<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[dissonances]]></title><description><![CDATA[Neuroscience, vision, machine learning. Also music, food, Muay Thai.]]></description><link>https://www.dissonances.blog</link><image><url>https://substackcdn.com/image/fetch/$s_!AM5T!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ca8745-e12f-4ac5-9a90-07989921e6d6_1280x1280.png</url><title>dissonances</title><link>https://www.dissonances.blog</link></image><generator>Substack</generator><lastBuildDate>Sat, 04 Apr 2026 23:30:13 GMT</lastBuildDate><atom:link href="https://www.dissonances.blog/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[galen]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[dissonances@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[dissonances@substack.com]]></itunes:email><itunes:name><![CDATA[galen]]></itunes:name></itunes:owner><itunes:author><![CDATA[galen]]></itunes:author><googleplay:owner><![CDATA[dissonances@substack.com]]></googleplay:owner><googleplay:email><![CDATA[dissonances@substack.com]]></googleplay:email><googleplay:author><![CDATA[galen]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Invariance, equivariance, and factorization]]></title><description><![CDATA[Strategies for scene understanding]]></description><link>https://www.dissonances.blog/p/invariance-equivariance-and-factorization</link><guid isPermaLink="false">https://www.dissonances.blog/p/invariance-equivariance-and-factorization</guid><dc:creator><![CDATA[galen]]></dc:creator><pubDate>Sat, 28 Feb 2026 23:53:37 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/71c587bd-2f1d-4498-88ad-7abf9fd06443_969x561.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I gave a guest lecture in the <a href="https://thomas9t.github.io/teaching/2026-01-01-eec289q/">Neurally Inspired Algorithms and Architectures</a> course at UC Davis; this is my attempt at putting into blog post form.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!638C!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6ab3a2-438e-431f-b866-3ce87a8c3536_2984x1502.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!638C!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6ab3a2-438e-431f-b866-3ce87a8c3536_2984x1502.png 424w, https://substackcdn.com/image/fetch/$s_!638C!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6ab3a2-438e-431f-b866-3ce87a8c3536_2984x1502.png 848w, https://substackcdn.com/image/fetch/$s_!638C!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6ab3a2-438e-431f-b866-3ce87a8c3536_2984x1502.png 1272w, https://substackcdn.com/image/fetch/$s_!638C!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6ab3a2-438e-431f-b866-3ce87a8c3536_2984x1502.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!638C!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6ab3a2-438e-431f-b866-3ce87a8c3536_2984x1502.png" width="1456" height="733" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f6ab3a2-438e-431f-b866-3ce87a8c3536_2984x1502.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:733,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:4097536,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.dissonances.blog/i/189087104?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6ab3a2-438e-431f-b866-3ce87a8c3536_2984x1502.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!638C!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6ab3a2-438e-431f-b866-3ce87a8c3536_2984x1502.png 424w, https://substackcdn.com/image/fetch/$s_!638C!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6ab3a2-438e-431f-b866-3ce87a8c3536_2984x1502.png 848w, https://substackcdn.com/image/fetch/$s_!638C!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6ab3a2-438e-431f-b866-3ce87a8c3536_2984x1502.png 1272w, https://substackcdn.com/image/fetch/$s_!638C!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6ab3a2-438e-431f-b866-3ce87a8c3536_2984x1502.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>What are the challenges in visual scene understanding? There&#8217;s a long list: occlusion, the presence of many objects, unfamiliar objects, reflections on surfaces, shadows, blur, etc. Due partially to research breakthroughs but mostly to a massive amount of money and resources, we have computer vision systems that can now perform some version of scene understanding for constrained tasks, such as self-driving cars and autonomous warehouse cart robots.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Z0av!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79db3d3-15dc-49dd-b1a8-04537c1bdaf8_3662x1566.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Z0av!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79db3d3-15dc-49dd-b1a8-04537c1bdaf8_3662x1566.png 424w, https://substackcdn.com/image/fetch/$s_!Z0av!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79db3d3-15dc-49dd-b1a8-04537c1bdaf8_3662x1566.png 848w, https://substackcdn.com/image/fetch/$s_!Z0av!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79db3d3-15dc-49dd-b1a8-04537c1bdaf8_3662x1566.png 1272w, https://substackcdn.com/image/fetch/$s_!Z0av!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79db3d3-15dc-49dd-b1a8-04537c1bdaf8_3662x1566.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Z0av!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79db3d3-15dc-49dd-b1a8-04537c1bdaf8_3662x1566.png" width="1456" height="623" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f79db3d3-15dc-49dd-b1a8-04537c1bdaf8_3662x1566.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:623,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:936499,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.dissonances.blog/i/189087104?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79db3d3-15dc-49dd-b1a8-04537c1bdaf8_3662x1566.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Z0av!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79db3d3-15dc-49dd-b1a8-04537c1bdaf8_3662x1566.png 424w, https://substackcdn.com/image/fetch/$s_!Z0av!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79db3d3-15dc-49dd-b1a8-04537c1bdaf8_3662x1566.png 848w, https://substackcdn.com/image/fetch/$s_!Z0av!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79db3d3-15dc-49dd-b1a8-04537c1bdaf8_3662x1566.png 1272w, https://substackcdn.com/image/fetch/$s_!Z0av!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79db3d3-15dc-49dd-b1a8-04537c1bdaf8_3662x1566.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Karimi-Rouzbahani et al. <a href="https://www.nature.com/articles/s41598-017-13756-8">2017</a>.</figcaption></figure></div><p>For now, let&#8217;s consider an even simpler problem: object recognition. Suppose you perform 3D transformations on three cars. For each resulting image, you ask someone which car is in the image. This feels like an easy task because it happens almost automatically for us. But consider that the pattern of light that hits a sensor is completely different for each image &#8212; there are often no pixels in common between two instances of the same object. Systems must both perform complex operations to transform these seemingly unrelated patterns of light into more abstract concepts that eventually map to recognition. </p><p>How do current ML/AI systems solve the problem? Deep learning-based computer vision, with mechanisms inspired by early neuroscience research, has had several breakthroughs in the past ~14 years, including convolutional neural networks, residual networks, and vision transformers. We know they work (where the definition of &#8220;work&#8221; is based on benchmarks and product usage), but it&#8217;s hard to claim that we understand <em>how</em> they work, especially as these models have gotten much more complex. And despite successes, there are still strange failures that indicate that something may be missing. </p><p>One way to talk about these failures is <em>excessive sensitivity &#8212; </em>when small, perceptually irrelevant changes affect model outputs &#8212; and <em>excessive invariance &#8212; </em>when large changes that should affect the model do not. Here, different frames in the same movie with very little perceptual difference cause a massive drop in the model&#8217;s probability of classifying an otter.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3G05!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f2eb74c-82ce-417a-8c98-f108f10601f5_1916x538.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3G05!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f2eb74c-82ce-417a-8c98-f108f10601f5_1916x538.png 424w, https://substackcdn.com/image/fetch/$s_!3G05!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f2eb74c-82ce-417a-8c98-f108f10601f5_1916x538.png 848w, https://substackcdn.com/image/fetch/$s_!3G05!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f2eb74c-82ce-417a-8c98-f108f10601f5_1916x538.png 1272w, https://substackcdn.com/image/fetch/$s_!3G05!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f2eb74c-82ce-417a-8c98-f108f10601f5_1916x538.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3G05!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f2eb74c-82ce-417a-8c98-f108f10601f5_1916x538.png" width="1456" height="409" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6f2eb74c-82ce-417a-8c98-f108f10601f5_1916x538.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:409,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:772839,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.dissonances.blog/i/189087104?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f2eb74c-82ce-417a-8c98-f108f10601f5_1916x538.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3G05!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f2eb74c-82ce-417a-8c98-f108f10601f5_1916x538.png 424w, https://substackcdn.com/image/fetch/$s_!3G05!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f2eb74c-82ce-417a-8c98-f108f10601f5_1916x538.png 848w, https://substackcdn.com/image/fetch/$s_!3G05!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f2eb74c-82ce-417a-8c98-f108f10601f5_1916x538.png 1272w, https://substackcdn.com/image/fetch/$s_!3G05!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f2eb74c-82ce-417a-8c98-f108f10601f5_1916x538.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Excessive sensitivity. Azulay &amp; Weiss <a href="https://arxiv.org/abs/1805.12177">2019</a>.</figcaption></figure></div><p>Here, despite massive perturbations of the image that render the image unrecognizable, the model still has high confidence of the correct class. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5UYA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dddb12e-9b19-47d6-881d-59e829d1d6a7_3332x1210.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5UYA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dddb12e-9b19-47d6-881d-59e829d1d6a7_3332x1210.png 424w, https://substackcdn.com/image/fetch/$s_!5UYA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dddb12e-9b19-47d6-881d-59e829d1d6a7_3332x1210.png 848w, https://substackcdn.com/image/fetch/$s_!5UYA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dddb12e-9b19-47d6-881d-59e829d1d6a7_3332x1210.png 1272w, https://substackcdn.com/image/fetch/$s_!5UYA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dddb12e-9b19-47d6-881d-59e829d1d6a7_3332x1210.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5UYA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dddb12e-9b19-47d6-881d-59e829d1d6a7_3332x1210.png" width="1456" height="529" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9dddb12e-9b19-47d6-881d-59e829d1d6a7_3332x1210.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:529,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2833107,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.dissonances.blog/i/189087104?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dddb12e-9b19-47d6-881d-59e829d1d6a7_3332x1210.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5UYA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dddb12e-9b19-47d6-881d-59e829d1d6a7_3332x1210.png 424w, https://substackcdn.com/image/fetch/$s_!5UYA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dddb12e-9b19-47d6-881d-59e829d1d6a7_3332x1210.png 848w, https://substackcdn.com/image/fetch/$s_!5UYA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dddb12e-9b19-47d6-881d-59e829d1d6a7_3332x1210.png 1272w, https://substackcdn.com/image/fetch/$s_!5UYA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dddb12e-9b19-47d6-881d-59e829d1d6a7_3332x1210.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Excessive invariance. Qin et al. <a href="https://arxiv.org/abs/2110.07858">2022</a>.</figcaption></figure></div><p>Although these papers are from a few years ago, if you use any current image or video models, I&#8217;m sure you&#8217;ve seen a lot of other strange failures as well. So what are these models missing? What properties would an ideal vision system (natural or artificial) have? (I posed these as discussion questions to the class; feel free to ponder or respond.)</p><p>Wouldn&#8217;t it be great if we could borrow concepts from something we know has robust object recognition abilities &#8212; the brain? TOO BAD! We don&#8217;t know how the brain does it &#129335;&#127995;&#8205;&#9792;&#65039;<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>. Okay, then let&#8217;s think a bit deeper. Suppose we were designing a system for object recognition from scratch: what would be good computational principles to incorporate? There are many answers of course, but in this post I&#8217;m going to focus on just a few principles: <em>invariance</em> and <em>equivariance</em>. And more generally, <em>factorization</em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>. </p><p>There are formal mathematical definitions for these terms, but for our purposes, I&#8217;m going to define them this way: A representation used for recognition should discard transformations irrelevant to object identity (<em>invariant </em>to transformations). For general scene understanding, there should also exist representations <em>equivariant</em> to the transformations, i.e. that change appropriately with the relevant transformation variable<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XgNU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4857081e-3621-4861-ae87-92ee295269ae_3108x1710.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XgNU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4857081e-3621-4861-ae87-92ee295269ae_3108x1710.png 424w, https://substackcdn.com/image/fetch/$s_!XgNU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4857081e-3621-4861-ae87-92ee295269ae_3108x1710.png 848w, https://substackcdn.com/image/fetch/$s_!XgNU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4857081e-3621-4861-ae87-92ee295269ae_3108x1710.png 1272w, https://substackcdn.com/image/fetch/$s_!XgNU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4857081e-3621-4861-ae87-92ee295269ae_3108x1710.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XgNU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4857081e-3621-4861-ae87-92ee295269ae_3108x1710.png" width="1456" height="801" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4857081e-3621-4861-ae87-92ee295269ae_3108x1710.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:801,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:573615,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.dissonances.blog/i/189087104?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4857081e-3621-4861-ae87-92ee295269ae_3108x1710.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!XgNU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4857081e-3621-4861-ae87-92ee295269ae_3108x1710.png 424w, https://substackcdn.com/image/fetch/$s_!XgNU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4857081e-3621-4861-ae87-92ee295269ae_3108x1710.png 848w, https://substackcdn.com/image/fetch/$s_!XgNU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4857081e-3621-4861-ae87-92ee295269ae_3108x1710.png 1272w, https://substackcdn.com/image/fetch/$s_!XgNU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4857081e-3621-4861-ae87-92ee295269ae_3108x1710.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://medium.com/@weichenpai/invariance-v-s-equivariance-in-computer-vision-ede663ee9a35">Nick Pai</a></figcaption></figure></div><p>On the left, scaling the cat still gets you the cat label, with information about the scaling thrown out. The representation of the cat is invariant to the scaling transform. On the right, scaling gets you a representation that changes along with the scaling of the input; it is equivariant with scaling. Another example of an equivariant representation would be any type of slider in a UI: the position along the bar represents some other relevant variable, e.g. the volume bar on your computer.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lCVH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f869b49-8d73-4e4b-aea7-5903ec604fda_1720x1772.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lCVH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f869b49-8d73-4e4b-aea7-5903ec604fda_1720x1772.png 424w, https://substackcdn.com/image/fetch/$s_!lCVH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f869b49-8d73-4e4b-aea7-5903ec604fda_1720x1772.png 848w, https://substackcdn.com/image/fetch/$s_!lCVH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f869b49-8d73-4e4b-aea7-5903ec604fda_1720x1772.png 1272w, https://substackcdn.com/image/fetch/$s_!lCVH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f869b49-8d73-4e4b-aea7-5903ec604fda_1720x1772.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lCVH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f869b49-8d73-4e4b-aea7-5903ec604fda_1720x1772.png" width="512" height="527.4725274725274" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8f869b49-8d73-4e4b-aea7-5903ec604fda_1720x1772.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1500,&quot;width&quot;:1456,&quot;resizeWidth&quot;:512,&quot;bytes&quot;:310967,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.dissonances.blog/i/189087104?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f869b49-8d73-4e4b-aea7-5903ec604fda_1720x1772.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lCVH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f869b49-8d73-4e4b-aea7-5903ec604fda_1720x1772.png 424w, https://substackcdn.com/image/fetch/$s_!lCVH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f869b49-8d73-4e4b-aea7-5903ec604fda_1720x1772.png 848w, https://substackcdn.com/image/fetch/$s_!lCVH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f869b49-8d73-4e4b-aea7-5903ec604fda_1720x1772.png 1272w, https://substackcdn.com/image/fetch/$s_!lCVH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f869b49-8d73-4e4b-aea7-5903ec604fda_1720x1772.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Factorization. Adelson &amp; Pentland <a href="https://persci.mit.edu/pub_pdfs/shading96.pdf">1996</a>. </figcaption></figure></div><p><em>Factorization</em> is the process of disentangling relevant factors into explicit representations. Here, an image can be factorized into reflectance &#8212; the properties of the object surface &#8212; and shading. If you were performing pattern recognition, it would be useful to have the reflectance image, separate from the shading. But if you wanted to understand a general scene, for example, where the light source is, knowing the shading information is necessary. Even though edge 1 and edge 2 have identical pixel values, we know the causes of these values are due to different factors. The brain is clearly doing some kind of factorization.</p><p>This example is simple, but many problems in perception can be framed as factorization, such as identifying someone&#8217;s voice in a loud room while understanding what they&#8217;re saying, or knowing how an object is oriented in order to grab it<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a>. </p><p>Now that I&#8217;ve introduced factorization at a high level, I&#8217;ll focus in on an example of low-level factorization with invariant and equivariant representations in a model: complex-valued sparse coding. My previous blog post has an <a href="https://www.dissonances.blog/i/150816353/sparse-coding">intro</a> to regular sparse coding, but here&#8217;s a quick summary.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PXtv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41dce60b-f860-465b-9405-dec505d1799c_3364x1206.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PXtv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41dce60b-f860-465b-9405-dec505d1799c_3364x1206.png 424w, https://substackcdn.com/image/fetch/$s_!PXtv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41dce60b-f860-465b-9405-dec505d1799c_3364x1206.png 848w, https://substackcdn.com/image/fetch/$s_!PXtv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41dce60b-f860-465b-9405-dec505d1799c_3364x1206.png 1272w, https://substackcdn.com/image/fetch/$s_!PXtv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41dce60b-f860-465b-9405-dec505d1799c_3364x1206.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PXtv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41dce60b-f860-465b-9405-dec505d1799c_3364x1206.png" width="1456" height="522" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/41dce60b-f860-465b-9405-dec505d1799c_3364x1206.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:522,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:506439,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.dissonances.blog/i/189087104?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41dce60b-f860-465b-9405-dec505d1799c_3364x1206.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PXtv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41dce60b-f860-465b-9405-dec505d1799c_3364x1206.png 424w, https://substackcdn.com/image/fetch/$s_!PXtv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41dce60b-f860-465b-9405-dec505d1799c_3364x1206.png 848w, https://substackcdn.com/image/fetch/$s_!PXtv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41dce60b-f860-465b-9405-dec505d1799c_3364x1206.png 1272w, https://substackcdn.com/image/fetch/$s_!PXtv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41dce60b-f860-465b-9405-dec505d1799c_3364x1206.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!83MQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa267dd0-f78d-46f6-bba5-758d42f5bf69_1280x343.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!83MQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa267dd0-f78d-46f6-bba5-758d42f5bf69_1280x343.png 424w, https://substackcdn.com/image/fetch/$s_!83MQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa267dd0-f78d-46f6-bba5-758d42f5bf69_1280x343.png 848w, https://substackcdn.com/image/fetch/$s_!83MQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa267dd0-f78d-46f6-bba5-758d42f5bf69_1280x343.png 1272w, https://substackcdn.com/image/fetch/$s_!83MQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa267dd0-f78d-46f6-bba5-758d42f5bf69_1280x343.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!83MQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa267dd0-f78d-46f6-bba5-758d42f5bf69_1280x343.png" width="410" height="109.8671875" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aa267dd0-f78d-46f6-bba5-758d42f5bf69_1280x343.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:343,&quot;width&quot;:1280,&quot;resizeWidth&quot;:410,&quot;bytes&quot;:89902,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.dissonances.blog/i/189087104?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa267dd0-f78d-46f6-bba5-758d42f5bf69_1280x343.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!83MQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa267dd0-f78d-46f6-bba5-758d42f5bf69_1280x343.png 424w, https://substackcdn.com/image/fetch/$s_!83MQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa267dd0-f78d-46f6-bba5-758d42f5bf69_1280x343.png 848w, https://substackcdn.com/image/fetch/$s_!83MQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa267dd0-f78d-46f6-bba5-758d42f5bf69_1280x343.png 1272w, https://substackcdn.com/image/fetch/$s_!83MQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa267dd0-f78d-46f6-bba5-758d42f5bf69_1280x343.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Given a set of images <em>X</em>, the goal of sparse coding is to learn a set of basis functions <em>A</em> (each corresponding to a unit) that can be linearly combined to reconstruct the images. The key is that the coefficients <em>s</em> of the linear combination should be sparse, i.e. mostly zeros. We learn an <em>A </em>for the whole dataset and infer an <em>s </em>for each image by minimizing <em>E</em> with respect to the appropriate variable. <em>s</em> is sparse, and <em>A</em> ends up looking like oriented, bandpass, localized filters (Olshausen &amp; Field <a href="https://www.nature.com/articles/381607a0">1996</a>). </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dl9E!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff51db686-913d-415a-8e7d-ebd91c8850be_1768x687.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dl9E!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff51db686-913d-415a-8e7d-ebd91c8850be_1768x687.png 424w, https://substackcdn.com/image/fetch/$s_!dl9E!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff51db686-913d-415a-8e7d-ebd91c8850be_1768x687.png 848w, https://substackcdn.com/image/fetch/$s_!dl9E!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff51db686-913d-415a-8e7d-ebd91c8850be_1768x687.png 1272w, https://substackcdn.com/image/fetch/$s_!dl9E!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff51db686-913d-415a-8e7d-ebd91c8850be_1768x687.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dl9E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff51db686-913d-415a-8e7d-ebd91c8850be_1768x687.png" width="494" height="191.9558823529412" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f51db686-913d-415a-8e7d-ebd91c8850be_1768x687.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:687,&quot;width&quot;:1768,&quot;resizeWidth&quot;:494,&quot;bytes&quot;:583664,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.dissonances.blog/i/189087104?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd86fc8fc-e4a6-4e52-863a-0049ea8333d1_1258x1768.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dl9E!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff51db686-913d-415a-8e7d-ebd91c8850be_1768x687.png 424w, https://substackcdn.com/image/fetch/$s_!dl9E!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff51db686-913d-415a-8e7d-ebd91c8850be_1768x687.png 848w, https://substackcdn.com/image/fetch/$s_!dl9E!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff51db686-913d-415a-8e7d-ebd91c8850be_1768x687.png 1272w, https://substackcdn.com/image/fetch/$s_!dl9E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff51db686-913d-415a-8e7d-ebd91c8850be_1768x687.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">A few example basis functions.</figcaption></figure></div><p>There&#8217;s a slight problem with standard sparse coding, however, which is that patterns are entangled with transformations. Here, I&#8217;m showing how the sparse code in orange changes with a shifting input pattern.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!e6iQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9918ba53-69a2-44a6-8877-421c09645a58_2908x1000.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!e6iQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9918ba53-69a2-44a6-8877-421c09645a58_2908x1000.gif 424w, https://substackcdn.com/image/fetch/$s_!e6iQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9918ba53-69a2-44a6-8877-421c09645a58_2908x1000.gif 848w, https://substackcdn.com/image/fetch/$s_!e6iQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9918ba53-69a2-44a6-8877-421c09645a58_2908x1000.gif 1272w, https://substackcdn.com/image/fetch/$s_!e6iQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9918ba53-69a2-44a6-8877-421c09645a58_2908x1000.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!e6iQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9918ba53-69a2-44a6-8877-421c09645a58_2908x1000.gif" width="1456" height="501" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9918ba53-69a2-44a6-8877-421c09645a58_2908x1000.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:501,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:802227,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.dissonances.blog/i/189087104?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9918ba53-69a2-44a6-8877-421c09645a58_2908x1000.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!e6iQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9918ba53-69a2-44a6-8877-421c09645a58_2908x1000.gif 424w, https://substackcdn.com/image/fetch/$s_!e6iQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9918ba53-69a2-44a6-8877-421c09645a58_2908x1000.gif 848w, https://substackcdn.com/image/fetch/$s_!e6iQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9918ba53-69a2-44a6-8877-421c09645a58_2908x1000.gif 1272w, https://substackcdn.com/image/fetch/$s_!e6iQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9918ba53-69a2-44a6-8877-421c09645a58_2908x1000.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The representation of the image, the sparse code, is changing quite a lot with each frame. You and I can see easily that a static pattern is being shifted vertically. But if all you saw was this sparse code, a set of neurons firing, it would be impossible to tell whether the changes in the sparse code were caused by the pattern itself changing, a transformation to the pattern, or a combination of both. What might be a better representation that makes the pattern and the transform explicit?</p><p>Let&#8217;s look at complex-valued sparse coding for movies, described in Cadieu &amp; Olshausen <a href="https://www.rctn.org/bruno/papers/cadieu-olshausen-nc12.pdf">2012</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a>, as an example of factorization.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GzKA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05f39031-3bb9-457b-b9af-340e44e0a82b_3686x1768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GzKA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05f39031-3bb9-457b-b9af-340e44e0a82b_3686x1768.png 424w, https://substackcdn.com/image/fetch/$s_!GzKA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05f39031-3bb9-457b-b9af-340e44e0a82b_3686x1768.png 848w, https://substackcdn.com/image/fetch/$s_!GzKA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05f39031-3bb9-457b-b9af-340e44e0a82b_3686x1768.png 1272w, https://substackcdn.com/image/fetch/$s_!GzKA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05f39031-3bb9-457b-b9af-340e44e0a82b_3686x1768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GzKA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05f39031-3bb9-457b-b9af-340e44e0a82b_3686x1768.png" width="1456" height="698" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/05f39031-3bb9-457b-b9af-340e44e0a82b_3686x1768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:698,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:627829,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.dissonances.blog/i/189087104?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05f39031-3bb9-457b-b9af-340e44e0a82b_3686x1768.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GzKA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05f39031-3bb9-457b-b9af-340e44e0a82b_3686x1768.png 424w, https://substackcdn.com/image/fetch/$s_!GzKA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05f39031-3bb9-457b-b9af-340e44e0a82b_3686x1768.png 848w, https://substackcdn.com/image/fetch/$s_!GzKA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05f39031-3bb9-457b-b9af-340e44e0a82b_3686x1768.png 1272w, https://substackcdn.com/image/fetch/$s_!GzKA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05f39031-3bb9-457b-b9af-340e44e0a82b_3686x1768.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>It has the same core algorithm as sparse coding, but the basis functions are now complex-valued. While the <em>s</em> variable is still responsible for the amount of the feature present and is encouraged to be sparse, the phase variable <em>&#966;</em> is responsible for interpolating between the basis functions, as you can see in the generative model equation above. Put another way, you can steer the exact appearance of the basis function in the reconstruction using <em>&#966;</em>. </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iIEz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5667039-37c6-418d-9e27-27f347fad6ec_1702x580.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iIEz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5667039-37c6-418d-9e27-27f347fad6ec_1702x580.png 424w, https://substackcdn.com/image/fetch/$s_!iIEz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5667039-37c6-418d-9e27-27f347fad6ec_1702x580.png 848w, https://substackcdn.com/image/fetch/$s_!iIEz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5667039-37c6-418d-9e27-27f347fad6ec_1702x580.png 1272w, https://substackcdn.com/image/fetch/$s_!iIEz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5667039-37c6-418d-9e27-27f347fad6ec_1702x580.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iIEz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5667039-37c6-418d-9e27-27f347fad6ec_1702x580.png" width="608" height="207.12087912087912" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e5667039-37c6-418d-9e27-27f347fad6ec_1702x580.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:496,&quot;width&quot;:1456,&quot;resizeWidth&quot;:608,&quot;bytes&quot;:160796,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.dissonances.blog/i/189087104?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5667039-37c6-418d-9e27-27f347fad6ec_1702x580.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iIEz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5667039-37c6-418d-9e27-27f347fad6ec_1702x580.png 424w, https://substackcdn.com/image/fetch/$s_!iIEz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5667039-37c6-418d-9e27-27f347fad6ec_1702x580.png 848w, https://substackcdn.com/image/fetch/$s_!iIEz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5667039-37c6-418d-9e27-27f347fad6ec_1702x580.png 1272w, https://substackcdn.com/image/fetch/$s_!iIEz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5667039-37c6-418d-9e27-27f347fad6ec_1702x580.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The energy function to be minimized is<em> </em>almost the same as regular sparse coding, with an extra term that encourages <em>s</em> to be similar between frames. This follows the slowness principle<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a> which says that because of smoothness in the world, i.e. things don&#8217;t change suddenly, representations in neighboring frames should be similar to each other. The authors end up with pairs of receptive fields (each pair is the real and imaginary component of one unit) like the ones below, that vary only in phase.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-M2K!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b2c609-254c-4f20-99b7-8ce863c7bc22_2064x794.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-M2K!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b2c609-254c-4f20-99b7-8ce863c7bc22_2064x794.png 424w, https://substackcdn.com/image/fetch/$s_!-M2K!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b2c609-254c-4f20-99b7-8ce863c7bc22_2064x794.png 848w, https://substackcdn.com/image/fetch/$s_!-M2K!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b2c609-254c-4f20-99b7-8ce863c7bc22_2064x794.png 1272w, https://substackcdn.com/image/fetch/$s_!-M2K!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b2c609-254c-4f20-99b7-8ce863c7bc22_2064x794.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-M2K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b2c609-254c-4f20-99b7-8ce863c7bc22_2064x794.png" width="1456" height="560" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f9b2c609-254c-4f20-99b7-8ce863c7bc22_2064x794.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:560,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:794819,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.dissonances.blog/i/189087104?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b2c609-254c-4f20-99b7-8ce863c7bc22_2064x794.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-M2K!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b2c609-254c-4f20-99b7-8ce863c7bc22_2064x794.png 424w, https://substackcdn.com/image/fetch/$s_!-M2K!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b2c609-254c-4f20-99b7-8ce863c7bc22_2064x794.png 848w, https://substackcdn.com/image/fetch/$s_!-M2K!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b2c609-254c-4f20-99b7-8ce863c7bc22_2064x794.png 1272w, https://substackcdn.com/image/fetch/$s_!-M2K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b2c609-254c-4f20-99b7-8ce863c7bc22_2064x794.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Cadieu &amp; Olshausen <a href="https://www.rctn.org/bruno/papers/cadieu-olshausen-nc12.pdf">2012</a>.</figcaption></figure></div><p>If you animate them, i.e. apply the generative model above for a unit turned on and fixing the amplitude but varying the phase, you get this. This shows the range of possible features that can be expressed by each unit.</p><div id="vimeo-25522341" class="vimeo-wrap" data-attrs="{&quot;videoId&quot;:&quot;25522341&quot;,&quot;videoKey&quot;:&quot;&quot;,&quot;belowTheFold&quot;:true}" data-component-name="VimeoToDOM"><div class="vimeo-inner"><iframe src="https://player.vimeo.com/video/25522341?autoplay=0" frameborder="0" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" loading="lazy"></iframe></div></div><p>So what does this have to do with factorization? How would this representation allow us to disentangle the pattern from the transform in the example earlier? A key insight in this model is that because of the sparsity and slowness penalties on the amplitudes, representations of transformation are conveyed phases, which can spin freely at each frame. Amplitudes stay relatively stable to incur less cost in the objective function. Here, I&#8217;m using the same video but showing the complex-valued sparse coding representation. Orange are the amplitudes, purple is the phase structure of the pattern, and green is the change in phase at each step.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sxqC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a76c7e6-6ebd-4e84-807c-384941cf2229_4339x1400.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sxqC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a76c7e6-6ebd-4e84-807c-384941cf2229_4339x1400.gif 424w, https://substackcdn.com/image/fetch/$s_!sxqC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a76c7e6-6ebd-4e84-807c-384941cf2229_4339x1400.gif 848w, https://substackcdn.com/image/fetch/$s_!sxqC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a76c7e6-6ebd-4e84-807c-384941cf2229_4339x1400.gif 1272w, https://substackcdn.com/image/fetch/$s_!sxqC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a76c7e6-6ebd-4e84-807c-384941cf2229_4339x1400.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sxqC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a76c7e6-6ebd-4e84-807c-384941cf2229_4339x1400.gif" width="1456" height="470" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4a76c7e6-6ebd-4e84-807c-384941cf2229_4339x1400.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:470,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:4461829,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.dissonances.blog/i/189087104?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a76c7e6-6ebd-4e84-807c-384941cf2229_4339x1400.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sxqC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a76c7e6-6ebd-4e84-807c-384941cf2229_4339x1400.gif 424w, https://substackcdn.com/image/fetch/$s_!sxqC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a76c7e6-6ebd-4e84-807c-384941cf2229_4339x1400.gif 848w, https://substackcdn.com/image/fetch/$s_!sxqC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a76c7e6-6ebd-4e84-807c-384941cf2229_4339x1400.gif 1272w, https://substackcdn.com/image/fetch/$s_!sxqC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a76c7e6-6ebd-4e84-807c-384941cf2229_4339x1400.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1SQQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0dde5505-64be-40e5-a76c-851ef680e47d_1524x540.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1SQQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0dde5505-64be-40e5-a76c-851ef680e47d_1524x540.png 424w, https://substackcdn.com/image/fetch/$s_!1SQQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0dde5505-64be-40e5-a76c-851ef680e47d_1524x540.png 848w, https://substackcdn.com/image/fetch/$s_!1SQQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0dde5505-64be-40e5-a76c-851ef680e47d_1524x540.png 1272w, https://substackcdn.com/image/fetch/$s_!1SQQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0dde5505-64be-40e5-a76c-851ef680e47d_1524x540.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1SQQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0dde5505-64be-40e5-a76c-851ef680e47d_1524x540.png" width="396" height="140.34065934065933" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0dde5505-64be-40e5-a76c-851ef680e47d_1524x540.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:516,&quot;width&quot;:1456,&quot;resizeWidth&quot;:396,&quot;bytes&quot;:157447,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.dissonances.blog/i/189087104?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0dde5505-64be-40e5-a76c-851ef680e47d_1524x540.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1SQQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0dde5505-64be-40e5-a76c-851ef680e47d_1524x540.png 424w, https://substackcdn.com/image/fetch/$s_!1SQQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0dde5505-64be-40e5-a76c-851ef680e47d_1524x540.png 848w, https://substackcdn.com/image/fetch/$s_!1SQQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0dde5505-64be-40e5-a76c-851ef680e47d_1524x540.png 1272w, https://substackcdn.com/image/fetch/$s_!1SQQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0dde5505-64be-40e5-a76c-851ef680e47d_1524x540.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>I hope you can see that the information is factorized into two parts: the complex-valued pattern <em>se</em>^{<em>j&#966;</em>} (orange and purple) whose amplitudes <em>s </em>and phases <em>&#966;</em> are pretty much constant over time, and the transformation (green) represented by phase shift &#948;. For this particular transformation, applying local vertical shift does not affect the invariant representation, and the amount of shift is specified by the amount of &#948; applied &#8212;  an equivariant representation.</p><p>(BTW, I&#8217;m not explaining well what about amplitude and phase allows this to work, and I&#8217;m actually skipping a portion of the lecture about the importance of phase in images, but this post got too long. I&#8217;m planning to write a separate post(s) about phase.)</p><p>Furthermore, we can combine patterns and transforms to generalize to novel image sequences. For example, given the complex representation of an unseen pattern, you could apply the appropriate &#948; to shift it vertically. You can also understand novel sequences: given a known pattern that has been transformed in novel way, you should be able to recover the transform being applied to it, and then apply it to other images. Pretty neat!</p><p>Here are example of other transformations, or other &#948; configurations that can be learned from videos. </p><div id="vimeo-25259227" class="vimeo-wrap" data-attrs="{&quot;videoId&quot;:&quot;25259227&quot;,&quot;videoKey&quot;:&quot;&quot;,&quot;belowTheFold&quot;:true}" data-component-name="VimeoToDOM"><div class="vimeo-inner"><iframe src="https://player.vimeo.com/video/25259227?autoplay=0" frameborder="0" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" loading="lazy"></iframe></div></div><div id="vimeo-25259206" class="vimeo-wrap" data-attrs="{&quot;videoId&quot;:&quot;25259206&quot;,&quot;videoKey&quot;:&quot;&quot;,&quot;belowTheFold&quot;:true}" data-component-name="VimeoToDOM"><div class="vimeo-inner"><iframe src="https://player.vimeo.com/video/25259206?autoplay=0" frameborder="0" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" loading="lazy"></iframe></div></div><p>The main themes of the lecture were discussing challenges and failures in computer vision, factorization into invariant and equivariant parts as a computational strategy, and complex-valued sparse coding as an example of factorization in a theoretical model of early visual cortex. The subtext of the lecture, however, was that although we live in a society dominated by a very specific type of statistical learning, it is not flawless, and it is not the only way to do things. Although we don&#8217;t understand how the brain solves these problems, I think it&#8217;s still important to think about fundamental principles of computation for both understanding natural systems and building artificial systems. Maybe we&#8217;re wrong: factorization is not how the brain does things, and maybe it&#8217;s not the best design for an artificial system. But at least we&#8217;ve started to understand the nature of these problems, rather than just throwing data at them<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a>.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>We have many, many studies on the neural correlates of vision in many parts of the brain. But what are the necessary and sufficient computational principles and algorithms?</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>I&#8217;m not claiming these properties are sufficient for a robust vision system, but many of the failures of AI indicate that models cannot factorize correctly, e.g. the otter example.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>After the lecture, someone said they didn&#8217;t understand why equivariance was important. First, while we can recognize objects independent of their transforms, we also simultaneously know their other properties: where they are, how far they are, what color, etc.; we&#8217;re not just throwing out all non-invariant information. But the bigger question: Why should we need an explicit representation if we can just decode the equivariant component from the inputs or mid-level representations? I could probably write a whole post about this, but my short argument is: a representation is <em>for</em> something, i.e. some downstream process that should not have to decode, because its job is to perform more complex operations on this explicit representation. All the information you need is indeed the input &#8212; invariant and equivariant parts &#8212; but it&#8217;s entangled. It needs to be transformed into a format that is useful for some task or computation. You may have equivariances earlier in your network, like in this example, or only later, when you need to perform some task, but they must be present somewhere to make sense of the raw data. A reasonable hypothesis is that there are equivariances all throughout the processing stream.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>A nice paper with clear examples is Tenenbaum &amp; Freeman <a href="https://www.cs.cmu.edu/~efros/courses/LBMV07/Papers/tennebaum-neuralcomp-00.pdf">2000</a>, who frame it as separating style and content.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p>Other similar work: Hyv&#228;rinen &amp; Hoyer <a href="https://pubmed.ncbi.nlm.nih.gov/10935923/">2000</a>, Paiton et al. <a href="https://redwood.berkeley.edu/wp-content/uploads/2020/05/paiton2020subspace.pdf">2020</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-6" href="#footnote-anchor-6" class="footnote-number" contenteditable="false" target="_self">6</a><div class="footnote-content"><p>See Wiskott &amp; Sejnowski <a href="https://www.cnbc.cmu.edu/~tai/readings/learning/wiskott_sejnowski_2002.pdf">2002</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-7" href="#footnote-anchor-7" class="footnote-number" contenteditable="false" target="_self">7</a><div class="footnote-content"><p>And also, we all had a good time! Right? &#128512;</p></div></div>]]></content:encoded></item><item><title><![CDATA[Neuroscience as intuition]]></title><description><![CDATA[A reflection 1.5 years after my first blog post]]></description><link>https://www.dissonances.blog/p/neuroscience-as-intuition</link><guid isPermaLink="false">https://www.dissonances.blog/p/neuroscience-as-intuition</guid><dc:creator><![CDATA[galen]]></dc:creator><pubDate>Thu, 01 May 2025 09:00:49 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!B3ok!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e243434-9861-4720-9bb4-b257897d15b1_653x317.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Hello, I&#8217;m back after a semester off from blogging! I have a plan for upcoming &#10024;science&#10024; posts, but in the meantime, my buddy <a href="https://substack.com/@jamesluckey">Luckey</a> invited me to submit to the <a href="https://bipoc.substack.com/">Unlocked</a> series. I&#8217;m using it as an opportunity to write a personal reflection I&#8217;ve been putting off for a while.</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!B3ok!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e243434-9861-4720-9bb4-b257897d15b1_653x317.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!B3ok!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e243434-9861-4720-9bb4-b257897d15b1_653x317.png 424w, https://substackcdn.com/image/fetch/$s_!B3ok!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e243434-9861-4720-9bb4-b257897d15b1_653x317.png 848w, https://substackcdn.com/image/fetch/$s_!B3ok!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e243434-9861-4720-9bb4-b257897d15b1_653x317.png 1272w, https://substackcdn.com/image/fetch/$s_!B3ok!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e243434-9861-4720-9bb4-b257897d15b1_653x317.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!B3ok!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e243434-9861-4720-9bb4-b257897d15b1_653x317.png" width="653" height="317" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6e243434-9861-4720-9bb4-b257897d15b1_653x317.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:317,&quot;width&quot;:653,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:29220,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.dissonances.blog/i/162486873?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e243434-9861-4720-9bb4-b257897d15b1_653x317.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!B3ok!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e243434-9861-4720-9bb4-b257897d15b1_653x317.png 424w, https://substackcdn.com/image/fetch/$s_!B3ok!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e243434-9861-4720-9bb4-b257897d15b1_653x317.png 848w, https://substackcdn.com/image/fetch/$s_!B3ok!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e243434-9861-4720-9bb4-b257897d15b1_653x317.png 1272w, https://substackcdn.com/image/fetch/$s_!B3ok!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e243434-9861-4720-9bb4-b257897d15b1_653x317.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A friend&#8217;s attempt to summarize my research.</figcaption></figure></div><p>I wrote my first blog <a href="https://www.dissonances.blog/p/neuroscience-as-religion">post</a> during my transition from computer science to neuroscience in my PhD. At the time, neuroscience felt <em>religious</em> to me, and I struggled to understand how neuroscientists often have such immutable convictions in the face of so much conflicting yet reputable evidence<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>. </p><p>Even in computational neuroscience, which appeared more concrete to me than experimental neuroscience, no one really agrees on anything. Unlike machine learning models, it is far less clear what it means for a model of the brain to be &#8220;useful&#8221;<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>. Should the goal be to fit to recorded neural data? Even if a model predicted spikes with perfectly, would we understood the brain any better? On the other hand, if we had a principled model that did not fit data as well, would that be useful? One could go around in circles forever arguing like this.</p><p>Further contributing to my confusion was the fact that I had not yet mapped out the literature and history of the field for myself. I didn&#8217;t know what was obvious or accepted, even from my lab&#8217;s point of view. I certainly wasn&#8217;t ready to form my own beliefs, and as a result, didn&#8217;t have a good idea of the research questions I was interested in. I wrote the first blog post with the naive hope that verbalizing my lack of clarity about the field would help me make more sense of everything.</p><p>1.5 years later, I am only slightly less naive and only making a little more sense. The biggest change is simply that I have spent much more time reading, talking, writing, and thinking about the brain. Just like practicing an instrument, playing a sport, or learning a language, I feel myself starting to develop proficiency in this new skill of&#8230; neuroscience? Let me explain what I mean.</p><p>In the past, questions during presentations or even meetings would often send me into a panic. They didn&#8217;t have to be particularly hard questions, just ones I hadn&#8217;t yet thought too much about. Attempting to answer involved straining through complex logic, or tortuously sifting through figures and equations in my head. I could not understand how people were able to answer hard questions on the fly, or look at a plot and immediately understand what was going on. It was like they were fluent in a language, and all I could do was string together broken phrases. Was I just too stupid to be doing this?<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a></p><p>Through a slow and agonizing process of pushing my research forward and preparing for my qualifying exam, I managed to start orienting myself. I won&#8217;t go through the gory details, but I treated it like how I used to practice violin, or prepare for coding interviews in college. I&#8217;m sure everyone&#8217;s process is different. But as a result, I&#8217;ve started to feel the freedom of moving through a new world, truly like developing fluency in a language. I am more comfortable thinking on my feet, as if concepts are flowing around me, and I just need to grab what&#8217;s already there. I don&#8217;t have to think so hard all the time.</p><p>In other words, I have started forming my <em>intuitions</em> about neuroscience, or at least the subfield I&#8217;m focusing on now. For example, someone may ask a confusing question about my project, and I can immediately understand their underlying misconception. Or someone brings up an idea, and a simulation I could run with my model will pop into my head. These are things I couldn&#8217;t do before, at least not immediately, through reasoning alone.</p><p>A lot of this might seem obvious, and I feel a bit silly writing some of this down. But the reason this feels so profound for me is that I have never experienced this in an academic setting. In undergrad and before grad school, I kept hopping around different disciplines and labs to figure out what I wanted to do. I realized that finally, now at the end of my 4th year, this is the longest I&#8217;ve ever spent in one field. I am maybe starting to become an expert in something, for the first time? </p><p>I can start to see now that after decades of being in a field, a scientist&#8217;s intuition might look a lot like what I called religion, from the outside. Their intuition lets them <em>feel</em> that this problem is a good problem, that this approach is the right one. Even if there is evidence that seems to contradict it. Intuition stems from deep understanding, honed from decades of training. Although it may have started there, it goes beyond rational, quantitative scientific thinking.</p><p>In <em><a href="https://yalebooks.yale.edu/book/9780300270884/mathematica/">Mathematica</a></em>, David Bessis argues that contrary to popular belief, mathematical ability is not an intrinsic gift certain people are born with. Rather, it is about developing intuitions in your own way, driven by the desire to understand. Although we&#8217;re traditionally taught that math is symbols on a page, that&#8217;s just one way to communicate intuition. You could also think about math in terms of of something we all have strong intuitions for, such as the physical world. Terence Tao famously rolled on the floor to think about a problem:</p><blockquote><p>Early in his career, he struggled with a problem that involved waves rotating on top of one another. He wanted to come up with a moving coordinate system that would make things easier to see, something like a virtual Steadi&#173;cam. So he lay down on the floor and rolled back and forth, trying to see it in his mind&#8217;s eye. &#8216;&#8216;My aunt caught me doing this,&#8217;&#8217; Tao told me, laughing, &#8216;&#8216;and I couldn&#8217;t explain what I was doing.&#8217;&#8217; (<a href="https://www.nytimes.com/2015/07/26/magazine/the-singular-mind-of-terry-tao.html?unlocked_article_code=1.D08.dHCX.EN-u6zJb7VTC&amp;smid=url-share">NYT</a>)<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a></p></blockquote><p>There is something very profound about human intuition, and scientists clearly rely on it to guide them. What would science look like without intuition? Unfortunately, understanding intuition itself is a hard problem, certainly harder than next-token prediction (does AI have intuition?). Regardless, it&#8217;s part of what makes us human, and more interesting and beautiful than a reasoning machine could ever be.</p><p>Let me connect this back to my original point. Similar to religion, intuition is separable from logic and reasoning. Perhaps someone&#8217;s intuition is so strong that no evidence they&#8217;ve seen so far can convince them otherwise. But ideally, unlike in religion, we learn something when we&#8217;re proven wrong. It deepens our understanding, and we modify the intuition accordingly. When someone&#8217;s intuition is correct, it may lead to discoveries that would have taken orders of magnitude longer through reasoning.</p><p>So for now, I guess I&#8217;d revise my opinion from <em>neuroscience as religion </em>to the less extreme <em>neuroscience as intuition</em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a>. Through my own attempts to grow as a scientist and seeing others&#8217; processes, I&#8217;m realizing how important intuition is in science, and how I might go about developing my own. Maybe these convictions that I see in neuroscientists aren&#8217;t as bizarre as they initially seemed. Maybe I will be there too, one day (for better or worse).</p><p>This is still just the beginning for me, of course. I still don&#8217;t feel comfortable calling myself a neuroscientist (maybe I never will) or a vision scientist (my department, technically), but I&#8217;m also definitely not a computer scientist. Whatever I may be, my focus now is not to form beliefs, but to hone my intuition. I guess, until I find a better reframing by the next reflection post.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>One concrete example is the fundamental <a href="https://www.sas.upenn.edu/psych/rust-lab/publications/inpraiseofartifice.pdf">debate</a> between using artificial versus natural stimuli to characterize the visual system. I think we are trending toward natural(istic) stimuli as a field, but there are still well-respected scientists on either side!</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>I suspect this statement could get me in trouble with ML people &#129763;, but that&#8217;s another conversation.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>I don&#8217;t know, jury&#8217;s really still out on this one.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>He wrote about it more <a href="https://mathstodon.xyz/@tao/113465889558324816">here</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p>More cynically, you could also call it <em>neuroscience as</em> <em>vibes</em>. But <a href="https://en.wikipedia.org/wiki/Vibe_coding">everyone&#8217;s into vibes</a> these days, so maybe there&#8217;s no problem with that.</p><p></p></div></div>]]></content:encoded></item><item><title><![CDATA[Wrapping up Neural Computation]]></title><description><![CDATA[Sprinting through special topics, and a reflection]]></description><link>https://www.dissonances.blog/p/wrapping-up-neural-computation</link><guid isPermaLink="false">https://www.dissonances.blog/p/wrapping-up-neural-computation</guid><dc:creator><![CDATA[galen]]></dc:creator><pubDate>Tue, 31 Dec 2024 20:19:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!oZMd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c78d3bd-5c36-4dbe-ae7a-287334829311_1558x314.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oZMd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c78d3bd-5c36-4dbe-ae7a-287334829311_1558x314.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oZMd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c78d3bd-5c36-4dbe-ae7a-287334829311_1558x314.png 424w, https://substackcdn.com/image/fetch/$s_!oZMd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c78d3bd-5c36-4dbe-ae7a-287334829311_1558x314.png 848w, https://substackcdn.com/image/fetch/$s_!oZMd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c78d3bd-5c36-4dbe-ae7a-287334829311_1558x314.png 1272w, https://substackcdn.com/image/fetch/$s_!oZMd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c78d3bd-5c36-4dbe-ae7a-287334829311_1558x314.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oZMd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c78d3bd-5c36-4dbe-ae7a-287334829311_1558x314.png" width="1558" height="314" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6c78d3bd-5c36-4dbe-ae7a-287334829311_1558x314.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:314,&quot;width&quot;:1558,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:755740,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oZMd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c78d3bd-5c36-4dbe-ae7a-287334829311_1558x314.png 424w, https://substackcdn.com/image/fetch/$s_!oZMd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c78d3bd-5c36-4dbe-ae7a-287334829311_1558x314.png 848w, https://substackcdn.com/image/fetch/$s_!oZMd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c78d3bd-5c36-4dbe-ae7a-287334829311_1558x314.png 1272w, https://substackcdn.com/image/fetch/$s_!oZMd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c78d3bd-5c36-4dbe-ae7a-287334829311_1558x314.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption"><a href="https://pubmed.ncbi.nlm.nih.gov/1322982/">Blasdel 1992</a>.</figcaption></figure></div><p>Although I (obviously) got very behind with blogging, I set a hard deadline for myself to wrap up by&#8230; today. We&#8217;re finally done with the main topics so I&#8217;ll briefly summarize some of the special topics covered in the last four weeks of lecture. All lecture posts from this semester are <a href="https://www.dissonances.blog/p/neural-computation">here</a>.</p><h3>Factorization and compositionality in scene understanding</h3><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RPvk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3d37d7c-ace7-4a08-82ea-ddd96f104b99_2096x466.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RPvk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3d37d7c-ace7-4a08-82ea-ddd96f104b99_2096x466.png 424w, https://substackcdn.com/image/fetch/$s_!RPvk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3d37d7c-ace7-4a08-82ea-ddd96f104b99_2096x466.png 848w, https://substackcdn.com/image/fetch/$s_!RPvk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3d37d7c-ace7-4a08-82ea-ddd96f104b99_2096x466.png 1272w, https://substackcdn.com/image/fetch/$s_!RPvk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3d37d7c-ace7-4a08-82ea-ddd96f104b99_2096x466.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RPvk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3d37d7c-ace7-4a08-82ea-ddd96f104b99_2096x466.png" width="2096" height="466" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e3d37d7c-ace7-4a08-82ea-ddd96f104b99_2096x466.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:466,&quot;width&quot;:2096,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1234780,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RPvk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3d37d7c-ace7-4a08-82ea-ddd96f104b99_2096x466.png 424w, https://substackcdn.com/image/fetch/$s_!RPvk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3d37d7c-ace7-4a08-82ea-ddd96f104b99_2096x466.png 848w, https://substackcdn.com/image/fetch/$s_!RPvk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3d37d7c-ace7-4a08-82ea-ddd96f104b99_2096x466.png 1272w, https://substackcdn.com/image/fetch/$s_!RPvk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3d37d7c-ace7-4a08-82ea-ddd96f104b99_2096x466.png 1456w" sizes="100vw"></picture><div></div></div></a><figcaption class="image-caption">Right three images are generated from the original left. A deep learning model still recognizes with high accuracy, unlike humans. <a href="https://arxiv.org/abs/1904.00760">Brendel &amp; Bethge 2019</a>.</figcaption></figure></div><p>Visual objects can appear in infinitely many ways &#8212; with varying pose, illumination conditions, occlusion, in a complex scene, etc. &#8212; and still be recognizable to us. Deep learning does not process images the same way we do, and some work has highlighted these differences by looking at adversarial examples and metamers, e.g. <em>Excessive Invariance Causes Adversarial Vulnerability </em>(Jacobsen et al. <a href="https://arxiv.org/abs/1811.00401">2018</a>) and <em>Model metamers reveal divergent invariances between biological and artificial neural networks</em> (Feather et al. <a href="https://www.nature.com/articles/s41593-023-01442-0">2023</a>).</p><p>How does this brain handle this? An extreme would be that there is a neuron that responds to every possible combination of every transformation of every entity, which would result in a combinatorial explosion. A theory to address the explosion is that there are mechanisms for factorization (inferring explanatory factors in a scene, e.g. <a href="http:///https://persci.mit.edu/pub_pdfs/shading96.pdf">shape from shading</a>) and compositional structure (generalizing to complex scenes from basic components and rules) that allow us to more efficiently disentangle and understand parts of scenes. A few papers that explore this are <em>Shape Recognition and Illusory Conjunctions</em> (Hinton &amp; Lang <a href="https://www.cs.toronto.edu/~fritz/absps/illusory.pdf">1981</a>), <em>Dynamic Routing </em>(Olshausen et al. <a href="https://pubmed.ncbi.nlm.nih.gov/8229193/">1993</a>), and <em>Disentangling Images with Lie Group Transformations and Sparse Coding </em>(Chau et al. <a href="https://proceedings.mlr.press/v197/chau23a/chau23a.pdf">2022</a>).</p><h3>Sparse Distributed Memory</h3><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PDrr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F568133d1-63fe-44c4-8195-85b6e03e1771_2190x542.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PDrr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F568133d1-63fe-44c4-8195-85b6e03e1771_2190x542.png 424w, https://substackcdn.com/image/fetch/$s_!PDrr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F568133d1-63fe-44c4-8195-85b6e03e1771_2190x542.png 848w, https://substackcdn.com/image/fetch/$s_!PDrr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F568133d1-63fe-44c4-8195-85b6e03e1771_2190x542.png 1272w, https://substackcdn.com/image/fetch/$s_!PDrr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F568133d1-63fe-44c4-8195-85b6e03e1771_2190x542.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PDrr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F568133d1-63fe-44c4-8195-85b6e03e1771_2190x542.png" width="1456" height="360" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/568133d1-63fe-44c4-8195-85b6e03e1771_2190x542.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:360,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:213908,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PDrr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F568133d1-63fe-44c4-8195-85b6e03e1771_2190x542.png 424w, https://substackcdn.com/image/fetch/$s_!PDrr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F568133d1-63fe-44c4-8195-85b6e03e1771_2190x542.png 848w, https://substackcdn.com/image/fetch/$s_!PDrr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F568133d1-63fe-44c4-8195-85b6e03e1771_2190x542.png 1272w, https://substackcdn.com/image/fetch/$s_!PDrr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F568133d1-63fe-44c4-8195-85b6e03e1771_2190x542.png 1456w" sizes="100vw"></picture><div></div></div></a><figcaption class="image-caption">From <a href="https://redwood.berkeley.edu/wp-content/uploads/2024/08/4CEREBELLUM-13nov24.pdf">slides</a>.</figcaption></figure></div><p>Pentti Kanerva&#8217;s <a href="https://en.wikipedia.org/wiki/Sparse_distributed_memory">SDM</a> (1988) is a model of human long-term memory using sparse, high-dimensional vectors, and uses a lot of the same concepts as his <a href="https://en.wikipedia.org/wiki/Hyperdimensional_computing">hyperdimensional computing</a> framework (which I went over in my last <a href="https://www.dissonances.blog/p/computing-in-high-dimensions">post</a>). He later found interesting connections to how it could be used to model the cerebellum. It&#8217;s a super rich model that&#8217;s been applied to research problems in computer vision, reinforcement learning, and more. Fun fact: attention in transformers has been found to approximate SDM (Bricken <a href="https://proceedings.neurips.cc/paper_files/paper/2021/hash/8171ac2c5544a5cb54ac0f38bf477af4-Abstract.html">2021</a>).</p><h3>Maps</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mT9P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda594e9-b343-464e-8cfb-a60f972a2603_2784x780.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mT9P!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda594e9-b343-464e-8cfb-a60f972a2603_2784x780.png 424w, https://substackcdn.com/image/fetch/$s_!mT9P!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda594e9-b343-464e-8cfb-a60f972a2603_2784x780.png 848w, https://substackcdn.com/image/fetch/$s_!mT9P!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda594e9-b343-464e-8cfb-a60f972a2603_2784x780.png 1272w, https://substackcdn.com/image/fetch/$s_!mT9P!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda594e9-b343-464e-8cfb-a60f972a2603_2784x780.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mT9P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda594e9-b343-464e-8cfb-a60f972a2603_2784x780.png" width="1456" height="408" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fda594e9-b343-464e-8cfb-a60f972a2603_2784x780.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:408,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:536698,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mT9P!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda594e9-b343-464e-8cfb-a60f972a2603_2784x780.png 424w, https://substackcdn.com/image/fetch/$s_!mT9P!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda594e9-b343-464e-8cfb-a60f972a2603_2784x780.png 848w, https://substackcdn.com/image/fetch/$s_!mT9P!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda594e9-b343-464e-8cfb-a60f972a2603_2784x780.png 1272w, https://substackcdn.com/image/fetch/$s_!mT9P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda594e9-b343-464e-8cfb-a60f972a2603_2784x780.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://tcosmo.github.io/assets/soms/doc/kohonen1982.pdf">Kohonen 1982</a>.</figcaption></figure></div><p>The brain is full of maps for vision, audition, touch, space, and more. In the primary visual cortex alone, there are many types of maps, where distance on cortex corresponds to eccentricity in visual field, orientation of features, direction of stimulus movement, and more. Computationally, do these maps serve a purpose, or are they epiphenomena? The classic model is Kohonen&#8217;s <a href="https://en.wikipedia.org/wiki/Self-organizing_map">self-organizing map</a> (SOM, <a href="https://tcosmo.github.io/assets/soms/doc/kohonen1982.pdf">1982</a>), which starts with units placed on a 2D sheet. Initially the connections between the units are random with the constraint that units excite nearby units and inhibit faraway units. Through Hebbian learning, they eventually learn a map such that neighboring points on the sheet map to nearby points in space. SOM does not answer the question of <em>why</em> maps are needed, as the map part is built into the constraints. There are many theories, but maybe there&#8217;s some argument for reduction of wiring length? E.g. Chandra et al. <a href="https://www.biorxiv.org/content/10.1101/2024.01.07.574543v1.abstract">2024</a> find that maps and other phenomena emerge from a wiring minimization objective. </p><h3>Perception and action</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hIvh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f2fa46-2930-40a2-b68e-f9fb3a11d24b_1070x568.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hIvh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f2fa46-2930-40a2-b68e-f9fb3a11d24b_1070x568.png 424w, https://substackcdn.com/image/fetch/$s_!hIvh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f2fa46-2930-40a2-b68e-f9fb3a11d24b_1070x568.png 848w, https://substackcdn.com/image/fetch/$s_!hIvh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f2fa46-2930-40a2-b68e-f9fb3a11d24b_1070x568.png 1272w, https://substackcdn.com/image/fetch/$s_!hIvh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f2fa46-2930-40a2-b68e-f9fb3a11d24b_1070x568.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hIvh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f2fa46-2930-40a2-b68e-f9fb3a11d24b_1070x568.png" width="478" height="253.74205607476637" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d3f2fa46-2930-40a2-b68e-f9fb3a11d24b_1070x568.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:568,&quot;width&quot;:1070,&quot;resizeWidth&quot;:478,&quot;bytes&quot;:231415,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hIvh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f2fa46-2930-40a2-b68e-f9fb3a11d24b_1070x568.png 424w, https://substackcdn.com/image/fetch/$s_!hIvh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f2fa46-2930-40a2-b68e-f9fb3a11d24b_1070x568.png 848w, https://substackcdn.com/image/fetch/$s_!hIvh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f2fa46-2930-40a2-b68e-f9fb3a11d24b_1070x568.png 1272w, https://substackcdn.com/image/fetch/$s_!hIvh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f2fa46-2930-40a2-b68e-f9fb3a11d24b_1070x568.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">From <a href="https://redwood.berkeley.edu/wp-content/uploads/2024/08/perception-action-foveated-imaging.pdf">slides</a>.</figcaption></figure></div><p>Up to this point, we&#8217;ve talked about vision as if it exists in isolation. This is wrong! Vision, along with other modes of perception, are active. For example, our eyes move constantly, even when we&#8217;re fixating on something, and one hypothesis is that eye movements are essential for high visual acuity. Some research that hints at this are <em>Bayesian model of dynamic image stabilization in the visual system</em> (Burak et al. <a href="https://www.pnas.org/doi/10.1073/pnas.1006076107">2010</a>), <em>Benefits of retinal image motion at the limits of spatial vision </em>(Ratnam et al. <a href="https://pmc.ncbi.nlm.nih.gov/articles/PMC5283083/">2017</a>), and <em>High-Acuity Vision from Retinal Image Motion</em> (Anderson et al. <a href="https://jov.arvojournals.org/article.aspx?articleid=2770552">2021</a>)<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>. </p><p>A bit more philosophically, there are also theories that &#8220;seeing&#8221; is an active process that occurs when we probe the world, i.e. due to sensorimotor contingencies. See<em> A sensorimotor account of vision and visual consciousness</em> (O&#8217;Regan &amp; No&#235; <a href="https://redwood.berkeley.edu/wp-content/uploads/2020/08/oregan-noe01.pdf">2001</a>)<em> </em>and <em>Is There Something Out There? Inferring Space from Sensorimotor Dependencies </em>(Philipona et al. <a href="https://redwood.berkeley.edu/wp-content/uploads/2020/08/philipona-oregan-nadal-out-there.pdf">2003</a>).</p><h3>Class projects</h3><p>Class projects are always fun, and I was genuinely very impressed by these! This year, they ranged from analyzing real neural data to augmenting LLMs. The most popular topics were modeling the cerebellum, memory retrieval, and behavior with SDM; Hopfield networks for different types of data; and hyperdimensional computing with language. There was also a project on retinal waves in development of cortex, sparse coding applied to language, a hardware implementation of the fruit fly head direction circuit, and a review of models in computational psychiatry. Given the diverse background of the students, it was exciting to see what people found interesting enough to investigate on their own, especially in the current age of AI hype.</p><div><hr></div><h3>Reflection</h3><p>To be honest, blogging through the course was way too much work! But it was also extremely fun, and I learned a lot. Not only was I forced to strengthen my grasp on technical details in order to write about them, I&#8217;m starting to get into the habit of thinking more about setting context (I do not know nearly enough history!) and forming a narrative when trying to communicate scientific ideas. People tell me I will be doing a lot of this in my career! I also feel more excited than ever about being in this field and studying these problems, because they are COOL and FUN &#129321;! I also realized I kind of like teaching? &#128064;</p><p>I felt this when I took the course, and heard it from students this year: at about the halfway point when we start representation learning, the topics suddenly get more abstract and require more math. The associated blog posts reflected this shift: they were <em>much</em> harder to write, because I had to make more decisions about the precision-clarity tradeoff that is always present in science communication. But I&#8217;m happy with how they turned out given my time constraints. Although they are very far from perfect, I hope that even if you don&#8217;t have a technical background, you were able to learn something from each post.</p><p>Thanks for following along! If you want to stay, the future of <em>dissonances</em> will be a mix of my own research, topics I&#8217;m learning about, and random music stuff. See you in 2025! &#129395;&#129346;</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>Not eye movements, but a similar idea: <em>Handheld Multi-Frame Super-Resolution</em> (Wronski et al. <a href="https://arxiv.org/abs/1905.03277">2021</a>) shows that better resolution can be achieved by taking into account natural hand tremors when taking a photo.</p></div></div>]]></content:encoded></item><item><title><![CDATA[Computing in high dimensions]]></title><description><![CDATA[Featuring a dip back into &#120222;&#120202; &#120212;&#120209;&#120201;&#120202; AI history]]></description><link>https://www.dissonances.blog/p/computing-in-high-dimensions</link><guid isPermaLink="false">https://www.dissonances.blog/p/computing-in-high-dimensions</guid><dc:creator><![CDATA[galen]]></dc:creator><pubDate>Mon, 30 Dec 2024 22:14:04 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/cfe200e1-99f8-4bca-a4f1-7aea809cd8bf_1604x428.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5ZH_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a2d0430-fdff-4edf-b52d-5d093b8b69df_1608x276.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5ZH_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a2d0430-fdff-4edf-b52d-5d093b8b69df_1608x276.png 424w, https://substackcdn.com/image/fetch/$s_!5ZH_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a2d0430-fdff-4edf-b52d-5d093b8b69df_1608x276.png 848w, https://substackcdn.com/image/fetch/$s_!5ZH_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a2d0430-fdff-4edf-b52d-5d093b8b69df_1608x276.png 1272w, https://substackcdn.com/image/fetch/$s_!5ZH_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a2d0430-fdff-4edf-b52d-5d093b8b69df_1608x276.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5ZH_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a2d0430-fdff-4edf-b52d-5d093b8b69df_1608x276.png" width="1456" height="250" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7a2d0430-fdff-4edf-b52d-5d093b8b69df_1608x276.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:250,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:645077,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5ZH_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a2d0430-fdff-4edf-b52d-5d093b8b69df_1608x276.png 424w, https://substackcdn.com/image/fetch/$s_!5ZH_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a2d0430-fdff-4edf-b52d-5d093b8b69df_1608x276.png 848w, https://substackcdn.com/image/fetch/$s_!5ZH_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a2d0430-fdff-4edf-b52d-5d093b8b69df_1608x276.png 1272w, https://substackcdn.com/image/fetch/$s_!5ZH_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a2d0430-fdff-4edf-b52d-5d093b8b69df_1608x276.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption"><a href="https://arxiv.org/abs/2406.18808">Kymn et al. 2024</a>.</figcaption></figure></div><p>Current machine learning relies on manipulation of high-dimensional vectors. The classic <a href="https://en.wikipedia.org/wiki/Word2vec">Word2vec</a> represents a word as a vector and associates semantic similarity with distance in a vector space. Transformers in large language models (LLMs) convert words to large vectors and perform operations like inner products, concatenation, and thresholding on them. These approaches are in the spirit of the <em><a href="https://en.wikipedia.org/wiki/Connectionism">connectionist</a></em> AI philosophy, inspired by the machinery of neurons inside the brain and training a model to learn from the statistics of data. One weakness of connectionism is that it is unclear whether it can do things we consider important for cognition, such as bind variables, represent relationships between concepts, and <a href="https://en.wikipedia.org/wiki/Principle_of_compositionality">compose</a> expressions.</p><p>The contrasting old-school approach, <em><a href="https://en.wikipedia.org/wiki/Symbolic_artificial_intelligence">symbolic</a></em> AI, uses high-level logical and human-readable symbols as the basis for intelligence, and explicitly represents data structures (graphs, trees, etc.), variables, and relationships, as in computer programming. It&#8217;s a powerful framework, but is not designed to learn from and adapt to the world, and has fallen out of fashion in these data-powered times. </p><p>This is a standard narrative of connectionist vs. symbolic AI<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>, but there&#8217;s another more neuroscience-y weakness of connectionism to acknowledge. It was inspired by single-unit recordings in the brain and the idea that recording from individual cells conveys important information about neural computation, borne out of technological limitations that only allowed us to record from one neuron at a time. But the single cell angle is not the only way to think about computation in a network; recorded activity from one neuron is certainly not <em>incorrect</em>, but it does not tell us the whole story<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>, especially in the highly recurrent circuits of the brain. We also now have technology, such as <a href="https://en.wikipedia.org/wiki/Neuropixels">Neuropixels</a>, that allows us to record from hundreds or thousands of neurons simultaneously.</p><p>An approach that attempts to address some of the limitations in both connectionist and symbolic AI is Hyperdimensional computing (HDC, Kanerva <a href="http://www.cap-lore.com/RWC97-kanerva.pdf">1997</a>)<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>. In HDC, the fundamental unit is the activity of a population of units, in the form of a vector. It is not just a convenient representation; it is a different <em>computational framework</em>, where the <em>primitives</em> are vectors. Looking at a single value in the vector may tell you something, but it conceals the power of the system. HDC allows us to use the symbolic tools of data structures and logical operators while retaining some desired connectionist properties. We&#8217;ll demonstrate this through some examples.</p><h3>HDC algebra</h3><p>HDC defines an algebra over vectors, where the values of a vector could be binary, real, complex, etc. Given a concept, like a word, a color, or an image, we assign it a <strong>random</strong> high-dimensional vector. The main operations, which maintain the same dimensionality, are (random vectors in bold)</p><ul><li><p>Bundling: <strong>u </strong>= <strong>a</strong> + <strong>b </strong>+ <strong>c</strong>,<strong> </strong>where + is element-wise addition. This combines a set of discrete items into one vector</p></li><li><p>Binding (variable assignment or key-value pairing): <strong>d </strong>= <strong>k </strong>&#8857;<strong> v</strong>, where &#8857; is e.g. element-wise multiplication (Hadamard)</p></li><li><p>Permutation (ordering vectors): <strong>s</strong> = <strong>a </strong>+ &#961;<strong>b </strong>+ &#961;<sup>2</sup><strong>c</strong>,<strong> </strong>where &#961; is a constant</p></li></ul><p>It is also easy to compare similarity between vectors, and a simple example is taking the inner product. <strong>u</strong> &#8226; <strong>a</strong> would have a nonzero inner product, whereas <strong>u</strong> &#8226; <strong>d</strong> would likely be close to 0. </p><p>The randomness and high dimensionality here are key: if vectors are orthogonal or close to orthogonal, information contained in <strong>u</strong>, <strong>d</strong>, and <strong>s</strong> can easily be decoded, queried, and used to perform reasoning without a serial search through the set. The higher the dimension, the more likely it is that random vectors are orthogonal, and the less likely it is that there will be cross-talk between vectors<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a>.</p><p>Although it&#8217;s not without limitations, here&#8217;s a high-level summary of some advantages of HDC. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vXdb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff03657bb-8de9-47b7-939d-25848950451e_1976x1300.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vXdb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff03657bb-8de9-47b7-939d-25848950451e_1976x1300.png 424w, https://substackcdn.com/image/fetch/$s_!vXdb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff03657bb-8de9-47b7-939d-25848950451e_1976x1300.png 848w, https://substackcdn.com/image/fetch/$s_!vXdb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff03657bb-8de9-47b7-939d-25848950451e_1976x1300.png 1272w, https://substackcdn.com/image/fetch/$s_!vXdb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff03657bb-8de9-47b7-939d-25848950451e_1976x1300.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vXdb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff03657bb-8de9-47b7-939d-25848950451e_1976x1300.png" width="1456" height="958" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f03657bb-8de9-47b7-939d-25848950451e_1976x1300.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:958,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:156242,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vXdb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff03657bb-8de9-47b7-939d-25848950451e_1976x1300.png 424w, https://substackcdn.com/image/fetch/$s_!vXdb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff03657bb-8de9-47b7-939d-25848950451e_1976x1300.png 848w, https://substackcdn.com/image/fetch/$s_!vXdb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff03657bb-8de9-47b7-939d-25848950451e_1976x1300.png 1272w, https://substackcdn.com/image/fetch/$s_!vXdb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff03657bb-8de9-47b7-939d-25848950451e_1976x1300.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">&#8220;Traditional computing/AI&#8221; refers to symbolic programming and AI. &#8220;Transparent&#8221; refers to being easy to decode or interpret.</figcaption></figure></div><p>I have been vague about what <em>querying </em>and <em>reasoning</em> mean so far, but we&#8217;ll try to concretize these in the following examples.</p><h3>Variable binding and language</h3><p>Tony Plate developed Holographic Reduced Representations (HRR) as a graduate student with Geoff Hinton. At the time, they were interested in getting connectionist systems to do symbolic reasoning. HRR was inspired by Paul Smolensky&#8217;s tensor product variable binding (<a href="http://www.lscp.net/persons/dupoux/teaching/AT1_2014/papers/Smolensky_1990_TensorProductVariableBinding.AI.pdf">1990</a>), but instead of keeping the expanded dimensionality, compressed the tensor into a lower dimension using circular convolution.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Zeqt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e7f24d-3677-442e-b8f0-3216f07d3320_2222x736.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Zeqt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e7f24d-3677-442e-b8f0-3216f07d3320_2222x736.png 424w, https://substackcdn.com/image/fetch/$s_!Zeqt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e7f24d-3677-442e-b8f0-3216f07d3320_2222x736.png 848w, https://substackcdn.com/image/fetch/$s_!Zeqt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e7f24d-3677-442e-b8f0-3216f07d3320_2222x736.png 1272w, https://substackcdn.com/image/fetch/$s_!Zeqt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e7f24d-3677-442e-b8f0-3216f07d3320_2222x736.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Zeqt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e7f24d-3677-442e-b8f0-3216f07d3320_2222x736.png" width="1456" height="482" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f7e7f24d-3677-442e-b8f0-3216f07d3320_2222x736.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:482,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:265946,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Zeqt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e7f24d-3677-442e-b8f0-3216f07d3320_2222x736.png 424w, https://substackcdn.com/image/fetch/$s_!Zeqt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e7f24d-3677-442e-b8f0-3216f07d3320_2222x736.png 848w, https://substackcdn.com/image/fetch/$s_!Zeqt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e7f24d-3677-442e-b8f0-3216f07d3320_2222x736.png 1272w, https://substackcdn.com/image/fetch/$s_!Zeqt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7e7f24d-3677-442e-b8f0-3216f07d3320_2222x736.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The tensor product of two 2D length-3 vectors is the outer product. Left: the tensor product of two vectors, size 3x3. Center: illustration of the circular convolution of the two vectors, where the values are compressed to a length-3 vector following each line in the direction of the arrows. Right: the convolution computation. <a href="https://pages.ucsd.edu/~msereno/170/readings/06-Holographic.pdf">Plate 1995</a>.</figcaption></figure></div><p>Plate&#8217;s method allows storage of lots of information within one N-dimensional vector, provided N is large enough. Querying the vector is also straightforward. Suppose we want to represent a word <strong>x</strong> that has part of speech <strong>c</strong>. We bind via circular convolution (&#8859;): <strong>t</strong> = <strong>c </strong>&#8859; <strong>x</strong>, and unbind using the correlation operator (&#8860;<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a>) to get back an estimation of the word <strong>x </strong>&#8776;<strong> c </strong>&#8860;<strong> t</strong>. We can compose two bound variables: <strong>t </strong>= <strong>c1 </strong>&#8859; <strong>x1 </strong>+<strong> c2 </strong>&#8859; <strong>x2</strong> and get back an estimation of <strong>x1 </strong>&#8776; <strong>c1 </strong>&#8860; <strong>t</strong>, e.g. if we wanted to get the word with part of speech <strong>c1</strong> in the phrase <strong>t</strong>.</p><p>Here&#8217;s a more concrete example on language. We can represent parts of speech, roles, grammatical structures, and not just superpositions of words, but recursive superposition of words and their roles. For example, to represent the sentence &#8220;Spot bit Jane, causing Jane to flee from Spot&#8221;, you could construct a highly-structured vector that assigns meaning to each word</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1KjR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66179c1c-175c-4128-8fb9-a0ec6a8004d1_1928x404.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1KjR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66179c1c-175c-4128-8fb9-a0ec6a8004d1_1928x404.png 424w, https://substackcdn.com/image/fetch/$s_!1KjR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66179c1c-175c-4128-8fb9-a0ec6a8004d1_1928x404.png 848w, https://substackcdn.com/image/fetch/$s_!1KjR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66179c1c-175c-4128-8fb9-a0ec6a8004d1_1928x404.png 1272w, https://substackcdn.com/image/fetch/$s_!1KjR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66179c1c-175c-4128-8fb9-a0ec6a8004d1_1928x404.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1KjR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66179c1c-175c-4128-8fb9-a0ec6a8004d1_1928x404.png" width="1456" height="305" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/66179c1c-175c-4128-8fb9-a0ec6a8004d1_1928x404.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:305,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:91050,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1KjR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66179c1c-175c-4128-8fb9-a0ec6a8004d1_1928x404.png 424w, https://substackcdn.com/image/fetch/$s_!1KjR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66179c1c-175c-4128-8fb9-a0ec6a8004d1_1928x404.png 848w, https://substackcdn.com/image/fetch/$s_!1KjR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66179c1c-175c-4128-8fb9-a0ec6a8004d1_1928x404.png 1272w, https://substackcdn.com/image/fetch/$s_!1KjR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66179c1c-175c-4128-8fb9-a0ec6a8004d1_1928x404.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p><em>agt</em> refers to the agent performing the verb, &lt; &gt; denote unit normalization, and each variable in bold is a random high-dimensional vector (say length=2048). You can query <strong>P</strong> for who&#8217;s doing the biting or fleeing, for example, and also compare the similarity between <strong>P</strong> and other sentences created using the same vectors. Surprisingly, something as simple as the inner product works quite well as a first-pass similarity measure, as shown in Plate&#8217;s <a href="https://redwood.berkeley.edu/wp-content/uploads/2024/08/Tony-Plate-thesis.pdf">thesis</a> (1994), chapter 6.</p><p>Although this is a simple example compared to scale of what LLMs are doing now, you can see how easily recursive structure, such as a parse tree, can be stored and accessed efficiently in HDC.</p><h3>Analogical reasoning</h3><p>Researchers like Douglas Hofstadter and Melanie Mitchell have long been studying analogical reasoning as a key component of intelligence and reasoning<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a>. The <a href="https://www.kaggle.com/c/abstraction-and-reasoning-challenge">Abstraction and Reasoning Challenge</a> (ARC) and variants have recently gotten a lot of attention<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a> for being hard to solve with LLMs. Although beating a benchmark is not equivalent to solving a problem, we have not yet saturated these benchmarks.</p><p>One basic example of analogical reasoning in HDC comes from Pentti Kanerva (<a href="https://redwood.berkeley.edu/wp-content/uploads/2020/05/kanerva2010what.pdf">2010</a>). How would we answer a question like <em>What is the dollar of Mexico?</em></p><p>For the variable names, we have <strong>Nam</strong>e, <strong>Cap</strong>ital, and <strong>Mon</strong>etary unit of the country. For <strong>USA</strong>, those variables are bound to the values <strong>Us</strong>, <strong>Dc</strong>, and <strong>$</strong>, respectively. The binding operator is <strong>*</strong> here.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!p0Oi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bba6616-7a70-4d19-8412-90f1136448ae_1246x190.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!p0Oi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bba6616-7a70-4d19-8412-90f1136448ae_1246x190.png 424w, https://substackcdn.com/image/fetch/$s_!p0Oi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bba6616-7a70-4d19-8412-90f1136448ae_1246x190.png 848w, https://substackcdn.com/image/fetch/$s_!p0Oi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bba6616-7a70-4d19-8412-90f1136448ae_1246x190.png 1272w, https://substackcdn.com/image/fetch/$s_!p0Oi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bba6616-7a70-4d19-8412-90f1136448ae_1246x190.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!p0Oi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bba6616-7a70-4d19-8412-90f1136448ae_1246x190.png" width="538" height="82.03852327447834" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2bba6616-7a70-4d19-8412-90f1136448ae_1246x190.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:190,&quot;width&quot;:1246,&quot;resizeWidth&quot;:538,&quot;bytes&quot;:41940,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!p0Oi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bba6616-7a70-4d19-8412-90f1136448ae_1246x190.png 424w, https://substackcdn.com/image/fetch/$s_!p0Oi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bba6616-7a70-4d19-8412-90f1136448ae_1246x190.png 848w, https://substackcdn.com/image/fetch/$s_!p0Oi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bba6616-7a70-4d19-8412-90f1136448ae_1246x190.png 1272w, https://substackcdn.com/image/fetch/$s_!p0Oi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bba6616-7a70-4d19-8412-90f1136448ae_1246x190.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>We can bind the two vectors representing the countries </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UuJS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e350670-c468-4eb4-9d97-73fcc39cc6e9_608x98.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UuJS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e350670-c468-4eb4-9d97-73fcc39cc6e9_608x98.png 424w, https://substackcdn.com/image/fetch/$s_!UuJS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e350670-c468-4eb4-9d97-73fcc39cc6e9_608x98.png 848w, https://substackcdn.com/image/fetch/$s_!UuJS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e350670-c468-4eb4-9d97-73fcc39cc6e9_608x98.png 1272w, https://substackcdn.com/image/fetch/$s_!UuJS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e350670-c468-4eb4-9d97-73fcc39cc6e9_608x98.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UuJS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e350670-c468-4eb4-9d97-73fcc39cc6e9_608x98.png" width="260" height="41.9078947368421" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3e350670-c468-4eb4-9d97-73fcc39cc6e9_608x98.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:98,&quot;width&quot;:608,&quot;resizeWidth&quot;:260,&quot;bytes&quot;:15426,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UuJS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e350670-c468-4eb4-9d97-73fcc39cc6e9_608x98.png 424w, https://substackcdn.com/image/fetch/$s_!UuJS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e350670-c468-4eb4-9d97-73fcc39cc6e9_608x98.png 848w, https://substackcdn.com/image/fetch/$s_!UuJS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e350670-c468-4eb4-9d97-73fcc39cc6e9_608x98.png 1272w, https://substackcdn.com/image/fetch/$s_!UuJS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e350670-c468-4eb4-9d97-73fcc39cc6e9_608x98.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>which can also be written as</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ItZB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F054f3eee-f514-413e-b34b-3eb594b2f496_1456x116.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ItZB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F054f3eee-f514-413e-b34b-3eb594b2f496_1456x116.png 424w, https://substackcdn.com/image/fetch/$s_!ItZB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F054f3eee-f514-413e-b34b-3eb594b2f496_1456x116.png 848w, https://substackcdn.com/image/fetch/$s_!ItZB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F054f3eee-f514-413e-b34b-3eb594b2f496_1456x116.png 1272w, https://substackcdn.com/image/fetch/$s_!ItZB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F054f3eee-f514-413e-b34b-3eb594b2f496_1456x116.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ItZB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F054f3eee-f514-413e-b34b-3eb594b2f496_1456x116.png" width="624" height="49.714285714285715" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/054f3eee-f514-413e-b34b-3eb594b2f496_1456x116.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:116,&quot;width&quot;:1456,&quot;resizeWidth&quot;:624,&quot;bytes&quot;:25256,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ItZB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F054f3eee-f514-413e-b34b-3eb594b2f496_1456x116.png 424w, https://substackcdn.com/image/fetch/$s_!ItZB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F054f3eee-f514-413e-b34b-3eb594b2f496_1456x116.png 848w, https://substackcdn.com/image/fetch/$s_!ItZB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F054f3eee-f514-413e-b34b-3eb594b2f496_1456x116.png 1272w, https://substackcdn.com/image/fetch/$s_!ItZB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F054f3eee-f514-413e-b34b-3eb594b2f496_1456x116.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>This can be derived from distributivity and the fact that Pentti uses vectors and a <strong>*</strong> such that <strong>A*(A*X) = X</strong>. The noise comes from the fact that all other terms should be approximately orthogonal and result in very small values. To answer the original question, we ask <em>what in Mexico corresponds to $ in USA?</em> and unbind <strong>$</strong> with <strong>Pair</strong>:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ecmg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019edfac-5d0d-484e-8cf3-b0a7fd05c908_1826x506.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ecmg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019edfac-5d0d-484e-8cf3-b0a7fd05c908_1826x506.png 424w, https://substackcdn.com/image/fetch/$s_!Ecmg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019edfac-5d0d-484e-8cf3-b0a7fd05c908_1826x506.png 848w, https://substackcdn.com/image/fetch/$s_!Ecmg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019edfac-5d0d-484e-8cf3-b0a7fd05c908_1826x506.png 1272w, https://substackcdn.com/image/fetch/$s_!Ecmg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019edfac-5d0d-484e-8cf3-b0a7fd05c908_1826x506.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ecmg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019edfac-5d0d-484e-8cf3-b0a7fd05c908_1826x506.png" width="1456" height="403" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/019edfac-5d0d-484e-8cf3-b0a7fd05c908_1826x506.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:403,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:90339,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Ecmg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019edfac-5d0d-484e-8cf3-b0a7fd05c908_1826x506.png 424w, https://substackcdn.com/image/fetch/$s_!Ecmg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019edfac-5d0d-484e-8cf3-b0a7fd05c908_1826x506.png 848w, https://substackcdn.com/image/fetch/$s_!Ecmg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019edfac-5d0d-484e-8cf3-b0a7fd05c908_1826x506.png 1272w, https://substackcdn.com/image/fetch/$s_!Ecmg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019edfac-5d0d-484e-8cf3-b0a7fd05c908_1826x506.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>to get the correct answer, <strong>P </strong>for Peso. This is all made possible by this simple algebra in high-dimensional space. This is of course a basic analogy, but we can represent much more complex ones with negligible extra computational cost.</p><div><hr></div><p>At this point, you might be scratching your head. Of all the increasingly disconnected-from-reality topics we&#8217;ve covered in the past few posts, this is by far the most abstract. Despite its simple operations, it&#8217;s difficult to wrap your head around the idea of HDC as a<strong> </strong><em>distinct computational framework</em>. But even more abstract still is its connection to the brain.</p><p>The short answer is that the motivation for HDC comes more from cognitive science and AI than neuroscience. Binding, bundling, and permutation operations are first principles-driven, and not from biology (though perceptrons didn&#8217;t come from biology either!). But there is importance in stepping away from neurobiological plausibility (the theoretical neuroscientist&#8217;s frenemy) and thinking about what types of computations would be <em>required</em> to perform cognitive reasoning. We&#8217;re exploring this framework now, with the ultimate goal of mapping it onto actual implementations in brain circuits. This mindset is not unique to HDC; this is more generally why theory is important<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a>!</p><p>HDC is relatively under-explored, but we&#8217;re excited to see where it goes in the coming years. Chris Kymn&#8217;s recent NeurIPS <a href="https://arxiv.org/abs/2406.18808">paper</a> very elegantly uses approaches from HDC and attractor networks to model hippocampus and entorhinal cortex. For a recent review of HDC applications, see <a href="https://dl.acm.org/doi/pdf/10.1145/3558000">Kleyko et al. 2023</a>. And here&#8217;s a nice 2023 <a href="https://www.quantamagazine.org/a-new-approach-to-computation-reimagines-artificial-intelligence-20230413/">feature</a> of Bruno and Pentti in Quanta Magazine.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>I am absolutely not an expert on AI history/philosophy, so you should read all the other stuff out there. E.g. Maxim Raginsky&#8217;s recent <a href="https://realizable.substack.com/p/the-daoist-image-of-control-ii">post</a> has more in-depth analysis of LLM reasoning in the connectionist-symbolic framework.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>This again recalls the parable of the <a href="https://en.wikipedia.org/wiki/Blind_men_and_an_elephant">blind men and the elephant</a> that I referenced in the first lecture <a href="https://www.dissonances.blog/p/what-is-neural-computation">post</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>It was also introduced by many around the same time using different names: Holographic Reduced Representations (Plate <a href="https://redwood.berkeley.edu/wp-content/uploads/2024/08/Tony-Plate-thesis.pdf">1994</a>) and Vector Symbolic Architectures (Gayler, late 1990s).</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>For non-hand-wavey versions of these statements, see <a href="https://arxiv.org/abs/2010.07426">Thomas et al. 2021</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p>The symbol should be a # inside a circle but I can&#8217;t find the right character.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-6" href="#footnote-anchor-6" class="footnote-number" contenteditable="false" target="_self">6</a><div class="footnote-content"><p>See <a href="https://en.wikipedia.org/wiki/Copycat_(software)">Copycat</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-7" href="#footnote-anchor-7" class="footnote-number" contenteditable="false" target="_self">7</a><div class="footnote-content"><p>Largely driven by <a href="https://arcprize.org/">capital</a>, of course.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-8" href="#footnote-anchor-8" class="footnote-number" contenteditable="false" target="_self">8</a><div class="footnote-content"><p>I described an example of theoretical structure later being found experimentally in the attractor network <a href="https://www.dissonances.blog/p/stable-states">post</a>.</p></div></div>]]></content:encoded></item><item><title><![CDATA[Microwaving a Hopfield network]]></title><description><![CDATA[An introduction to the Boltzmann machine]]></description><link>https://www.dissonances.blog/p/microwaving-a-hopfield-network</link><guid isPermaLink="false">https://www.dissonances.blog/p/microwaving-a-hopfield-network</guid><dc:creator><![CDATA[galen]]></dc:creator><pubDate>Sat, 28 Dec 2024 18:46:07 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/5676c20a-8ee7-47dd-95d0-9a662083b4e0_1767x1162.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!001y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd3714ef-db08-4b7e-a683-0a40a9f0341b_1780x344.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!001y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd3714ef-db08-4b7e-a683-0a40a9f0341b_1780x344.png 424w, https://substackcdn.com/image/fetch/$s_!001y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd3714ef-db08-4b7e-a683-0a40a9f0341b_1780x344.png 848w, https://substackcdn.com/image/fetch/$s_!001y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd3714ef-db08-4b7e-a683-0a40a9f0341b_1780x344.png 1272w, https://substackcdn.com/image/fetch/$s_!001y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd3714ef-db08-4b7e-a683-0a40a9f0341b_1780x344.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!001y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd3714ef-db08-4b7e-a683-0a40a9f0341b_1780x344.png" width="1456" height="281" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dd3714ef-db08-4b7e-a683-0a40a9f0341b_1780x344.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:281,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:59850,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!001y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd3714ef-db08-4b7e-a683-0a40a9f0341b_1780x344.png 424w, https://substackcdn.com/image/fetch/$s_!001y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd3714ef-db08-4b7e-a683-0a40a9f0341b_1780x344.png 848w, https://substackcdn.com/image/fetch/$s_!001y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd3714ef-db08-4b7e-a683-0a40a9f0341b_1780x344.png 1272w, https://substackcdn.com/image/fetch/$s_!001y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd3714ef-db08-4b7e-a683-0a40a9f0341b_1780x344.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><blockquote><p>I had just read an article by Scott Kirkpatrick on simulated annealing, and I said, &#8220;Geoff, we could heat it up, we could heat up the Hopfield network by adding a temperature&#8221;, so instead of always going downhill sometimes you pop up and with that, if you slowly cool it we can find the optimal solution&#8230; It turns out something magical happens when you heat up a Hopfield network: it becomes capable of learning the weights to a multi-layer network; which is the first time that had been done.</p></blockquote><p>-Terry Sejnowski via <em><a href="https://jamesstone.sites.sheffield.ac.uk/books">The Artificial Intelligence Papers: Original Research Papers With Tutorial Commentaries</a> </em>by James Stone</p><p>At the time, the standard way of thinking about cognition was with rule-based symbolic systems. Hinton and Sejnowski&#8217;s 1983 <a href="https://www.cs.toronto.edu/~fritz/absps/optimal.pdf">paper</a> <em>Optimal Perceptual Inference</em> was unique in approaching perceptual inference using ideas from physical systems. It was the beginning of what would become the Boltzmann machine: a probabilistic, connectionist model of perception. I this post, I&#8217;ll attempt to give a brief introduction to the Boltzmann machine.</p><div><hr></div><p>What does it mean to heat up a Hopfield network? Recall that the energy function for a Hopfield network (intro in this <a href="https://www.dissonances.blog/p/stable-states">post</a>) is</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;E(\\textbf{s}) = -\\frac{1}{2}\\sum\\limits_{i\\neq j}T_{ij}s_is_j&quot;,&quot;id&quot;:&quot;KMEOYVZXBK&quot;}" data-component-name="LatexBlockToDOM"></div><p>where <em>T</em> is a 2D matrix of fully connected, symmetric weights between units with states <em>s&#7522;</em> in {-1, 1}.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NCTj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f92add-d4b6-4787-92d6-4974fbdba347_1024x786.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NCTj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f92add-d4b6-4787-92d6-4974fbdba347_1024x786.png 424w, https://substackcdn.com/image/fetch/$s_!NCTj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f92add-d4b6-4787-92d6-4974fbdba347_1024x786.png 848w, https://substackcdn.com/image/fetch/$s_!NCTj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f92add-d4b6-4787-92d6-4974fbdba347_1024x786.png 1272w, https://substackcdn.com/image/fetch/$s_!NCTj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f92add-d4b6-4787-92d6-4974fbdba347_1024x786.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NCTj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f92add-d4b6-4787-92d6-4974fbdba347_1024x786.png" width="324" height="248.6953125" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/64f92add-d4b6-4787-92d6-4974fbdba347_1024x786.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:786,&quot;width&quot;:1024,&quot;resizeWidth&quot;:324,&quot;bytes&quot;:68854,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!NCTj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f92add-d4b6-4787-92d6-4974fbdba347_1024x786.png 424w, https://substackcdn.com/image/fetch/$s_!NCTj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f92add-d4b6-4787-92d6-4974fbdba347_1024x786.png 848w, https://substackcdn.com/image/fetch/$s_!NCTj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f92add-d4b6-4787-92d6-4974fbdba347_1024x786.png 1272w, https://substackcdn.com/image/fetch/$s_!NCTj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f92add-d4b6-4787-92d6-4974fbdba347_1024x786.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>To recover a state stored in the weights, we want to travel to a low-energy basin of attraction. Another way you could describe the system is by defining the probability of a state <em><strong>s</strong></em> as</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;P(\\textbf{s}) = \\frac{1}{Z}e^{-\\beta E(\\textbf{s})}&quot;,&quot;id&quot;:&quot;VYXXTYOWCJ&quot;}" data-component-name="LatexBlockToDOM"></div><p>which is called a <em><a href="https://en.wikipedia.org/wiki/Boltzmann_distribution">Boltzmann distribution</a></em> and depends on the energy and the system&#8217;s temperature (1/<em>&#946;</em>). High energy states are low probability and vice versa, as desired. If <em>&#946; </em>is very small (high temperature), then we heat up the Hopfield network for a smoother <em>P(s)</em>, and we can move easily between low-energy states. In the other extreme, if <em>&#946;</em> is very large, then <em>P(s) </em>will be sharp peaks at low energy states; in this case, it would be hard to move between them. In the Hopfield network, <em>&#946; </em>is quite high, resulting in a deterministic system. In a Boltzmann machine, <em>&#946; </em>is set such that the dynamics become probabilistic. At a high level, this is a more powerful idea than the original Hopfield network, which is just used for storing exact patterns: the Boltzmann machine allows you to learn a distribution over data, and sample new patterns from the distribution.</p><h3>Learning and updating</h3><p>The Hopfield network has a well-defined learning rule to store patterns in weights <em>T</em>. From the Boltzmann distribution, they derived the corresponding learning rule</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\begin{aligned}\n\\Delta T_{ij} &amp;\\propto \\frac{\\partial \\langle \\log P(\\textbf{s}) \\rangle}{\\partial T_{ij}} \\\\\n&amp;= \\beta \\bigr[\\langle s_i s_j \\rangle_{\\text{clamped}} - \\langle s_i s_j \\rangle_{\\text{free}}\\bigr ]\n\\end{aligned}&quot;,&quot;id&quot;:&quot;TCLMALUZZQ&quot;}" data-component-name="LatexBlockToDOM"></div><p>where &lt; &gt; refers to the average over data points, <em>clamped</em> refers to the states set to some input data, and <em>free</em> refers to the states sampled from <em>P(s)</em>. There are two stages of learning: &#8220;wake&#8221; (clamped) and &#8220;sleep&#8221; (free). When it&#8217;s &#8220;awake&#8221;, it sees data and updates its weights proportionally to pairwise correlations in data. When it&#8217;s &#8220;asleep&#8221;, it samples from its probability distribution <em>P(s)</em>, computes pairwise correlations, and does <em>anti-Hebbian </em>learning (due to the negative sign)<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>. Intuitively, we want to change the weights such that sampling states from the model&#8217;s distribution fits the observed data, i.e. when clamped - free = 0. When the model predicts something different from what&#8217;s present in the data, the weights are nudged in the correct direction.</p><p>There&#8217;s a clear problem with this algorithm, however, and it&#8217;s perhaps the reason Boltzmann machines never really took off, at least in the same way deep learning has. Due to the <em>Z</em> normalization term, which contains an integral over all possible states, sampling from <em>P(s) </em>is challenging. The way this is normally done is via <em><a href="https://en.wikipedia.org/wiki/Gibbs_sampling">Gibbs sampling</a></em>; as <em><strong>s</strong></em> is a vector, this method samples from a series of conditional probabilities, one dimension at a time, to eventually approximate the joint distribution. Writing out the sampling process, you can rearrange terms to eventually get</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\begin{aligned}\nP(\\text{flipping the value of } s_i) &amp;= \\sigma(2\\beta u_i) \\\\\nu_i &amp;:= \\sum_{i\\neq j}T_{ij}s_j\n\\end{aligned}&quot;,&quot;id&quot;:&quot;BXUIZSFHRD&quot;}" data-component-name="LatexBlockToDOM"></div><p>which looks almost like the update step for a Hopfield network! But rather than a deterministic thresholding function, we now have a <a href="https://en.wikipedia.org/wiki/Sigmoid_function">sigmoid function</a> &#963; that outputs values in [0, 1], indicating a probability of flipping the value, dependent on <em>&#946; </em>and a linear combination of all other values. Remarkably, starting from Gibbs sampling, they arrive at the same flavor of update rule as a deterministic model. Furthermore, just as in a Hopfield network, this is a local learning rule requiring only pairwise connections, and could potentially be implemented in biology.</p><h3>Hidden units</h3><p>In the basic setting of the Boltzmann machine, the states serve as both input and output. For a more powerful model that can capture higher order structure (more than just pairwise correlations between units), we add latent &#8220;hidden&#8221; units (white); visible units are outputs.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UykF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa816e76f-7171-4415-a22f-94d630698c71_2296x862.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UykF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa816e76f-7171-4415-a22f-94d630698c71_2296x862.png 424w, https://substackcdn.com/image/fetch/$s_!UykF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa816e76f-7171-4415-a22f-94d630698c71_2296x862.png 848w, https://substackcdn.com/image/fetch/$s_!UykF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa816e76f-7171-4415-a22f-94d630698c71_2296x862.png 1272w, https://substackcdn.com/image/fetch/$s_!UykF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa816e76f-7171-4415-a22f-94d630698c71_2296x862.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UykF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa816e76f-7171-4415-a22f-94d630698c71_2296x862.png" width="636" height="238.9368131868132" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a816e76f-7171-4415-a22f-94d630698c71_2296x862.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:547,&quot;width&quot;:1456,&quot;resizeWidth&quot;:636,&quot;bytes&quot;:152269,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!UykF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa816e76f-7171-4415-a22f-94d630698c71_2296x862.png 424w, https://substackcdn.com/image/fetch/$s_!UykF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa816e76f-7171-4415-a22f-94d630698c71_2296x862.png 848w, https://substackcdn.com/image/fetch/$s_!UykF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa816e76f-7171-4415-a22f-94d630698c71_2296x862.png 1272w, https://substackcdn.com/image/fetch/$s_!UykF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa816e76f-7171-4415-a22f-94d630698c71_2296x862.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>For the clamped stage, the hidden states are sampled according to <em>P(s<sup>h</sup>|s<sup>v</sup>) </em>(because there is no data to clamp hidden stages to), and for the free stage, both hidden and visible states are sampled from <em>P(s)</em>. Although connections are still only pairwise, marginalizing over hidden units effectively lets us capture higher order structure. Suppose you had one hidden unit <em>s<sup>h</sup></em> connected to three visible units <em>s<sup>v1</sup>, s<sup>v2</sup>, s<sup>v3</sup></em> (not shown above). <em>s<sup>h</sup> </em>activating would increase the probability that <em>s<sup>v1</sup>, s<sup>v2</sup>, s<sup>v3</sup> </em>are active together.</p><p>Sadly, what&#8217;s powerful about the hidden variable model is also what makes it intractable: sampling in the clamped stage becomes very slow due to the hidden units. For each hidden state sample, you need to run a whole Gibbs sampling chain, which must finish before you can sample again. In this form, Boltzmann machines of a nontrivial size are almost impossible to train.</p><h3>Restricted Boltzmann machine</h3><p>To address the tractability issue, the Restricted Boltzmann machine (RBM) retains the hidden units, but removes connections between units of the <em>same</em> layer.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!d-1Q!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af0d50-e37f-4697-9b2c-c91925192bce_2098x618.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!d-1Q!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af0d50-e37f-4697-9b2c-c91925192bce_2098x618.png 424w, https://substackcdn.com/image/fetch/$s_!d-1Q!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af0d50-e37f-4697-9b2c-c91925192bce_2098x618.png 848w, https://substackcdn.com/image/fetch/$s_!d-1Q!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af0d50-e37f-4697-9b2c-c91925192bce_2098x618.png 1272w, https://substackcdn.com/image/fetch/$s_!d-1Q!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af0d50-e37f-4697-9b2c-c91925192bce_2098x618.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!d-1Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af0d50-e37f-4697-9b2c-c91925192bce_2098x618.png" width="1456" height="429" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/51af0d50-e37f-4697-9b2c-c91925192bce_2098x618.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:429,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:109024,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!d-1Q!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af0d50-e37f-4697-9b2c-c91925192bce_2098x618.png 424w, https://substackcdn.com/image/fetch/$s_!d-1Q!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af0d50-e37f-4697-9b2c-c91925192bce_2098x618.png 848w, https://substackcdn.com/image/fetch/$s_!d-1Q!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af0d50-e37f-4697-9b2c-c91925192bce_2098x618.png 1272w, https://substackcdn.com/image/fetch/$s_!d-1Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51af0d50-e37f-4697-9b2c-c91925192bce_2098x618.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The resulting energy function has far fewer dependencies; each hidden unit is only conditioned on a set of visible units and vice versa. This means that we can now sample all hidden units in <em>parallel</em>, without having all the serial dependencies of the original model. This dramatically speeds things up, and allows application to real tasks. For example, <a href="https://www.cs.toronto.edu/~hinton/absps/science.pdf">Hinton &amp; Salakhutdinov 2006</a> introduced a &#8220;deep&#8221; version by <em>stacking</em> RBMs to perform dimensionality reduction via autoencoding. To initialize the network parameters, they trained several small networks separately and connected the outputs of one layer to the inputs of the next. After this pre-training, they used backpropagation to finish fine-tuning the network, and could also perform classification using the pre-trained network.</p><h3>Don&#8217;t listen to your advisor?</h3><p>Later, going against Hinton (their advisor)<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>, Alex Krizhevsky and Ilya Sutskever dropped the pre-training part and just did backprop in <a href="https://en.wikipedia.org/wiki/AlexNet">AlexNet</a>. It worked better than anything else and led to deep learning as we know it today.</p><p>The messaging of Hinton&#8217;s recent Nobel Prize seemed to suggest that success in deep learning came about as a result of the RBM. In reality, it&#8217;s more like it happened <em>in spite of</em> the RBM. This is not to detract from the scientific significance of the RBM or Hinton and Sejnowski&#8217;s work, and it may be that the great breakthroughs of the RBM for AI are still yet to come. But the morals of the story are perhaps that 1) great discoveries often result from disobedience, and 2) scientific innovation does not always translate to real impact.</p><p>I skipped over details for the RBM, but see Hinton and Sejnowski&#8217;s <a href="https://papers.cnl.salk.edu/PDFs/Learning%20and%20Relearning%20in%20Boltzmann%20Machines%201986-3239.pdf">chapter</a> in <em>Parallel Distributed Processing</em>. In the next post, we&#8217;ll cover the final main topic of the course: computing with high-dimensional vectors.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>This recalls Crick &amp; Mitchison&#8217;s 1983 <a href="https://www.nature.com/articles/304111a0">proposal</a> that the purpose of sleep is to forget.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>Bruno recalls Hinton being very skeptical of backprop in a talk he gave back then (he thought the method in the 2006 paper was the way forward), and he <a href="https://www.axios.com/2017/12/15/artificial-intelligence-pioneer-says-we-need-to-start-over-1513305524">appears</a> to still feel this way.</p></div></div>]]></content:encoded></item><item><title><![CDATA[Perception as visual inference]]></title><description><![CDATA[Bayes and natural images]]></description><link>https://www.dissonances.blog/p/perception-as-visual-inference</link><guid isPermaLink="false">https://www.dissonances.blog/p/perception-as-visual-inference</guid><dc:creator><![CDATA[galen]]></dc:creator><pubDate>Thu, 26 Dec 2024 18:37:12 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/20e9b0ce-37cb-40fe-9d6e-e100acfa9e5f_310x248.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>What do you see in this image?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mjpU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea6e166d-8564-4de4-b8c6-e6c6f32a5520_571x729.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mjpU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea6e166d-8564-4de4-b8c6-e6c6f32a5520_571x729.png 424w, https://substackcdn.com/image/fetch/$s_!mjpU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea6e166d-8564-4de4-b8c6-e6c6f32a5520_571x729.png 848w, https://substackcdn.com/image/fetch/$s_!mjpU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea6e166d-8564-4de4-b8c6-e6c6f32a5520_571x729.png 1272w, https://substackcdn.com/image/fetch/$s_!mjpU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea6e166d-8564-4de4-b8c6-e6c6f32a5520_571x729.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mjpU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea6e166d-8564-4de4-b8c6-e6c6f32a5520_571x729.png" width="223" height="284.7057793345009" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ea6e166d-8564-4de4-b8c6-e6c6f32a5520_571x729.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:729,&quot;width&quot;:571,&quot;resizeWidth&quot;:223,&quot;bytes&quot;:105055,&quot;alt&quot;:&quot;Fig. 1&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Fig. 1" title="Fig. 1" srcset="https://substackcdn.com/image/fetch/$s_!mjpU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea6e166d-8564-4de4-b8c6-e6c6f32a5520_571x729.png 424w, https://substackcdn.com/image/fetch/$s_!mjpU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea6e166d-8564-4de4-b8c6-e6c6f32a5520_571x729.png 848w, https://substackcdn.com/image/fetch/$s_!mjpU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea6e166d-8564-4de4-b8c6-e6c6f32a5520_571x729.png 1272w, https://substackcdn.com/image/fetch/$s_!mjpU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea6e166d-8564-4de4-b8c6-e6c6f32a5520_571x729.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>You probably got that one, but the next one is harder. If you can&#8217;t see it, scroll to the answer at the bottom and come back!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dfTa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc74afff-875c-49fd-9be8-eea4a4370f4c_313x248.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dfTa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc74afff-875c-49fd-9be8-eea4a4370f4c_313x248.jpeg 424w, https://substackcdn.com/image/fetch/$s_!dfTa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc74afff-875c-49fd-9be8-eea4a4370f4c_313x248.jpeg 848w, https://substackcdn.com/image/fetch/$s_!dfTa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc74afff-875c-49fd-9be8-eea4a4370f4c_313x248.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!dfTa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc74afff-875c-49fd-9be8-eea4a4370f4c_313x248.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dfTa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc74afff-875c-49fd-9be8-eea4a4370f4c_313x248.jpeg" width="351" height="278.1086261980831" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bc74afff-875c-49fd-9be8-eea4a4370f4c_313x248.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:248,&quot;width&quot;:313,&quot;resizeWidth&quot;:351,&quot;bytes&quot;:31496,&quot;alt&quot;:&quot;Renshaw Cow Card/Mystery Picture&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Renshaw Cow Card/Mystery Picture" title="Renshaw Cow Card/Mystery Picture" srcset="https://substackcdn.com/image/fetch/$s_!dfTa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc74afff-875c-49fd-9be8-eea4a4370f4c_313x248.jpeg 424w, https://substackcdn.com/image/fetch/$s_!dfTa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc74afff-875c-49fd-9be8-eea4a4370f4c_313x248.jpeg 848w, https://substackcdn.com/image/fetch/$s_!dfTa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc74afff-875c-49fd-9be8-eea4a4370f4c_313x248.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!dfTa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc74afff-875c-49fd-9be8-eea4a4370f4c_313x248.jpeg 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In 1867, Hermann von Helmholtz introduced the idea of visual perception as <em><a href="https://en.wikipedia.org/wiki/Unconscious_inference">unconscious inference</a></em>: that we perceive and understand the visual world immediately and subconsciously<em>. </em>Illusions are interesting because our perceptual deviations from reality give us hints about the inference process. Maybe you stare at the image for a long time, and try to guess what different blobs could be. Maybe it takes knowing the answer, as is usually the case for the second image, to actually make sense of it.</p><p>Here&#8217;s another example you probably know: we see A and B as different shades, despite identical pixel values. Given the regularity of the grid and the fact that B is in the shadow of the cylinder, we <em>infer</em> the information that B is lighter than A. If all we were doing was processing pixel values, we would perceive A and B as the same color.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KRNQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b9e1513-0853-4bb9-9a5c-7d6d341cb336_1540x1198.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KRNQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b9e1513-0853-4bb9-9a5c-7d6d341cb336_1540x1198.png 424w, https://substackcdn.com/image/fetch/$s_!KRNQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b9e1513-0853-4bb9-9a5c-7d6d341cb336_1540x1198.png 848w, https://substackcdn.com/image/fetch/$s_!KRNQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b9e1513-0853-4bb9-9a5c-7d6d341cb336_1540x1198.png 1272w, https://substackcdn.com/image/fetch/$s_!KRNQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b9e1513-0853-4bb9-9a5c-7d6d341cb336_1540x1198.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KRNQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b9e1513-0853-4bb9-9a5c-7d6d341cb336_1540x1198.png" width="468" height="364.17857142857144" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6b9e1513-0853-4bb9-9a5c-7d6d341cb336_1540x1198.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1133,&quot;width&quot;:1456,&quot;resizeWidth&quot;:468,&quot;bytes&quot;:421412,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KRNQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b9e1513-0853-4bb9-9a5c-7d6d341cb336_1540x1198.png 424w, https://substackcdn.com/image/fetch/$s_!KRNQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b9e1513-0853-4bb9-9a5c-7d6d341cb336_1540x1198.png 848w, https://substackcdn.com/image/fetch/$s_!KRNQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b9e1513-0853-4bb9-9a5c-7d6d341cb336_1540x1198.png 1272w, https://substackcdn.com/image/fetch/$s_!KRNQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b9e1513-0853-4bb9-9a5c-7d6d341cb336_1540x1198.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Ted Adelson (<a href="https://www.illusionsindex.org/i/adelson-s-checker-shadow-illusion">source</a>).</figcaption></figure></div><p>Another example is the McGurk effect, which demonstrates the interaction between vision and audition. A different video is enough to skew our perception of the consonant being spoken, even though the audio is the same. If language were only dependent on sound, they would sound identical. But our inference process depends on both sound and vision.</p><div id="youtube2-2k8fHR9jKVM" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;2k8fHR9jKVM&quot;,&quot;startTime&quot;:&quot;6&quot;,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/2k8fHR9jKVM?start=6&amp;rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>There are endless fun examples (e.g. see the <a href="https://www.illusionsindex.org/">Illusions Index</a>), but how do we formalize perceptual inference? If we have good models of human perception, should they be fooled in similar ways by illusions<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>? One approach I&#8217;ll go over briefly in this post is Bayesian inference and probabilistic models.</p><h3>Denoising via Bayes&#8217; rule</h3><p>This is Bayes&#8217; rule (sans normalization term), where <em>H</em> = hypothesis and <em>D</em> = data.</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;P(H|D) \\propto P(D|H)P(H)&quot;,&quot;id&quot;:&quot;THOMVYWNQG&quot;}" data-component-name="LatexBlockToDOM"></div><p>It says that the <em>posterior</em>, the probability of your hypothesis about the world being true given the data you receive, is proportional to the <em>likelihood</em>, the probability that you see the data given your hypothesis, multiplied by your <em>prior</em> knowledge about what the hypothesis could be. There are tons of tutorials online explaining Bayes&#8217; rule (and here&#8217;s a more detailed <a href="https://redwood.berkeley.edu/wp-content/uploads/2018/08/Bayes-prob-generative.pdf">handout</a> by Bruno on Bayes and generative modeling), so I&#8217;ll just go through an example application that also relates nicely to natural images statistics: removing noise from an image.</p><p>It had been common practice in the television industry to perform <em>coring:</em> noise reduction by removing high-amplitude, high-frequency components from a signal. Previously, this operation was a bit ad-hoc, but <a href="https://www.cns.nyu.edu/pub/eero/simoncelli96c.pdf">Simoncelli &amp; Adelson 1996</a> showed how to calculate the optimal coring function for a signal using a Bayesian derivation.</p><p>Given a simple formulation <em>y = x + n</em> where <em>y</em> is the given noisy signal, <em>x</em> is the clean signal, and <em>n</em> is some Gaussian noise, they wish to recover <em>x&#770;</em> , an estimation of <em>x</em>. For example, these clean and noisy images.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oFa4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eab2e11-fc48-4baa-af4f-6fa2f84e2125_2056x1018.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oFa4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eab2e11-fc48-4baa-af4f-6fa2f84e2125_2056x1018.png 424w, https://substackcdn.com/image/fetch/$s_!oFa4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eab2e11-fc48-4baa-af4f-6fa2f84e2125_2056x1018.png 848w, https://substackcdn.com/image/fetch/$s_!oFa4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eab2e11-fc48-4baa-af4f-6fa2f84e2125_2056x1018.png 1272w, https://substackcdn.com/image/fetch/$s_!oFa4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eab2e11-fc48-4baa-af4f-6fa2f84e2125_2056x1018.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oFa4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eab2e11-fc48-4baa-af4f-6fa2f84e2125_2056x1018.png" width="536" height="265.4230769230769" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9eab2e11-fc48-4baa-af4f-6fa2f84e2125_2056x1018.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:721,&quot;width&quot;:1456,&quot;resizeWidth&quot;:536,&quot;bytes&quot;:383302,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oFa4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eab2e11-fc48-4baa-af4f-6fa2f84e2125_2056x1018.png 424w, https://substackcdn.com/image/fetch/$s_!oFa4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eab2e11-fc48-4baa-af4f-6fa2f84e2125_2056x1018.png 848w, https://substackcdn.com/image/fetch/$s_!oFa4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eab2e11-fc48-4baa-af4f-6fa2f84e2125_2056x1018.png 1272w, https://substackcdn.com/image/fetch/$s_!oFa4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eab2e11-fc48-4baa-af4f-6fa2f84e2125_2056x1018.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Left: clean image, right: noisy image.</figcaption></figure></div><p>Rather than taking <em>x</em> to be the raw pixel values of the image, they perform a 2D <a href="https://www.cns.nyu.edu/~eero/steerpyr/">steerable pyramid wavelet transform</a> on the image. If you convolve an image with an oriented, bandpass filter, you get a set of coefficients that express roughly the presence/strength of that feature present throughout the image. Doing this with a whole set of filters with different scales and orientations gets you a bunch of coefficients that serve as a summary of the image. In this paper,<em> x</em>,<em> x&#770;</em> , and <em>y</em> refer to the coefficients from this transform, not the image pixels. For each filter, they get a distribution of coefficients that looks like the ones below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Wg4Q!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ebd228-2c38-44ee-8ff0-39752776f2bb_1792x722.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Wg4Q!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ebd228-2c38-44ee-8ff0-39752776f2bb_1792x722.png 424w, https://substackcdn.com/image/fetch/$s_!Wg4Q!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ebd228-2c38-44ee-8ff0-39752776f2bb_1792x722.png 848w, https://substackcdn.com/image/fetch/$s_!Wg4Q!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ebd228-2c38-44ee-8ff0-39752776f2bb_1792x722.png 1272w, https://substackcdn.com/image/fetch/$s_!Wg4Q!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ebd228-2c38-44ee-8ff0-39752776f2bb_1792x722.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Wg4Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ebd228-2c38-44ee-8ff0-39752776f2bb_1792x722.png" width="1456" height="587" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/43ebd228-2c38-44ee-8ff0-39752776f2bb_1792x722.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:587,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:98674,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Wg4Q!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ebd228-2c38-44ee-8ff0-39752776f2bb_1792x722.png 424w, https://substackcdn.com/image/fetch/$s_!Wg4Q!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ebd228-2c38-44ee-8ff0-39752776f2bb_1792x722.png 848w, https://substackcdn.com/image/fetch/$s_!Wg4Q!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ebd228-2c38-44ee-8ff0-39752776f2bb_1792x722.png 1272w, https://substackcdn.com/image/fetch/$s_!Wg4Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43ebd228-2c38-44ee-8ff0-39752776f2bb_1792x722.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Histogram of a wavelet transform (convolution of a 2D oriented, bandpass wavelet with the image) of a natural image (left) and Gaussian noise (right).</figcaption></figure></div><p>We know that natural images do not follow a Gaussian distribution; they look like the left one, with most coefficients at or close to 0 (sparse) and with tails decaying more slowly (high kurtosis) than a Gaussian<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>. Given this prior knowledge about the images, and assuming that the noise is Gaussian, they want to find a way to go from a distribution with a shape like this</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IqPJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23fbf827-a293-434c-ad8b-9457d69df433_824x804.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IqPJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23fbf827-a293-434c-ad8b-9457d69df433_824x804.png 424w, https://substackcdn.com/image/fetch/$s_!IqPJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23fbf827-a293-434c-ad8b-9457d69df433_824x804.png 848w, https://substackcdn.com/image/fetch/$s_!IqPJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23fbf827-a293-434c-ad8b-9457d69df433_824x804.png 1272w, https://substackcdn.com/image/fetch/$s_!IqPJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23fbf827-a293-434c-ad8b-9457d69df433_824x804.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IqPJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23fbf827-a293-434c-ad8b-9457d69df433_824x804.png" width="345" height="336.626213592233" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/23fbf827-a293-434c-ad8b-9457d69df433_824x804.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:804,&quot;width&quot;:824,&quot;resizeWidth&quot;:345,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!IqPJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23fbf827-a293-434c-ad8b-9457d69df433_824x804.png 424w, https://substackcdn.com/image/fetch/$s_!IqPJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23fbf827-a293-434c-ad8b-9457d69df433_824x804.png 848w, https://substackcdn.com/image/fetch/$s_!IqPJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23fbf827-a293-434c-ad8b-9457d69df433_824x804.png 1272w, https://substackcdn.com/image/fetch/$s_!IqPJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23fbf827-a293-434c-ad8b-9457d69df433_824x804.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>to the original left histogram. In Bayesian terms, they would like an estimator that has a high probability of producing the clean signal <em>x</em> given the noisy signal <em>y</em>. Suppose they want to minimize the mean squared error of the cleaned up image. Then,</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ggzE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db6b7e7-ac7e-4fe0-b11f-faa985b80404_646x206.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ggzE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db6b7e7-ac7e-4fe0-b11f-faa985b80404_646x206.png 424w, https://substackcdn.com/image/fetch/$s_!ggzE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db6b7e7-ac7e-4fe0-b11f-faa985b80404_646x206.png 848w, https://substackcdn.com/image/fetch/$s_!ggzE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db6b7e7-ac7e-4fe0-b11f-faa985b80404_646x206.png 1272w, https://substackcdn.com/image/fetch/$s_!ggzE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db6b7e7-ac7e-4fe0-b11f-faa985b80404_646x206.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ggzE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db6b7e7-ac7e-4fe0-b11f-faa985b80404_646x206.png" width="236" height="75.25696594427245" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2db6b7e7-ac7e-4fe0-b11f-faa985b80404_646x206.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:206,&quot;width&quot;:646,&quot;resizeWidth&quot;:236,&quot;bytes&quot;:18962,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ggzE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db6b7e7-ac7e-4fe0-b11f-faa985b80404_646x206.png 424w, https://substackcdn.com/image/fetch/$s_!ggzE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db6b7e7-ac7e-4fe0-b11f-faa985b80404_646x206.png 848w, https://substackcdn.com/image/fetch/$s_!ggzE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db6b7e7-ac7e-4fe0-b11f-faa985b80404_646x206.png 1272w, https://substackcdn.com/image/fetch/$s_!ggzE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db6b7e7-ac7e-4fe0-b11f-faa985b80404_646x206.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>which requires <em>P(x|y)</em>, which can be calculated via Bayes&#8217; rule:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;P(x|y) \\propto P(y|x)P(x)&quot;,&quot;id&quot;:&quot;MSJFUVSMUK&quot;}" data-component-name="LatexBlockToDOM"></div><p>All that&#8217;s needed is <em>P(y|x)</em>, which is just <em>P(n)</em> = <em>Normal(0, &#963;&#8345;) </em>(due to <em>n = y - x</em>), and <em>P(x)</em>, which they approximate with <em>P(y)</em>.</p><p>If one assumes the signal and noise are iid Gaussian with mean 0 and variances <em>&#963;&#8347;</em> and <em>&#963;&#8345;</em>, the closed form solution corresponds to a <a href="https://en.wikipedia.org/wiki/Wiener_filter">Wiener filter</a>. But since natural images have a peakier distribution, they instead use the <a href="https://en.wikipedia.org/wiki/Laplace_distribution">Laplacian</a> distribution, and use the noisy image to estimate the distribution parameters for the clean image. See the paper for details, but on a high level, they derive an optimization problem to get coefficients <em>x&#770;</em>  for each wavelet, then convert back into the cleaned image in pixel space. </p><p>The optimal estimator they get out looks like the curvy line below:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VFVd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb34860-fad3-40d2-b72f-2a106c2e2cb2_1062x1022.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VFVd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb34860-fad3-40d2-b72f-2a106c2e2cb2_1062x1022.png 424w, https://substackcdn.com/image/fetch/$s_!VFVd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb34860-fad3-40d2-b72f-2a106c2e2cb2_1062x1022.png 848w, https://substackcdn.com/image/fetch/$s_!VFVd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb34860-fad3-40d2-b72f-2a106c2e2cb2_1062x1022.png 1272w, https://substackcdn.com/image/fetch/$s_!VFVd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb34860-fad3-40d2-b72f-2a106c2e2cb2_1062x1022.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VFVd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb34860-fad3-40d2-b72f-2a106c2e2cb2_1062x1022.png" width="330" height="317.57062146892656" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/beb34860-fad3-40d2-b72f-2a106c2e2cb2_1062x1022.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1022,&quot;width&quot;:1062,&quot;resizeWidth&quot;:330,&quot;bytes&quot;:75603,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!VFVd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb34860-fad3-40d2-b72f-2a106c2e2cb2_1062x1022.png 424w, https://substackcdn.com/image/fetch/$s_!VFVd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb34860-fad3-40d2-b72f-2a106c2e2cb2_1062x1022.png 848w, https://substackcdn.com/image/fetch/$s_!VFVd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb34860-fad3-40d2-b72f-2a106c2e2cb2_1062x1022.png 1272w, https://substackcdn.com/image/fetch/$s_!VFVd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb34860-fad3-40d2-b72f-2a106c2e2cb2_1062x1022.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The curved line denotes the optimal coring function, and the straight line is the identity function <em>y = x</em>. At the black dot, <em>y </em>=<em> </em>10 and <em>x </em>= 5. Compared to the identity function<em>, x</em> is pushed toward 0. The same effect happens on the other side of 0.</figcaption></figure></div><p>Reading out the vertical axis, the coring function pushes small <em>y</em> values down and keeps larger ones approximately the same. It&#8217;s called a coring function because you can imagine roughly removing (setting to zero) the &#8220;core&#8221; (values close to zero), and it induces a distribution more peaked at 0, as desired. Applying it to the noisy image coefficients gets you the estimation of the clean image coefficients. This Bayesian approach shows a nice way to use the statistics of natural images and an assumed noise distribution to clean up an image.</p><h3>Probabilistic formulation of sparse coding</h3><p>Here&#8217;s another application of Bayes&#8217; rule, applied this time to sparse coding, which I introduced briefly in a previous <a href="https://www.dissonances.blog/p/some-nonlinear-learning">post</a>. It turns out you can formulate the standard sparse coding energy function probabilistically<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>. Let&#8217;s just focus on the inference step, i.e. determining the sparse coefficients for an image given a dictionary (set of filters). It&#8217;s equivalent to finding the most probable configuration of coefficients <em>a</em> given some images <em>I</em> and dictionary <em>&#934;</em>. We write the posterior probability using Bayes&#8217; rule, in black:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-w9P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc513553f-6416-4c13-a05c-0dc4f4cdfe4f_1168x340.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-w9P!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc513553f-6416-4c13-a05c-0dc4f4cdfe4f_1168x340.png 424w, https://substackcdn.com/image/fetch/$s_!-w9P!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc513553f-6416-4c13-a05c-0dc4f4cdfe4f_1168x340.png 848w, https://substackcdn.com/image/fetch/$s_!-w9P!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc513553f-6416-4c13-a05c-0dc4f4cdfe4f_1168x340.png 1272w, https://substackcdn.com/image/fetch/$s_!-w9P!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc513553f-6416-4c13-a05c-0dc4f4cdfe4f_1168x340.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-w9P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc513553f-6416-4c13-a05c-0dc4f4cdfe4f_1168x340.png" width="477" height="138.8527397260274" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c513553f-6416-4c13-a05c-0dc4f4cdfe4f_1168x340.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:340,&quot;width&quot;:1168,&quot;resizeWidth&quot;:477,&quot;bytes&quot;:37830,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-w9P!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc513553f-6416-4c13-a05c-0dc4f4cdfe4f_1168x340.png 424w, https://substackcdn.com/image/fetch/$s_!-w9P!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc513553f-6416-4c13-a05c-0dc4f4cdfe4f_1168x340.png 848w, https://substackcdn.com/image/fetch/$s_!-w9P!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc513553f-6416-4c13-a05c-0dc4f4cdfe4f_1168x340.png 1272w, https://substackcdn.com/image/fetch/$s_!-w9P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc513553f-6416-4c13-a05c-0dc4f4cdfe4f_1168x340.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>In practice, we formulate inference as a minimization of the negative log probability, which results in the red equation. The first term |<em>I</em>-<em>&#934;a</em>|&#178; comes from taking the log of <em>P(I|a; &#934;)</em>, for which we assume a Gaussian distribution; it&#8217;s high if the reconstructed image is different from the actual image, corresponding to the (negative) probability of whether the image <em>I</em> was generated from the given <em>a</em> (remember that sparse coding is a generative model). The second term is the prior <em>P(a),</em> assumed to be sparse based on our knowledge of natural image statistics (e.g. left histogram above). The sum over <em>C(a&#7522;</em>) corresponds to the sparse image prior, where <em>C()</em> induces sparsity in <em>a</em> (assumed to be independent) and is chosen to be something like the absolute value or the <a href="https://en.wikipedia.org/wiki/Cauchy_distribution">Cauchy distribution</a>. The standard method of solving is to use maximum a priori (MAP) estimation, which simply takes the mode of the posterior distribution<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a>. I apologize for the whirlwindy explanation, but more details can be found in <a href="https://pubmed.ncbi.nlm.nih.gov/9425546/">Olshausen &amp; Field 1997</a>. And if you want more details on perception as inference in general, Bruno wrote a <a href="https://www.rctn.org/bruno/papers/perception-as-inference.pdf">book chapter</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a>.</p><p>Okay, I lied last time when I said this post would cover the Restricted Boltzmann machine. I got too wrapped up in sparsity&#8230; the next post will cover RBM!</p><div><hr></div><p>The first image in this post is a <a href="https://en.wikipedia.org/wiki/Mooney_Face_Test">Mooney face</a>. The second is a cow that&#8217;s often used as an example of &#8220;top-down&#8221; information influencing perception.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>I won&#8217;t go over this here, but there has been decades of work on trying to model perceptual illusions, e.g. <a href="https://www.cnbc.cmu.edu/~tai/readings/v1model/heitger2.pdf">illusory contours</a>. AFAIK there have not been clear breakthroughs yet. Current state-of-the-art models are clearly not there; Tomer Ullman recently did an <a href="https://osf.io/preprints/psyarxiv/7zcj8">investigation</a> of illusions in LLMs.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>For a review on natural image statistics see <a href="https://www.cns.nyu.edu/pub/eero/simoncelli01-reprint.pdf">Simoncelli &amp; Olshausen 2001</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>Apparently Peter Dayan helped inspire this approach, as well as the realization that <a href="https://en.wikipedia.org/wiki/Independent_component_analysis">independent component analysis</a> is a special case of sparse coding; details <a href="https://redwood.berkeley.edu/wp-content/uploads/2018/08/sparse-coding-ICA.pdf">here</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>A better way to do this is to sample from the entire posterior distribution. <a href="https://www.rctn.org/bruno/papers/langevin-sparse-coding.pdf">Fang et al. 2022</a> use Langevin dynamics.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p>Also:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!n4wc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3b0249-3b7d-448f-82f4-9beb7969886a_728x262.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!n4wc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3b0249-3b7d-448f-82f4-9beb7969886a_728x262.png 424w, https://substackcdn.com/image/fetch/$s_!n4wc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3b0249-3b7d-448f-82f4-9beb7969886a_728x262.png 848w, https://substackcdn.com/image/fetch/$s_!n4wc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3b0249-3b7d-448f-82f4-9beb7969886a_728x262.png 1272w, https://substackcdn.com/image/fetch/$s_!n4wc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3b0249-3b7d-448f-82f4-9beb7969886a_728x262.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!n4wc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3b0249-3b7d-448f-82f4-9beb7969886a_728x262.png" width="554" height="199.37912087912088" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/af3b0249-3b7d-448f-82f4-9beb7969886a_728x262.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:262,&quot;width&quot;:728,&quot;resizeWidth&quot;:554,&quot;bytes&quot;:43275,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!n4wc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3b0249-3b7d-448f-82f4-9beb7969886a_728x262.png 424w, https://substackcdn.com/image/fetch/$s_!n4wc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3b0249-3b7d-448f-82f4-9beb7969886a_728x262.png 848w, https://substackcdn.com/image/fetch/$s_!n4wc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3b0249-3b7d-448f-82f4-9beb7969886a_728x262.png 1272w, https://substackcdn.com/image/fetch/$s_!n4wc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3b0249-3b7d-448f-82f4-9beb7969886a_728x262.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Konrad K&#246;rding is a Bayesian neuroscience professor at UPenn.</figcaption></figure></div></div></div>]]></content:encoded></item><item><title><![CDATA[Stable states]]></title><description><![CDATA[A brief introduction to attractor networks in theoretical neuroscience]]></description><link>https://www.dissonances.blog/p/stable-states</link><guid isPermaLink="false">https://www.dissonances.blog/p/stable-states</guid><dc:creator><![CDATA[galen]]></dc:creator><pubDate>Mon, 09 Dec 2024 17:04:40 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!nGJJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6de2b70-79e9-45f3-a943-2c3ed934d8de_2204x494.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nGJJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6de2b70-79e9-45f3-a943-2c3ed934d8de_2204x494.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nGJJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6de2b70-79e9-45f3-a943-2c3ed934d8de_2204x494.png 424w, https://substackcdn.com/image/fetch/$s_!nGJJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6de2b70-79e9-45f3-a943-2c3ed934d8de_2204x494.png 848w, https://substackcdn.com/image/fetch/$s_!nGJJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6de2b70-79e9-45f3-a943-2c3ed934d8de_2204x494.png 1272w, https://substackcdn.com/image/fetch/$s_!nGJJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6de2b70-79e9-45f3-a943-2c3ed934d8de_2204x494.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nGJJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6de2b70-79e9-45f3-a943-2c3ed934d8de_2204x494.png" width="1456" height="326" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a6de2b70-79e9-45f3-a943-2c3ed934d8de_2204x494.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:326,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2037741,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nGJJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6de2b70-79e9-45f3-a943-2c3ed934d8de_2204x494.png 424w, https://substackcdn.com/image/fetch/$s_!nGJJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6de2b70-79e9-45f3-a943-2c3ed934d8de_2204x494.png 848w, https://substackcdn.com/image/fetch/$s_!nGJJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6de2b70-79e9-45f3-a943-2c3ed934d8de_2204x494.png 1272w, https://substackcdn.com/image/fetch/$s_!nGJJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6de2b70-79e9-45f3-a943-2c3ed934d8de_2204x494.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">Firing rates of rat grid cells. <a href="https://www.nature.com/articles/s41586-021-04268-7">Gardner et al. 2022</a>.</figcaption></figure></div><p>In October, John Hopfield and Geoffrey Hinton won the Nobel Prize in Physics for &#8220;foundational discoveries and inventions that enable machine learning with artificial neural networks&#8221;. Hopfield was recognized for his theoretical model of associative memory based on the Ising model from physics, and Hinton for a generative, probabilistic neural network<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>. Though there is no doubt both scientists have contributed significantly to their respective fields, the decision seems to imply that physics-based models like the Hopfield Network and Restricted Boltzmann machine have heavily influenced current ML/AI. This is not true, to my knowledge (if you believe otherwise, I&#8217;d like to hear it)<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>. A different take is, of course:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Mbm8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55a078b2-5908-4b76-9fbe-90f2d1723702_1184x360.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Mbm8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55a078b2-5908-4b76-9fbe-90f2d1723702_1184x360.png 424w, https://substackcdn.com/image/fetch/$s_!Mbm8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55a078b2-5908-4b76-9fbe-90f2d1723702_1184x360.png 848w, https://substackcdn.com/image/fetch/$s_!Mbm8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55a078b2-5908-4b76-9fbe-90f2d1723702_1184x360.png 1272w, https://substackcdn.com/image/fetch/$s_!Mbm8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55a078b2-5908-4b76-9fbe-90f2d1723702_1184x360.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Mbm8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55a078b2-5908-4b76-9fbe-90f2d1723702_1184x360.png" width="1184" height="360" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/55a078b2-5908-4b76-9fbe-90f2d1723702_1184x360.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:360,&quot;width&quot;:1184,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:94845,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Mbm8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55a078b2-5908-4b76-9fbe-90f2d1723702_1184x360.png 424w, https://substackcdn.com/image/fetch/$s_!Mbm8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55a078b2-5908-4b76-9fbe-90f2d1723702_1184x360.png 848w, https://substackcdn.com/image/fetch/$s_!Mbm8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55a078b2-5908-4b76-9fbe-90f2d1723702_1184x360.png 1272w, https://substackcdn.com/image/fetch/$s_!Mbm8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55a078b2-5908-4b76-9fbe-90f2d1723702_1184x360.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>That said, Nobel Prizes and this weird worship of single scientists doesn&#8217;t make much sense to me. Science is only possible through collaboration and building off others&#8217; work<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>, not to mention all the other factors that allow us to be in the privileged position of doing science in the first place.</p><p>Regardless of their relationship to AI, we can learn a lot from these elegant models. Attractor networks (this post) and probabilistic models (next post) are central to theoretical neuroscience.</p><div><hr></div><p>The brain is highly recurrent. We saw this diagram of cortex and its wirings in a previous lecture:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eId8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89cec38b-6d49-432b-b7d2-bd3213ab96ff_1050x760.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eId8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89cec38b-6d49-432b-b7d2-bd3213ab96ff_1050x760.jpeg 424w, https://substackcdn.com/image/fetch/$s_!eId8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89cec38b-6d49-432b-b7d2-bd3213ab96ff_1050x760.jpeg 848w, https://substackcdn.com/image/fetch/$s_!eId8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89cec38b-6d49-432b-b7d2-bd3213ab96ff_1050x760.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!eId8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89cec38b-6d49-432b-b7d2-bd3213ab96ff_1050x760.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eId8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89cec38b-6d49-432b-b7d2-bd3213ab96ff_1050x760.jpeg" width="620" height="448.76190476190476" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/89cec38b-6d49-432b-b7d2-bd3213ab96ff_1050x760.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:760,&quot;width&quot;:1050,&quot;resizeWidth&quot;:620,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!eId8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89cec38b-6d49-432b-b7d2-bd3213ab96ff_1050x760.jpeg 424w, https://substackcdn.com/image/fetch/$s_!eId8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89cec38b-6d49-432b-b7d2-bd3213ab96ff_1050x760.jpeg 848w, https://substackcdn.com/image/fetch/$s_!eId8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89cec38b-6d49-432b-b7d2-bd3213ab96ff_1050x760.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!eId8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89cec38b-6d49-432b-b7d2-bd3213ab96ff_1050x760.jpeg 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The thickness of a line is proportional to the number of connections between cortical areas. <a href="https://pubmed.ncbi.nlm.nih.gov/18957212/">Wallisch &amp; Movshon 2008</a>.</figcaption></figure></div><p>The connections between cortical areas, represented by the lines, go in both directions. Complex dynamics govern the recurrent interactions between brain areas. In <a href="https://www.pnas.org/doi/10.1073/pnas.79.8.2554">1982</a>, Hopfield brought ideas from statistical physics as a starting point to model these relationships.</p><p>Given a dynamical system, which is a set of variables that change over time according to some equations, we can analyze its <em>state</em>, or the setting of its variables at a moment in time. An attractor network is a dynamical system whose variables converge to a particular state (or a set of states, as we will see later) as time goes on.</p><h3>The Hopfield Network</h3><p>An <em>associative memory</em> is a system that takes content as input (as opposed to a memory address), e.g. image pixels, and retrieves the most likely match from stored memories. The Hopfield Network is a recurrent dynamical system that returns a stored pattern given some input pattern that could be noisy or incomplete. The below example shows a noisy binary input and running the dynamics until the correct pattern is recalled.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!T4k9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c1cd6f-f1d0-494f-8227-d10171d4ce6c_300x300.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!T4k9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c1cd6f-f1d0-494f-8227-d10171d4ce6c_300x300.gif 424w, https://substackcdn.com/image/fetch/$s_!T4k9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c1cd6f-f1d0-494f-8227-d10171d4ce6c_300x300.gif 848w, https://substackcdn.com/image/fetch/$s_!T4k9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c1cd6f-f1d0-494f-8227-d10171d4ce6c_300x300.gif 1272w, https://substackcdn.com/image/fetch/$s_!T4k9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c1cd6f-f1d0-494f-8227-d10171d4ce6c_300x300.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!T4k9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c1cd6f-f1d0-494f-8227-d10171d4ce6c_300x300.gif" width="222" height="222" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/26c1cd6f-f1d0-494f-8227-d10171d4ce6c_300x300.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:300,&quot;width&quot;:300,&quot;resizeWidth&quot;:222,&quot;bytes&quot;:8811,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!T4k9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c1cd6f-f1d0-494f-8227-d10171d4ce6c_300x300.gif 424w, https://substackcdn.com/image/fetch/$s_!T4k9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c1cd6f-f1d0-494f-8227-d10171d4ce6c_300x300.gif 848w, https://substackcdn.com/image/fetch/$s_!T4k9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c1cd6f-f1d0-494f-8227-d10171d4ce6c_300x300.gif 1272w, https://substackcdn.com/image/fetch/$s_!T4k9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c1cd6f-f1d0-494f-8227-d10171d4ce6c_300x300.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Animation of a Hopfield Network (100 units) recall process given a noisy input image.</figcaption></figure></div><p>Implementing an associative or <em>content-addressable</em> memory is a hard problem as the number of patterns increases, but humans are able to robustly recall patterns in this way. For example, if you hear a snippet of a song you know, even if it&#8217;s in a noisy environment or a bad karaoke, you can sing the part that follows without much effort. While we do not know how the brain does it, we start by analyzing a simple recurrent system.</p><p>The basic Hopfield Network consists of a set of units <em>V </em>that take on values of either -1 or 1. They have all-to-all connections in both directions defined by symmetric weight matrix <em>T</em>, which is where the patterns are stored.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fJwP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfe563c-a725-4b6f-a7ea-0d5cf7ed0693_976x576.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fJwP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfe563c-a725-4b6f-a7ea-0d5cf7ed0693_976x576.png 424w, https://substackcdn.com/image/fetch/$s_!fJwP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfe563c-a725-4b6f-a7ea-0d5cf7ed0693_976x576.png 848w, https://substackcdn.com/image/fetch/$s_!fJwP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfe563c-a725-4b6f-a7ea-0d5cf7ed0693_976x576.png 1272w, https://substackcdn.com/image/fetch/$s_!fJwP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfe563c-a725-4b6f-a7ea-0d5cf7ed0693_976x576.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fJwP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfe563c-a725-4b6f-a7ea-0d5cf7ed0693_976x576.png" width="474" height="279.73770491803276" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1bfe563c-a725-4b6f-a7ea-0d5cf7ed0693_976x576.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:576,&quot;width&quot;:976,&quot;resizeWidth&quot;:474,&quot;bytes&quot;:49806,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fJwP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfe563c-a725-4b6f-a7ea-0d5cf7ed0693_976x576.png 424w, https://substackcdn.com/image/fetch/$s_!fJwP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfe563c-a725-4b6f-a7ea-0d5cf7ed0693_976x576.png 848w, https://substackcdn.com/image/fetch/$s_!fJwP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfe563c-a725-4b6f-a7ea-0d5cf7ed0693_976x576.png 1272w, https://substackcdn.com/image/fetch/$s_!fJwP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfe563c-a725-4b6f-a7ea-0d5cf7ed0693_976x576.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A recurrent network with 5 units.</figcaption></figure></div><p>To store, we follow the weight update rule</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Fmlq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdc19dc-b44f-47a7-afe5-9b57b922a8df_474x152.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Fmlq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdc19dc-b44f-47a7-afe5-9b57b922a8df_474x152.png 424w, https://substackcdn.com/image/fetch/$s_!Fmlq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdc19dc-b44f-47a7-afe5-9b57b922a8df_474x152.png 848w, https://substackcdn.com/image/fetch/$s_!Fmlq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdc19dc-b44f-47a7-afe5-9b57b922a8df_474x152.png 1272w, https://substackcdn.com/image/fetch/$s_!Fmlq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdc19dc-b44f-47a7-afe5-9b57b922a8df_474x152.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Fmlq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdc19dc-b44f-47a7-afe5-9b57b922a8df_474x152.png" width="226" height="72.47257383966245" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dcdc19dc-b44f-47a7-afe5-9b57b922a8df_474x152.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:152,&quot;width&quot;:474,&quot;resizeWidth&quot;:226,&quot;bytes&quot;:13654,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Fmlq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdc19dc-b44f-47a7-afe5-9b57b922a8df_474x152.png 424w, https://substackcdn.com/image/fetch/$s_!Fmlq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdc19dc-b44f-47a7-afe5-9b57b922a8df_474x152.png 848w, https://substackcdn.com/image/fetch/$s_!Fmlq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdc19dc-b44f-47a7-afe5-9b57b922a8df_474x152.png 1272w, https://substackcdn.com/image/fetch/$s_!Fmlq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdc19dc-b44f-47a7-afe5-9b57b922a8df_474x152.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>where <em>&#945;</em> indexes the patterns. For each pattern, this forms a <em>basin of attraction</em> that the values are pushed toward. Note that we store multiple patterns in one weight matrix by simply adding the unit value products (<em>superposition</em>).</p><p>Given a set of weights where patterns have already been stored and some initial unit values (input), we select a unit and update its values according to the rules</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3zNx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6bffd8-3dd5-4351-b902-fe90de860d14_796x350.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3zNx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6bffd8-3dd5-4351-b902-fe90de860d14_796x350.png 424w, https://substackcdn.com/image/fetch/$s_!3zNx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6bffd8-3dd5-4351-b902-fe90de860d14_796x350.png 848w, https://substackcdn.com/image/fetch/$s_!3zNx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6bffd8-3dd5-4351-b902-fe90de860d14_796x350.png 1272w, https://substackcdn.com/image/fetch/$s_!3zNx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6bffd8-3dd5-4351-b902-fe90de860d14_796x350.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3zNx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6bffd8-3dd5-4351-b902-fe90de860d14_796x350.png" width="386" height="169.72361809045225" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5b6bffd8-3dd5-4351-b902-fe90de860d14_796x350.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:350,&quot;width&quot;:796,&quot;resizeWidth&quot;:386,&quot;bytes&quot;:34495,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3zNx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6bffd8-3dd5-4351-b902-fe90de860d14_796x350.png 424w, https://substackcdn.com/image/fetch/$s_!3zNx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6bffd8-3dd5-4351-b902-fe90de860d14_796x350.png 848w, https://substackcdn.com/image/fetch/$s_!3zNx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6bffd8-3dd5-4351-b902-fe90de860d14_796x350.png 1272w, https://substackcdn.com/image/fetch/$s_!3zNx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b6bffd8-3dd5-4351-b902-fe90de860d14_796x350.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>We then move on to another unit, and repeat until convergence, i.e. when the values stop changing. At this point, we have recovered the stored pattern that is the most similar to the input. But wait, you might think (as I did initially), with these equations, couldn&#8217;t the units just flip their values back and forth forever without converging? It turns out the answer is no.</p><p>To the system of neurons, we can assign an <em>energy</em>, which we would like to minimize over time. We can prove that Hopfield Network dynamics will always maintain or decrease the energy, and converge to a stable, low-energy fixed point<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a>. Intuitively, we know this energy will be lowest when the product of unit values matches the connection between them. Since the memories are stored in the weights, the units will change values until they all correspond with the weights as well as possible.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7Usx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa20f55ad-d9cb-4d75-8718-a44d501b4914_778x246.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7Usx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa20f55ad-d9cb-4d75-8718-a44d501b4914_778x246.png 424w, https://substackcdn.com/image/fetch/$s_!7Usx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa20f55ad-d9cb-4d75-8718-a44d501b4914_778x246.png 848w, https://substackcdn.com/image/fetch/$s_!7Usx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa20f55ad-d9cb-4d75-8718-a44d501b4914_778x246.png 1272w, https://substackcdn.com/image/fetch/$s_!7Usx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa20f55ad-d9cb-4d75-8718-a44d501b4914_778x246.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7Usx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa20f55ad-d9cb-4d75-8718-a44d501b4914_778x246.png" width="328" height="103.7120822622108" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a20f55ad-d9cb-4d75-8718-a44d501b4914_778x246.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:246,&quot;width&quot;:778,&quot;resizeWidth&quot;:328,&quot;bytes&quot;:73447,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7Usx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa20f55ad-d9cb-4d75-8718-a44d501b4914_778x246.png 424w, https://substackcdn.com/image/fetch/$s_!7Usx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa20f55ad-d9cb-4d75-8718-a44d501b4914_778x246.png 848w, https://substackcdn.com/image/fetch/$s_!7Usx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa20f55ad-d9cb-4d75-8718-a44d501b4914_778x246.png 1272w, https://substackcdn.com/image/fetch/$s_!7Usx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa20f55ad-d9cb-4d75-8718-a44d501b4914_778x246.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Although the dynamics are guaranteed to converge, they are not guaranteed to retrieve the correct pattern because of the way memories are stored. Each network has a capacity for how many memories it can recall accurately, which is ~0.14N where N is the number of neurons in the network. If the patterns are very similar, then this number becomes even smaller. Bruno has a nice handout on <a href="https://redwood.berkeley.edu/wp-content/uploads/2018/08/handout-attractor-nets.pdf">attractor networks</a> that goes much more in-depth than I do here, and there are tons of comprehensive tutorials on Hopfield Networks out there, e.g. Bhiksha Raj&#8217;s <a href="https://www.youtube.com/watch?v=3Cp_pjPRmt8">lecture</a>, that can help give more intuition to how these dynamics work.</p><p>In the context of neuroscience, an obvious question arises: does the Hopfield Network map onto an actual mechanism in the brain? Not that I know of, but it&#8217;s a nice starting point for learning about recurrent neural models. As for the AI side, there are some connections between Hopfield Networks and current machine learning algorithms, such as the attention mechanism in transformers (which are behind LLMs) via the modified <em>Modern Hopfield Network</em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a>. But as far as I know, this post-hoc connection was formulated after the success of transformers, and the Hopfield Network has not really played a part in current AI.</p><h3>A ring attractor for head direction</h3><p>Here&#8217;s an example of an attractor network that we can relate more concretely to a real biological mechanism. Rats have cells that are selective to a specific head direction (an angle from 0 to 360) with respect to some external reference point.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OBDg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4760325a-2f5d-4da6-b7f7-a2e98128e8e0_1156x966.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OBDg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4760325a-2f5d-4da6-b7f7-a2e98128e8e0_1156x966.png 424w, https://substackcdn.com/image/fetch/$s_!OBDg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4760325a-2f5d-4da6-b7f7-a2e98128e8e0_1156x966.png 848w, https://substackcdn.com/image/fetch/$s_!OBDg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4760325a-2f5d-4da6-b7f7-a2e98128e8e0_1156x966.png 1272w, https://substackcdn.com/image/fetch/$s_!OBDg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4760325a-2f5d-4da6-b7f7-a2e98128e8e0_1156x966.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OBDg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4760325a-2f5d-4da6-b7f7-a2e98128e8e0_1156x966.png" width="402" height="335.9273356401384" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4760325a-2f5d-4da6-b7f7-a2e98128e8e0_1156x966.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:966,&quot;width&quot;:1156,&quot;resizeWidth&quot;:402,&quot;bytes&quot;:107937,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!OBDg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4760325a-2f5d-4da6-b7f7-a2e98128e8e0_1156x966.png 424w, https://substackcdn.com/image/fetch/$s_!OBDg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4760325a-2f5d-4da6-b7f7-a2e98128e8e0_1156x966.png 848w, https://substackcdn.com/image/fetch/$s_!OBDg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4760325a-2f5d-4da6-b7f7-a2e98128e8e0_1156x966.png 1272w, https://substackcdn.com/image/fetch/$s_!OBDg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4760325a-2f5d-4da6-b7f7-a2e98128e8e0_1156x966.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A typical head direction cell fires maximally when the rat&#8217;s head direction <em>&#952;</em> aligns with the cell&#8217;s preferred direction <em>&#952;&#8320;</em>. Figure from <a href="https://www.jneurosci.org/content/16/6/2112">Zhang 1996</a>, data originally from <a href="https://pubmed.ncbi.nlm.nih.gov/7823153/">Taube 1995</a>.</figcaption></figure></div><p>In <a href="https://www.jneurosci.org/content/16/6/2112">1996</a>, Kechen Zhang proposed a ring attractor circuit and dynamics to simulate this head direction-tuned cell activity. Others had previously suggested similar circuits (e.g. <a href="https://proceedings.neurips.cc/paper/1994/hash/024d7f84fff11dd7e8d9c510137a2381-Abstract.html">Skaggs 1995</a>), but Zhang concretized it with math.</p><p>Given a set of neurons, each with a different preferred head direction <em>&#952;&#8320; </em>(i.e. each one has a peak like in the above plot, but at a different angle), how can we connect them with some weights and dynamics such that there is a stable &#8220;bump&#8221; in neural activity that encodes head direction? In the below simulation, 64 neurons are each initialized to some random firing rate. Over time, the dynamics cause convergence to a stable bump, where the peak indicates the neurons that are the most selective to the current head direction. Note that this not the same bump as the above plot; we are modeling the <em>population</em> <em>dynamics</em> of recurrently-connected neurons, not the tuning of a single neuron.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zXKZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb80f8551-2e6a-4a7c-8348-fc7ca3ca496f_640x480.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zXKZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb80f8551-2e6a-4a7c-8348-fc7ca3ca496f_640x480.gif 424w, https://substackcdn.com/image/fetch/$s_!zXKZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb80f8551-2e6a-4a7c-8348-fc7ca3ca496f_640x480.gif 848w, https://substackcdn.com/image/fetch/$s_!zXKZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb80f8551-2e6a-4a7c-8348-fc7ca3ca496f_640x480.gif 1272w, https://substackcdn.com/image/fetch/$s_!zXKZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb80f8551-2e6a-4a7c-8348-fc7ca3ca496f_640x480.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zXKZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb80f8551-2e6a-4a7c-8348-fc7ca3ca496f_640x480.gif" width="458" height="343.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b80f8551-2e6a-4a7c-8348-fc7ca3ca496f_640x480.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:480,&quot;width&quot;:640,&quot;resizeWidth&quot;:458,&quot;bytes&quot;:959947,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zXKZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb80f8551-2e6a-4a7c-8348-fc7ca3ca496f_640x480.gif 424w, https://substackcdn.com/image/fetch/$s_!zXKZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb80f8551-2e6a-4a7c-8348-fc7ca3ca496f_640x480.gif 848w, https://substackcdn.com/image/fetch/$s_!zXKZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb80f8551-2e6a-4a7c-8348-fc7ca3ca496f_640x480.gif 1272w, https://substackcdn.com/image/fetch/$s_!zXKZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb80f8551-2e6a-4a7c-8348-fc7ca3ca496f_640x480.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Contrasting with the point attractor dynamics in the Hopfield Network, a ring attractor allows us not only to have multiple stable points of attraction, but also gives us a way to move smoothly between them. Because we are modeling an angular variable, head direction, it is natural to use a ring topology (once we hit the end, we return to the beginning). What if the rat is turning in space? We would like the movement of the bump to reflect this, i.e. shifting the bump corresponds to the rat&#8217;s rotation. Below is the model population activity as the rat is turning at a constant velocity in one direction. Despite shifting position, the bump maintains its shape.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gpKT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfc1160b-4a04-47d8-9c73-028b403035ab_640x480.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gpKT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfc1160b-4a04-47d8-9c73-028b403035ab_640x480.gif 424w, https://substackcdn.com/image/fetch/$s_!gpKT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfc1160b-4a04-47d8-9c73-028b403035ab_640x480.gif 848w, https://substackcdn.com/image/fetch/$s_!gpKT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfc1160b-4a04-47d8-9c73-028b403035ab_640x480.gif 1272w, https://substackcdn.com/image/fetch/$s_!gpKT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfc1160b-4a04-47d8-9c73-028b403035ab_640x480.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gpKT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfc1160b-4a04-47d8-9c73-028b403035ab_640x480.gif" width="484" height="363" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bfc1160b-4a04-47d8-9c73-028b403035ab_640x480.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:480,&quot;width&quot;:640,&quot;resizeWidth&quot;:484,&quot;bytes&quot;:1183257,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gpKT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfc1160b-4a04-47d8-9c73-028b403035ab_640x480.gif 424w, https://substackcdn.com/image/fetch/$s_!gpKT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfc1160b-4a04-47d8-9c73-028b403035ab_640x480.gif 848w, https://substackcdn.com/image/fetch/$s_!gpKT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfc1160b-4a04-47d8-9c73-028b403035ab_640x480.gif 1272w, https://substackcdn.com/image/fetch/$s_!gpKT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfc1160b-4a04-47d8-9c73-028b403035ab_640x480.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The dynamics for the stable bump are quite straightforward. Below, <em>u</em> is a vector that represents the membrane potential of the units, <em>u&#775;</em>  is the population change over time, and <em>v</em> is a vector of firing rates, produced from a point-wise nonlinear function <em>&#963;</em> of <em>u</em>. &#8727; indicates convolution. <em>w</em> is a vector of weights, which we must define to induce this stable bump structure.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TQUM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e2de0f7-4fa8-421a-a136-b220a6fa4be6_914x310.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TQUM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e2de0f7-4fa8-421a-a136-b220a6fa4be6_914x310.png 424w, https://substackcdn.com/image/fetch/$s_!TQUM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e2de0f7-4fa8-421a-a136-b220a6fa4be6_914x310.png 848w, https://substackcdn.com/image/fetch/$s_!TQUM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e2de0f7-4fa8-421a-a136-b220a6fa4be6_914x310.png 1272w, https://substackcdn.com/image/fetch/$s_!TQUM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e2de0f7-4fa8-421a-a136-b220a6fa4be6_914x310.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TQUM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e2de0f7-4fa8-421a-a136-b220a6fa4be6_914x310.png" width="295" height="100.054704595186" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0e2de0f7-4fa8-421a-a136-b220a6fa4be6_914x310.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:310,&quot;width&quot;:914,&quot;resizeWidth&quot;:295,&quot;bytes&quot;:87010,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TQUM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e2de0f7-4fa8-421a-a136-b220a6fa4be6_914x310.png 424w, https://substackcdn.com/image/fetch/$s_!TQUM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e2de0f7-4fa8-421a-a136-b220a6fa4be6_914x310.png 848w, https://substackcdn.com/image/fetch/$s_!TQUM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e2de0f7-4fa8-421a-a136-b220a6fa4be6_914x310.png 1272w, https://substackcdn.com/image/fetch/$s_!TQUM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e2de0f7-4fa8-421a-a136-b220a6fa4be6_914x310.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>It turns out the correct <em>w</em> looks like the below left: for one unit, we want its neighboring units to be excited, and ones far away to be inhibited. More generally, for a whole set of neurons, we get the matrix on the right, which is symmetric and structured (specifically, a Toeplitz matrix<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a>). This structure lets us formulate the dynamics with the circular convolution above. I won&#8217;t go into the derivation of <em>w</em> here, but it&#8217;s all in the paper.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HkJO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75687134-207a-41cf-8283-769780a32137_1854x996.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HkJO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75687134-207a-41cf-8283-769780a32137_1854x996.png 424w, https://substackcdn.com/image/fetch/$s_!HkJO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75687134-207a-41cf-8283-769780a32137_1854x996.png 848w, https://substackcdn.com/image/fetch/$s_!HkJO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75687134-207a-41cf-8283-769780a32137_1854x996.png 1272w, https://substackcdn.com/image/fetch/$s_!HkJO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75687134-207a-41cf-8283-769780a32137_1854x996.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HkJO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75687134-207a-41cf-8283-769780a32137_1854x996.png" width="591" height="317.41895604395603" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/75687134-207a-41cf-8283-769780a32137_1854x996.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:782,&quot;width&quot;:1456,&quot;resizeWidth&quot;:591,&quot;bytes&quot;:888539,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HkJO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75687134-207a-41cf-8283-769780a32137_1854x996.png 424w, https://substackcdn.com/image/fetch/$s_!HkJO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75687134-207a-41cf-8283-769780a32137_1854x996.png 848w, https://substackcdn.com/image/fetch/$s_!HkJO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75687134-207a-41cf-8283-769780a32137_1854x996.png 1272w, https://substackcdn.com/image/fetch/$s_!HkJO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75687134-207a-41cf-8283-769780a32137_1854x996.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure from Chris Kymn.</figcaption></figure></div><p>To shift the bump, we can take the spatial derivative of the weight vector, shown in the middle row of <strong>A</strong> below. This basically says to excite neighboring cells to the right and inhibit those to the left, and add it to the original weights. The <em>&#947; </em>determines how quickly the bump is moved. The derivative helps preserve the bump shape as it&#8217;s shifting: this causes movement within the basin of the energy landscape. In a biological circuit, these added derivatives could be inputs from the vestibular system, for example, that indicate to the circuit that the animal is changing head direction.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Xnf5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20896dac-3d3d-4b47-ac0f-542ec632b4fe_674x1448.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Xnf5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20896dac-3d3d-4b47-ac0f-542ec632b4fe_674x1448.png 424w, https://substackcdn.com/image/fetch/$s_!Xnf5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20896dac-3d3d-4b47-ac0f-542ec632b4fe_674x1448.png 848w, https://substackcdn.com/image/fetch/$s_!Xnf5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20896dac-3d3d-4b47-ac0f-542ec632b4fe_674x1448.png 1272w, https://substackcdn.com/image/fetch/$s_!Xnf5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20896dac-3d3d-4b47-ac0f-542ec632b4fe_674x1448.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Xnf5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20896dac-3d3d-4b47-ac0f-542ec632b4fe_674x1448.png" width="348" height="747.6320474777448" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/20896dac-3d3d-4b47-ac0f-542ec632b4fe_674x1448.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1448,&quot;width&quot;:674,&quot;resizeWidth&quot;:348,&quot;bytes&quot;:523790,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Xnf5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20896dac-3d3d-4b47-ac0f-542ec632b4fe_674x1448.png 424w, https://substackcdn.com/image/fetch/$s_!Xnf5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20896dac-3d3d-4b47-ac0f-542ec632b4fe_674x1448.png 848w, https://substackcdn.com/image/fetch/$s_!Xnf5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20896dac-3d3d-4b47-ac0f-542ec632b4fe_674x1448.png 1272w, https://substackcdn.com/image/fetch/$s_!Xnf5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20896dac-3d3d-4b47-ac0f-542ec632b4fe_674x1448.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><strong>A</strong>. Original weight vector for a fixed bump, the derivative, and the resulting shift weight vector (peak is slightly to the right). <strong>C</strong>. The resulting bump shift. <a href="https://www.jneurosci.org/content/16/6/2112">Zhang 1996</a>.</figcaption></figure></div><p>The head direction circuit is a beautiful example of bridging theory and experimental discoveries. Zhang and Skaggs didn&#8217;t originally propose a physical configuration of these units, only a connectivity pattern via the weights. But in 2015, <a href="https://www.nature.com/articles/nature14446">Seelig &amp; Jarayaman</a> showed that head direction activity in the fruit fly ellipsoid body &#8212; a donut-shaped structure in the brain &#8212; is <strong>literally organized on a ring</strong>. Below, the bump of neural activity on the upper left is shown via calcium imaging; on the bottom right, the blue trace shows the actual head direction, and the red trace shows the head direction decoded from neural activity.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;577be76e-f64a-46ce-a529-305def050d01&quot;,&quot;duration&quot;:null}"></div><p>It&#8217;s striking that theory and biology arrived at similar solutions for the dynamics of head direction cells, hinting at some fundamental principles that govern nature.</p><p>Also not too long ago, experimental studies (e.g. <a href="https://www.nature.com/articles/nature22343">Green et al. 2017</a>) showed that the bump-shifting mechanism in fruit flies involves asymmetrical connections from different populations, which could connect to Zhang&#8217;s formulation. Zhang also notes that one could also extend the 1D dynamics to a 2D sheet; there is a lot of very exciting ongoing theoretical neuroscience work (e.g. <a href="https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1000291">Burak &amp; Fiete 2009</a>) on attractor network models of 2D grid cells.</p><p>There are clearly many exciting applications in neuroscience for attractor networks, and I regret that I&#8217;m really not able to do the topic justice in this post. But we&#8217;ll move on in the next post to probabilistic models, and touch on the Restricted Boltzmann machine.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>Interestingly, Hinton is not a physicist. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!H6BG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3520c300-06ce-4a0c-8708-8b6bbf1e5d00_1172x328.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!H6BG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3520c300-06ce-4a0c-8708-8b6bbf1e5d00_1172x328.png 424w, https://substackcdn.com/image/fetch/$s_!H6BG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3520c300-06ce-4a0c-8708-8b6bbf1e5d00_1172x328.png 848w, https://substackcdn.com/image/fetch/$s_!H6BG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3520c300-06ce-4a0c-8708-8b6bbf1e5d00_1172x328.png 1272w, https://substackcdn.com/image/fetch/$s_!H6BG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3520c300-06ce-4a0c-8708-8b6bbf1e5d00_1172x328.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!H6BG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3520c300-06ce-4a0c-8708-8b6bbf1e5d00_1172x328.png" width="1172" height="328" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3520c300-06ce-4a0c-8708-8b6bbf1e5d00_1172x328.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:328,&quot;width&quot;:1172,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:84872,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!H6BG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3520c300-06ce-4a0c-8708-8b6bbf1e5d00_1172x328.png 424w, https://substackcdn.com/image/fetch/$s_!H6BG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3520c300-06ce-4a0c-8708-8b6bbf1e5d00_1172x328.png 848w, https://substackcdn.com/image/fetch/$s_!H6BG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3520c300-06ce-4a0c-8708-8b6bbf1e5d00_1172x328.png 1272w, https://substackcdn.com/image/fetch/$s_!H6BG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3520c300-06ce-4a0c-8708-8b6bbf1e5d00_1172x328.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Used with permission from David.</figcaption></figure></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>The only one I can think of is <a href="https://en.wikipedia.org/wiki/Diffusion_model">diffusion models</a>, which are used in all (?) current state-of-the-art AI image models.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>Shun-ichi Amari was actually (one of?) the first to introduce what would be known as the Hopfield Network in <a href="https://people.idsia.ch/~juergen/amari1972hopfield.pdf">1972</a>, though his approach is more cybernetic than physics-based. His (classy) response to the Physics Nobel Prize is <a href="https://cbs.riken.jp/en/news/2024/20241010.html">here</a>. J&#252;rgen Schmidhuber has a rant <a href="https://people.idsia.ch/~juergen/physics-nobel-2024-plagiarism.html">here</a> with more historical details. Credit assignment in science is scary!</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>This is a <a href="https://en.wikipedia.org/wiki/Lyapunov_function">Lyapunov function</a>, so a Hopfield Network is guaranteed to converge to a fixed point under certain assumptions (symmetric weights, asynchronous weight updates).</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p>Paul Ivanov notes that an alternative (and better, in my opinion) name would be the <em>Hip-Hopfield Network</em>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-6" href="#footnote-anchor-6" class="footnote-number" contenteditable="false" target="_self">6</a><div class="footnote-content"><p><a href="https://flagship.kip.uni-heidelberg.de/video/meeting_257_video_9437.mp4">Here</a>, Terry Sejnowski talks about Toeplitz matrices and their connections to traveling waves, state space models, and more.</p></div></div>]]></content:encoded></item><item><title><![CDATA[Ambient spaces]]></title><description><![CDATA[Learning manifolds]]></description><link>https://www.dissonances.blog/p/ambient-spaces</link><guid isPermaLink="false">https://www.dissonances.blog/p/ambient-spaces</guid><dc:creator><![CDATA[galen]]></dc:creator><pubDate>Tue, 19 Nov 2024 16:03:17 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!US26!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10200758-5693-4859-940d-886ad892d909_1620x558.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!US26!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10200758-5693-4859-940d-886ad892d909_1620x558.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!US26!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10200758-5693-4859-940d-886ad892d909_1620x558.png 424w, https://substackcdn.com/image/fetch/$s_!US26!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10200758-5693-4859-940d-886ad892d909_1620x558.png 848w, https://substackcdn.com/image/fetch/$s_!US26!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10200758-5693-4859-940d-886ad892d909_1620x558.png 1272w, https://substackcdn.com/image/fetch/$s_!US26!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10200758-5693-4859-940d-886ad892d909_1620x558.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!US26!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10200758-5693-4859-940d-886ad892d909_1620x558.png" width="1456" height="502" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/10200758-5693-4859-940d-886ad892d909_1620x558.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:502,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:207321,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!US26!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10200758-5693-4859-940d-886ad892d909_1620x558.png 424w, https://substackcdn.com/image/fetch/$s_!US26!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10200758-5693-4859-940d-886ad892d909_1620x558.png 848w, https://substackcdn.com/image/fetch/$s_!US26!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10200758-5693-4859-940d-886ad892d909_1620x558.png 1272w, https://substackcdn.com/image/fetch/$s_!US26!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10200758-5693-4859-940d-886ad892d909_1620x558.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://math.uchicago.edu/~shmuel/AAT-readings/Data%20Analysis%20/mumford-carlsson%20et%20al.pdf">Carlsson et al. 2008</a>.</figcaption></figure></div><p>In the below cartoon, <strong>s</strong> and <strong>t </strong>are 2D points, each representing an image containing <strong>A</strong>. The most natural transformation between these two <strong>A</strong>s is horizontal translation, where the midpoint between the two should correspond to an <strong>A</strong> in the middle (top point). If we were to simply linearly interpolate between the pixels of <strong>s</strong> and <strong>t</strong>, it would look like the bottom image, a superposition of two <strong>A</strong>s, which is not a valid shift. The red line is the <em>manifold</em> of <strong>A</strong>s shifted along the center horizontal axis of the image. Possible points can lie anywhere in 2D, but all possible horizontal translations lie on a (specific) line, which is 1D. Note also that the position of the point on the red line also tells you the horizontal position: it explicitly parameterizes <em>amount of shift</em>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dlEk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd4d0870-5695-4947-95cd-1a68c1f77a28_1780x1700.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dlEk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd4d0870-5695-4947-95cd-1a68c1f77a28_1780x1700.png 424w, https://substackcdn.com/image/fetch/$s_!dlEk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd4d0870-5695-4947-95cd-1a68c1f77a28_1780x1700.png 848w, https://substackcdn.com/image/fetch/$s_!dlEk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd4d0870-5695-4947-95cd-1a68c1f77a28_1780x1700.png 1272w, https://substackcdn.com/image/fetch/$s_!dlEk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd4d0870-5695-4947-95cd-1a68c1f77a28_1780x1700.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dlEk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd4d0870-5695-4947-95cd-1a68c1f77a28_1780x1700.png" width="510" height="487.07865168539325" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bd4d0870-5695-4947-95cd-1a68c1f77a28_1780x1700.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1700,&quot;width&quot;:1780,&quot;resizeWidth&quot;:510,&quot;bytes&quot;:162371,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dlEk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd4d0870-5695-4947-95cd-1a68c1f77a28_1780x1700.png 424w, https://substackcdn.com/image/fetch/$s_!dlEk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd4d0870-5695-4947-95cd-1a68c1f77a28_1780x1700.png 848w, https://substackcdn.com/image/fetch/$s_!dlEk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd4d0870-5695-4947-95cd-1a68c1f77a28_1780x1700.png 1272w, https://substackcdn.com/image/fetch/$s_!dlEk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd4d0870-5695-4947-95cd-1a68c1f77a28_1780x1700.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Formally, a manifold is a topological space that is locally approximately Euclidean. As I am not a mathematician, I hope you&#8217;ll forgive me (and many others) for using manifold here more as a conceptual device (with selected mathematical tools) to help reason about the geometry of data that lie on some high-dimensional space. In 2D, manifolds include lines and circles (1D structures embedded in 2D space), and in 3D, surfaces such as planes, spheres, and toruses (2D structures embedded in 3D space).</p><p>What about real data? If you had a set of natural images each of size <em>p</em> pixels, the manifold of natural images would be <em>n</em>-dimensional, where <em>n &lt; p</em>. That is, if you randomly selected <em>p</em> values for an image, this would probably look like noise, and would unlikely fall on the <em>n-</em>dimensional natural image manifold. &#8220;Walking&#8221; on this manifold would result in natural images undergoing transformations you would expect to see in the real world, such as local translation. Fun fact: Carlsson et al. <a href="https://math.uchicago.edu/~shmuel/AAT-readings/Data%20Analysis%20/mumford-carlsson%20et%20al.pdf">2008</a> showed that the distribution of 3x3 natural image patches parameterized by oriented edges forms a 2D <a href="https://en.wikipedia.org/wiki/Klein_bottle">Klein bottle</a> manifold.</p><p>Going back to a toy example, shown below is the classic Swiss roll problem, where the manifold is a 2D sheet rolled up in 3D. It&#8217;s not immediately clear how you would &#8220;unroll&#8221; this manifold into a flat 2D sheet. Roweis &amp; Saul <a href="https://redwood.berkeley.edu/wp-content/uploads/2018/08/roweis-saul-manifold.pdf">2000</a> developed <em>local linear embeddings</em> (LLE)<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>, an algorithm that finds weights to approximate each point as a linear combination of its local nearest neighbors (i.e. in 3D), and then uses those weights to define neighboring relationships in a new low-dimensional (i.e. 2D) space.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!d6S9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38e51a3-3e4e-4e7b-add1-37244054016f_2138x828.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!d6S9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38e51a3-3e4e-4e7b-add1-37244054016f_2138x828.png 424w, https://substackcdn.com/image/fetch/$s_!d6S9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38e51a3-3e4e-4e7b-add1-37244054016f_2138x828.png 848w, https://substackcdn.com/image/fetch/$s_!d6S9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38e51a3-3e4e-4e7b-add1-37244054016f_2138x828.png 1272w, https://substackcdn.com/image/fetch/$s_!d6S9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38e51a3-3e4e-4e7b-add1-37244054016f_2138x828.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!d6S9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38e51a3-3e4e-4e7b-add1-37244054016f_2138x828.png" width="680" height="263.4065934065934" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a38e51a3-3e4e-4e7b-add1-37244054016f_2138x828.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:564,&quot;width&quot;:1456,&quot;resizeWidth&quot;:680,&quot;bytes&quot;:675778,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!d6S9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38e51a3-3e4e-4e7b-add1-37244054016f_2138x828.png 424w, https://substackcdn.com/image/fetch/$s_!d6S9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38e51a3-3e4e-4e7b-add1-37244054016f_2138x828.png 848w, https://substackcdn.com/image/fetch/$s_!d6S9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38e51a3-3e4e-4e7b-add1-37244054016f_2138x828.png 1272w, https://substackcdn.com/image/fetch/$s_!d6S9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa38e51a3-3e4e-4e7b-add1-37244054016f_2138x828.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><strong>A. </strong>The ground truth manifold. Colors are just for visualization purposes and represent distances from one end of the sheet, but there are no values assigned to each point. <strong>B.</strong> Points are sampled from the sheet.<strong> C.</strong> After applying LLE, the points are mapped into 2D, with the points in correct order based on color. <a href="https://redwood.berkeley.edu/wp-content/uploads/2018/08/roweis-saul-manifold.pdf">Roweis &amp; Saul 2000</a>.</figcaption></figure></div><p>While this algorithm unrolls the Swiss roll correctly, we are missing something crucial  that the learned weights or final 2D representation don&#8217;t tell us: the structure of the original manifold. How might we learn this?</p><p>None of the representations we&#8217;ve discussed so far in the course, e.g. PCA, winner-take-all, or sparse coding, can capture manifold structure. In standard <a href="https://www.dissonances.blog/p/some-nonlinear-learning">sparse coding</a>, if you perform inference on frames of a movie, the coefficients at each frame are sparse as intended, but they change extremely quickly and incoherently. They do not reflect the persistence of features or smoothness of motion in the video. Suppose we had an object translating smoothy through space in a video; ideally, the corresponding sparse code should reflect this motion. Similar to the 2D case in the first figure, we would like our representation (sparse code) to parameterize something we care about, such as local position of some feature in the movie. </p><p>Inspired by <em>Locally Linear Landmarks</em> from Vladymyrov &amp; Carreira-Perpi&#241;&#225;n <a href="https://faculty.ucmerced.edu/mcarreira-perpinan/papers/icml13-wspect.pdf">2013</a>, Chen, Paiton, &amp; Olshausen <a href="https://arxiv.org/abs/1806.08887">2018</a> developed the <em>Sparse Manifold Transform</em>, which performs sparse coding of high-dimensional points (resulting in localized features), and then learns a linear projection that induces flatness on a low-dimensional manifold.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6spy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F961ae48b-7641-4de0-9830-da4588ff1175_2576x1278.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6spy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F961ae48b-7641-4de0-9830-da4588ff1175_2576x1278.png 424w, https://substackcdn.com/image/fetch/$s_!6spy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F961ae48b-7641-4de0-9830-da4588ff1175_2576x1278.png 848w, https://substackcdn.com/image/fetch/$s_!6spy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F961ae48b-7641-4de0-9830-da4588ff1175_2576x1278.png 1272w, https://substackcdn.com/image/fetch/$s_!6spy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F961ae48b-7641-4de0-9830-da4588ff1175_2576x1278.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6spy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F961ae48b-7641-4de0-9830-da4588ff1175_2576x1278.png" width="1456" height="722" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/961ae48b-7641-4de0-9830-da4588ff1175_2576x1278.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:722,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:325770,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6spy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F961ae48b-7641-4de0-9830-da4588ff1175_2576x1278.png 424w, https://substackcdn.com/image/fetch/$s_!6spy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F961ae48b-7641-4de0-9830-da4588ff1175_2576x1278.png 848w, https://substackcdn.com/image/fetch/$s_!6spy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F961ae48b-7641-4de0-9830-da4588ff1175_2576x1278.png 1272w, https://substackcdn.com/image/fetch/$s_!6spy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F961ae48b-7641-4de0-9830-da4588ff1175_2576x1278.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The Sparse Manifold Transform. <strong>A)</strong> A function defined on 2D spatial coordinates (e.g. grayscale mages) in black; a local reconstructed component from sparse coding in red. <strong>B)</strong> Sparse coding results in a learned dictionary &#934; and sparse vector &#945;. <strong>C)</strong> Each dictionary element (black arrows) represents a <em>landmark</em> on some smooth manifold. Red arrows represent true underlying function, which are not in the dictionary. <strong>D)</strong> The true image component in red can be reconstructed from a linear interpolation of dictionary elements.</figcaption></figure></div><p>I&#8217;ll leave the details for another time<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>, but this is a start in trying to learn and understand manifold structure, rather than just a mapping.</p><p>Apart from images, you could also consider manifolds in neural data space. DiCarlo &amp; Cox <a href="https://pubmed.ncbi.nlm.nih.gov/17631409/">2007</a> proposed that the brain might perform visual object recognition by <em>disentangling manifolds</em>: each object has its own manifold in neural activity space, where movement along the manifold represents different transformations that the object undergoes, such as viewing angle, illumination, etc. The theory is that in early visual cortex, the manifolds are entangled and not separable; in later stages of the pathway, they become disentangled and neurons have explicit representations of object identity. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!T47_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0127352d-3e6d-4b74-ae92-95682a97f387_2256x982.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!T47_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0127352d-3e6d-4b74-ae92-95682a97f387_2256x982.png 424w, https://substackcdn.com/image/fetch/$s_!T47_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0127352d-3e6d-4b74-ae92-95682a97f387_2256x982.png 848w, https://substackcdn.com/image/fetch/$s_!T47_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0127352d-3e6d-4b74-ae92-95682a97f387_2256x982.png 1272w, https://substackcdn.com/image/fetch/$s_!T47_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0127352d-3e6d-4b74-ae92-95682a97f387_2256x982.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!T47_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0127352d-3e6d-4b74-ae92-95682a97f387_2256x982.png" width="1456" height="634" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0127352d-3e6d-4b74-ae92-95682a97f387_2256x982.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:634,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:920943,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!T47_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0127352d-3e6d-4b74-ae92-95682a97f387_2256x982.png 424w, https://substackcdn.com/image/fetch/$s_!T47_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0127352d-3e6d-4b74-ae92-95682a97f387_2256x982.png 848w, https://substackcdn.com/image/fetch/$s_!T47_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0127352d-3e6d-4b74-ae92-95682a97f387_2256x982.png 1272w, https://substackcdn.com/image/fetch/$s_!T47_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0127352d-3e6d-4b74-ae92-95682a97f387_2256x982.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Schematic of disentangling face identity manifolds. Stimuli are two different faces shown under a variety of transformations. <strong>(a)</strong> In primary visual cortex (V1), we imagine two high-dimensional manifolds corresponding to two face identities. From a single V1 cell (real data), the response to the two faces is non-separable. <strong>(b)</strong> In inferotemporal cortex (IT) later in the ventral stream, the activity is more separable and identity is easier to decode (real data). <strong>(c)</strong> In an idealized IT unit, the two responses would be perfectly separable.</figcaption></figure></div><p>Though the term manifold is somewhat of a buzzword right now in neuroscience<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a> and ML, it&#8217;s a nice idea. But as far as I know, we don&#8217;t currently have specific theories for how the brain does this disentangling.</p><p>This post wraps up the unsupervised learning module of the course. Next post, we will discuss attractor dynamics, which includes Hopfield networks!</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>Tenenbaum, Silva, &amp; Langford developed the similar method <a href="https://www.science.org/doi/10.1126/science.290.5500.2319">Isomaps</a> at around the same time. The two groups published their papers next to each other in Science in 2000, along with commentary.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>Here&#8217;s a <a href="https://www.youtube.com/watch?v=_YvBfsS7C90">talk</a> by Bruno on SMT.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p><a href="https://bsky.app/profile/mattneuro.bsky.social/post/3lb7rjihozc2s">Source</a>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Oxix!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf47d300-e6d4-4d39-9213-ce509468a4a8_1170x2000.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Oxix!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf47d300-e6d4-4d39-9213-ce509468a4a8_1170x2000.png 424w, https://substackcdn.com/image/fetch/$s_!Oxix!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf47d300-e6d4-4d39-9213-ce509468a4a8_1170x2000.png 848w, https://substackcdn.com/image/fetch/$s_!Oxix!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf47d300-e6d4-4d39-9213-ce509468a4a8_1170x2000.png 1272w, https://substackcdn.com/image/fetch/$s_!Oxix!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf47d300-e6d4-4d39-9213-ce509468a4a8_1170x2000.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Oxix!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf47d300-e6d4-4d39-9213-ce509468a4a8_1170x2000.png" width="1170" height="2000" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bf47d300-e6d4-4d39-9213-ce509468a4a8_1170x2000.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2000,&quot;width&quot;:1170,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1406032,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Oxix!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf47d300-e6d4-4d39-9213-ce509468a4a8_1170x2000.png 424w, https://substackcdn.com/image/fetch/$s_!Oxix!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf47d300-e6d4-4d39-9213-ce509468a4a8_1170x2000.png 848w, https://substackcdn.com/image/fetch/$s_!Oxix!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf47d300-e6d4-4d39-9213-ce509468a4a8_1170x2000.png 1272w, https://substackcdn.com/image/fetch/$s_!Oxix!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf47d300-e6d4-4d39-9213-ce509468a4a8_1170x2000.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></div></div>]]></content:encoded></item><item><title><![CDATA[Heaven metal]]></title><description><![CDATA[You should listen to Midwife]]></description><link>https://www.dissonances.blog/p/heaven-metal</link><guid isPermaLink="false">https://www.dissonances.blog/p/heaven-metal</guid><dc:creator><![CDATA[galen]]></dc:creator><pubDate>Sun, 17 Nov 2024 17:49:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/youtube/w_728,c_limit/4GvFVrXatP4" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>If you subscribed to my blog for neural computation content: I will sometimes post random more personal stuff, often music-related. Sorry if you don&#8217;t want that! But it&#8217;s my blog so I can do whatever I want</em> &#128519;.</p><p>I found myself at a metal concert last week. I don&#8217;t like metal! But I went to see the opener Madeline Johnston, a guitarist and singer who goes by Midwife. I always feel clumsy trying to describe music with words<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>, but it&#8217;s fun to try; I could wander forever in her guitar textures, which range from abrasive overdrive to delicate riffs, accompanied by ethereal vocal effects. Her music envelops you unexpectedly, like a warm hug from a stranger. Devastation and serenity coexist. I&#8217;ll defer to the musician: she calls her music <em>heaven metal</em>. I think it&#8217;s a perfect descriptor.</p><div id="youtube2-EtIfko_vauo" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;EtIfko_vauo&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/EtIfko_vauo?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>I&#8217;m impatient and impulsive, and my musical taste reflects this. I tend to prefer lots of movement, rhythmic structure, and interesting tonality. Midwife is none of this! But after listening to her for the first time a couple of months ago, I couldn&#8217;t get her slow-burn melodies out of my head. It&#8217;s hard to pin down exactly why I like her music so much, but it must have something to do with the tension of tender melodies set against noisy textures. You can find peace, even if things are hard. It&#8217;s a patient, deep introspection that is the opposite of almost everything I listen to these days.</p><div id="youtube2-nXJR5Zuv03E" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;nXJR5Zuv03E&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/nXJR5Zuv03E?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p><em>Killdozer</em>, from her newest album, has been looping in my head nonstop. Though the song seems angsty at first glance, it is, at its core, peaceful. The warm chords and soft guitar just feel like a hug! And the lyrics deliver a calm acceptance:</p><blockquote><p>All my songs are love songs<br>All my songs are blue<br>All my songs are about death<br>I live my life without you</p></blockquote><div id="youtube2-4GvFVrXatP4" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;4GvFVrXatP4&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/4GvFVrXatP4?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>Midwife pushes the normal boundaries of my listening, and forces me to slow down, in the best way. Her music gives me a chance to breathe, and to sit with complex emotions. It&#8217;s what art is about, I suppose.</p><p>By the way, I did stay for the main act, Blood Incantation. It was actually a lot of fun, though I did get a pretty nasty shin bruise from a guy who decided to mosh very far from the mosh pit. Which I guess is kind of par for the course?</p><p>I&#8217;ve never been a fan of metal because I cannot stand the screaming, and the volume of guitar stuff usually overwhelms me. But setting these aside, I found the rhythm and tonality super interesting: shifting, odd time signatures, dissonances (hey that&#8217;s the name of the blog!), and unpredictable scales. This is all stuff that I am drawn to normally! I grew up on classical music, and got super into contemporary classical music at one point<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>. There actually seem to be a lot of similarities to metal<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>. So maybe I&#8217;d be into metal if I could just get past&#8230; the way it sounds? </p><p>I can imagine this is how people who aren&#8217;t familiar with classical music feel: that it&#8217;s all just stuffy and boring. There&#8217;s certainly lots of classical music that is that, and I don&#8217;t blame anyone for thinking it, but there&#8217;s also plenty that isn&#8217;t. In the end, there are of course only two types of music: <a href="https://www.therestisnoise.com/2023/05/only-good-and-bad.html">the good kind, and the other kind</a>. Anyway, here&#8217;s some Blood Incantation (check out the transition at 3:00):</p><div id="youtube2-F6LVxFL-6NA" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;F6LVxFL-6NA&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/F6LVxFL-6NA?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>I love hearing crazy textures and rhythms live! I&#8217;m glad I got over myself and tried something new. Even if it meant getting kicked in the shin. And I hope everyone starts listening to Midwife.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>Like <a href="https://en.wikipedia.org/wiki/Writing_about_music_is_like_dancing_about_architecture">dancing about architecture</a>, though I&#8217;m sure I&#8217;d be even more clumsy at that.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>Bonus lore: I started blogging in high school&#8230; about contemporary classical music &#128584;</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>I&#8217;m actually curious about the overlap between metal and classical music, if anyone knows about this. For classic prog rock, one connection is Frank Zappa and Edgard Var&#232;se. And the first time I heard this King Crimson song I thought it was Var&#232;se: </p><div id="youtube2-ViRg4byBA3Y" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;ViRg4byBA3Y&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/ViRg4byBA3Y?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>Currently, I guess there&#8217;s people like Jonny Greenwood, Bryce Dessner, Nico Muhly.</p></div></div>]]></content:encoded></item><item><title><![CDATA[Some nonlinear learning]]></title><description><![CDATA[Clustering, and our favorite: sparse coding]]></description><link>https://www.dissonances.blog/p/some-nonlinear-learning</link><guid isPermaLink="false">https://www.dissonances.blog/p/some-nonlinear-learning</guid><dc:creator><![CDATA[galen]]></dc:creator><pubDate>Mon, 11 Nov 2024 16:01:15 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Z8JS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d17a48d-5623-4b9a-8f83-4ef24ec81f9b_1448x388.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Z8JS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d17a48d-5623-4b9a-8f83-4ef24ec81f9b_1448x388.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Z8JS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d17a48d-5623-4b9a-8f83-4ef24ec81f9b_1448x388.png 424w, https://substackcdn.com/image/fetch/$s_!Z8JS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d17a48d-5623-4b9a-8f83-4ef24ec81f9b_1448x388.png 848w, https://substackcdn.com/image/fetch/$s_!Z8JS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d17a48d-5623-4b9a-8f83-4ef24ec81f9b_1448x388.png 1272w, https://substackcdn.com/image/fetch/$s_!Z8JS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d17a48d-5623-4b9a-8f83-4ef24ec81f9b_1448x388.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Z8JS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d17a48d-5623-4b9a-8f83-4ef24ec81f9b_1448x388.png" width="1448" height="388" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5d17a48d-5623-4b9a-8f83-4ef24ec81f9b_1448x388.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:388,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:96549,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Z8JS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d17a48d-5623-4b9a-8f83-4ef24ec81f9b_1448x388.png 424w, https://substackcdn.com/image/fetch/$s_!Z8JS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d17a48d-5623-4b9a-8f83-4ef24ec81f9b_1448x388.png 848w, https://substackcdn.com/image/fetch/$s_!Z8JS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d17a48d-5623-4b9a-8f83-4ef24ec81f9b_1448x388.png 1272w, https://substackcdn.com/image/fetch/$s_!Z8JS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d17a48d-5623-4b9a-8f83-4ef24ec81f9b_1448x388.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://redwood.berkeley.edu/wp-content/uploads/2018/08/foldiak90.pdf">Foldiak 1990</a>.</figcaption></figure></div><p>Last post, we talked about the limits of representation learning in linear neuron models. In PCA, implemented by Sanger&#8217;s rule, we only consider pairwise correlations of inputs.</p><p>What happens if we want to look at higher-order correlations? A logical next step is nonlinear Hebbian learning. Suppose we now have a neuron with some nonlinear function <em>f</em>. <em>i</em> indexes the inputs <em>x</em> and corresponding weights <em>w</em>.</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;y=f(\\sum_i w_i x_i)&quot;,&quot;id&quot;:&quot;QFUYPWVBDF&quot;}" data-component-name="LatexBlockToDOM"></div><p>Our Hebbian update rule becomes</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\begin{aligned}\n\\Delta w_{i} &amp;\\propto y_ix_i \\\\\n&amp;= f(\\sum_jw_{j}x_j)x_i \\\\\n&amp;= k_0x_i + k_1 \\sum_j w_j x_i + k_2\\sum_{jk} w_j w_k x_kx_j x_i + ...\n\\end{aligned}&quot;,&quot;id&quot;:&quot;QGTIVGIBEX&quot;}" data-component-name="LatexBlockToDOM"></div><p>where <em>j </em>indexes all the neurons in the network. If you do a Taylor expansion, your weight updates are now a function of three- and higher-point correlations between units <em>x_i, x_j, x_k&#8230;</em> But what you get exactly of course depends on <em>f</em>.</p><h3>Winner-take-all</h3><p>How do we pick <em>f</em>? This depends on the structure of the data. Suppose our data come from discrete groups, or <em>clusters</em>, where we do not have ground truth labels for each point. For example, an animal identifying an odorant from olfactory input. Our network looks like this, where black arrows are excitation, and white arrows are inhibition.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Tgsd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ec17546-c458-4148-b0e3-b8c46c8b5798_1614x728.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Tgsd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ec17546-c458-4148-b0e3-b8c46c8b5798_1614x728.png 424w, https://substackcdn.com/image/fetch/$s_!Tgsd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ec17546-c458-4148-b0e3-b8c46c8b5798_1614x728.png 848w, https://substackcdn.com/image/fetch/$s_!Tgsd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ec17546-c458-4148-b0e3-b8c46c8b5798_1614x728.png 1272w, https://substackcdn.com/image/fetch/$s_!Tgsd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ec17546-c458-4148-b0e3-b8c46c8b5798_1614x728.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Tgsd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ec17546-c458-4148-b0e3-b8c46c8b5798_1614x728.png" width="496" height="223.8131868131868" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1ec17546-c458-4148-b0e3-b8c46c8b5798_1614x728.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:657,&quot;width&quot;:1456,&quot;resizeWidth&quot;:496,&quot;bytes&quot;:263362,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Tgsd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ec17546-c458-4148-b0e3-b8c46c8b5798_1614x728.png 424w, https://substackcdn.com/image/fetch/$s_!Tgsd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ec17546-c458-4148-b0e3-b8c46c8b5798_1614x728.png 848w, https://substackcdn.com/image/fetch/$s_!Tgsd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ec17546-c458-4148-b0e3-b8c46c8b5798_1614x728.png 1272w, https://substackcdn.com/image/fetch/$s_!Tgsd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ec17546-c458-4148-b0e3-b8c46c8b5798_1614x728.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>We can take <em>f</em> to be the <em>winner-take-all</em> function. That is, <em>y_i </em>is 1 if the input has the highest inner product with the <em>i</em>th weight compared to other weights, and 0 otherwise.</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\n\ny_i = \n\\begin{cases}\n1 &amp; \\sum_k w_{ik}x_k > \\sum_k w_{jk} x_k\\, \\, \\forall i \\neq j \\\\\n0 &amp; \\text{otherwise}\n\\end{cases}&quot;,&quot;id&quot;:&quot;ZZFCWKOTQA&quot;}" data-component-name="LatexBlockToDOM"></div><p>E.g. for output unit &#9312; to turn on, the inner product of its weights and the input would have to be higher than the every other unit&#8217;s weights&#8217; inner product with the input. The learning rule is</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\Delta w_{ij} = \\eta y_i (x_j - w_{ij})&quot;,&quot;id&quot;:&quot;QRGCWQTADH&quot;}" data-component-name="LatexBlockToDOM"></div><p>which says that the cluster center moves toward the points that were assigned to it.</p><p>This results in a discrete clustering algorithm: given a dataset, assign each point to a cluster that contains other points similar to it. This is also a form of <em>competitive learning</em>, as seen literally in the winner-take-all function, meaning that neurons have the ability to turn other neurons off in the appropriate situation.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Yzwd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb35cea6-bd06-4788-aef7-389716659539_2224x1216.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Yzwd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb35cea6-bd06-4788-aef7-389716659539_2224x1216.png 424w, https://substackcdn.com/image/fetch/$s_!Yzwd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb35cea6-bd06-4788-aef7-389716659539_2224x1216.png 848w, https://substackcdn.com/image/fetch/$s_!Yzwd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb35cea6-bd06-4788-aef7-389716659539_2224x1216.png 1272w, https://substackcdn.com/image/fetch/$s_!Yzwd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb35cea6-bd06-4788-aef7-389716659539_2224x1216.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Yzwd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb35cea6-bd06-4788-aef7-389716659539_2224x1216.png" width="570" height="311.6208791208791" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fb35cea6-bd06-4788-aef7-389716659539_2224x1216.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:796,&quot;width&quot;:1456,&quot;resizeWidth&quot;:570,&quot;bytes&quot;:362598,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Yzwd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb35cea6-bd06-4788-aef7-389716659539_2224x1216.png 424w, https://substackcdn.com/image/fetch/$s_!Yzwd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb35cea6-bd06-4788-aef7-389716659539_2224x1216.png 848w, https://substackcdn.com/image/fetch/$s_!Yzwd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb35cea6-bd06-4788-aef7-389716659539_2224x1216.png 1272w, https://substackcdn.com/image/fetch/$s_!Yzwd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb35cea6-bd06-4788-aef7-389716659539_2224x1216.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">x are cluster centers (randomly initialized), and &#8226; are data points. After learning cluster centers (weights) from the points, each point is assigned to a cluster.</figcaption></figure></div><p>In an abstract neural circuit, you could think of winner-take-all as <em>1-sparse network</em>: given some input, exactly one neuron fires in response. But there are obvious limitations to the winner-take-all algorithm. What if we can&#8217;t assume that each input corresponds to exactly what one neuron is coding? What if activity is distributed across a population of neurons?</p><h3>Sparse coding</h3><p>Suppose we could assign multiple clusters to each data point. We could use these assignments (AKA weights) to linearly combine different clusters to describe each data point. Said another way: rather than representing one concept with one neuron, we could represent one concept using a small set of neurons, where the rest of the neurons are silent. This is <em>sparse coding</em>.</p><p>In the below figure, we show a range of coding schemes, each with its own pros and cons. In a dense binary code, you can represent <em>2^N</em> concepts where <em>N</em> is the number of neurons, but it is brittle: changing one unit can completely change the output. Plus, more neurons will be firing at once, which is less energy efficient, and it is nontrivial to decode information from the neural activity. On the other end of the spectrum, local codes are winner-take-all AKA a lookup table AKA &#8220;grandmother cells&#8221;<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>: for each concept, exactly one neuron fires. You can only represent up to <em>N </em>concepts, and if one neuron is destroyed, you can no longer represent the corresponding concept. But it requires very little energy, and can be decoded easily by a direct readout.</p><p>A sparse code is then somewhere in the middle: it is more robust to noise and perturbations, and can represent up to <em>N </em>choose <em>K</em> patterns, where <em>K &#171; N</em> is the number of active neurons.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IjTM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59c37805-284b-4681-b62f-979ee92ba3bf_1796x1106.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IjTM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59c37805-284b-4681-b62f-979ee92ba3bf_1796x1106.png 424w, https://substackcdn.com/image/fetch/$s_!IjTM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59c37805-284b-4681-b62f-979ee92ba3bf_1796x1106.png 848w, https://substackcdn.com/image/fetch/$s_!IjTM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59c37805-284b-4681-b62f-979ee92ba3bf_1796x1106.png 1272w, https://substackcdn.com/image/fetch/$s_!IjTM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59c37805-284b-4681-b62f-979ee92ba3bf_1796x1106.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IjTM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59c37805-284b-4681-b62f-979ee92ba3bf_1796x1106.png" width="728" height="448.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/59c37805-284b-4681-b62f-979ee92ba3bf_1796x1106.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:897,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:171082,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!IjTM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59c37805-284b-4681-b62f-979ee92ba3bf_1796x1106.png 424w, https://substackcdn.com/image/fetch/$s_!IjTM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59c37805-284b-4681-b62f-979ee92ba3bf_1796x1106.png 848w, https://substackcdn.com/image/fetch/$s_!IjTM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59c37805-284b-4681-b62f-979ee92ba3bf_1796x1106.png 1272w, https://substackcdn.com/image/fetch/$s_!IjTM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59c37805-284b-4681-b62f-979ee92ba3bf_1796x1106.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Each type of representation (here all binary) has its pros and cons.</figcaption></figure></div><p>In his quest to relate sensory perception to neural activity, Horace Barlow proposed the concept of sparse coding in <a href="https://www.cs.jhu.edu/~ayuille/JHUcourses/ProbabilisticModelsOfVisualCognition2020/Lec4/BarlowSparsity1972.pdf">1972</a> as one of five dogmas:</p><blockquote><p>2. The sensory system is organized to achieve as complete a representation of the sensory stimulus as possible with the minimum number of active neurons. </p></blockquote><p>Peter F&#246;ldi&#225;k first created a neural learning algorithm for sparse coding in <a href="https://redwood.berkeley.edu/wp-content/uploads/2018/08/foldiak90.pdf">1990</a>. Bruno Olshausen &amp; David Field showed in <a href="https://rctn.org/bruno/papers/nature-paper.pdf">1996</a> that maximizing image reconstruction and sparsity of neural activity results in learning localized, oriented, and bandpass features that resemble receptive fields in mammalian primary visual cortex<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WcbD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddf0468-8331-4777-8ec9-83e67c37a1cf_2184x660.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WcbD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddf0468-8331-4777-8ec9-83e67c37a1cf_2184x660.png 424w, https://substackcdn.com/image/fetch/$s_!WcbD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddf0468-8331-4777-8ec9-83e67c37a1cf_2184x660.png 848w, https://substackcdn.com/image/fetch/$s_!WcbD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddf0468-8331-4777-8ec9-83e67c37a1cf_2184x660.png 1272w, https://substackcdn.com/image/fetch/$s_!WcbD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddf0468-8331-4777-8ec9-83e67c37a1cf_2184x660.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WcbD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddf0468-8331-4777-8ec9-83e67c37a1cf_2184x660.png" width="1456" height="440" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dddf0468-8331-4777-8ec9-83e67c37a1cf_2184x660.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:440,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1197930,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WcbD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddf0468-8331-4777-8ec9-83e67c37a1cf_2184x660.png 424w, https://substackcdn.com/image/fetch/$s_!WcbD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddf0468-8331-4777-8ec9-83e67c37a1cf_2184x660.png 848w, https://substackcdn.com/image/fetch/$s_!WcbD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddf0468-8331-4777-8ec9-83e67c37a1cf_2184x660.png 1272w, https://substackcdn.com/image/fetch/$s_!WcbD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdddf0468-8331-4777-8ec9-83e67c37a1cf_2184x660.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A subset of features learned from sparse coding on natural images.</figcaption></figure></div><p>Why do these features look the way they do? Learning them can be thought of abstractly as an evolutionary process to develop optimal representations (i.e. receptive fields). They are adapted to the low-level statistics of natural scenes, which contain localized oriented edges<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>, and learning oriented features requires seeing correlations beyond pairwise<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a>. Sparse coding provides a way to do this.</p><p>Mathematically, the goal of sparse coding is learn the features <em>&#934;</em> and infer the neural activity <em>a</em> that minimize the energy function <em>E</em>:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;E = \\lVert x - \\Phi a \\rVert_2^2 + \\lambda \\lVert a \\rVert_1&quot;,&quot;id&quot;:&quot;YEUAHRUTOX&quot;}" data-component-name="LatexBlockToDOM"></div><p>Where <em>x</em> is the input image, and <em>&#955;</em> is a scalar that controls the strength of the sparsity penalty. The first term encourages reconstruction of the image, and the second encourages sparsity of the coefficients. Note that this is a <em>generative model</em>: we reconstruct the image using a linear combination of features</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;x = \\Phi a + \\epsilon&quot;,&quot;id&quot;:&quot;BIYGTWTMWD&quot;}" data-component-name="LatexBlockToDOM"></div><p>where <em>&#1013;</em> is some random measurement or image noise.</p><p>Inferring the activity amounts to producing the sparsest coefficients that best reconstruct the image using the given features<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a>. Unlike in standard machine learning, we use <em>inference</em> here to mean an iterative procedure that outputs relevant factors <em>a</em> given input data<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a>. Although the generative model is linear, inference itself is recurrent and nonlinear: updating the activity of one neuron depends on the activity of all the neurons in the previous time step. Because of the sparsity constraint, this can also be thought of as competitive learning<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a>.</p><p>Sparse coding is an unsupervised feature learning algorithm that has lots of advantages to previous methods we discussed. Outside of vision, there has been experimental evidence for sparse coding in other systems in other animals (see Olshausen &amp; Field <a href="https://www.cnbc.cmu.edu/~tai/nc19journalclubs/Olshausen-Field-CON-2004-1.pdf">2004</a> for a review). But there are of course limitations. A clear one is the inability of a sparse code to capture spatial transformations, or more abstract similarities. The next post will focus on one method that starts to address this: manifold learning.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>This term comes from the idea that there is a cell that fires when you see your grandmother. There has been <a href="https://www.nature.com/articles/nature03687">experimental evidence</a> for this in a guy who had a Jennifer Aniston cell, though apparently he was also just obsessed with Jennifer Anniston, so&#8230; &#129335;&#127995;&#8205;&#9792;&#65039;</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>I wrote a simple sparse coding tutorial <a href="https://github.com/rctn/sparsecoding/blob/main/tutorials/vanilla/tutorial.ipynb">here</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>Unfortunately I don&#8217;t have time to go into this here, but much of the motivation for sparse coding from natural scene statistics comes from Field <a href="https://www.rctn.org/bruno/public/papers/field94.pdf">1994</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>For example, PCA on natural images (considering only pairwise correlations) results in non-localized and generally non-oriented features.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UHIy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c8efc3-479f-4e44-97cf-23d3f5fd6acf_1106x1102.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UHIy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c8efc3-479f-4e44-97cf-23d3f5fd6acf_1106x1102.png 424w, https://substackcdn.com/image/fetch/$s_!UHIy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c8efc3-479f-4e44-97cf-23d3f5fd6acf_1106x1102.png 848w, https://substackcdn.com/image/fetch/$s_!UHIy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c8efc3-479f-4e44-97cf-23d3f5fd6acf_1106x1102.png 1272w, https://substackcdn.com/image/fetch/$s_!UHIy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c8efc3-479f-4e44-97cf-23d3f5fd6acf_1106x1102.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UHIy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c8efc3-479f-4e44-97cf-23d3f5fd6acf_1106x1102.png" width="472" height="470.2929475587703" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/08c8efc3-479f-4e44-97cf-23d3f5fd6acf_1106x1102.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1102,&quot;width&quot;:1106,&quot;resizeWidth&quot;:472,&quot;bytes&quot;:360215,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UHIy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c8efc3-479f-4e44-97cf-23d3f5fd6acf_1106x1102.png 424w, https://substackcdn.com/image/fetch/$s_!UHIy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c8efc3-479f-4e44-97cf-23d3f5fd6acf_1106x1102.png 848w, https://substackcdn.com/image/fetch/$s_!UHIy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c8efc3-479f-4e44-97cf-23d3f5fd6acf_1106x1102.png 1272w, https://substackcdn.com/image/fetch/$s_!UHIy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08c8efc3-479f-4e44-97cf-23d3f5fd6acf_1106x1102.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p>Given a set of features, there are many ways to infer coefficients: standard gradient descent, the more neurally-plausible <a href="https://pubmed.ncbi.nlm.nih.gov/18439138/">locally competitive algorithm</a>, <a href="https://www.ceremade.dauphine.fr/~carlier/FISTA">ISTA/FISTA</a>, etc.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-6" href="#footnote-anchor-6" class="footnote-number" contenteditable="false" target="_self">6</a><div class="footnote-content"><p>Bruno&#8217;s book <a href="https://www.rctn.org/bruno/papers/perception-as-inference.pdf">chapter</a> on perception as inference.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-7" href="#footnote-anchor-7" class="footnote-number" contenteditable="false" target="_self">7</a><div class="footnote-content"><p>The concept of <em>explaining away</em> is very important in sparse coding inference, and separates it from feedforward filtering algorithms that also produce activity given a set of features. On the left, we see two receptive fields representing two cells, overlaid on an edge. For feedforward neurons (the output is just the inner product between the receptive field and the pixels underneath), the tilted cell would have only a slightly lower firing rate than the upright one, because both receptive fields match decently well with the edge orientation and polarity. However, in sparse coding, the tiled cell would be suppressed by the upright cell, because the upright cell is better aligned with the edge. This suppression also results in a sparser representation.</p><p>Competitive learning and explaining away can be better explained through <a href="https://pubmed.ncbi.nlm.nih.gov/18439138/">LCA</a>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!y3Bh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c5fb7da-d41a-4941-8e62-a7839d19bb1b_2320x1008.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!y3Bh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c5fb7da-d41a-4941-8e62-a7839d19bb1b_2320x1008.png 424w, https://substackcdn.com/image/fetch/$s_!y3Bh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c5fb7da-d41a-4941-8e62-a7839d19bb1b_2320x1008.png 848w, https://substackcdn.com/image/fetch/$s_!y3Bh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c5fb7da-d41a-4941-8e62-a7839d19bb1b_2320x1008.png 1272w, https://substackcdn.com/image/fetch/$s_!y3Bh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c5fb7da-d41a-4941-8e62-a7839d19bb1b_2320x1008.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!y3Bh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c5fb7da-d41a-4941-8e62-a7839d19bb1b_2320x1008.png" width="1456" height="633" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6c5fb7da-d41a-4941-8e62-a7839d19bb1b_2320x1008.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:633,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:160282,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!y3Bh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c5fb7da-d41a-4941-8e62-a7839d19bb1b_2320x1008.png 424w, https://substackcdn.com/image/fetch/$s_!y3Bh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c5fb7da-d41a-4941-8e62-a7839d19bb1b_2320x1008.png 848w, https://substackcdn.com/image/fetch/$s_!y3Bh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c5fb7da-d41a-4941-8e62-a7839d19bb1b_2320x1008.png 1272w, https://substackcdn.com/image/fetch/$s_!y3Bh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c5fb7da-d41a-4941-8e62-a7839d19bb1b_2320x1008.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></div></div>]]></content:encoded></item><item><title><![CDATA[Limits of linear learning]]></title><description><![CDATA[Neural implementation of linear classification and principal components analysis]]></description><link>https://www.dissonances.blog/p/limits-of-linear-learning</link><guid isPermaLink="false">https://www.dissonances.blog/p/limits-of-linear-learning</guid><pubDate>Thu, 31 Oct 2024 15:01:35 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!hYJz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d5daad8-bf1b-49a1-9dca-19c49c866c55_1162x840.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pfU2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976402b-7681-49fc-867f-40f11bdb311c_2424x334.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pfU2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976402b-7681-49fc-867f-40f11bdb311c_2424x334.png 424w, https://substackcdn.com/image/fetch/$s_!pfU2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976402b-7681-49fc-867f-40f11bdb311c_2424x334.png 848w, https://substackcdn.com/image/fetch/$s_!pfU2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976402b-7681-49fc-867f-40f11bdb311c_2424x334.png 1272w, https://substackcdn.com/image/fetch/$s_!pfU2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976402b-7681-49fc-867f-40f11bdb311c_2424x334.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pfU2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976402b-7681-49fc-867f-40f11bdb311c_2424x334.png" width="1456" height="201" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5976402b-7681-49fc-867f-40f11bdb311c_2424x334.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:201,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:97987,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pfU2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976402b-7681-49fc-867f-40f11bdb311c_2424x334.png 424w, https://substackcdn.com/image/fetch/$s_!pfU2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976402b-7681-49fc-867f-40f11bdb311c_2424x334.png 848w, https://substackcdn.com/image/fetch/$s_!pfU2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976402b-7681-49fc-867f-40f11bdb311c_2424x334.png 1272w, https://substackcdn.com/image/fetch/$s_!pfU2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976402b-7681-49fc-867f-40f11bdb311c_2424x334.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption"><a href="https://spaces.ac.cn/usr/uploads/2018/04/3543773848.pdf">Redlich 1993</a>.</figcaption></figure></div><p>After sensing and coding, the brain must reformat information for behavior in the world. For example, to act on an object, the number of <a href="https://www.dissonances.blog/p/the-brain-as-a-statistician">photons hitting each rod</a>, or the <a href="https://www.dissonances.blog/p/whitening-three-ways">decorrelated activity across photoreceptors</a> is probably not that relevant. The brain may, however, need to know how close the object is, or which direction it&#8217;s moving. Information is reformatted into <em>representations<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a></em> that make relevant variables explicit. </p><p>In the mammalian brain, we know that primary visual cortex (V1) represents low-level features such as localized oriented edges. But to forage for food, or identify the face of a friend in a crowd, more abstract and complex concepts are needed. How are these representations formed, and how can we understand what they are? If we were to build a brain, what would we put in each box in the cortical diagram below?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hYJz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d5daad8-bf1b-49a1-9dca-19c49c866c55_1162x840.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hYJz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d5daad8-bf1b-49a1-9dca-19c49c866c55_1162x840.png 424w, https://substackcdn.com/image/fetch/$s_!hYJz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d5daad8-bf1b-49a1-9dca-19c49c866c55_1162x840.png 848w, https://substackcdn.com/image/fetch/$s_!hYJz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d5daad8-bf1b-49a1-9dca-19c49c866c55_1162x840.png 1272w, https://substackcdn.com/image/fetch/$s_!hYJz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d5daad8-bf1b-49a1-9dca-19c49c866c55_1162x840.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hYJz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d5daad8-bf1b-49a1-9dca-19c49c866c55_1162x840.png" width="656" height="474.2168674698795" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4d5daad8-bf1b-49a1-9dca-19c49c866c55_1162x840.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:840,&quot;width&quot;:1162,&quot;resizeWidth&quot;:656,&quot;bytes&quot;:180975,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hYJz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d5daad8-bf1b-49a1-9dca-19c49c866c55_1162x840.png 424w, https://substackcdn.com/image/fetch/$s_!hYJz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d5daad8-bf1b-49a1-9dca-19c49c866c55_1162x840.png 848w, https://substackcdn.com/image/fetch/$s_!hYJz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d5daad8-bf1b-49a1-9dca-19c49c866c55_1162x840.png 1272w, https://substackcdn.com/image/fetch/$s_!hYJz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d5daad8-bf1b-49a1-9dca-19c49c866c55_1162x840.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Each box represents a cortical area, with box size proportional to surface area. The thickness of connecting lines is proportional to number of connections, which run in both directions. <a href="https://pubmed.ncbi.nlm.nih.gov/18957212/">Wallisch &amp; Movshon 2008</a>.</figcaption></figure></div><p>We are very far from answering these questions, but they serve as high-level motivation for this post and the next. I&#8217;ll describe several learning rules that can be implemented by basic neuron models, their resulting representations, and their limitations.</p><p>Rather than tackling the entire problem of visual perception, we&#8217;ll start small, with the model that Bruno says &#8220;is ironically still with us today&#8221;: the <em>perceptron</em>, designed for pattern recognition<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a> by Frank Rosenblatt in the late 1950s. Why ironic? We spent a few lectures talking about the ways in which <a href="https://www.dissonances.blog/p/neural-nonlinearities">neurons are not linear</a>, but the perceptron is fundamentally a linear summing device that takes inputs from other units, multiplies them by some weights, and adds them together. The effectiveness of the perceptron unit lies in outputting a nonlinear function of that sum, which crudely approximates an action potential. This model is also the building block of all current machine learning, so there are a million tutorials and historical accounts out there. I&#8217;ll just focus on its limitations.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xK-3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8357a1f-a10b-4790-857a-0af84eac8986_3064x1074.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xK-3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8357a1f-a10b-4790-857a-0af84eac8986_3064x1074.png 424w, https://substackcdn.com/image/fetch/$s_!xK-3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8357a1f-a10b-4790-857a-0af84eac8986_3064x1074.png 848w, https://substackcdn.com/image/fetch/$s_!xK-3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8357a1f-a10b-4790-857a-0af84eac8986_3064x1074.png 1272w, https://substackcdn.com/image/fetch/$s_!xK-3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8357a1f-a10b-4790-857a-0af84eac8986_3064x1074.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xK-3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8357a1f-a10b-4790-857a-0af84eac8986_3064x1074.png" width="1456" height="510" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d8357a1f-a10b-4790-857a-0af84eac8986_3064x1074.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:510,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:322258,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xK-3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8357a1f-a10b-4790-857a-0af84eac8986_3064x1074.png 424w, https://substackcdn.com/image/fetch/$s_!xK-3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8357a1f-a10b-4790-857a-0af84eac8986_3064x1074.png 848w, https://substackcdn.com/image/fetch/$s_!xK-3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8357a1f-a10b-4790-857a-0af84eac8986_3064x1074.png 1272w, https://substackcdn.com/image/fetch/$s_!xK-3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8357a1f-a10b-4790-857a-0af84eac8986_3064x1074.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Left: input vector <em>x</em> is multiplied by weights <em>w</em>, summed together, and passed through a point-wise nonlinearity <em>&#963;</em> to get output scalar <em>y</em>. Right (<a href="https://mlstory.org/">Hardt and Recht 2022</a>): with <em>n=2</em> and a set of linearly separable points <em>x </em>with labels <em>y</em> (+ or -), a visualization of the decision boundary (dotted line) given by a solution <em>w</em>.</figcaption></figure></div><p>There&#8217;s actually nothing we can say about the limitations of the perceptron that hasn&#8217;t already been said. Marvin Minsky and Seymour Papert basically wrote an entire <a href="https://en.wikipedia.org/wiki/Perceptrons_(book)">diss track</a> in 1969. But for our purposes, perceptrons have two major weaknesses. First, they require labels, or a teaching signal, to learn the weights mentioned above. We call this a <em>supervised</em> learning problem. For example, if you want to train a model to identify objects in a supervised fashion, you must know the true identity of each example in the training set. Is it reasonable to assume that for any problem we want to solve, in machine learning or in nature, we have explicit ground truth information for every example? Probably not. Second, while the perceptron has nice formal guarantees for labelled data that are linearly separable, these don&#8217;t hold for non-linearly separable problems (of course, you can transform your data into a space where it is linearly separable). In the above right figure, imagine if you had a <strong>+</strong> point to the right of the <strong>-</strong> points; as this dataset is not linearly separable, you would not be able to find a single line in 2D to separate all <strong>+</strong> from all <strong>-</strong>. Unfortunately, pretty much all the problems we care about do not have labels, and are not linearly separable. Very sad!</p><p>Even with all its issues, the perceptron is a good starting point because it sets up the problem of <em>learning</em>, or how to find the best representation for a task. Given a set of points and labels, how do we arrive at the correct <em>w</em>? It turns out it&#8217;s just basic calculus: assign some kind of differentiable score function to the model, and change <em>w </em>iteratively such that it increases the score. Gradient descent is still the most effective learning algorithm in practice today. There are also a million tutorials on this, so I won&#8217;t go into it here.</p><p>Other than the tenuous connection between a perceptron and a real neuron, how does this all relate to the brain? Is there a &#8220;teaching signal&#8221; that helps us modify our synaptic weights? Is gradient descent implemented in the brain<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>? Up until this point in the course, most concepts have been grounded in physiology or experimental evidence: biophysics, spiking neuron models, sensory and efficient coding. We are about halfway through (I am a few weeks behind with blogging), and the topic of representations marks the start of the more theoretical section of the course. That is, what are possible models and theories that could explain phenomena in the brain, based on mathematical ideas we may not yet have experimental proof for? These theories can then drive future predictions and experiments. </p><p>There is also clearly a big overlap between theoretical neuroscience, machine learning, and computer science, which is not coincidental: neuroscience, cybernetics, and computation have been intertwined since their beginnings. And the first well-known linear(ish) neuron model was not actually the perceptron, but the 1943 <a href="https://www.cs.cmu.edu/~./epxing/Class/10715/reading/McCulloch.and.Pitts.pdf">McCulloch-Pitts neuron</a>, which also inspired early computers<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a>.</p><p>I&#8217;m rambling, but there is so much to say! We are also rapidly approaching my research area, so I have to restrain myself. Let&#8217;s examine other types of lesser-known early models beyond the perceptron, starting with an <em>unsupervised</em> learning method, which does not rely on ground truth labels. Principal components analysis (PCA), which decorrelates data, is one such method. Below, the original data contain correlations:<em> </em>as <em>x</em> values increase, so do <em>y</em>, and vice versa. After linear projection onto the orthonormal basis W, or the directions of highest variance of the data, the decorrelated data on the right no longer have this pattern.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JJHa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90988c3d-13ae-44af-b1d9-d9794593a058_1658x947.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JJHa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90988c3d-13ae-44af-b1d9-d9794593a058_1658x947.png 424w, https://substackcdn.com/image/fetch/$s_!JJHa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90988c3d-13ae-44af-b1d9-d9794593a058_1658x947.png 848w, https://substackcdn.com/image/fetch/$s_!JJHa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90988c3d-13ae-44af-b1d9-d9794593a058_1658x947.png 1272w, https://substackcdn.com/image/fetch/$s_!JJHa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90988c3d-13ae-44af-b1d9-d9794593a058_1658x947.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JJHa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90988c3d-13ae-44af-b1d9-d9794593a058_1658x947.png" width="504" height="288" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/90988c3d-13ae-44af-b1d9-d9794593a058_1658x947.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:832,&quot;width&quot;:1456,&quot;resizeWidth&quot;:504,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!JJHa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90988c3d-13ae-44af-b1d9-d9794593a058_1658x947.png 424w, https://substackcdn.com/image/fetch/$s_!JJHa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90988c3d-13ae-44af-b1d9-d9794593a058_1658x947.png 848w, https://substackcdn.com/image/fetch/$s_!JJHa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90988c3d-13ae-44af-b1d9-d9794593a058_1658x947.png 1272w, https://substackcdn.com/image/fetch/$s_!JJHa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90988c3d-13ae-44af-b1d9-d9794593a058_1658x947.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">PCA in two dimensions. Left: the weights W are the eigenvectors of the covariance matrix of the data. W1 points in the direction of highest variance, and W2 the second highest. Right: applying the weights to the data results in decorrelated (rotated) data.</figcaption></figure></div><p>What&#8217;s lesser-known is not PCA itself, but the fact that it can be implemented by a neural network using a local update rule called <em>Hebbian learning</em>, or colloquially, the concept that &#8220;neurons that fire together wire together&#8221;. Let&#8217;s assume a simple linear model with some synaptic weight. If two connected neurons fire in response to the same input, then they likely represent some correlation, and Hebbian learning says we increase the strength of the connection.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YCcG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358bbdb4-fb88-4335-bbd1-52ec945cb765_1292x1068.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YCcG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358bbdb4-fb88-4335-bbd1-52ec945cb765_1292x1068.png 424w, https://substackcdn.com/image/fetch/$s_!YCcG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358bbdb4-fb88-4335-bbd1-52ec945cb765_1292x1068.png 848w, https://substackcdn.com/image/fetch/$s_!YCcG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358bbdb4-fb88-4335-bbd1-52ec945cb765_1292x1068.png 1272w, https://substackcdn.com/image/fetch/$s_!YCcG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358bbdb4-fb88-4335-bbd1-52ec945cb765_1292x1068.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YCcG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358bbdb4-fb88-4335-bbd1-52ec945cb765_1292x1068.png" width="406" height="335.60990712074306" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/358bbdb4-fb88-4335-bbd1-52ec945cb765_1292x1068.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1068,&quot;width&quot;:1292,&quot;resizeWidth&quot;:406,&quot;bytes&quot;:93779,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YCcG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358bbdb4-fb88-4335-bbd1-52ec945cb765_1292x1068.png 424w, https://substackcdn.com/image/fetch/$s_!YCcG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358bbdb4-fb88-4335-bbd1-52ec945cb765_1292x1068.png 848w, https://substackcdn.com/image/fetch/$s_!YCcG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358bbdb4-fb88-4335-bbd1-52ec945cb765_1292x1068.png 1272w, https://substackcdn.com/image/fetch/$s_!YCcG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358bbdb4-fb88-4335-bbd1-52ec945cb765_1292x1068.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Hebbian learning says that the change in the weight between two units <em>W_AB</em> increases proportionally with the correlation <em>&lt;AB&gt;</em> of the units&#8217; activity. If we feed an animal right after ringing a bell, it will start to associate these two events and the weight of A onto B will strengthen. This means that in the future, if A fires, B will likely fire.</figcaption></figure></div><p>In 1982, Erkki Oja proposed an implementation of PCA using Hebbian learning, and Terence Sanger generalized this in 1989 for a network with multiple output units. Given a linear neuron </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!P0MQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13c615a5-2d46-41bd-a6dc-1bee211be7b3_1434x858.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!P0MQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13c615a5-2d46-41bd-a6dc-1bee211be7b3_1434x858.png 424w, https://substackcdn.com/image/fetch/$s_!P0MQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13c615a5-2d46-41bd-a6dc-1bee211be7b3_1434x858.png 848w, https://substackcdn.com/image/fetch/$s_!P0MQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13c615a5-2d46-41bd-a6dc-1bee211be7b3_1434x858.png 1272w, https://substackcdn.com/image/fetch/$s_!P0MQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13c615a5-2d46-41bd-a6dc-1bee211be7b3_1434x858.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!P0MQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13c615a5-2d46-41bd-a6dc-1bee211be7b3_1434x858.png" width="506" height="302.7531380753138" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/13c615a5-2d46-41bd-a6dc-1bee211be7b3_1434x858.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:858,&quot;width&quot;:1434,&quot;resizeWidth&quot;:506,&quot;bytes&quot;:99500,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!P0MQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13c615a5-2d46-41bd-a6dc-1bee211be7b3_1434x858.png 424w, https://substackcdn.com/image/fetch/$s_!P0MQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13c615a5-2d46-41bd-a6dc-1bee211be7b3_1434x858.png 848w, https://substackcdn.com/image/fetch/$s_!P0MQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13c615a5-2d46-41bd-a6dc-1bee211be7b3_1434x858.png 1272w, https://substackcdn.com/image/fetch/$s_!P0MQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13c615a5-2d46-41bd-a6dc-1bee211be7b3_1434x858.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Oja&#8217;s learning rule is</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\Delta w_{i} = \\eta (yx_i-y^2w_i)&quot;,&quot;id&quot;:&quot;EQMFQCRPVJ&quot;}" data-component-name="LatexBlockToDOM"></div><p>where <em>&#951;</em> is the learning rate. The first term in the parentheses tells us that <em>w_i </em>grows proportionally with the correlation between the unit&#8217;s output <em>y</em> and input <em>x_i</em>, which is just Hebb&#8217;s rule. The second term constrains the growth of <em>w_i</em> (specifically, to be unit norm).</p><p>This implements learning the first principle component in PCA. How? If you let a linear neuron follow Hebb&#8217;s rule, you can show that the weight vector <em>w_i</em> will grow in the direction of the first eigenvector of the data&#8217;s covariance matrix, AKA the first principal component. The problem is that the length of <em>w_i</em> will grow exponentially, which is why Oja&#8217;s rule has the second term.</p><p>Sanger&#8217;s learning generalizes this to a network with multiple output neurons, i.e. multiple dimensions of PCA. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UK_r!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5f357c-90b0-474e-a205-1f896553a559_1296x766.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UK_r!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5f357c-90b0-474e-a205-1f896553a559_1296x766.png 424w, https://substackcdn.com/image/fetch/$s_!UK_r!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5f357c-90b0-474e-a205-1f896553a559_1296x766.png 848w, https://substackcdn.com/image/fetch/$s_!UK_r!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5f357c-90b0-474e-a205-1f896553a559_1296x766.png 1272w, https://substackcdn.com/image/fetch/$s_!UK_r!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5f357c-90b0-474e-a205-1f896553a559_1296x766.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UK_r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5f357c-90b0-474e-a205-1f896553a559_1296x766.png" width="484" height="286.0679012345679" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ae5f357c-90b0-474e-a205-1f896553a559_1296x766.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:766,&quot;width&quot;:1296,&quot;resizeWidth&quot;:484,&quot;bytes&quot;:104926,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UK_r!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5f357c-90b0-474e-a205-1f896553a559_1296x766.png 424w, https://substackcdn.com/image/fetch/$s_!UK_r!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5f357c-90b0-474e-a205-1f896553a559_1296x766.png 848w, https://substackcdn.com/image/fetch/$s_!UK_r!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5f357c-90b0-474e-a205-1f896553a559_1296x766.png 1272w, https://substackcdn.com/image/fetch/$s_!UK_r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5f357c-90b0-474e-a205-1f896553a559_1296x766.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A linear network with <em>n</em> inputs and <em>m</em> outputs; weight matrix is size <em>m </em>x<em> n</em>. Each connection (line) has a corresponding scalar weight.</figcaption></figure></div><p>The first term below says we update weight <em>ij</em> proportionally with the correlation between input <em>x_j</em> and output <em>y_i</em>. The second term constrains the growth of <em>w</em> relative to other neurons&#8217; correlations with the output.</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\Delta w_{ij} = \\eta \\Bigr(y_i x_j - y_i \\sum_{k=1}^i y_k w_{kj} \\Bigr)&quot;,&quot;id&quot;:&quot;XZSQKGDCTV&quot;}" data-component-name="LatexBlockToDOM"></div><p>I skipped over a ton of details, which you can read in Bruno&#8217;s explanation of the derivation <a href="https://redwood.berkeley.edu/wp-content/uploads/2018/08/handout-hebb-PCA.pdf">here</a>.</p><p>If we had a group of neurons implementing PCA, what would be the limitations of this representation? First, suppose we had datasets that had the same mean and variance in each dimension, but one had a Gaussian distribution while the other didn&#8217;t. PCA would arrive at the same solution for both datasets, because it considers only pairwise correlations, and produces orthogonal weights.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YKsN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a752618-dad9-432a-adca-298cec8d0dee_1495x764.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YKsN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a752618-dad9-432a-adca-298cec8d0dee_1495x764.png 424w, https://substackcdn.com/image/fetch/$s_!YKsN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a752618-dad9-432a-adca-298cec8d0dee_1495x764.png 848w, https://substackcdn.com/image/fetch/$s_!YKsN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a752618-dad9-432a-adca-298cec8d0dee_1495x764.png 1272w, https://substackcdn.com/image/fetch/$s_!YKsN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a752618-dad9-432a-adca-298cec8d0dee_1495x764.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YKsN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a752618-dad9-432a-adca-298cec8d0dee_1495x764.png" width="636" height="324.989010989011" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4a752618-dad9-432a-adca-298cec8d0dee_1495x764.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:744,&quot;width&quot;:1456,&quot;resizeWidth&quot;:636,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YKsN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a752618-dad9-432a-adca-298cec8d0dee_1495x764.png 424w, https://substackcdn.com/image/fetch/$s_!YKsN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a752618-dad9-432a-adca-298cec8d0dee_1495x764.png 848w, https://substackcdn.com/image/fetch/$s_!YKsN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a752618-dad9-432a-adca-298cec8d0dee_1495x764.png 1272w, https://substackcdn.com/image/fetch/$s_!YKsN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a752618-dad9-432a-adca-298cec8d0dee_1495x764.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Sanger&#8217;s rule (PCA) finds the same principal components (yellow and red lines) for each distribution, even though the non-Gaussian one clearly has other directions of high variance.</figcaption></figure></div><p>Unfortunately, most interesting problems are probably non-Gaussian. You&#8217;re probably starting to notice a theme: these models make a ton of simplifications, such as supervision, linear neurons, or Gaussian data. We must understand the limitations imposed by these assumptions, but we&#8217;ve got to start somewhere. We&#8217;d be in trouble if we couldn&#8217;t model Gaussian data!</p><p>We&#8217;ll continue in the next post with nonlinear learning strategies and their resulting representations: clustering and sparse coding.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p><em>The Transmitter</em> has a couple of high-level <a href="https://www.thetransmitter.org/defining-representations/">articles</a> discussing what the term <em>representation</em> actually refers to. Unsurprisingly, there&#8217;s no canonical definition.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>AKA &#8220;AI&#8221;, if you have the right conflict of interests.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>This is a bit contentious, but some believe backpropagation happens in some form in the brain. An example is this <a href="https://www.nature.com/articles/s41593-019-0520-2">paper</a> from Blake Richards and many others.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>von Neumann cited them in the <a href="https://en.wikipedia.org/wiki/First_Draft_of_a_Report_on_the_EDVAC">first draft of the EDVAC report</a>.</p></div></div>]]></content:encoded></item><item><title><![CDATA[Whitening, three ways]]></title><description><![CDATA[Efficient coding of natural image statistics in the retina]]></description><link>https://www.dissonances.blog/p/whitening-three-ways</link><guid isPermaLink="false">https://www.dissonances.blog/p/whitening-three-ways</guid><dc:creator><![CDATA[galen]]></dc:creator><pubDate>Mon, 14 Oct 2024 15:08:02 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!BJoO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35b6574d-97e9-457d-aa36-8cedc60675bd_2394x389.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BJoO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35b6574d-97e9-457d-aa36-8cedc60675bd_2394x389.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BJoO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35b6574d-97e9-457d-aa36-8cedc60675bd_2394x389.png 424w, https://substackcdn.com/image/fetch/$s_!BJoO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35b6574d-97e9-457d-aa36-8cedc60675bd_2394x389.png 848w, https://substackcdn.com/image/fetch/$s_!BJoO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35b6574d-97e9-457d-aa36-8cedc60675bd_2394x389.png 1272w, https://substackcdn.com/image/fetch/$s_!BJoO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35b6574d-97e9-457d-aa36-8cedc60675bd_2394x389.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BJoO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35b6574d-97e9-457d-aa36-8cedc60675bd_2394x389.png" width="2394" height="389" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/35b6574d-97e9-457d-aa36-8cedc60675bd_2394x389.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:389,&quot;width&quot;:2394,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:863756,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BJoO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35b6574d-97e9-457d-aa36-8cedc60675bd_2394x389.png 424w, https://substackcdn.com/image/fetch/$s_!BJoO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35b6574d-97e9-457d-aa36-8cedc60675bd_2394x389.png 848w, https://substackcdn.com/image/fetch/$s_!BJoO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35b6574d-97e9-457d-aa36-8cedc60675bd_2394x389.png 1272w, https://substackcdn.com/image/fetch/$s_!BJoO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35b6574d-97e9-457d-aa36-8cedc60675bd_2394x389.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">Silicon retina response to a moving soccer ball. <a href="https://www.jstor.org/stable/24936904">Mahowald and Mead 1991</a>.</figcaption></figure></div><p>On the way to the cortex, information from photoreceptors must go through at least two bottlenecks: 1) the conversion from an analog signal to spikes (discussed <a href="https://www.dissonances.blog/p/time-versus-rate">last time</a>)<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>, and 2) the optic nerve, which has fewer fibers than the retina has photoreceptors. Analogous to how digital images are encoded to save memory and bandwidth, visual information must also be compressed. This is possible because of redundancies in the signals.</p><p>The statistics of natural scenes are quite consistent. If you measure the correlation of grayscale pixel values as a function of spatial distance, pixels that are close together look more similar on average. This makes sense, as they are likely part of the same object or texture.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zdcA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc7afdd7-c093-4c42-a008-fa6e4b5a87f7_1488x954.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zdcA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc7afdd7-c093-4c42-a008-fa6e4b5a87f7_1488x954.png 424w, https://substackcdn.com/image/fetch/$s_!zdcA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc7afdd7-c093-4c42-a008-fa6e4b5a87f7_1488x954.png 848w, https://substackcdn.com/image/fetch/$s_!zdcA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc7afdd7-c093-4c42-a008-fa6e4b5a87f7_1488x954.png 1272w, https://substackcdn.com/image/fetch/$s_!zdcA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc7afdd7-c093-4c42-a008-fa6e4b5a87f7_1488x954.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zdcA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc7afdd7-c093-4c42-a008-fa6e4b5a87f7_1488x954.png" width="544" height="348.5934065934066" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cc7afdd7-c093-4c42-a008-fa6e4b5a87f7_1488x954.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:933,&quot;width&quot;:1456,&quot;resizeWidth&quot;:544,&quot;bytes&quot;:105382,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zdcA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc7afdd7-c093-4c42-a008-fa6e4b5a87f7_1488x954.png 424w, https://substackcdn.com/image/fetch/$s_!zdcA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc7afdd7-c093-4c42-a008-fa6e4b5a87f7_1488x954.png 848w, https://substackcdn.com/image/fetch/$s_!zdcA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc7afdd7-c093-4c42-a008-fa6e4b5a87f7_1488x954.png 1272w, https://substackcdn.com/image/fetch/$s_!zdcA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc7afdd7-c093-4c42-a008-fa6e4b5a87f7_1488x954.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Because of these correlations, you can imagine that it would be wasteful to have a wire from each photoreceptor down the optic nerve that conveys simply the value at a location. The plot above tells us that given a photoreceptor&#8217;s response, you&#8217;d already know a fair amount about the responses of neighboring cones. </p><p>If we look in the frequency domain, there is another type of correlation: the power spectrum of natural images drops off at a rate of 1/f&#178;. Each trace below is a different image, obtained by averaging over orientations. A decorrelated power spectrum would be flat, which is the signature of white noise.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Mr3t!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52364f27-8903-4830-b9ca-0e59c9b04d1b_754x1148.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Mr3t!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52364f27-8903-4830-b9ca-0e59c9b04d1b_754x1148.png 424w, https://substackcdn.com/image/fetch/$s_!Mr3t!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52364f27-8903-4830-b9ca-0e59c9b04d1b_754x1148.png 848w, https://substackcdn.com/image/fetch/$s_!Mr3t!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52364f27-8903-4830-b9ca-0e59c9b04d1b_754x1148.png 1272w, https://substackcdn.com/image/fetch/$s_!Mr3t!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52364f27-8903-4830-b9ca-0e59c9b04d1b_754x1148.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Mr3t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52364f27-8903-4830-b9ca-0e59c9b04d1b_754x1148.png" width="306" height="465.8992042440318" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/52364f27-8903-4830-b9ca-0e59c9b04d1b_754x1148.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1148,&quot;width&quot;:754,&quot;resizeWidth&quot;:306,&quot;bytes&quot;:139624,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Mr3t!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52364f27-8903-4830-b9ca-0e59c9b04d1b_754x1148.png 424w, https://substackcdn.com/image/fetch/$s_!Mr3t!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52364f27-8903-4830-b9ca-0e59c9b04d1b_754x1148.png 848w, https://substackcdn.com/image/fetch/$s_!Mr3t!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52364f27-8903-4830-b9ca-0e59c9b04d1b_754x1148.png 1272w, https://substackcdn.com/image/fetch/$s_!Mr3t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52364f27-8903-4830-b9ca-0e59c9b04d1b_754x1148.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The power spectrum of natural images falls off as 1/f&#178;. Each trace corresponds to a different image, averaged across orientations. <a href="https://opg-optica-org.libproxy.berkeley.edu/josaa/fulltext.cfm?uri=josaa-4-12-2379&amp;id=2980">Field 1987</a>.</figcaption></figure></div><p>We will illustrate the concept of redundancy reduction by defining <em>whitening</em>, how it&#8217;s implemented in the retina, and how it&#8217;s been implemented in silicon. These three ways also coincide with the principles of the course outlined at the beginning: mathematical explanations, observations from nature, and how to build a brain.</p><h3>Theoretical</h3><p>Suppose you have a 10x10 pixel image. You could plot the image as a point in a 100-dimensional space. Personally, I cannot visualize 100 dimensions, but we can simplify this to a hypothetical 2-pixel &#8220;image&#8221;, and plot in 2D such that each point with coordinates (<em>x,y</em>) in the plots below represents an image. Across the original images, there are redundancies. For example, looking at the leftmost plot, just knowing that a point has <em>x</em>=2 tells you something about <em>y</em>: it is likely between 0 and 2. Other points with <em>x</em>&#8776;2 probably also have similar <em>y</em> values. In the rightmost plot, we now represent the same data transformed such that the <em>y</em> corresponding to <em>x</em>=2 is evenly distributed around 0. Knowing <em>x</em> does not give you much information about <em>y</em>, or about other points with <em>x</em>&#8776;2. We call this decorrelated and independent.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yuSd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ed8eb3e-ebe0-4cab-ae79-789a5509f992_3208x927.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yuSd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ed8eb3e-ebe0-4cab-ae79-789a5509f992_3208x927.png 424w, https://substackcdn.com/image/fetch/$s_!yuSd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ed8eb3e-ebe0-4cab-ae79-789a5509f992_3208x927.png 848w, https://substackcdn.com/image/fetch/$s_!yuSd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ed8eb3e-ebe0-4cab-ae79-789a5509f992_3208x927.png 1272w, https://substackcdn.com/image/fetch/$s_!yuSd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ed8eb3e-ebe0-4cab-ae79-789a5509f992_3208x927.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yuSd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ed8eb3e-ebe0-4cab-ae79-789a5509f992_3208x927.png" width="1456" height="421" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2ed8eb3e-ebe0-4cab-ae79-789a5509f992_3208x927.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:421,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:564880,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yuSd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ed8eb3e-ebe0-4cab-ae79-789a5509f992_3208x927.png 424w, https://substackcdn.com/image/fetch/$s_!yuSd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ed8eb3e-ebe0-4cab-ae79-789a5509f992_3208x927.png 848w, https://substackcdn.com/image/fetch/$s_!yuSd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ed8eb3e-ebe0-4cab-ae79-789a5509f992_3208x927.png 1272w, https://substackcdn.com/image/fetch/$s_!yuSd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ed8eb3e-ebe0-4cab-ae79-789a5509f992_3208x927.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Whitening applied to a set of 2-pixel &#8220;images&#8221;. Orange and green points chosen to demonstrate the change to an individual point across whitening steps. X=data, E=eigenvectors of the covariance matrix, &#923;^-1/2=diagonal scaling matrix.</figcaption></figure></div><p>Here are the whitening steps:</p><ol><li><p>Decorrelate: take the eigenvectors of the covariance matrix of the data, and project the data onto these eigenvectors. This amounts to rotating the data such that its main axes are the ones of highest variance.</p></li><li><p>Sphere/whiten: equalize the variance in all directions (divide by the standard deviation) such that the distribution is decorrelated <em>and</em> independent. This is called whitening because if you think of the eigenvector decomposition as a frequency analysis, we&#8217;re equalizing power in all directions (which would result in flat power spectra in the earlier plot).</p></li><li><p>Rotate: rotate back to the original orientation to calculate weighted combinations in pixel space.</p></li></ol><p>We can concatenate these linear operations into one matrix W, and plot each weight over the image distribution.</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;W = E\\Lambda ^{-\\frac{1}{2}}E^\\top&quot;,&quot;id&quot;:&quot;LIDHWEFHWU&quot;}" data-component-name="LatexBlockToDOM"></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6R12!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18d488c6-9b70-4002-82d2-c3047e07d176_863x847.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6R12!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18d488c6-9b70-4002-82d2-c3047e07d176_863x847.png 424w, https://substackcdn.com/image/fetch/$s_!6R12!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18d488c6-9b70-4002-82d2-c3047e07d176_863x847.png 848w, https://substackcdn.com/image/fetch/$s_!6R12!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18d488c6-9b70-4002-82d2-c3047e07d176_863x847.png 1272w, https://substackcdn.com/image/fetch/$s_!6R12!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18d488c6-9b70-4002-82d2-c3047e07d176_863x847.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6R12!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18d488c6-9b70-4002-82d2-c3047e07d176_863x847.png" width="336" height="329.77056778679025" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/18d488c6-9b70-4002-82d2-c3047e07d176_863x847.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:847,&quot;width&quot;:863,&quot;resizeWidth&quot;:336,&quot;bytes&quot;:170780,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6R12!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18d488c6-9b70-4002-82d2-c3047e07d176_863x847.png 424w, https://substackcdn.com/image/fetch/$s_!6R12!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18d488c6-9b70-4002-82d2-c3047e07d176_863x847.png 848w, https://substackcdn.com/image/fetch/$s_!6R12!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18d488c6-9b70-4002-82d2-c3047e07d176_863x847.png 1272w, https://substackcdn.com/image/fetch/$s_!6R12!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18d488c6-9b70-4002-82d2-c3047e07d176_863x847.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The first weight vector W1 transforms a point (<em>x,y</em>) by calculating a weighted difference between <em>x</em> and <em>y</em> (positive <em>x</em>, negative <em>y</em>). W2 does some amount of <em>y-x</em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>. In 2D, it&#8217;s hard to understand what this means beyond the operations. Let&#8217;s look at 10x10 natural images: W ends up looking like a set of <em>center-surround filters</em>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OeqL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0545922d-b598-48bd-8b67-31c4f0c21ff4_1108x1108.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OeqL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0545922d-b598-48bd-8b67-31c4f0c21ff4_1108x1108.png 424w, https://substackcdn.com/image/fetch/$s_!OeqL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0545922d-b598-48bd-8b67-31c4f0c21ff4_1108x1108.png 848w, https://substackcdn.com/image/fetch/$s_!OeqL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0545922d-b598-48bd-8b67-31c4f0c21ff4_1108x1108.png 1272w, https://substackcdn.com/image/fetch/$s_!OeqL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0545922d-b598-48bd-8b67-31c4f0c21ff4_1108x1108.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OeqL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0545922d-b598-48bd-8b67-31c4f0c21ff4_1108x1108.png" width="348" height="348" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0545922d-b598-48bd-8b67-31c4f0c21ff4_1108x1108.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1108,&quot;width&quot;:1108,&quot;resizeWidth&quot;:348,&quot;bytes&quot;:177574,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!OeqL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0545922d-b598-48bd-8b67-31c4f0c21ff4_1108x1108.png 424w, https://substackcdn.com/image/fetch/$s_!OeqL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0545922d-b598-48bd-8b67-31c4f0c21ff4_1108x1108.png 848w, https://substackcdn.com/image/fetch/$s_!OeqL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0545922d-b598-48bd-8b67-31c4f0c21ff4_1108x1108.png 1272w, https://substackcdn.com/image/fetch/$s_!OeqL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0545922d-b598-48bd-8b67-31c4f0c21ff4_1108x1108.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This is a generalized version of the 2D case. Each filter is saying: take some positive amount of one pixel, a negative amount of the pixels around it, and sum those together. Rather than conveying the value at each pixel, which would contain redundancies, it performs a <em>local difference operation</em>. After applying these types of filters, what do actual whitened images look like?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TxZJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61784398-038e-4684-ba97-fbc963faca54_831x547.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TxZJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61784398-038e-4684-ba97-fbc963faca54_831x547.png 424w, https://substackcdn.com/image/fetch/$s_!TxZJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61784398-038e-4684-ba97-fbc963faca54_831x547.png 848w, https://substackcdn.com/image/fetch/$s_!TxZJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61784398-038e-4684-ba97-fbc963faca54_831x547.png 1272w, https://substackcdn.com/image/fetch/$s_!TxZJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61784398-038e-4684-ba97-fbc963faca54_831x547.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TxZJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61784398-038e-4684-ba97-fbc963faca54_831x547.png" width="720" height="473.93501805054154" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/61784398-038e-4684-ba97-fbc963faca54_831x547.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:547,&quot;width&quot;:831,&quot;resizeWidth&quot;:720,&quot;bytes&quot;:521228,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TxZJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61784398-038e-4684-ba97-fbc963faca54_831x547.png 424w, https://substackcdn.com/image/fetch/$s_!TxZJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61784398-038e-4684-ba97-fbc963faca54_831x547.png 848w, https://substackcdn.com/image/fetch/$s_!TxZJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61784398-038e-4684-ba97-fbc963faca54_831x547.png 1272w, https://substackcdn.com/image/fetch/$s_!TxZJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61784398-038e-4684-ba97-fbc963faca54_831x547.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Top: raw images, bottom: whitened. Images from David Field.</figcaption></figure></div><p>Yay! We hypothesize that this more or less approximates signals being sent down the optic nerve. But how does the retina do this?</p><h3>Empirical</h3><p>For a cone in the fovea (the highest resolution part of the retina), there are corresponding &#8220;on&#8221; and &#8220;off&#8221; bipolar and retinal ganglion cells (RGCs send information down the optic nerve). They respond to deviations from the mean in the positive and negative direction, as in the schematic below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mD3X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaf3e8ad-cd0f-471f-9f9c-aed671936846_2512x866.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mD3X!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaf3e8ad-cd0f-471f-9f9c-aed671936846_2512x866.png 424w, https://substackcdn.com/image/fetch/$s_!mD3X!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaf3e8ad-cd0f-471f-9f9c-aed671936846_2512x866.png 848w, https://substackcdn.com/image/fetch/$s_!mD3X!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaf3e8ad-cd0f-471f-9f9c-aed671936846_2512x866.png 1272w, https://substackcdn.com/image/fetch/$s_!mD3X!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaf3e8ad-cd0f-471f-9f9c-aed671936846_2512x866.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mD3X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaf3e8ad-cd0f-471f-9f9c-aed671936846_2512x866.png" width="1456" height="502" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/caf3e8ad-cd0f-471f-9f9c-aed671936846_2512x866.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:502,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:129382,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mD3X!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaf3e8ad-cd0f-471f-9f9c-aed671936846_2512x866.png 424w, https://substackcdn.com/image/fetch/$s_!mD3X!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaf3e8ad-cd0f-471f-9f9c-aed671936846_2512x866.png 848w, https://substackcdn.com/image/fetch/$s_!mD3X!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaf3e8ad-cd0f-471f-9f9c-aed671936846_2512x866.png 1272w, https://substackcdn.com/image/fetch/$s_!mD3X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaf3e8ad-cd0f-471f-9f9c-aed671936846_2512x866.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Horizontal cells pool over groups of photoreceptors, and serve to inhibit photoreceptor activity relative to the local population. Combined with bipolar cells that drive the center of the receptive field, this gives rise to center-surround RGC receptive fields. These localized filters are also easily wired by the connections between photoreceptors, bipolar cells, horizontal cells, and RGCs.</p><p>Remarkably, we can arrive at the same whitening solution through another approach. <a href="https://pubmed.ncbi.nlm.nih.gov/26273180/">Karklin &amp; Simoncelli 2012</a> derive whitening filters by optimizing an objective function: maximize the mutual information between the input and the activity (first term) while penalizing unit activity (second term). <em>X</em> is a set of images, <em>R </em>is RGC firing rates. <em>&#955;</em> is a weight term that indicates how strongly to penalize activity, and the brackets indicate averaging over images.</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;I(X;R) - \\sum_j \\lambda_j \\langle r_j \\rangle&quot;,&quot;id&quot;:&quot;MSZECRXODU&quot;}" data-component-name="LatexBlockToDOM"></div><p>The model is constructed as follows: to get a firing rate <em>r&#7522;</em>, take an inner product of an image with the <em>w&#7522;</em>, pass it through a nonlinearity <em>f&#7522;</em> that forces values (firing rates) to be non-negative, and add some noise <em>n&#7522;</em>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!l7W2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f58a59-2ac6-402e-98dd-39a241d9a638_1266x756.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!l7W2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f58a59-2ac6-402e-98dd-39a241d9a638_1266x756.png 424w, https://substackcdn.com/image/fetch/$s_!l7W2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f58a59-2ac6-402e-98dd-39a241d9a638_1266x756.png 848w, https://substackcdn.com/image/fetch/$s_!l7W2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f58a59-2ac6-402e-98dd-39a241d9a638_1266x756.png 1272w, https://substackcdn.com/image/fetch/$s_!l7W2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f58a59-2ac6-402e-98dd-39a241d9a638_1266x756.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!l7W2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f58a59-2ac6-402e-98dd-39a241d9a638_1266x756.png" width="488" height="291.4123222748815" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/88f58a59-2ac6-402e-98dd-39a241d9a638_1266x756.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:756,&quot;width&quot;:1266,&quot;resizeWidth&quot;:488,&quot;bytes&quot;:258892,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!l7W2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f58a59-2ac6-402e-98dd-39a241d9a638_1266x756.png 424w, https://substackcdn.com/image/fetch/$s_!l7W2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f58a59-2ac6-402e-98dd-39a241d9a638_1266x756.png 848w, https://substackcdn.com/image/fetch/$s_!l7W2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f58a59-2ac6-402e-98dd-39a241d9a638_1266x756.png 1272w, https://substackcdn.com/image/fetch/$s_!l7W2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f58a59-2ac6-402e-98dd-39a241d9a638_1266x756.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Karklin &amp; Simoncelli 2012.</figcaption></figure></div><p>If the goal were just to compress the image, W could be any set of independent filters. But with the extra conditions &#8212; 1) non-negative firing rates, 2) the noise floor pushing firing rates up<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>, and 3) the penalty pushing firing rates down &#8212; we end up with the center-surround filters below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KXg9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98beb21-2658-4dc1-a1ac-44f0e953777c_2317x802.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KXg9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98beb21-2658-4dc1-a1ac-44f0e953777c_2317x802.png 424w, https://substackcdn.com/image/fetch/$s_!KXg9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98beb21-2658-4dc1-a1ac-44f0e953777c_2317x802.png 848w, https://substackcdn.com/image/fetch/$s_!KXg9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98beb21-2658-4dc1-a1ac-44f0e953777c_2317x802.png 1272w, https://substackcdn.com/image/fetch/$s_!KXg9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98beb21-2658-4dc1-a1ac-44f0e953777c_2317x802.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KXg9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98beb21-2658-4dc1-a1ac-44f0e953777c_2317x802.png" width="2317" height="802" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e98beb21-2658-4dc1-a1ac-44f0e953777c_2317x802.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:802,&quot;width&quot;:2317,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:777847,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!KXg9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98beb21-2658-4dc1-a1ac-44f0e953777c_2317x802.png 424w, https://substackcdn.com/image/fetch/$s_!KXg9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98beb21-2658-4dc1-a1ac-44f0e953777c_2317x802.png 848w, https://substackcdn.com/image/fetch/$s_!KXg9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98beb21-2658-4dc1-a1ac-44f0e953777c_2317x802.png 1272w, https://substackcdn.com/image/fetch/$s_!KXg9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe98beb21-2658-4dc1-a1ac-44f0e953777c_2317x802.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Left: filters <em>W </em>learned by the model, where dark are OFF- and light are ON-center. Middle, right: overlaid spatial envelopes of the filters show that they roughly tile the space. Karklin &amp; Simoncelli 2012.</figcaption></figure></div><p>There is nothing in the model or optimization that explicitly says to whiten or use localized filters; they emerge from the imposed constraints, trained on natural images. When multiple approaches converge to the same answer, it&#8217;s usually a good sign. Statistical, biological, and information-theoretic methods all seem to arrive at this whitening solution!</p><h3>Synthetic</h3><p>Other than the retina itself, everything we&#8217;ve seen so far is a <em>simulation</em> of whitening, implemented on digital machines. Modern computing architecture is predicated on performing operations without error, with physical constraints abstracted away. But imposing digital precision on an inherently imprecise analog signal is costly. Misha Mahowald and Carver Mead, the inventors of the silicon retina, estimated (in 1991) that </p><blockquote><p>the most efficient digital integrated circuits envisioned will consume about 10^-9 joule per operation, whereas neurons expend only 10^-16 joule. In digital systems, data and computational operations must be converted into binary code, a process that requires about 10,000 digital voltage changes per operation. Analog devices carry out the same operation in one step and so decrease the power consumption of silicon circuits by a factor of about 10,000<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a>.</p></blockquote><p>To build a retina, they construct a hexagonal grid of pixels where each pixel has analogues of a photoreceptor, horizontal cell connections, and a bipolar cell. The key is that each pixel performs a difference operation between the photoreceptor input<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a> and the circuit average at that location: the resistor network (horizontal connections) calculates the local average voltage, and the amplifier (bipolar cell) outputs the local difference. The voltage at each pixel represents a spatially-weighted average of photoreceptor inputs, where the weighting decays exponentially with distance, like in a network of real neurons modeled by a cable equation. Beautifully, the response of this synthetic retina approximates the human retina (local difference = center-surround AKA whitening), and all of these computations are done at low power, with physics!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!D8jM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82e4a21a-b7f1-449b-9528-ee956152da55_1076x1290.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!D8jM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82e4a21a-b7f1-449b-9528-ee956152da55_1076x1290.png 424w, https://substackcdn.com/image/fetch/$s_!D8jM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82e4a21a-b7f1-449b-9528-ee956152da55_1076x1290.png 848w, https://substackcdn.com/image/fetch/$s_!D8jM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82e4a21a-b7f1-449b-9528-ee956152da55_1076x1290.png 1272w, https://substackcdn.com/image/fetch/$s_!D8jM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82e4a21a-b7f1-449b-9528-ee956152da55_1076x1290.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!D8jM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82e4a21a-b7f1-449b-9528-ee956152da55_1076x1290.png" width="524" height="628.2156133828996" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/82e4a21a-b7f1-449b-9528-ee956152da55_1076x1290.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1290,&quot;width&quot;:1076,&quot;resizeWidth&quot;:524,&quot;bytes&quot;:388827,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!D8jM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82e4a21a-b7f1-449b-9528-ee956152da55_1076x1290.png 424w, https://substackcdn.com/image/fetch/$s_!D8jM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82e4a21a-b7f1-449b-9528-ee956152da55_1076x1290.png 848w, https://substackcdn.com/image/fetch/$s_!D8jM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82e4a21a-b7f1-449b-9528-ee956152da55_1076x1290.png 1272w, https://substackcdn.com/image/fetch/$s_!D8jM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82e4a21a-b7f1-449b-9528-ee956152da55_1076x1290.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The hexagonal grid of pixels of the silicon retina. In the circle: a photoreceptor P drives the resistive network with conductance G; an amplifier (&#8220;bipolar cell&#8221;) takes the difference between the photoreceptor output and the voltage on the network; six resistors and a capacitor C (&#8220;horizontal connections&#8221;) connect each pixel to its neighbors. <a href="https://www.sciencedirect.com/science/article/pii/089360808890024X">Mead and Mahowald 1988</a>.</figcaption></figure></div><p>For more details, see <a href="https://redwood.berkeley.edu/wp-content/uploads/2018/08/Mead-chapter15-silicon-retina.pdf">Chapter 15</a> of <em>Analog VLSI and Neural Systems.</em></p><p>Phew, this post got way longer than I expected. I think you&#8217;d need at least a month to do this topic justice. Sadly, I have some deadlines coming up, and I&#8217;ll need to pause the lecture posts for a couple of weeks. We will resume with types of representation learning and their limitations.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>This is estimated to be about 300 bits/sec photoreceptors and bipolar cells to 1-3 bits/spike in RGCs.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>Note that unlike principal components analysis, the weights are not the direction of highest variance.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>Decreasing the noise results in more oriented, less localized filters.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3-aO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a1c3f4a-83f0-4574-a60f-3a81294167ab_2138x714.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3-aO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a1c3f4a-83f0-4574-a60f-3a81294167ab_2138x714.png 424w, https://substackcdn.com/image/fetch/$s_!3-aO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a1c3f4a-83f0-4574-a60f-3a81294167ab_2138x714.png 848w, https://substackcdn.com/image/fetch/$s_!3-aO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a1c3f4a-83f0-4574-a60f-3a81294167ab_2138x714.png 1272w, https://substackcdn.com/image/fetch/$s_!3-aO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a1c3f4a-83f0-4574-a60f-3a81294167ab_2138x714.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3-aO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a1c3f4a-83f0-4574-a60f-3a81294167ab_2138x714.png" width="1456" height="486" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6a1c3f4a-83f0-4574-a60f-3a81294167ab_2138x714.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:486,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!3-aO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a1c3f4a-83f0-4574-a60f-3a81294167ab_2138x714.png 424w, https://substackcdn.com/image/fetch/$s_!3-aO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a1c3f4a-83f0-4574-a60f-3a81294167ab_2138x714.png 848w, https://substackcdn.com/image/fetch/$s_!3-aO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a1c3f4a-83f0-4574-a60f-3a81294167ab_2138x714.png 1272w, https://substackcdn.com/image/fetch/$s_!3-aO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a1c3f4a-83f0-4574-a60f-3a81294167ab_2138x714.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Karklin &amp; Simoncelli 2012.</figcaption></figure></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p><em>The Silicon Retina</em>, <a href="https://www.jstor.org/stable/24936904">Mahowald and Mead (1991)</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p>The photoreceptors respond logarithmically in light intensity, allowing higher dynamic range and calculation of intensity ratios (subtraction in logarithmic space).</p><p></p></div></div>]]></content:encoded></item><item><title><![CDATA[Time versus rate]]></title><description><![CDATA[Encoding (and decoding) with spikes]]></description><link>https://www.dissonances.blog/p/time-versus-rate</link><guid isPermaLink="false">https://www.dissonances.blog/p/time-versus-rate</guid><dc:creator><![CDATA[galen]]></dc:creator><pubDate>Thu, 03 Oct 2024 15:03:25 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd76454b2-6170-4100-9800-b5bafec05118_1410x338.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VKUq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec1d3288-835c-474e-b5db-9fe0394fc64c_1362x261.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VKUq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec1d3288-835c-474e-b5db-9fe0394fc64c_1362x261.png 424w, https://substackcdn.com/image/fetch/$s_!VKUq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec1d3288-835c-474e-b5db-9fe0394fc64c_1362x261.png 848w, https://substackcdn.com/image/fetch/$s_!VKUq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec1d3288-835c-474e-b5db-9fe0394fc64c_1362x261.png 1272w, https://substackcdn.com/image/fetch/$s_!VKUq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec1d3288-835c-474e-b5db-9fe0394fc64c_1362x261.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VKUq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec1d3288-835c-474e-b5db-9fe0394fc64c_1362x261.png" width="1362" height="261" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ec1d3288-835c-474e-b5db-9fe0394fc64c_1362x261.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:261,&quot;width&quot;:1362,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:24439,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VKUq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec1d3288-835c-474e-b5db-9fe0394fc64c_1362x261.png 424w, https://substackcdn.com/image/fetch/$s_!VKUq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec1d3288-835c-474e-b5db-9fe0394fc64c_1362x261.png 848w, https://substackcdn.com/image/fetch/$s_!VKUq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec1d3288-835c-474e-b5db-9fe0394fc64c_1362x261.png 1272w, https://substackcdn.com/image/fetch/$s_!VKUq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec1d3288-835c-474e-b5db-9fe0394fc64c_1362x261.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p>Last lecture, we saw how spikes are generated from a fluctuating membrane potential. But why do neurons send discrete spikes instead of continuous voltage? Over long distances, physics tells us that voltage decays exponentially. To maintain the signal, it must be amplified as it travels down the axon. The solution is to send strong signals in the form of action potentials, i.e. spikes.</p><p>There are two primary ways to convey information through spikes: a time code and a rate code. Which is the brain using? This is one of the oldest debates in neuroscience, and when you have very informed people on either extreme, the answer is usually somewhere in between, or both. In this post, we&#8217;ll take a whirlwind tour through evidence for both sides, and also talk about oscillations (which are&#8230; kind of both).</p><p>Last time, we described the deterministic leaky integrate-and-fire (LIF) neuron. Although you could still measure a firing rate of such a neuron, information is conveyed in the precise <em>timing</em> of the spikes. Said another way, the LIF would have exactly the same output across different trials of the same experiment. In contrast, the linear-nonlinear Poisson neuron (LNP) generates spikes through a random Poisson process, with nondeterministic timing. Information is conveyed, by design, through the spike <em>rate</em>. For the LNP, different trials would all look different, but their spike rates on average would be about the same. Of course, these neuron models each have various caveats, but we use them to illustrate the opposing regimes.</p><p>In physiology, the classic example of single cell recordings comes from the 1960s experiments of David Hubel and Torsten Wiesel in cat primary visual cortex. Neurons are tuned to orientations of bars (A), meaning that there is a <em>tuning curve</em> (B) of firing rate as a function of orientation angle. This supports the rate coding hypothesis. It looks random: if you did this trial again, there would be a different set of spike times with the same firing rate on average.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CHhF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd68ed5b0-ea59-414d-a4f8-011c6cec0503_2142x1146.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CHhF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd68ed5b0-ea59-414d-a4f8-011c6cec0503_2142x1146.png 424w, https://substackcdn.com/image/fetch/$s_!CHhF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd68ed5b0-ea59-414d-a4f8-011c6cec0503_2142x1146.png 848w, https://substackcdn.com/image/fetch/$s_!CHhF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd68ed5b0-ea59-414d-a4f8-011c6cec0503_2142x1146.png 1272w, https://substackcdn.com/image/fetch/$s_!CHhF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd68ed5b0-ea59-414d-a4f8-011c6cec0503_2142x1146.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CHhF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd68ed5b0-ea59-414d-a4f8-011c6cec0503_2142x1146.png" width="656" height="350.97802197802196" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d68ed5b0-ea59-414d-a4f8-011c6cec0503_2142x1146.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:779,&quot;width&quot;:1456,&quot;resizeWidth&quot;:656,&quot;bytes&quot;:353179,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CHhF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd68ed5b0-ea59-414d-a4f8-011c6cec0503_2142x1146.png 424w, https://substackcdn.com/image/fetch/$s_!CHhF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd68ed5b0-ea59-414d-a4f8-011c6cec0503_2142x1146.png 848w, https://substackcdn.com/image/fetch/$s_!CHhF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd68ed5b0-ea59-414d-a4f8-011c6cec0503_2142x1146.png 1272w, https://substackcdn.com/image/fetch/$s_!CHhF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd68ed5b0-ea59-414d-a4f8-011c6cec0503_2142x1146.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A: Illustration of a single neuron&#8217;s selectivity to orientation, where there are more spikes for the middle orientation. B: Orientation tuning curve, averaged over many trials. Dayan &amp; Abbott chapter 1, adapted from <a href="https://pubmed.ncbi.nlm.nih.gov/4966457/">Hubel &amp; Wiesel 1968</a>.</figcaption></figure></div><p>An implication of the rate coding hypothesis is that there must be noise in the system, shown here by the data points deviating from the fitted curve at higher firing rates. If we model spikes with a Poisson process, the variance should be equal to the mean. Lo and behold, in the middle temporal visual area of macaque monkeys shown movie stimuli, this was found to be roughly empirically true.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vymL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4114a5b-842c-4fba-840a-082a968098cd_740x882.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vymL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4114a5b-842c-4fba-840a-082a968098cd_740x882.png 424w, https://substackcdn.com/image/fetch/$s_!vymL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4114a5b-842c-4fba-840a-082a968098cd_740x882.png 848w, https://substackcdn.com/image/fetch/$s_!vymL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4114a5b-842c-4fba-840a-082a968098cd_740x882.png 1272w, https://substackcdn.com/image/fetch/$s_!vymL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4114a5b-842c-4fba-840a-082a968098cd_740x882.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vymL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4114a5b-842c-4fba-840a-082a968098cd_740x882.png" width="290" height="345.64864864864865" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f4114a5b-842c-4fba-840a-082a968098cd_740x882.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:882,&quot;width&quot;:740,&quot;resizeWidth&quot;:290,&quot;bytes&quot;:97400,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vymL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4114a5b-842c-4fba-840a-082a968098cd_740x882.png 424w, https://substackcdn.com/image/fetch/$s_!vymL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4114a5b-842c-4fba-840a-082a968098cd_740x882.png 848w, https://substackcdn.com/image/fetch/$s_!vymL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4114a5b-842c-4fba-840a-082a968098cd_740x882.png 1272w, https://substackcdn.com/image/fetch/$s_!vymL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4114a5b-842c-4fba-840a-082a968098cd_740x882.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Consistent with a Poisson process, the recorded variance of spikes in macaque MT increases with the mean in this experiment. Dayan &amp; Abbott chapter 1, adapted from O&#8217;Keefe, Bair, &amp; Movshon 1997.</figcaption></figure></div><p>In the fly H1 neuron, which responds to horizontal motion, this Poisson relationship was also found in response to a stimulus of constant velocity. However, what if we have a stimulus that varies velocity across time? Suddenly, the the relationship is no longer Poisson. The spike patterns appear to be timed with specific changes in stimulus velocity or direction. This is not a rate code.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8293!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f3d3780-dab3-4e05-b2b9-539f7c76401a_756x888.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8293!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f3d3780-dab3-4e05-b2b9-539f7c76401a_756x888.png 424w, https://substackcdn.com/image/fetch/$s_!8293!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f3d3780-dab3-4e05-b2b9-539f7c76401a_756x888.png 848w, https://substackcdn.com/image/fetch/$s_!8293!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f3d3780-dab3-4e05-b2b9-539f7c76401a_756x888.png 1272w, https://substackcdn.com/image/fetch/$s_!8293!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f3d3780-dab3-4e05-b2b9-539f7c76401a_756x888.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8293!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f3d3780-dab3-4e05-b2b9-539f7c76401a_756x888.png" width="368" height="432.25396825396825" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8f3d3780-dab3-4e05-b2b9-539f7c76401a_756x888.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:888,&quot;width&quot;:756,&quot;resizeWidth&quot;:368,&quot;bytes&quot;:202873,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8293!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f3d3780-dab3-4e05-b2b9-539f7c76401a_756x888.png 424w, https://substackcdn.com/image/fetch/$s_!8293!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f3d3780-dab3-4e05-b2b9-539f7c76401a_756x888.png 848w, https://substackcdn.com/image/fetch/$s_!8293!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f3d3780-dab3-4e05-b2b9-539f7c76401a_756x888.png 1272w, https://substackcdn.com/image/fetch/$s_!8293!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f3d3780-dab3-4e05-b2b9-539f7c76401a_756x888.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The H1 fly spikes appear to be synchronized with the time-varying stimulus consistently across trials. <a href="https://pubmed.ncbi.nlm.nih.gov/9065407/">de Ruyter van Steveninck et al. 1997</a>.</figcaption></figure></div><p>In a rat cortical neuron, spike timing response to an injected constant current (left) appears to become noisier as time goes on. The firing rate seems about the same, but the timing looks random. But when a time-varying signal is injected, the spike timing is synchronized to fluctuations in the signal (right). Unlike the time-varying signal, the constant signal gives nothing for the neurons to synchronize with, so their fluctuations in timing are due to other processes.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!d_aA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fcd3149-c2f0-47b8-8c69-86fa83c67418_1506x524.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!d_aA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fcd3149-c2f0-47b8-8c69-86fa83c67418_1506x524.png 424w, https://substackcdn.com/image/fetch/$s_!d_aA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fcd3149-c2f0-47b8-8c69-86fa83c67418_1506x524.png 848w, https://substackcdn.com/image/fetch/$s_!d_aA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fcd3149-c2f0-47b8-8c69-86fa83c67418_1506x524.png 1272w, https://substackcdn.com/image/fetch/$s_!d_aA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fcd3149-c2f0-47b8-8c69-86fa83c67418_1506x524.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!d_aA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fcd3149-c2f0-47b8-8c69-86fa83c67418_1506x524.png" width="678" height="235.90438247011951" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2fcd3149-c2f0-47b8-8c69-86fa83c67418_1506x524.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:524,&quot;width&quot;:1506,&quot;resizeWidth&quot;:678,&quot;bytes&quot;:215071,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!d_aA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fcd3149-c2f0-47b8-8c69-86fa83c67418_1506x524.png 424w, https://substackcdn.com/image/fetch/$s_!d_aA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fcd3149-c2f0-47b8-8c69-86fa83c67418_1506x524.png 848w, https://substackcdn.com/image/fetch/$s_!d_aA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fcd3149-c2f0-47b8-8c69-86fa83c67418_1506x524.png 1272w, https://substackcdn.com/image/fetch/$s_!d_aA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fcd3149-c2f0-47b8-8c69-86fa83c67418_1506x524.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Left: Spike response (bottom) to constant stimulus (top trace) appears to be random. Right: A time-varying signal results in precise spike timing, consistent across trials. <a href="https://pubmed.ncbi.nlm.nih.gov/7770778/">Mainen &amp; Sejnowski 1995</a>.</figcaption></figure></div><p>The results from this experiment should make you uncomfortable, Bruno says. When people saw these results, it certainly had that effect. There were mixed reactions: some people took the left response as confirmation that spiking is governed by a random process under some regimes. Others took it as evidence that spike timing is deterministic when there is signal driving it, and that the seemingly random responses are a result of other processes in the neuron not quantified by us. We don&#8217;t have access to the state of the neuron, and we can&#8217;t observe all the variables that generate spikes.</p><p>Based on studies like these, the answer to the time vs. rate question is unsatisfying. Sometimes, things appear to be random. And sometimes, they appear to be deterministic. We probably need to look at both the timing and the rate?</p><p>Here&#8217;s an example of this. The nerve fibers in the auditory system seem to be <em>phase-locked</em>, which kind of codes both timing and rate simultaneously: the neurons fire at a specific position in a cycle of the incoming signal (hair cells wiggling). Each row below shows a histogram over many trials of the spikes from an auditory nerve fiber. The rows are ordered by the frequency the fiber is the most sensitive to, determined by the corresponding position on the basilar membrane<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>. The punchline here is that each nerve fiber fires when there is energy in the signal at its characteristic frequency, but the timing of the spike also reflects the signal frequency!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Et2g!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef48cf-e906-44c4-902f-61043ce5b3fd_1220x860.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Et2g!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef48cf-e906-44c4-902f-61043ce5b3fd_1220x860.png 424w, https://substackcdn.com/image/fetch/$s_!Et2g!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef48cf-e906-44c4-902f-61043ce5b3fd_1220x860.png 848w, https://substackcdn.com/image/fetch/$s_!Et2g!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef48cf-e906-44c4-902f-61043ce5b3fd_1220x860.png 1272w, https://substackcdn.com/image/fetch/$s_!Et2g!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef48cf-e906-44c4-902f-61043ce5b3fd_1220x860.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Et2g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef48cf-e906-44c4-902f-61043ce5b3fd_1220x860.png" width="558" height="393.344262295082" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/66ef48cf-e906-44c4-902f-61043ce5b3fd_1220x860.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:860,&quot;width&quot;:1220,&quot;resizeWidth&quot;:558,&quot;bytes&quot;:199394,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Et2g!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef48cf-e906-44c4-902f-61043ce5b3fd_1220x860.png 424w, https://substackcdn.com/image/fetch/$s_!Et2g!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef48cf-e906-44c4-902f-61043ce5b3fd_1220x860.png 848w, https://substackcdn.com/image/fetch/$s_!Et2g!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef48cf-e906-44c4-902f-61043ce5b3fd_1220x860.png 1272w, https://substackcdn.com/image/fetch/$s_!Et2g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef48cf-e906-44c4-902f-61043ce5b3fd_1220x860.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Each row is a histogram of spikes (x-axis is time) of an auditory nerve fiber of a specific characteristic frequency, collected across trials to the same stimulus. <a href="https://jontallen.ece.illinois.edu/uploads/537.F18/Papers/OLD/DelgutteSpeechProcessing97.pdf">Delgutte 1997</a>.</figcaption></figure></div><p>In addition to the oscillations, the frequency information is transmitted two ways: in the tonotopic code (where the neuron is on the basilar membrane tells you the frequency), and in the phase-locked spike times. Because the tuning of the cells &#8212; the frequency they are most sensitive to &#8212; is relatively broad, there is some ambiguity to the tonotopic code. A cell could fire in response to 500 Hz, but it could also fire to 510 Hz. The exact timing of the spikes gives much more precision. Downstream processes can then take advantage of either, or both of these coding strategies.</p><p>This is not the only place we see oscillations. In the lateral geniculate nucleus (LGN), which sits between the eye and visual cortex in the visual processing stream, intracellular recordings reveal spikes from retinal ganglion cells. The retina was found previously to generate its own oscillations, separate from external signals<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>. The spikes in A below appear to be noisy, but the authors hypothesized that it was because the stimuli were out of phase with the retinal rhythm. To test this, they shifted all trials to be aligned in phase with the retinal oscillations (B). The spike timings became very precise, and what&#8217;s more, they found that there was more information encoded when looking at the timing as opposed to just the rate. Knowing the underlying process behind this initial apparent &#8220;noise&#8221; revealed that it was not noise after all.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZsmY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa4c8a34-2c82-47b6-a236-0073a7547c43_2402x972.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZsmY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa4c8a34-2c82-47b6-a236-0073a7547c43_2402x972.png 424w, https://substackcdn.com/image/fetch/$s_!ZsmY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa4c8a34-2c82-47b6-a236-0073a7547c43_2402x972.png 848w, https://substackcdn.com/image/fetch/$s_!ZsmY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa4c8a34-2c82-47b6-a236-0073a7547c43_2402x972.png 1272w, https://substackcdn.com/image/fetch/$s_!ZsmY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa4c8a34-2c82-47b6-a236-0073a7547c43_2402x972.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZsmY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa4c8a34-2c82-47b6-a236-0073a7547c43_2402x972.png" width="1456" height="589" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aa4c8a34-2c82-47b6-a236-0073a7547c43_2402x972.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:589,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1283419,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZsmY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa4c8a34-2c82-47b6-a236-0073a7547c43_2402x972.png 424w, https://substackcdn.com/image/fetch/$s_!ZsmY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa4c8a34-2c82-47b6-a236-0073a7547c43_2402x972.png 848w, https://substackcdn.com/image/fetch/$s_!ZsmY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa4c8a34-2c82-47b6-a236-0073a7547c43_2402x972.png 1272w, https://substackcdn.com/image/fetch/$s_!ZsmY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa4c8a34-2c82-47b6-a236-0073a7547c43_2402x972.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://pubmed.ncbi.nlm.nih.gov/19404487/">Koepsell et al. 2009</a>.</figcaption></figure></div><p>Okay, I&#8217;ve just rambled on about a zoo of spike encoding schemes. But how do we determine how much information is actually contained in these spikes? A schematic of the decoding process is shown below, where a signal <em>s(t)</em> is encoded into spikes <em>&#961;(t)</em>, and then decoded<em> </em>into a reconstruction of the signal <em>&#349;(t)</em>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Uc_8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7551bbe5-1407-43c2-b446-3dd44b99cfe0_2128x1234.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Uc_8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7551bbe5-1407-43c2-b446-3dd44b99cfe0_2128x1234.png 424w, https://substackcdn.com/image/fetch/$s_!Uc_8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7551bbe5-1407-43c2-b446-3dd44b99cfe0_2128x1234.png 848w, https://substackcdn.com/image/fetch/$s_!Uc_8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7551bbe5-1407-43c2-b446-3dd44b99cfe0_2128x1234.png 1272w, https://substackcdn.com/image/fetch/$s_!Uc_8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7551bbe5-1407-43c2-b446-3dd44b99cfe0_2128x1234.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Uc_8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7551bbe5-1407-43c2-b446-3dd44b99cfe0_2128x1234.png" width="584" height="338.5274725274725" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7551bbe5-1407-43c2-b446-3dd44b99cfe0_2128x1234.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:844,&quot;width&quot;:1456,&quot;resizeWidth&quot;:584,&quot;bytes&quot;:189007,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Uc_8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7551bbe5-1407-43c2-b446-3dd44b99cfe0_2128x1234.png 424w, https://substackcdn.com/image/fetch/$s_!Uc_8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7551bbe5-1407-43c2-b446-3dd44b99cfe0_2128x1234.png 848w, https://substackcdn.com/image/fetch/$s_!Uc_8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7551bbe5-1407-43c2-b446-3dd44b99cfe0_2128x1234.png 1272w, https://substackcdn.com/image/fetch/$s_!Uc_8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7551bbe5-1407-43c2-b446-3dd44b99cfe0_2128x1234.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">From <em><a href="https://mitpress.mit.edu/9780262181747/spikes/">Spikes</a></em>, by Rieke et al. 1995.</figcaption></figure></div><p>This is generally a hard problem, because we are trying to reconstruct a smooth, continuous signal from discrete events. The encoder is highly nonlinear, as we saw in the last post, but using a linear decoder is actually a non-absurd assumption<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>. It turns out that by convolving a kernel with a set of spikes, you can arrive at an approximate reconstruction. Below, we get &#8220;on&#8221; and &#8220;off&#8221; spikes via a LIF neuron on the signal and the sign-reversed signal. Then, we convolve the on spikes with the kernel, and the off spikes with the negative kernel. You could also do this with only on spikes and a different kernel.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!j1lj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37990904-6823-4d39-932e-8b583559ac1e_1834x1036.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!j1lj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37990904-6823-4d39-932e-8b583559ac1e_1834x1036.png 424w, https://substackcdn.com/image/fetch/$s_!j1lj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37990904-6823-4d39-932e-8b583559ac1e_1834x1036.png 848w, https://substackcdn.com/image/fetch/$s_!j1lj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37990904-6823-4d39-932e-8b583559ac1e_1834x1036.png 1272w, https://substackcdn.com/image/fetch/$s_!j1lj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37990904-6823-4d39-932e-8b583559ac1e_1834x1036.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!j1lj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37990904-6823-4d39-932e-8b583559ac1e_1834x1036.png" width="592" height="334.2197802197802" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/37990904-6823-4d39-932e-8b583559ac1e_1834x1036.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:822,&quot;width&quot;:1456,&quot;resizeWidth&quot;:592,&quot;bytes&quot;:149464,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!j1lj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37990904-6823-4d39-932e-8b583559ac1e_1834x1036.png 424w, https://substackcdn.com/image/fetch/$s_!j1lj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37990904-6823-4d39-932e-8b583559ac1e_1834x1036.png 848w, https://substackcdn.com/image/fetch/$s_!j1lj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37990904-6823-4d39-932e-8b583559ac1e_1834x1036.png 1272w, https://substackcdn.com/image/fetch/$s_!j1lj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37990904-6823-4d39-932e-8b583559ac1e_1834x1036.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>By showing this decoding procedure, we are not implying that the brain literally reconstructs the signal somewhere downstream of the spikes. This is just one way of quantifying the information contained in the spikes that can be utilized in subsequent processes.</p><p>We can also do this using information theory. I won&#8217;t go into detail here<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a>, but the remarkable thing about this analysis, applied across many systems and organisms, is that you sometimes get on the order of 2-3 bits of information per spike, rather than just 1 bit, as you&#8217;d expect from a binary signal. How? The key is that when the neuron is not spiking, there is also information conveyed; it&#8217;s the <em>pattern</em> of spikes over time that matters.</p><p>Personally, it&#8217;s obvious after seeing all these examples that there is no single answer to the timing vs. rate debate; there is clearly a diverse set of coding schemes dependent on the type of computation being performed. Putting this aside for now, the next lecture will get into coding more abstractly with one example: what is the most efficient way to encode natural scenes based on their statistics, and how does the retina do it?</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>For a brief overview of the computation in the cochlea, see my previous <a href="https://www.dissonances.blog/p/the-ear-does-not-do-a-fourier-transform">post</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p><em>Long-range synchronization of oscillatory light responses in the cat retina and lateral geniculate nucleus</em>, <a href="https://pubmed.ncbi.nlm.nih.gov/8602219/">Neuenschwander &amp; Singer (1998)</a>. This was a controversial paper, and it took decades for people to reproduce the findings and believe it.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>You can see motivation for this assumption in the joint distribution of spikes and signals: the decoding marginal distribution is roughly linear in number of spikes.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Zeh3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e669ee-33eb-427e-893f-a7bdf4a9c23d_976x1122.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Zeh3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e669ee-33eb-427e-893f-a7bdf4a9c23d_976x1122.png 424w, https://substackcdn.com/image/fetch/$s_!Zeh3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e669ee-33eb-427e-893f-a7bdf4a9c23d_976x1122.png 848w, https://substackcdn.com/image/fetch/$s_!Zeh3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e669ee-33eb-427e-893f-a7bdf4a9c23d_976x1122.png 1272w, https://substackcdn.com/image/fetch/$s_!Zeh3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e669ee-33eb-427e-893f-a7bdf4a9c23d_976x1122.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Zeh3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e669ee-33eb-427e-893f-a7bdf4a9c23d_976x1122.png" width="523" height="601.235655737705" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/91e669ee-33eb-427e-893f-a7bdf4a9c23d_976x1122.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1122,&quot;width&quot;:976,&quot;resizeWidth&quot;:523,&quot;bytes&quot;:210316,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Zeh3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e669ee-33eb-427e-893f-a7bdf4a9c23d_976x1122.png 424w, https://substackcdn.com/image/fetch/$s_!Zeh3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e669ee-33eb-427e-893f-a7bdf4a9c23d_976x1122.png 848w, https://substackcdn.com/image/fetch/$s_!Zeh3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e669ee-33eb-427e-893f-a7bdf4a9c23d_976x1122.png 1272w, https://substackcdn.com/image/fetch/$s_!Zeh3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91e669ee-33eb-427e-893f-a7bdf4a9c23d_976x1122.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Marginal distributions from the joint. Left: decoding, p(stimulus|spike). Right: encoding, p(spike|stimulus). From <em><a href="https://mitpress.mit.edu/9780262181747/spikes/">Spikes</a></em>, by Rieke et al. 1997.</figcaption></figure></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>For more details, the <em>Spikes </em>textbook describes this well! On a high level:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ItOR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91eb4f4a-eb14-451a-9d57-ac9dd0483a9b_1898x992.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ItOR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91eb4f4a-eb14-451a-9d57-ac9dd0483a9b_1898x992.png 424w, https://substackcdn.com/image/fetch/$s_!ItOR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91eb4f4a-eb14-451a-9d57-ac9dd0483a9b_1898x992.png 848w, https://substackcdn.com/image/fetch/$s_!ItOR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91eb4f4a-eb14-451a-9d57-ac9dd0483a9b_1898x992.png 1272w, https://substackcdn.com/image/fetch/$s_!ItOR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91eb4f4a-eb14-451a-9d57-ac9dd0483a9b_1898x992.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ItOR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91eb4f4a-eb14-451a-9d57-ac9dd0483a9b_1898x992.png" width="548" height="286.4203296703297" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/91eb4f4a-eb14-451a-9d57-ac9dd0483a9b_1898x992.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:548,&quot;bytes&quot;:183061,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ItOR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91eb4f4a-eb14-451a-9d57-ac9dd0483a9b_1898x992.png 424w, https://substackcdn.com/image/fetch/$s_!ItOR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91eb4f4a-eb14-451a-9d57-ac9dd0483a9b_1898x992.png 848w, https://substackcdn.com/image/fetch/$s_!ItOR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91eb4f4a-eb14-451a-9d57-ac9dd0483a9b_1898x992.png 1272w, https://substackcdn.com/image/fetch/$s_!ItOR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91eb4f4a-eb14-451a-9d57-ac9dd0483a9b_1898x992.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></div></div>]]></content:encoded></item><item><title><![CDATA[Neural nonlinearities]]></title><description><![CDATA[Biophysical computation and spiking models]]></description><link>https://www.dissonances.blog/p/neural-nonlinearities</link><guid isPermaLink="false">https://www.dissonances.blog/p/neural-nonlinearities</guid><dc:creator><![CDATA[galen]]></dc:creator><pubDate>Thu, 26 Sep 2024 15:00:59 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5bbe289-6f16-41a5-bbb5-50b059a2611d_1588x1214.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0NDl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d22f816-59cc-4333-9aee-aed6ab3eab6d_2088x424.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0NDl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d22f816-59cc-4333-9aee-aed6ab3eab6d_2088x424.png 424w, https://substackcdn.com/image/fetch/$s_!0NDl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d22f816-59cc-4333-9aee-aed6ab3eab6d_2088x424.png 848w, https://substackcdn.com/image/fetch/$s_!0NDl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d22f816-59cc-4333-9aee-aed6ab3eab6d_2088x424.png 1272w, https://substackcdn.com/image/fetch/$s_!0NDl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d22f816-59cc-4333-9aee-aed6ab3eab6d_2088x424.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0NDl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d22f816-59cc-4333-9aee-aed6ab3eab6d_2088x424.png" width="1456" height="296" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2d22f816-59cc-4333-9aee-aed6ab3eab6d_2088x424.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:296,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:56570,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0NDl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d22f816-59cc-4333-9aee-aed6ab3eab6d_2088x424.png 424w, https://substackcdn.com/image/fetch/$s_!0NDl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d22f816-59cc-4333-9aee-aed6ab3eab6d_2088x424.png 848w, https://substackcdn.com/image/fetch/$s_!0NDl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d22f816-59cc-4333-9aee-aed6ab3eab6d_2088x424.png 1272w, https://substackcdn.com/image/fetch/$s_!0NDl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d22f816-59cc-4333-9aee-aed6ab3eab6d_2088x424.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p><em>I am very much still learning how to explain technical stuff in this format, so please bear with me! This post kept getting out of hand so I kept it high-level and moved some details to the footnotes. Let me know what worked and what didn&#8217;t </em>&#128556;<em>.</em></p><p>The word &#8220;nonlinearity&#8221; evokes something specific in the context of artificial neural networks. The classic example is a rectified linear unit (ReLU), which is a function that maps non-positive values to 0 and leaves positive values unchanged<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>. The initial motivation for using ReLU was to simulate a firing rate (which cannot be negative) of a neuron given some potentially negative signal<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>. But enforcing biological constraints on deep learning models has not really gotten us anywhere, so the main motivation from machine learning nowadays seems to be that it just&#8230; works? (many such cases)</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3Wpt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae414a2a-3380-4866-8c66-9fc76ed63594_2880x1440.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3Wpt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae414a2a-3380-4866-8c66-9fc76ed63594_2880x1440.png 424w, https://substackcdn.com/image/fetch/$s_!3Wpt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae414a2a-3380-4866-8c66-9fc76ed63594_2880x1440.png 848w, https://substackcdn.com/image/fetch/$s_!3Wpt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae414a2a-3380-4866-8c66-9fc76ed63594_2880x1440.png 1272w, https://substackcdn.com/image/fetch/$s_!3Wpt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae414a2a-3380-4866-8c66-9fc76ed63594_2880x1440.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3Wpt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae414a2a-3380-4866-8c66-9fc76ed63594_2880x1440.png" width="450" height="225" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ae414a2a-3380-4866-8c66-9fc76ed63594_2880x1440.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1440,&quot;width&quot;:2880,&quot;resizeWidth&quot;:450,&quot;bytes&quot;:155227,&quot;alt&quot;:&quot;undefined&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="undefined" title="undefined" srcset="https://substackcdn.com/image/fetch/$s_!3Wpt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae414a2a-3380-4866-8c66-9fc76ed63594_2880x1440.png 424w, https://substackcdn.com/image/fetch/$s_!3Wpt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae414a2a-3380-4866-8c66-9fc76ed63594_2880x1440.png 848w, https://substackcdn.com/image/fetch/$s_!3Wpt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae414a2a-3380-4866-8c66-9fc76ed63594_2880x1440.png 1272w, https://substackcdn.com/image/fetch/$s_!3Wpt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae414a2a-3380-4866-8c66-9fc76ed63594_2880x1440.png 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><p>That we use &#8220;nonlinear&#8221; to refer to these functions reveals that the default operations in artificial neural networks are linear. Linearity is super convenient in engineering and math! But in this post, we&#8217;ll see why the brain, starting with its lowest level of computation, cannot be assumed to be linear.</p><p>In the last two lectures, we discussed sensory mechanisms that transduce signals into the eventual opening of ion channels. These channels allow the change in voltage, which drive the primary mode of communication in neurons: electrochemical signaling.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SMWN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5bbe289-6f16-41a5-bbb5-50b059a2611d_1588x1214.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SMWN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5bbe289-6f16-41a5-bbb5-50b059a2611d_1588x1214.png 424w, https://substackcdn.com/image/fetch/$s_!SMWN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5bbe289-6f16-41a5-bbb5-50b059a2611d_1588x1214.png 848w, https://substackcdn.com/image/fetch/$s_!SMWN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5bbe289-6f16-41a5-bbb5-50b059a2611d_1588x1214.png 1272w, https://substackcdn.com/image/fetch/$s_!SMWN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5bbe289-6f16-41a5-bbb5-50b059a2611d_1588x1214.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SMWN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5bbe289-6f16-41a5-bbb5-50b059a2611d_1588x1214.png" width="612" height="467.8269230769231" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e5bbe289-6f16-41a5-bbb5-50b059a2611d_1588x1214.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1113,&quot;width&quot;:1456,&quot;resizeWidth&quot;:612,&quot;bytes&quot;:776800,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SMWN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5bbe289-6f16-41a5-bbb5-50b059a2611d_1588x1214.png 424w, https://substackcdn.com/image/fetch/$s_!SMWN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5bbe289-6f16-41a5-bbb5-50b059a2611d_1588x1214.png 848w, https://substackcdn.com/image/fetch/$s_!SMWN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5bbe289-6f16-41a5-bbb5-50b059a2611d_1588x1214.png 1272w, https://substackcdn.com/image/fetch/$s_!SMWN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5bbe289-6f16-41a5-bbb5-50b059a2611d_1588x1214.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The cell membrane encloses the cell and selectively allows ions to pass through, enabling an electrochemical gradient. We typically think of the dendrites as receiving inputs, on which axons from other cells form synapses and change the voltage inside the dendrites. Current accumulates in the cell body, and when the membrane voltage reaches a certain threshold, an action potential (&#8220;spike&#8221;) is initiated in the axon hillock and is propagated down the axon<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>.</p><p>Let&#8217;s zoom into that little circuit diagram on the bottom dendrite to look at the membrane equation. You can think of this whole thing as a battery with a difference in potential (voltage) between the inside and outside of the cell caused by a difference in ion concentrations; the ion pumps serve as battery rechargers that maintain the difference<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a>. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8Jeh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e5bfcdb-2269-4349-a9cb-85f6457aa0dd_2096x1312.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8Jeh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e5bfcdb-2269-4349-a9cb-85f6457aa0dd_2096x1312.png 424w, https://substackcdn.com/image/fetch/$s_!8Jeh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e5bfcdb-2269-4349-a9cb-85f6457aa0dd_2096x1312.png 848w, https://substackcdn.com/image/fetch/$s_!8Jeh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e5bfcdb-2269-4349-a9cb-85f6457aa0dd_2096x1312.png 1272w, https://substackcdn.com/image/fetch/$s_!8Jeh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e5bfcdb-2269-4349-a9cb-85f6457aa0dd_2096x1312.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8Jeh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e5bfcdb-2269-4349-a9cb-85f6457aa0dd_2096x1312.png" width="1456" height="911" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4e5bfcdb-2269-4349-a9cb-85f6457aa0dd_2096x1312.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:911,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:179175,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8Jeh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e5bfcdb-2269-4349-a9cb-85f6457aa0dd_2096x1312.png 424w, https://substackcdn.com/image/fetch/$s_!8Jeh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e5bfcdb-2269-4349-a9cb-85f6457aa0dd_2096x1312.png 848w, https://substackcdn.com/image/fetch/$s_!8Jeh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e5bfcdb-2269-4349-a9cb-85f6457aa0dd_2096x1312.png 1272w, https://substackcdn.com/image/fetch/$s_!8Jeh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e5bfcdb-2269-4349-a9cb-85f6457aa0dd_2096x1312.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I&#8217;ve put this here for those who want to engage with the circuit diagram and its dynamics, but the main point can be made in words. The <em>&#916;G</em>s, or changes in conductance, are input currents (channels opening due to synaptic inputs), which change the membrane potential <em>V </em>(the difference between the inside and outside). I&#8217;ll draw your attention to the first equation, which says that in addition to a baseline conductance, both the numerator and denominator are affected by conductance changes<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a>. This means that the voltage, which eventually causes spikes, changes nonlinearly with any synaptic input to the cell; <strong>the fundamental unit of biophysical computation in the brain is nonlinear. </strong></p><p><em>Shunting inhibition</em> is another nonlinear phenomenon: when only the chlorine channel is open, it does not affect the membrane potential; however, when both chlorine and sodium channels are open simultaneously, the influence of sodium on the membrane potential is inhibited<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a>.</p><p>So far, we&#8217;ve focused on the membrane potential. But neurons don&#8217;t generally convey voltage; they spike. The most basic model of spiking neurons, the leaky integrate-and-fire (LIF) model, is a modification to the membrane equation above, with the addition of a spiking threshold (V_th below), a reset to the resting potential (0 here), and a refractory period (&#964;^ref). The spikes are the signals sent to other neurons.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dX0Z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45ceef64-cd4d-446d-bf35-0e6218c820b5_1500x928.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dX0Z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45ceef64-cd4d-446d-bf35-0e6218c820b5_1500x928.png 424w, https://substackcdn.com/image/fetch/$s_!dX0Z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45ceef64-cd4d-446d-bf35-0e6218c820b5_1500x928.png 848w, https://substackcdn.com/image/fetch/$s_!dX0Z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45ceef64-cd4d-446d-bf35-0e6218c820b5_1500x928.png 1272w, https://substackcdn.com/image/fetch/$s_!dX0Z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45ceef64-cd4d-446d-bf35-0e6218c820b5_1500x928.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dX0Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45ceef64-cd4d-446d-bf35-0e6218c820b5_1500x928.png" width="1456" height="901" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/45ceef64-cd4d-446d-bf35-0e6218c820b5_1500x928.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:901,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:115749,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dX0Z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45ceef64-cd4d-446d-bf35-0e6218c820b5_1500x928.png 424w, https://substackcdn.com/image/fetch/$s_!dX0Z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45ceef64-cd4d-446d-bf35-0e6218c820b5_1500x928.png 848w, https://substackcdn.com/image/fetch/$s_!dX0Z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45ceef64-cd4d-446d-bf35-0e6218c820b5_1500x928.png 1272w, https://substackcdn.com/image/fetch/$s_!dX0Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45ceef64-cd4d-446d-bf35-0e6218c820b5_1500x928.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">LIF with a constant current input. <a href="https://mitpress.mit.edu/9780262550604/neural-engineering/">Eliasmith and Anderson 2004</a>.</figcaption></figure></div><p>Another way of modeling spikes is with the <em>linear-nonlinear Poisson</em> (LNP) model<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a>. A signal is first filtered linearly, then goes through a point nonlinearity, such as ReLU, and is then used as a rate parameter for a Poisson distribution, which gives us spike times. It is nonlinear, and unlike a LIF neuron, the spike times are nondeterministic<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2apS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97550388-de2a-4380-a2ab-9bb282bfec89_2240x660.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2apS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97550388-de2a-4380-a2ab-9bb282bfec89_2240x660.png 424w, https://substackcdn.com/image/fetch/$s_!2apS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97550388-de2a-4380-a2ab-9bb282bfec89_2240x660.png 848w, https://substackcdn.com/image/fetch/$s_!2apS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97550388-de2a-4380-a2ab-9bb282bfec89_2240x660.png 1272w, https://substackcdn.com/image/fetch/$s_!2apS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97550388-de2a-4380-a2ab-9bb282bfec89_2240x660.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2apS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97550388-de2a-4380-a2ab-9bb282bfec89_2240x660.png" width="1456" height="429" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/97550388-de2a-4380-a2ab-9bb282bfec89_2240x660.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:429,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:226243,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2apS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97550388-de2a-4380-a2ab-9bb282bfec89_2240x660.png 424w, https://substackcdn.com/image/fetch/$s_!2apS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97550388-de2a-4380-a2ab-9bb282bfec89_2240x660.png 848w, https://substackcdn.com/image/fetch/$s_!2apS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97550388-de2a-4380-a2ab-9bb282bfec89_2240x660.png 1272w, https://substackcdn.com/image/fetch/$s_!2apS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97550388-de2a-4380-a2ab-9bb282bfec89_2240x660.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>After seeing all this nonlinearity, if you still believe the brain can be well-modeled with only linear operations, or even <em>mostly</em> linear operations, Bruno will throw tomatoes at you &#127813;&#129781;.</p><p>We&#8217;ve shown a canonical example of biophysical nonlinearity in the brain, and examples of basic spiking neuron models that are also obviously nonlinear. But how do spikes &#8212; a compression of an analog to pulsatile signal &#8212; convey information? Next lecture, we will talk about encoding and decoding.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>These point-wise nonlinearities are of course just one example. More generally, we say a function or system F is linear if and only if it satisfies the <em>superposition principle</em>, or both of these properties:</p><ol><li><p>Additivity: F(x1 + x2) = F(x1) + F(x2)</p></li><li><p>Homogeneity: a * F(x) = F(a * x) where a is a scalar</p></li></ol><p>For the ReLU, it&#8217;s clear that both of these don&#8217;t hold for all values, e.g. x1 = 1, x2 = -2 violates additivity and a=-1, x=1 violates homogeneity.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p><em>Visual Feature Extraction by a Multilayered Network of Analog Threshold Elements</em>, <a href="https://ieeexplore.ieee.org/document/4082265">Fukushima 1969</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>I apologize to the biophysicists as this is an egregious simplification. There are tons of different types of synapses, including dendrite to dendrite, axon to axon, and even reciprocal synapses. Plus, computations don&#8217;t just happen in the cell body; dendrites appear to be computing as well. Some dendrites can generate spike-like events to amplify signals over longer distances (another form of nonlinearity). They can even discriminate between temporal sequences (<a href="https://pubmed.ncbi.nlm.nih.gov/20705816/">Branco et al. 2010</a>).</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>Some more details: ions are moved across the membrane according to the ion concentration gradient (i.e. they will move from an area of high concentration to low concentration), or by pumps. The circuit diagram shows the top as the outside of the cell, and the bottom as the inside. <em>C_m</em> refers to conductance across the membrane, and each column corresponds to an ion channel that can be modeled with <em>G</em> resistance and <em>V</em> voltage.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p>To visualize, a basic example is f(x) = (1+x)/x.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HrnZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b3d8e1f-a84c-49fa-bd22-c373bfac004b_1020x1026.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HrnZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b3d8e1f-a84c-49fa-bd22-c373bfac004b_1020x1026.png 424w, https://substackcdn.com/image/fetch/$s_!HrnZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b3d8e1f-a84c-49fa-bd22-c373bfac004b_1020x1026.png 848w, https://substackcdn.com/image/fetch/$s_!HrnZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b3d8e1f-a84c-49fa-bd22-c373bfac004b_1020x1026.png 1272w, https://substackcdn.com/image/fetch/$s_!HrnZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b3d8e1f-a84c-49fa-bd22-c373bfac004b_1020x1026.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HrnZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b3d8e1f-a84c-49fa-bd22-c373bfac004b_1020x1026.png" width="320" height="321.88235294117646" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5b3d8e1f-a84c-49fa-bd22-c373bfac004b_1020x1026.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1026,&quot;width&quot;:1020,&quot;resizeWidth&quot;:320,&quot;bytes&quot;:73973,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HrnZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b3d8e1f-a84c-49fa-bd22-c373bfac004b_1020x1026.png 424w, https://substackcdn.com/image/fetch/$s_!HrnZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b3d8e1f-a84c-49fa-bd22-c373bfac004b_1020x1026.png 848w, https://substackcdn.com/image/fetch/$s_!HrnZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b3d8e1f-a84c-49fa-bd22-c373bfac004b_1020x1026.png 1272w, https://substackcdn.com/image/fetch/$s_!HrnZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b3d8e1f-a84c-49fa-bd22-c373bfac004b_1020x1026.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-6" href="#footnote-anchor-6" class="footnote-number" contenteditable="false" target="_self">6</a><div class="footnote-content"><p>A NAND gate.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-7" href="#footnote-anchor-7" class="footnote-number" contenteditable="false" target="_self">7</a><div class="footnote-content"><p>This is kind of a ridiculous name, similar in flavor to <em>long short-term memory</em>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-8" href="#footnote-anchor-8" class="footnote-number" contenteditable="false" target="_self">8</a><div class="footnote-content"><p>Are random spike times (a rate code) a good assumption? Maybe? We will talk about time codes versus rate codes in the next post.</p></div></div>]]></content:encoded></item><item><title><![CDATA[The ear does not do a Fourier transform]]></title><description><![CDATA[Sensory coding 2: electric boogaloo]]></description><link>https://www.dissonances.blog/p/the-ear-does-not-do-a-fourier-transform</link><guid isPermaLink="false">https://www.dissonances.blog/p/the-ear-does-not-do-a-fourier-transform</guid><dc:creator><![CDATA[galen]]></dc:creator><pubDate>Fri, 20 Sep 2024 00:22:18 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KT9h!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ee9e15-988a-44d6-a1c2-22b14fd0a53c_1836x325.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KT9h!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ee9e15-988a-44d6-a1c2-22b14fd0a53c_1836x325.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KT9h!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ee9e15-988a-44d6-a1c2-22b14fd0a53c_1836x325.png 424w, https://substackcdn.com/image/fetch/$s_!KT9h!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ee9e15-988a-44d6-a1c2-22b14fd0a53c_1836x325.png 848w, https://substackcdn.com/image/fetch/$s_!KT9h!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ee9e15-988a-44d6-a1c2-22b14fd0a53c_1836x325.png 1272w, https://substackcdn.com/image/fetch/$s_!KT9h!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ee9e15-988a-44d6-a1c2-22b14fd0a53c_1836x325.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KT9h!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ee9e15-988a-44d6-a1c2-22b14fd0a53c_1836x325.png" width="1836" height="325" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d0ee9e15-988a-44d6-a1c2-22b14fd0a53c_1836x325.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:325,&quot;width&quot;:1836,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:133876,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KT9h!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ee9e15-988a-44d6-a1c2-22b14fd0a53c_1836x325.png 424w, https://substackcdn.com/image/fetch/$s_!KT9h!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ee9e15-988a-44d6-a1c2-22b14fd0a53c_1836x325.png 848w, https://substackcdn.com/image/fetch/$s_!KT9h!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ee9e15-988a-44d6-a1c2-22b14fd0a53c_1836x325.png 1272w, https://substackcdn.com/image/fetch/$s_!KT9h!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ee9e15-988a-44d6-a1c2-22b14fd0a53c_1836x325.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p>Let&#8217;s talk about how the cochlea computes!</p><p>The tympanic membrane (eardrum) is vibrated by changes in air pressure (sound waves). Bones in the middle ear amplify and send these vibrations to the fluid-filled, snail-shaped cochlea. Vibrations travel through the fluid to the basilar membrane, which remarkably performs <em>frequency separation</em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>: the stiffer, lighter base resonates with high frequency components of the signal, and the more flexible, heavier apex resonates with lower frequencies. Between the two ends, the resonant frequencies decrease logarithmically in space<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5ZZC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe92e54-fc41-477d-891c-a6e968931613_894x772.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5ZZC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe92e54-fc41-477d-891c-a6e968931613_894x772.png 424w, https://substackcdn.com/image/fetch/$s_!5ZZC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe92e54-fc41-477d-891c-a6e968931613_894x772.png 848w, https://substackcdn.com/image/fetch/$s_!5ZZC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe92e54-fc41-477d-891c-a6e968931613_894x772.png 1272w, https://substackcdn.com/image/fetch/$s_!5ZZC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe92e54-fc41-477d-891c-a6e968931613_894x772.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5ZZC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe92e54-fc41-477d-891c-a6e968931613_894x772.png" width="366" height="316.0536912751678" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bbe92e54-fc41-477d-891c-a6e968931613_894x772.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:772,&quot;width&quot;:894,&quot;resizeWidth&quot;:366,&quot;bytes&quot;:127605,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5ZZC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe92e54-fc41-477d-891c-a6e968931613_894x772.png 424w, https://substackcdn.com/image/fetch/$s_!5ZZC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe92e54-fc41-477d-891c-a6e968931613_894x772.png 848w, https://substackcdn.com/image/fetch/$s_!5ZZC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe92e54-fc41-477d-891c-a6e968931613_894x772.png 1272w, https://substackcdn.com/image/fetch/$s_!5ZZC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe92e54-fc41-477d-891c-a6e968931613_894x772.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Resonant frequencies of the basilar membrane. Outer, larger numbers are frequencies (Hz). Inner, smaller numbers are distance along the unrolled basilar membrane (mm). From <a href="https://redwood.berkeley.edu/wp-content/uploads/2024/09/auditory-coding.pdf">lecture slides</a>.</figcaption></figure></div><p>The hair cells on different parts of the basilar membrane wiggle back and forth at the frequency corresponding to their position on the membrane. But how do wiggling hair cells translate to electrical signals? This mechanoelectrical transduction process feels like it could be from a Dr. Seuss world: springs connected to the ends of hair cells open and close ion channels at the frequency of the vibration, which then cause neurotransmitter release. Bruno calls them &#8220;trapdoors&#8221;. Here&#8217;s a visualization:</p><div id="youtube2-y_hQiIH_aAc" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;y_hQiIH_aAc&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/y_hQiIH_aAc?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>It&#8217;s clear that the hardware of the ear is well-equipped for frequency analysis. Nerve fibers serve as <em>filters</em> to extract temporal and frequency information about a signal. Below are examples of filters (not necessarily of the ear) shown in the time domain. On the left are filters that are more localized in time, i.e. when a filter is applied to a signal, it is clear when in the signal the corresponding frequency occurred. On the right are filters that have less temporal specificity, but are more uniformly distributed across frequencies compared to the left one.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6Ysl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78354a05-d8c7-4c3f-97bc-547625619cd5_1547x715.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6Ysl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78354a05-d8c7-4c3f-97bc-547625619cd5_1547x715.png 424w, https://substackcdn.com/image/fetch/$s_!6Ysl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78354a05-d8c7-4c3f-97bc-547625619cd5_1547x715.png 848w, https://substackcdn.com/image/fetch/$s_!6Ysl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78354a05-d8c7-4c3f-97bc-547625619cd5_1547x715.png 1272w, https://substackcdn.com/image/fetch/$s_!6Ysl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78354a05-d8c7-4c3f-97bc-547625619cd5_1547x715.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6Ysl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78354a05-d8c7-4c3f-97bc-547625619cd5_1547x715.png" width="632" height="292.10084033613447" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/78354a05-d8c7-4c3f-97bc-547625619cd5_1547x715.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:715,&quot;width&quot;:1547,&quot;resizeWidth&quot;:632,&quot;bytes&quot;:176287,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6Ysl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78354a05-d8c7-4c3f-97bc-547625619cd5_1547x715.png 424w, https://substackcdn.com/image/fetch/$s_!6Ysl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78354a05-d8c7-4c3f-97bc-547625619cd5_1547x715.png 848w, https://substackcdn.com/image/fetch/$s_!6Ysl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78354a05-d8c7-4c3f-97bc-547625619cd5_1547x715.png 1272w, https://substackcdn.com/image/fetch/$s_!6Ysl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78354a05-d8c7-4c3f-97bc-547625619cd5_1547x715.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Filters as a function of time. Left: mostly high temporal precision (short duration), but less uniform tiling of frequencies. Right: mostly low temporal precision (long duration), but more uniform tiling of frequencies. <a href="https://pubmed.ncbi.nlm.nih.gov/11896400/">Lewicki 2002</a>.</figcaption></figure></div><p>Wouldn&#8217;t it be convenient if the cochlea were doing a Fourier transform, which would fit cleanly into how we often analyze signals in engineering? But no &#128581;&#127995;&#8205;&#9792;&#65039;! A Fourier transform has no explicit temporal precision, and resembles something closer to the waveforms on the right; this is not what the filters in the cochlea look like. </p><p>We can visualize different filtering schemes, or tiling of the time-frequency domain, in the following figure. In the leftmost box, where each rectangle represents a filter, a signal could be represented at a high temporal resolution (similar to left filters above), but without information about its constituent frequencies. On the other end of the spectrum, the Fourier transform performs precise frequency decomposition, but we cannot tell when in the signal that frequency occurred (similar to right filters)<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>. What the cochlea is actually doing is somewhere between a wavelet and Gabor. At high frequencies, frequency resolution is sacrificed for temporal resolution, and vice versa at low frequencies.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ckic!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F927e2b1f-7d82-4c82-90d2-aebb2702ab5b_1910x460.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ckic!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F927e2b1f-7d82-4c82-90d2-aebb2702ab5b_1910x460.png 424w, https://substackcdn.com/image/fetch/$s_!ckic!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F927e2b1f-7d82-4c82-90d2-aebb2702ab5b_1910x460.png 848w, https://substackcdn.com/image/fetch/$s_!ckic!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F927e2b1f-7d82-4c82-90d2-aebb2702ab5b_1910x460.png 1272w, https://substackcdn.com/image/fetch/$s_!ckic!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F927e2b1f-7d82-4c82-90d2-aebb2702ab5b_1910x460.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ckic!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F927e2b1f-7d82-4c82-90d2-aebb2702ab5b_1910x460.png" width="1456" height="351" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/927e2b1f-7d82-4c82-90d2-aebb2702ab5b_1910x460.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:351,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:68414,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ckic!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F927e2b1f-7d82-4c82-90d2-aebb2702ab5b_1910x460.png 424w, https://substackcdn.com/image/fetch/$s_!ckic!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F927e2b1f-7d82-4c82-90d2-aebb2702ab5b_1910x460.png 848w, https://substackcdn.com/image/fetch/$s_!ckic!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F927e2b1f-7d82-4c82-90d2-aebb2702ab5b_1910x460.png 1272w, https://substackcdn.com/image/fetch/$s_!ckic!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F927e2b1f-7d82-4c82-90d2-aebb2702ab5b_1910x460.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">In each large box, each rectangle represents a filter. The human ear does not perform a Fourier transform, but rather employs filters that are somewhere between a wavelet and Gabor. From <a href="https://redwood.berkeley.edu/wp-content/uploads/2020/08/new-window-on-sound.pdf">Olshausen &amp; O&#8217;Connor 2002</a>.</figcaption></figure></div><p>Why would this type of frequency-temporal precision tradeoff be a good representation? One theory, explored in <a href="https://pubmed.ncbi.nlm.nih.gov/11896400/">Lewicki 2002</a>, is that these filters are a strategy to <em>reduce the redundancy</em> in the representation of natural sounds. Lewicki performed independent component analysis (ICA) to produce filters maximizing statistical independence, comparing environmental sounds, animal vocalizations, and human speech. The tradeoffs look different for each one, and you can kind of map them to somewhere in the above cartoon.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kXE0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529039e3-0143-4af9-9d85-d39ef36b662d_2320x1096.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kXE0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529039e3-0143-4af9-9d85-d39ef36b662d_2320x1096.png 424w, https://substackcdn.com/image/fetch/$s_!kXE0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529039e3-0143-4af9-9d85-d39ef36b662d_2320x1096.png 848w, https://substackcdn.com/image/fetch/$s_!kXE0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529039e3-0143-4af9-9d85-d39ef36b662d_2320x1096.png 1272w, https://substackcdn.com/image/fetch/$s_!kXE0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529039e3-0143-4af9-9d85-d39ef36b662d_2320x1096.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kXE0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529039e3-0143-4af9-9d85-d39ef36b662d_2320x1096.png" width="1456" height="688" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/529039e3-0143-4af9-9d85-d39ef36b662d_2320x1096.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:688,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:653109,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kXE0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529039e3-0143-4af9-9d85-d39ef36b662d_2320x1096.png 424w, https://substackcdn.com/image/fetch/$s_!kXE0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529039e3-0143-4af9-9d85-d39ef36b662d_2320x1096.png 848w, https://substackcdn.com/image/fetch/$s_!kXE0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529039e3-0143-4af9-9d85-d39ef36b662d_2320x1096.png 1272w, https://substackcdn.com/image/fetch/$s_!kXE0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529039e3-0143-4af9-9d85-d39ef36b662d_2320x1096.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">ICA on environmental sounds (rustling brush, rain, etc.) and human speech (various American English dialects) result in wavelets, while animal vocalizations (rainforest mammals) result in something closer to a Fourier transform. From <a href="https://pubmed.ncbi.nlm.nih.gov/11896400/">Lewicki 2002</a>.</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eStx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4533f3e-748f-4141-b2ef-2738ef54ca02_2414x830.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eStx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4533f3e-748f-4141-b2ef-2738ef54ca02_2414x830.png 424w, https://substackcdn.com/image/fetch/$s_!eStx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4533f3e-748f-4141-b2ef-2738ef54ca02_2414x830.png 848w, https://substackcdn.com/image/fetch/$s_!eStx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4533f3e-748f-4141-b2ef-2738ef54ca02_2414x830.png 1272w, https://substackcdn.com/image/fetch/$s_!eStx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4533f3e-748f-4141-b2ef-2738ef54ca02_2414x830.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eStx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4533f3e-748f-4141-b2ef-2738ef54ca02_2414x830.png" width="1456" height="501" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a4533f3e-748f-4141-b2ef-2738ef54ca02_2414x830.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:501,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:313516,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!eStx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4533f3e-748f-4141-b2ef-2738ef54ca02_2414x830.png 424w, https://substackcdn.com/image/fetch/$s_!eStx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4533f3e-748f-4141-b2ef-2738ef54ca02_2414x830.png 848w, https://substackcdn.com/image/fetch/$s_!eStx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4533f3e-748f-4141-b2ef-2738ef54ca02_2414x830.png 1272w, https://substackcdn.com/image/fetch/$s_!eStx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4533f3e-748f-4141-b2ef-2738ef54ca02_2414x830.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Examples of filters shown above.</figcaption></figure></div><p>It appears that human speech occupies a distinct time-frequency space. Some speculate that speech evolved to fill a time-frequency space that wasn&#8217;t yet occupied by other existing sounds.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!K57D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e9195f-082d-4f7e-a8c2-9ecab3fcda9d_780x705.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!K57D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e9195f-082d-4f7e-a8c2-9ecab3fcda9d_780x705.png 424w, https://substackcdn.com/image/fetch/$s_!K57D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e9195f-082d-4f7e-a8c2-9ecab3fcda9d_780x705.png 848w, https://substackcdn.com/image/fetch/$s_!K57D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e9195f-082d-4f7e-a8c2-9ecab3fcda9d_780x705.png 1272w, https://substackcdn.com/image/fetch/$s_!K57D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e9195f-082d-4f7e-a8c2-9ecab3fcda9d_780x705.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!K57D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e9195f-082d-4f7e-a8c2-9ecab3fcda9d_780x705.png" width="376" height="339.84615384615387" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/96e9195f-082d-4f7e-a8c2-9ecab3fcda9d_780x705.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:705,&quot;width&quot;:780,&quot;resizeWidth&quot;:376,&quot;bytes&quot;:80533,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!K57D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e9195f-082d-4f7e-a8c2-9ecab3fcda9d_780x705.png 424w, https://substackcdn.com/image/fetch/$s_!K57D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e9195f-082d-4f7e-a8c2-9ecab3fcda9d_780x705.png 848w, https://substackcdn.com/image/fetch/$s_!K57D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e9195f-082d-4f7e-a8c2-9ecab3fcda9d_780x705.png 1272w, https://substackcdn.com/image/fetch/$s_!K57D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96e9195f-082d-4f7e-a8c2-9ecab3fcda9d_780x705.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">+: animal vocalizations, x: environmental sounds, o: human speech. <a href="https://pubmed.ncbi.nlm.nih.gov/11896400/">Lewicki 2002</a>.</figcaption></figure></div><p>To drive the theory home, one that we have been hinting at since the outset: forming ecologically-relevant representations makes sense, as behavior is dependent on the environment. It appears that for audition, as well as other sensory modalities, we are doing this. This is a bit of a teaser for efficient coding, which we will get to soon.</p><p>We&#8217;ve talked about some incredible mechanisms that occur at the beginning of the sensory coding process, but it&#8217;s truly just the tiny tip of the ice burg. We also glossed over <em>how</em> these computations occur. The next lecture will zoom into the biophysics of computation in neurons.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>We call this <em>tonotopic organization</em>, which is a mapping from frequency to space. This type of organization also exists in the cortex for other senses in addition to audition, such as <em>retinotopy</em> for vision and <em>somatotopy</em> for touch.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>The relationship between human pitch perception and frequency is logarithmic. Coincidence? &#128558;</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>One could argue we should be comparing to a short-time Fourier transform, but this has <a href="https://en.wikipedia.org/wiki/Short-time_Fourier_transform#Resolution_issues">resolution issues</a>, and is still not what the cochlea appears to be doing.</p></div></div>]]></content:encoded></item><item><title><![CDATA[The brain as a statistician]]></title><description><![CDATA[Sensory coding 1: phototransduction]]></description><link>https://www.dissonances.blog/p/the-brain-as-a-statistician</link><guid isPermaLink="false">https://www.dissonances.blog/p/the-brain-as-a-statistician</guid><dc:creator><![CDATA[galen]]></dc:creator><pubDate>Mon, 16 Sep 2024 14:02:28 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023f4255-3971-4b1c-a74f-51ba23c9bf37_1679x583.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!A-C6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56cd9f03-bb70-4f97-adef-e6f865e9f389_2880x418.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!A-C6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56cd9f03-bb70-4f97-adef-e6f865e9f389_2880x418.png 424w, https://substackcdn.com/image/fetch/$s_!A-C6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56cd9f03-bb70-4f97-adef-e6f865e9f389_2880x418.png 848w, https://substackcdn.com/image/fetch/$s_!A-C6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56cd9f03-bb70-4f97-adef-e6f865e9f389_2880x418.png 1272w, https://substackcdn.com/image/fetch/$s_!A-C6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56cd9f03-bb70-4f97-adef-e6f865e9f389_2880x418.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!A-C6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56cd9f03-bb70-4f97-adef-e6f865e9f389_2880x418.png" width="2880" height="418" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/56cd9f03-bb70-4f97-adef-e6f865e9f389_2880x418.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:418,&quot;width&quot;:2880,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:186461,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!A-C6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56cd9f03-bb70-4f97-adef-e6f865e9f389_2880x418.png 424w, https://substackcdn.com/image/fetch/$s_!A-C6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56cd9f03-bb70-4f97-adef-e6f865e9f389_2880x418.png 848w, https://substackcdn.com/image/fetch/$s_!A-C6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56cd9f03-bb70-4f97-adef-e6f865e9f389_2880x418.png 1272w, https://substackcdn.com/image/fetch/$s_!A-C6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56cd9f03-bb70-4f97-adef-e6f865e9f389_2880x418.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p>As we saw last week, animals&#8217; ability to turn sensory information into behavior defines many of the computational problems we&#8217;d like to solve. How would one design a neural system to perform these computations? We&#8217;ll explore sensory coding with two examples: phototransduction in the eye (this post), and acoustic transduction in the ear (next post).</p><p>In every environment, we are constantly bombarded by electromagnetic waves. Anthropocentrically, we call waves at 400-700nm <em>light<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a></em>. But how do we convert light into electrical signals and glutamate release that eventually drives perception and action? Phototransduction in rods, which are photoreceptors in the retina used in low luminance conditions, illustrates how the brain is able to discriminate between relevant signals &#8212; photons from the world &#8212; and noise &#8212; spontaneous activation in a rod.</p><p>Although we think of light as waves, under low luminance, the retina senses light intensity by counting the number of photons. In moonlight, rods catch photons at a rate of about one per second. In darker environments, this rate has been psychophysically determined to be about one every 5000 seconds per rod in humans. To accomplish this, a rod must very reliably detect a <em>single photon</em>! </p><p>Inside a rod, rhodopsin molecules catch photons, isomerize (change chemical configuration), and initialize a biochemical cascade. Rhodopsin must be sensitive enough to detect one photon, but because strong collisions between molecules can also cause isomerization, they must be stable enough as they float around in the cell and bump into each other. When a collision does set off the isomerization, it appears to downstream processes identical to a photon catch. This is potentially bad! </p><p>Do these collisions happen often enough for us to care? For one rhodopsin molecule, the rate is about once every 700 years. Phew, you might say. BUT! There are hundreds of millions of rhodopsin molecules per rod, so this rate turns out to be about once every 160 seconds for a rod. Even worse, taking into account all the rods in the retina means that these events happen quite frequently. This noise is called <em>spontaneous isomerization</em>, often perceived as a scintillating pattern. And of course the Germans have a word for it: <em>eigengrau</em>, or intrinsic gray. A simulation of the eigengrau on a 300x300 patch of rods:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SQxY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f29e9f3-7523-4aca-a0ff-452bf466422b_720x720.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SQxY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f29e9f3-7523-4aca-a0ff-452bf466422b_720x720.gif 424w, https://substackcdn.com/image/fetch/$s_!SQxY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f29e9f3-7523-4aca-a0ff-452bf466422b_720x720.gif 848w, https://substackcdn.com/image/fetch/$s_!SQxY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f29e9f3-7523-4aca-a0ff-452bf466422b_720x720.gif 1272w, https://substackcdn.com/image/fetch/$s_!SQxY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f29e9f3-7523-4aca-a0ff-452bf466422b_720x720.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SQxY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f29e9f3-7523-4aca-a0ff-452bf466422b_720x720.gif" width="720" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4f29e9f3-7523-4aca-a0ff-452bf466422b_720x720.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:720,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1090339,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SQxY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f29e9f3-7523-4aca-a0ff-452bf466422b_720x720.gif 424w, https://substackcdn.com/image/fetch/$s_!SQxY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f29e9f3-7523-4aca-a0ff-452bf466422b_720x720.gif 848w, https://substackcdn.com/image/fetch/$s_!SQxY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f29e9f3-7523-4aca-a0ff-452bf466422b_720x720.gif 1272w, https://substackcdn.com/image/fetch/$s_!SQxY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f29e9f3-7523-4aca-a0ff-452bf466422b_720x720.gif 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Here&#8217;s the remarkable thing: the one photon per 5000 seconds per rod threshold was determined from the conditions under which a subject can discriminate between actual light and no light with 75% accuracy. <strong>How can the threshold be this low if spontaneous isomerizations happen at a much higher rate of once every 160 seconds per rod?</strong> How is it possible that a tiny change in rate is enough for the brain to say: this is light!</p><p>Let&#8217;s express this slightly more formally. We can model the background and signal distributions as Poisson, with <em>&#955;_b</em>=1/160 as the background spontaneous isomerization rate and <em>&#955;_s</em>=(1/160 + 1/5000) as the signal rate. Given an event, the brain must determine which distribution caused it. If the two distributions are very separated like in the cartoon below, maybe this is not too hard. You could be correct a high percentage of the time by using the dotted line below as a threshold. Say you perceived <em>x</em> amount of brightness: if it was to the left of the line, you say there&#8217;s no real light. Otherwise, you say there&#8217;s light. Even if you move the line, there would be some tradeoff between true and false positives, but you would not be <em>that</em> wrong<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ac8S!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023f4255-3971-4b1c-a74f-51ba23c9bf37_1679x583.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ac8S!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023f4255-3971-4b1c-a74f-51ba23c9bf37_1679x583.png 424w, https://substackcdn.com/image/fetch/$s_!Ac8S!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023f4255-3971-4b1c-a74f-51ba23c9bf37_1679x583.png 848w, https://substackcdn.com/image/fetch/$s_!Ac8S!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023f4255-3971-4b1c-a74f-51ba23c9bf37_1679x583.png 1272w, https://substackcdn.com/image/fetch/$s_!Ac8S!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023f4255-3971-4b1c-a74f-51ba23c9bf37_1679x583.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ac8S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023f4255-3971-4b1c-a74f-51ba23c9bf37_1679x583.png" width="582" height="202.08814770696844" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/023f4255-3971-4b1c-a74f-51ba23c9bf37_1679x583.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:583,&quot;width&quot;:1679,&quot;resizeWidth&quot;:582,&quot;bytes&quot;:62726,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Ac8S!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023f4255-3971-4b1c-a74f-51ba23c9bf37_1679x583.png 424w, https://substackcdn.com/image/fetch/$s_!Ac8S!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023f4255-3971-4b1c-a74f-51ba23c9bf37_1679x583.png 848w, https://substackcdn.com/image/fetch/$s_!Ac8S!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023f4255-3971-4b1c-a74f-51ba23c9bf37_1679x583.png 1272w, https://substackcdn.com/image/fetch/$s_!Ac8S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F023f4255-3971-4b1c-a74f-51ba23c9bf37_1679x583.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>In reality, the two rates only differ by about 3%. Even at a much higher rate of <em>&#955;_b</em>=10 (where <em>&#955;_s </em>also increases to maintain the 3% difference), the distributions are very close. At <em>&#955;_b</em>=100, they are a little bit farther. For both settings, using a threshold line to classify between the two distributions would result in a very high chance of being wrong.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!P-g6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d6b335-4981-4195-8e4f-13c3a7202008_1578x1120.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!P-g6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d6b335-4981-4195-8e4f-13c3a7202008_1578x1120.png 424w, https://substackcdn.com/image/fetch/$s_!P-g6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d6b335-4981-4195-8e4f-13c3a7202008_1578x1120.png 848w, https://substackcdn.com/image/fetch/$s_!P-g6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d6b335-4981-4195-8e4f-13c3a7202008_1578x1120.png 1272w, https://substackcdn.com/image/fetch/$s_!P-g6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d6b335-4981-4195-8e4f-13c3a7202008_1578x1120.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!P-g6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d6b335-4981-4195-8e4f-13c3a7202008_1578x1120.png" width="610" height="432.7815934065934" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/69d6b335-4981-4195-8e4f-13c3a7202008_1578x1120.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1033,&quot;width&quot;:1456,&quot;resizeWidth&quot;:610,&quot;bytes&quot;:119471,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!P-g6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d6b335-4981-4195-8e4f-13c3a7202008_1578x1120.png 424w, https://substackcdn.com/image/fetch/$s_!P-g6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d6b335-4981-4195-8e4f-13c3a7202008_1578x1120.png 848w, https://substackcdn.com/image/fetch/$s_!P-g6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d6b335-4981-4195-8e4f-13c3a7202008_1578x1120.png 1272w, https://substackcdn.com/image/fetch/$s_!P-g6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d6b335-4981-4195-8e4f-13c3a7202008_1578x1120.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Because the signal and background always differ by 3%, the goal is to increase the absolute distance by raising the rate such that the 3% is enough to get high accuracy by drawing a line. Qualitatively, it should look something like this:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JuLq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb616ec04-7a9f-4f00-9015-1b1f905e7fce_1225x348.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JuLq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb616ec04-7a9f-4f00-9015-1b1f905e7fce_1225x348.png 424w, https://substackcdn.com/image/fetch/$s_!JuLq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb616ec04-7a9f-4f00-9015-1b1f905e7fce_1225x348.png 848w, https://substackcdn.com/image/fetch/$s_!JuLq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb616ec04-7a9f-4f00-9015-1b1f905e7fce_1225x348.png 1272w, https://substackcdn.com/image/fetch/$s_!JuLq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb616ec04-7a9f-4f00-9015-1b1f905e7fce_1225x348.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JuLq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb616ec04-7a9f-4f00-9015-1b1f905e7fce_1225x348.png" width="526" height="149.4269387755102" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b616ec04-7a9f-4f00-9015-1b1f905e7fce_1225x348.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:348,&quot;width&quot;:1225,&quot;resizeWidth&quot;:526,&quot;bytes&quot;:24652,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!JuLq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb616ec04-7a9f-4f00-9015-1b1f905e7fce_1225x348.png 424w, https://substackcdn.com/image/fetch/$s_!JuLq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb616ec04-7a9f-4f00-9015-1b1f905e7fce_1225x348.png 848w, https://substackcdn.com/image/fetch/$s_!JuLq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb616ec04-7a9f-4f00-9015-1b1f905e7fce_1225x348.png 1272w, https://substackcdn.com/image/fetch/$s_!JuLq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb616ec04-7a9f-4f00-9015-1b1f905e7fce_1225x348.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><em>&#955;_b</em>=something big</figcaption></figure></div><p>Note that we cannot literally increase the 1/5000 threshold rate; this is a fixed property of the visual system. However, we could integrate over some number of rods and some period of time, i.e. count the number of events that occur in a spatiotemporal region, until we get an aggregated rate that achieves the desired accuracy. I will not give exact numbers in case future versions of this course use the same problem set, but it is a <em>ton</em> of rods and a surprisingly long amount of time<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>! Amazingly, the brain seems to have solved this problem: it is able to do these statistics constantly and as correctly as necessary.</p><p>This balance of sensitivity and stability continues to be important downstream of the rods. Bipolar cells in the retina must reliably detect a photon amongst a pool of rods. If just one rod catches a photon, there must somehow be a reliable change in the voltage of the bipolar cell. The challenge is, as Bruno says, to constantly fight the entropy of the universe, such as random fluctuations in synaptic terminals. If you were to linearly sum the noisy rod responses within each pool together, an individual photon event wouldn&#8217;t be detectable. The solution is to place thresholds at synapses, which results in passing only a real light signal (as much as possible) to the bipolar cell. What is the optimal threshold? Work by Sampath, Field, and Rieke<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a> calculated a theoretical optimal value based on the amount of noise at each synaptic terminal and the signal magnitude in response to actual light. Experimentally, they confirmed that the threshold was exactly where theory said it would be!</p><p>Perhaps this all seems like a convoluted, nonsensical system. But in the spirit of building a brain, the challenge would be: could you come up with a better mechanism that operates with such low energy, with such a high dynamic range, under these constraints? Really good cameras don&#8217;t have to work like the eye, but it&#8217;s still important (and fun, hopefully) to understand the principles underlying how biology solved this problem.</p><p>In the next post, we will see a solution to another problem: acoustic transduction.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>A bee would include the ultraviolet portion of the spectrum; a mosquito or snake, infrared.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>I didn&#8217;t want to go into area under the ROC curve (bold black curve below) in detail, but at a high level, the 75% accuracy refers to the area under the curve generated by every location of the threshold line for the two distributions. Each threshold line has a different tradeoff between true positives (hits) and false positives, which each fall somewhere on the ROC curve. If the area under the curve is 0.75 (out of 1), then the distributions are appropriately far apart. As an example, assuming the distributions are far enough apart, the threshold line below corresponds to the dot on the curve. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zzm8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43f6de20-d918-4fee-ac47-cdc01a49d8b0_1234x1492.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zzm8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43f6de20-d918-4fee-ac47-cdc01a49d8b0_1234x1492.png 424w, https://substackcdn.com/image/fetch/$s_!zzm8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43f6de20-d918-4fee-ac47-cdc01a49d8b0_1234x1492.png 848w, https://substackcdn.com/image/fetch/$s_!zzm8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43f6de20-d918-4fee-ac47-cdc01a49d8b0_1234x1492.png 1272w, https://substackcdn.com/image/fetch/$s_!zzm8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43f6de20-d918-4fee-ac47-cdc01a49d8b0_1234x1492.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zzm8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43f6de20-d918-4fee-ac47-cdc01a49d8b0_1234x1492.png" width="430" height="519.902755267423" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/43f6de20-d918-4fee-ac47-cdc01a49d8b0_1234x1492.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1492,&quot;width&quot;:1234,&quot;resizeWidth&quot;:430,&quot;bytes&quot;:112886,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zzm8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43f6de20-d918-4fee-ac47-cdc01a49d8b0_1234x1492.png 424w, https://substackcdn.com/image/fetch/$s_!zzm8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43f6de20-d918-4fee-ac47-cdc01a49d8b0_1234x1492.png 848w, https://substackcdn.com/image/fetch/$s_!zzm8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43f6de20-d918-4fee-ac47-cdc01a49d8b0_1234x1492.png 1272w, https://substackcdn.com/image/fetch/$s_!zzm8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43f6de20-d918-4fee-ac47-cdc01a49d8b0_1234x1492.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>This is part of why rods do not sense fast temporal changes as well as cones do.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p><em>Nonlinear signal transfer from mouse rods to bipolar cells and implications for visual sensitivity</em> (<a href="https://pubmed.ncbi.nlm.nih.gov/12062023/">Field &amp; Rieke 2002</a>); <em>Selective Transmission of Single Photon Responses by Saturation at the Rod-to-Rod Bipolar Synapse</em> (<a href="https://redwood.berkeley.edu/wp-content/uploads/2020/08/sampath-rieke-fod-bipolar.pdf">Sampath &amp; Rieke 2004</a>).</p></div></div>]]></content:encoded></item><item><title><![CDATA[Why do we need a brain?]]></title><description><![CDATA[Drawing inspiration from animal behavior and biological structure]]></description><link>https://www.dissonances.blog/p/why-do-we-need-a-brain</link><guid isPermaLink="false">https://www.dissonances.blog/p/why-do-we-need-a-brain</guid><dc:creator><![CDATA[galen]]></dc:creator><pubDate>Fri, 06 Sep 2024 17:50:27 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!WCpT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d053d3b-5a4b-4849-a3d9-37de9abf4fff_1220x1526.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jh4Z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897376c7-0d51-4371-8192-60ee969f3d50_1242x128.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jh4Z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897376c7-0d51-4371-8192-60ee969f3d50_1242x128.png 424w, https://substackcdn.com/image/fetch/$s_!jh4Z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897376c7-0d51-4371-8192-60ee969f3d50_1242x128.png 848w, https://substackcdn.com/image/fetch/$s_!jh4Z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897376c7-0d51-4371-8192-60ee969f3d50_1242x128.png 1272w, https://substackcdn.com/image/fetch/$s_!jh4Z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897376c7-0d51-4371-8192-60ee969f3d50_1242x128.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jh4Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897376c7-0d51-4371-8192-60ee969f3d50_1242x128.png" width="1242" height="128" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/897376c7-0d51-4371-8192-60ee969f3d50_1242x128.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:128,&quot;width&quot;:1242,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:27303,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jh4Z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897376c7-0d51-4371-8192-60ee969f3d50_1242x128.png 424w, https://substackcdn.com/image/fetch/$s_!jh4Z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897376c7-0d51-4371-8192-60ee969f3d50_1242x128.png 848w, https://substackcdn.com/image/fetch/$s_!jh4Z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897376c7-0d51-4371-8192-60ee969f3d50_1242x128.png 1272w, https://substackcdn.com/image/fetch/$s_!jh4Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F897376c7-0d51-4371-8192-60ee969f3d50_1242x128.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">From <em>Movements of the Retinae of Jumping Spiders (Salticidae: Dendryphantinae) in Response to Visual Stimuli</em>, <a href="https://journals.biologists.com/jeb/article/51/2/471/21596/Movements-of-the-Retinae-of-Jumping-Spiders">Land 1969</a>.</figcaption></figure></div><p>Chapter 2 of <em>Principles of Neural Design </em>(2017) by Peter Sterling and Simon Laughlin opens with the question: why do we <em>need</em> a brain?</p><p>Introductory neuroscience courses generally start at the lowest level, with neurons, synapses, and action potentials. It&#8217;s like teaching someone how a car works by starting with spark plugs rather than how the engine makes the car move, or why you need a transmission. Instead of starting with the nuts and bolts, we begin this course as Sterling and Laughlin begin their book: by motivating the investigation into core principles that tell us <em>what the brain is for</em>. And if these principles are truly fundamental, they should hold true for all types of brains.</p><blockquote><p>What we identify here as the brain&#8217;s purpose, especially because we are seeking principles, should apply not only to humans but as well to the nematode worm, <em>C. elegans</em>, and to flies. The deep purpose of the nematode&#8217;s brain of 302 neurons, the fruit fly&#8217;s brain of 105 neurons, and our own brain of 10^11 neurons (Azevedo et al., 2009) must be the same.</p></blockquote><p>Much of the current AI industry likes to impose specific definitions of intelligence, like image classification and next-token prediction<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>. In our approach, we counter with these questions: Is that what the brain is designed to do? What problems is biology solving? Why did the brain develop anatomically distinct structures; why did we evolve ears and eyes?</p><p>Speaking of eyes, the optical properties of animal eyes are beautiful examples of evolution based on animal capabilities and environments<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>. An improvement to the pit eye (<strong>a</strong>), the pinhole eye (<strong>b</strong>) found in the <em>Nautilus</em> is still quite limited due to low retinal illuminance and low resolution. As a solution, various types of lenses (<strong>c-h</strong>) allow wider apertures and refraction. Some animals developed reflective structure to capture more light (<strong>i</strong>). And these are just single-chamber eyes! That nature has discovered mechanisms that parallel the optics in our engineered systems is incredible.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WCpT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d053d3b-5a4b-4849-a3d9-37de9abf4fff_1220x1526.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WCpT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d053d3b-5a4b-4849-a3d9-37de9abf4fff_1220x1526.png 424w, https://substackcdn.com/image/fetch/$s_!WCpT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d053d3b-5a4b-4849-a3d9-37de9abf4fff_1220x1526.png 848w, https://substackcdn.com/image/fetch/$s_!WCpT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d053d3b-5a4b-4849-a3d9-37de9abf4fff_1220x1526.png 1272w, https://substackcdn.com/image/fetch/$s_!WCpT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d053d3b-5a4b-4849-a3d9-37de9abf4fff_1220x1526.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WCpT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d053d3b-5a4b-4849-a3d9-37de9abf4fff_1220x1526.png" width="450" height="562.8688524590164" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5d053d3b-5a4b-4849-a3d9-37de9abf4fff_1220x1526.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1526,&quot;width&quot;:1220,&quot;resizeWidth&quot;:450,&quot;bytes&quot;:266939,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WCpT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d053d3b-5a4b-4849-a3d9-37de9abf4fff_1220x1526.png 424w, https://substackcdn.com/image/fetch/$s_!WCpT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d053d3b-5a4b-4849-a3d9-37de9abf4fff_1220x1526.png 848w, https://substackcdn.com/image/fetch/$s_!WCpT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d053d3b-5a4b-4849-a3d9-37de9abf4fff_1220x1526.png 1272w, https://substackcdn.com/image/fetch/$s_!WCpT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d053d3b-5a4b-4849-a3d9-37de9abf4fff_1220x1526.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Principles of optics govern the design of eyes. <strong>a. </strong>pit eye, <strong>b</strong>. pinhole eye, <strong>c-g</strong>. eyes with different types of lenses, <strong>h</strong>. human eye, <strong>i</strong>. mirror eye. From <a href="https://pubmed.ncbi.nlm.nih.gov/1575438/">Land &amp; Fernald 1992</a>.</figcaption></figure></div><p>To examine behavior, we turn to simpler brains like those of <em>C. elegans</em>, fruit flies, and rats, but what we&#8217;ve learned is anything but simple. Some of the big breakthroughs in neuroscience relate to navigation in animals, such as the fruit fly ellipsoid body encoding head direction, and place and grid cells in rat hippocampus (we will go deeper into these topics later in the course). One of Bruno&#8217;s favorite examples is jumping spiders<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>. They have remarkable eyes that swivel back and forth to scan the environment. They stalk their prey, navigating in complex ways in 3D space. Jumping spider psychophysics (yes<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a>) show that they perform object recognition. Supposedly, if you catch one and put it in front of a white computer screen and move your cursor around, it will try to pounce on it like a tiny cat.</p><div id="youtube2--kJeQdnZfFY" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;-kJeQdnZfFY&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/-kJeQdnZfFY?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>Clearly, there is complex computation going on inside a jumping spider. Forget mammalian brains; we don&#8217;t even know how these simpler brains work! Until we do, it&#8217;s hard to make the case that we have made significant progress on discovering core principles. Surely we cannot discount what underlies these behaviors and structures in our studies of neuroscience and intelligence.</p><p>As interesting as animal behavior and biological structure are, this course is about computation, not evolutionary biology. Part of the reason the systems above are so compelling is that we can use mathematical language to describe them. This course will draw on elements of signal processing, statistics, calculus, linear algebra, attractor networks, and manifold representations, just to name a few. While mapping to math is useful, we should, above all, be open to <em>embracing the complexity of biology</em>. Bruno points out that maybe in studying these principles, we will realize we lack the appropriate language, and even develop new mathematical tools.</p><p>We&#8217;ve talked about animal behavior, but action is largely driven by sensory input. And it is not enough to just sense: signals need to be encoded in ways that are useful for action. For our first technical topic, the next lecture will dive into sensory coding by looking at the computations involved in phototransduction.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>These definitions of intelligence often just happen to match the capabilities of current state-of-the-art models on arbitrary benchmarks that drive products and profits. What a coincidence!</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p><em>The Evolution of Eyes</em>, <a href="https://pubmed.ncbi.nlm.nih.gov/1575438/">Land &amp; Fernald 1992</a>; <em>Animal Eyes</em>, <a href="https://global.oup.com/academic/product/animal-eyes-9780199581146?cc=us&amp;lang=en&amp;">Land &amp; Nilsson 2012</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>To the point where we have considered making Jumping Spider Fan Club t-shirts for the lab.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p><em>Movements of the Retinae of Jumping Spiders (Salticidae: Dendryphantinae) in Response to Visual Stimuli</em>, <a href="https://journals.biologists.com/jeb/article/51/2/471/21596/Movements-of-the-Retinae-of-Jumping-Spiders">Land 1969</a>.</p></div></div>]]></content:encoded></item><item><title><![CDATA[What is neural computation?]]></title><description><![CDATA[How brains work, and how to build a brain]]></description><link>https://www.dissonances.blog/p/what-is-neural-computation</link><guid isPermaLink="false">https://www.dissonances.blog/p/what-is-neural-computation</guid><dc:creator><![CDATA[galen]]></dc:creator><pubDate>Sat, 31 Aug 2024 15:17:33 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde218d0e-85e7-40de-bca2-818c26d16f4e_335x307.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vt17!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde218d0e-85e7-40de-bca2-818c26d16f4e_335x307.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vt17!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde218d0e-85e7-40de-bca2-818c26d16f4e_335x307.jpeg 424w, https://substackcdn.com/image/fetch/$s_!vt17!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde218d0e-85e7-40de-bca2-818c26d16f4e_335x307.jpeg 848w, https://substackcdn.com/image/fetch/$s_!vt17!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde218d0e-85e7-40de-bca2-818c26d16f4e_335x307.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!vt17!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde218d0e-85e7-40de-bca2-818c26d16f4e_335x307.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vt17!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde218d0e-85e7-40de-bca2-818c26d16f4e_335x307.jpeg" width="335" height="307" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de218d0e-85e7-40de-bca2-818c26d16f4e_335x307.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:307,&quot;width&quot;:335,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:33050,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vt17!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde218d0e-85e7-40de-bca2-818c26d16f4e_335x307.jpeg 424w, https://substackcdn.com/image/fetch/$s_!vt17!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde218d0e-85e7-40de-bca2-818c26d16f4e_335x307.jpeg 848w, https://substackcdn.com/image/fetch/$s_!vt17!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde218d0e-85e7-40de-bca2-818c26d16f4e_335x307.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!vt17!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde218d0e-85e7-40de-bca2-818c26d16f4e_335x307.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This semester, I&#8217;m TAing a graduate course called <em>Neural Computation</em> taught by Bruno Olshausen, which is probably my favorite class I&#8217;ve taken at Berkeley. I will try to write a short post each week with my annotations of that week&#8217;s lectures. It&#8217;s going to be a busy semester, so no guarantees, but I&#8217;ll do my best &#129761;. All course content is on the <a href="https://redwood.berkeley.edu/courses/vs265/">website</a>.</p><p>Throughout history, we have used our newest technologies as metaphors for the brain: hydraulic pumps, steam engines, and computers. I think this urge to project a known system onto the brain tells us how hard it is to reason about its complexity without a concrete foothold. In the context of this class, we are not saying that the brain literally operates like a computer. But we are using ideas of computation, e.g. logic gates, circuits, and encoding principles, to help us ask concrete questions about the brain.</p><p>In Bruno&#8217;s words, this course is about <em>how brains work, and how to build a brain</em>. These two ideas are intertwined and complementary. The Wright brothers were inspired by observations about bird wings, which also helped us learn more about how birds fly. If we agree with Richard Feynman&#8217;s quote &#8220;What I cannot create, I do not understand&#8221;, we won&#8217;t be able to build a brain without understanding it. But <em>trying</em> to build it may help us start to understand it.</p><p>With recent technological advances, it&#8217;s now possible to record from tens of thousands of neurons in the brain simultaneously<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>. How do we go from these complex, noisy data to understanding the principles the generate this activity? It isn&#8217;t sufficient to only analyze data in a &#8220;bottom-up&#8221; fashion. We need top-down concepts to inform how we interpret the data. As Horace Barlow said, &#8220;A wing would be a most mystifying structure if one did not know that birds flew.&#8221;<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a></p><p>As a side note, neuroscientist Konrad K&#246;rding made this point in a podcast earlier this year: </p><blockquote><p>&#8220;For every neural dataset... there is an infinite set of biologically meaningful, potentially realistic models that will predict exactly that dataset. The neuroscience that we do doesn't actually inform the mechanisms that we want to talk about, which puts large branches of neuroscience into an epistemologically really difficult spot."<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a></p></blockquote><p>Coming up with a model that predicts a dataset doesn&#8217;t mean you definitively understand some aspect of the brain. It&#8217;s a nice story to tell, but results are never so clean, and there are so many other possible explanations. Predicting brain activity is also only one type of modeling, which we call <em>descriptive</em>. Can a model that regresses to neural activity tell us something about the actual implementation in the brain, or the normative principles driving these patterns? These are all hairy epistemological questions that I won&#8217;t get into here. When it comes to trying to make sense of the massive amount of data and theories put forward about the brain, I like to think of the parable of the <a href="https://en.wikipedia.org/wiki/Blind_men_and_an_elephant">blind men and the elephant</a>, where each blind man draws a different conclusion about what an elephant is based on which part they touch. Werner Heisenberg puts it another way: &#8220;We have to remember that what we observe is not nature in itself, but nature exposed to our method of questioning.&#8221;<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a> This is why neuroscience is so hard, and why we still don&#8217;t understand the brain at all!</p><p>Okay, back to the lecture. In the 40s-60s, there were several early efforts to understand the brain. The cybernetics approach tried to understand the mechanisms of the brain from the inside, such as proposing that the brain implemented logic gates, which ended up also contributing to the development of modern computers<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a>. After the famous Dartmouth AI meeting, the organizers were motivated to design a machine to simulate the brain<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a>. Neurobiologists David Hubel and Torsten Wiesel discovered orientation tuning in cat visual cortex<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a>, which still largely dictates how we study visual cortex, and eventually led to the development of convolutional neural networks<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-9" href="#footnote-9" target="_self">9</a>. It&#8217;s clear that trying to understand the brain and trying to build one have been connected since the beginning of computation.</p><p>As Bruno says, nature hides its secrets well. But there is hope for discovering theoretical principles by looking to biology. Biology has already solved complex problems. Can we learn from it? This is one of the main themes of the course, and the next lecture will start by highlighting the rich world of animal behavior.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>E.g. <em>High-precision coding in visual cortex</em>, <a href="https://www.sciencedirect.com/science/article/pii/S0092867421003731">Stringer et al. 2021</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p><em>Possible Principles Underlying the Transformations of Sensory Messages</em>, <a href="https://www.cnbc.cmu.edu/~tai/microns_papers/Barlow-SensoryCommunication-1961.pdf">Barlow 1961</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>From Gaute Einevoll&#8217;s Theoretical Neuroscience podcast, <a href="https://theoreticalneuroscience.no/thn8/">episode 8</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p><em>Physics and Philosophy: The Revolution in Modern Science</em>, Heisenberg 1958.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p><em>A Logical Calculus of the Ideas Immanent in Nervous Activity</em>, <a href="https://www.cs.cmu.edu/~./epxing/Class/10715/reading/McCulloch.and.Pitts.pdf">McCulloch &amp; Pitts 1943</a>. This formed one of the bases for von Neumann&#8217;s development of the EDVAC, one of the first binary stored-value computers.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-6" href="#footnote-anchor-6" class="footnote-number" contenteditable="false" target="_self">6</a><div class="footnote-content"><p>The preface of <em>Automata Studies </em><a href="https://www.degruyter.com/document/doi/10.1515/9781400882618/html">(1956)</a> begins with &#8220;Among the most challenging scientific questions of our time are the corresponding analytic and synthetic problems: How does the brain function? Can we design a machine which will simulate a brain?&#8221;</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-7" href="#footnote-anchor-7" class="footnote-number" contenteditable="false" target="_self">7</a><div class="footnote-content"><p>Around that time, Claude Shannon, Herbert Simon, and Marvin Minsky, all arguably well-informed people who spent a lot of time thinking about these problems, predicted that AI was right around the corner. Sound familiar?</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-8" href="#footnote-anchor-8" class="footnote-number" contenteditable="false" target="_self">8</a><div class="footnote-content"><p><em>Receptive fields of single neurones in the cat's striate cortex</em>, <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1363130/">Hubel &amp; Wiesel 1959</a>. </p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-9" href="#footnote-anchor-9" class="footnote-number" contenteditable="false" target="_self">9</a><div class="footnote-content"><p>Fukushima&#8217;s <a href="https://en.wikipedia.org/wiki/Neocognitron">Neocognitron</a> (1979) was the first CNN. </p></div></div>]]></content:encoded></item><item><title><![CDATA[A pure person]]></title><description><![CDATA[Lim Giong's electronic contrasts as a reflection of Taiwanese identity]]></description><link>https://www.dissonances.blog/p/a-pure-person</link><guid isPermaLink="false">https://www.dissonances.blog/p/a-pure-person</guid><dc:creator><![CDATA[galen]]></dc:creator><pubDate>Sun, 18 Aug 2024 16:44:21 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/701fac9c-d584-4f91-9c3c-ea9742248daf_1132x1508.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4uyb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f57ea2d-8f44-459d-a08a-76545fb06644_1132x225.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4uyb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f57ea2d-8f44-459d-a08a-76545fb06644_1132x225.jpeg 424w, https://substackcdn.com/image/fetch/$s_!4uyb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f57ea2d-8f44-459d-a08a-76545fb06644_1132x225.jpeg 848w, https://substackcdn.com/image/fetch/$s_!4uyb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f57ea2d-8f44-459d-a08a-76545fb06644_1132x225.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!4uyb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f57ea2d-8f44-459d-a08a-76545fb06644_1132x225.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4uyb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f57ea2d-8f44-459d-a08a-76545fb06644_1132x225.jpeg" width="1132" height="225" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3f57ea2d-8f44-459d-a08a-76545fb06644_1132x225.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:225,&quot;width&quot;:1132,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:104954,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4uyb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f57ea2d-8f44-459d-a08a-76545fb06644_1132x225.jpeg 424w, https://substackcdn.com/image/fetch/$s_!4uyb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f57ea2d-8f44-459d-a08a-76545fb06644_1132x225.jpeg 848w, https://substackcdn.com/image/fetch/$s_!4uyb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f57ea2d-8f44-459d-a08a-76545fb06644_1132x225.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!4uyb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f57ea2d-8f44-459d-a08a-76545fb06644_1132x225.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p><em>Millennium Mambo</em> (2001) by Taiwanese director Hou Hsiao-hsien opens with a woman, ethereal, on a fluorescent-lit bridge at night. The music, by Lim Giong, starts with pulsing static and bell-like synths. A warm electric guitar enters, like a hug, accented with a steady kick drum, like a heartbeat. Then a man&#8217;s voice echoes in Taiwanese Hokkien: <em>si&#257;n-li&#244;ng (kind) / p&#238;ng-hu&#226;n (ordinary) / khu&#224;i-lo&#781;k (happy) / tan-s&#251;n &#234; l&#226;ng (a pure person)</em>. Artifice with sincerity, metronomic with flowing, new textures with an old language; it&#8217;s not obvious that these elements should all sound good together. Yet they do.</p><p>&#26519;&#24375; (Lim Giong), a Taiwanese pop singer turned electronic composer<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>, has a style characterized by contrasts. Following classic Taiwanese 90s pop, his early music was sentimental melodrama influenced by Western disco and rock. Later, he moved toward electronica, and one of his first mostly-electronic albums (<em>Insects Awaken</em>, 2005) contains spoken and sung Taiwanese, Mandarin, English, and French, as well as sounds of mahjong tiles, a funk track, and his rendition of a Taiwanese folk song. He&#8217;s also composed dozens of film soundtracks for Chinese and Taiwanese filmmakers, and won the Cannes Film Festival Soundtrack Award in 2015. His new record <em>&#21035;&#22659; </em>(<em>The Realm of Otherness</em>) combines sounds of nature &#8212; waves on a rocky beach, wind in a bamboo forest &#8212; with almost any electronic sound you can think of. His versatility is clear, but one thing has remained constant: the nostalgic Taiwanese language, sung, spoken, and sampled.</p><p>It&#8217;s perhaps not a coincidence that Taiwanese culture and history is also characterized by contrasts. Though best known internationally for semiconductors, Taiwan&#8217;s subtropical wildlife and scenery are also famous across Asia<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>. Throughout its history, the island has been colonized or occupied by southeastern Chinese immigrants, the Dutch and Spanish, the Japanese Empire, and Kuomintang from mainland China. After financial assistance and democratic reforms of the 20th century, Taiwan rapidly developed into what it is today: a mix of southeastern Chinese (where Hokkien comes from) and Japanese culture, democratic yet not recognized as a country, progressive yet steeped in Taoism and tradition, agricultural and food-centered yet technology-focused. Throughout Taiwan&#8217;s multiple governing entities and industrialization, Taiwanese Hokkien and Taiwanese Mandarin, distinct from their mainland origins, have developed and persisted.</p><p>Lim Giong&#8217;s music constantly hints at these themes: outside influences, nostalgia, the power of nature, contrasts and tension, and the Taiwanese identity. But more than anything else, the musical worlds he builds are unique and endlessly fun to listen to.</p><div><hr></div><p>A few years ago in the winter time, I came across the creaking of a windy bamboo forest outside of Tainan, in southern Taiwan. I had never heard anything like it, so I recorded it.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;428f1268-f3a1-4866-b04c-84db2dc9e638&quot;,&quot;duration&quot;:null}"></div><p>You can hear something similar at the end of <em>&#20908;&#39080;&#31481;</em> (<em>Winter Windswept Bamboos</em>)<em>.</em></p><div id="youtube2-8Q_JHiyp1IQ" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;8Q_JHiyp1IQ&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/8Q_JHiyp1IQ?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>And <em>&#30707;&#35997; (Stone Shell)</em> is my favorite from the new record: a dance club on a stone beach.</p><div id="youtube2-9Prwn87cqPU" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;9Prwn87cqPU&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/9Prwn87cqPU?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>There is a surreal quality to much of Lim Giong&#8217;s music that makes it well-suited for certain types of cinema. This scene from Bi Gan&#8217;s <em>&#22320;&#29699;&#26368;&#24460;&#30340;&#22812;&#26202; </em>(<em>Long Day&#8217;s Journey Into Night</em>, 2018), for example.</p><div id="youtube2-IiWXbbLzGPA" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;IiWXbbLzGPA&quot;,&quot;startTime&quot;:&quot;80&quot;,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/IiWXbbLzGPA?start=80&amp;rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>Here&#8217;s the opening of <em>Millennium Mambo</em>.</p><div id="youtube2-msU85-1s6o4" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;msU85-1s6o4&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/msU85-1s6o4?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>I&#8217;ll leave you with a playlist of my favorite Lim Giong.</p><iframe class="spotify-wrap playlist" data-attrs="{&quot;image&quot;:&quot;https://mosaic.scdn.co/640/ab67616d00001e020d204b8a6d8c7877d20ebb2cab67616d00001e025a6cbe05a43501d9d07544a9ab67616d00001e0291e73fae200423181de454fdab67616d00001e02fff226a0ff67a19fa7ddb043&quot;,&quot;title&quot;:&quot;A pure person&quot;,&quot;subtitle&quot;:&quot;By galen&quot;,&quot;description&quot;:&quot;Playlist&quot;,&quot;url&quot;:&quot;https://open.spotify.com/playlist/4Y7xfpLPuHhBblr1VvGCbI&quot;,&quot;belowTheFold&quot;:true,&quot;noScroll&quot;:false}" src="https://open.spotify.com/embed/playlist/4Y7xfpLPuHhBblr1VvGCbI" frameborder="0" gesture="media" allowfullscreen="true" allow="encrypted-media" loading="lazy" data-component-name="Spotify2ToDOM"></iframe><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>According to an <a href="https://www.youtube.com/watch?v=6UQdllPB7Lk">interview</a> (in Mandarin and French, but there&#8217;s another English written one <a href="https://mubi.com/en/notebook/posts/imagination-through-time-and-space-an-interview-with-lim-giong">here</a>), his full path was singer and guitarist &#8594; actor &#8594; film composer &#8594; DJ &#8594; electronic composer.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>The unique climate at high altitudes so close to the sea allows cultivation of the best oolong teas in the world.</p></div></div>]]></content:encoded></item><item><title><![CDATA[A year of code completion]]></title><description><![CDATA[Reflections on welcoming Github Copilot into my life]]></description><link>https://www.dissonances.blog/p/a-year-of-code-completion</link><guid isPermaLink="false">https://www.dissonances.blog/p/a-year-of-code-completion</guid><dc:creator><![CDATA[galen]]></dc:creator><pubDate>Mon, 12 Aug 2024 19:24:07 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/1d82cbef-b1ba-4bc0-812f-d4cb48bda991_395x449.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GM-I!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff351c8d2-8740-41ff-bd43-a6857ac420d6_848x157.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GM-I!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff351c8d2-8740-41ff-bd43-a6857ac420d6_848x157.jpeg 424w, https://substackcdn.com/image/fetch/$s_!GM-I!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff351c8d2-8740-41ff-bd43-a6857ac420d6_848x157.jpeg 848w, https://substackcdn.com/image/fetch/$s_!GM-I!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff351c8d2-8740-41ff-bd43-a6857ac420d6_848x157.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!GM-I!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff351c8d2-8740-41ff-bd43-a6857ac420d6_848x157.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GM-I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff351c8d2-8740-41ff-bd43-a6857ac420d6_848x157.jpeg" width="848" height="157" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f351c8d2-8740-41ff-bd43-a6857ac420d6_848x157.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:157,&quot;width&quot;:848,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:53336,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GM-I!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff351c8d2-8740-41ff-bd43-a6857ac420d6_848x157.jpeg 424w, https://substackcdn.com/image/fetch/$s_!GM-I!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff351c8d2-8740-41ff-bd43-a6857ac420d6_848x157.jpeg 848w, https://substackcdn.com/image/fetch/$s_!GM-I!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff351c8d2-8740-41ff-bd43-a6857ac420d6_848x157.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!GM-I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff351c8d2-8740-41ff-bd43-a6857ac420d6_848x157.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p>The only AI product I intentionally use is Copilot, which I adopted about a year ago following a friend&#8217;s enthusiastic endorsement<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>. For my non-programmer readers: GitHub Copilot is an LLM-based code autocompletion tool integrated into software used for programming (IDEs), not to be confused with Microsoft&#8217;s general Copilot AI (Microsoft owns GitHub). It automatically generates code given existing code, and you can prompt it the same way you&#8217;d use ChatGPT and friends (enemies?). Under the hood, Copilot uses OpenAI&#8217;s GPT-3 and 4. Disclaimer: I get Copilot for free because I&#8217;m a student.</p><p>I will contextualize this reflection with: the majority of my programming these days is small models in Python, basically just moving matrices around (many such cases). It&#8217;s also, euphemistically, &#8220;research code&#8221;, so it&#8217;s not exactly what code should aspire to be, and I&#8217;m not writing robust tests and infrastructure. On the flip side, research means I often need to write things likely uncommon in LLM training data, e.g. a specific complex-valued matrix operation, which provides an opportunity to explore how the model performs on unseen tasks (spoiler: not well). I don&#8217;t know how it performs for other purposes and languages, though it&#8217;s supposed to be best at Python<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>.</p><p>Some pros:</p><ul><li><p>Very well-integrated into VSCode (my IDE): if you stop typing for a few seconds, it will automatically suggest the rest of the line, or a next line/chunk. You can also use Copilot Chat that lets you interact with your codebase and generate more code via prompting. I haven&#8217;t tried Chat yet but it seems like it could be useful</p></li><li><p>Often good at doing a simple task when you write a comment (prompt) saying what you want to do, like: # <code>get the min and max values of a</code>, or <code># order b using the descending sorted order of a</code></p></li><li><p>Generally good at completion if you know exactly what you want to do using some common package (e.g. matplotlib), but don&#8217;t know the exact way to call a function. You can Google it easily, but this is often faster. E.g. plotting a joint histogram of two variables</p></li><li><p>Good at writing documentation/comments for a function you have already written</p></li><li><p>Good at writing functions similar to what you have written before (that Copilot has indexed)</p></li></ul><p>Cons:</p><ul><li><p>Bad at any mathematical operations beyond basic linear algebra, or just generally trying to do something that hasn&#8217;t been done before</p></li><li><p>Will sometimes make up functions that don&#8217;t exist</p></li><li><p>For more specific/complex tasks, takes much more involved prompting (breaking the task into small pieces, explaining every step), even with a well-known package, e.g. plotting a list of images in a grid formatted in a particular way. In these cases, doing it all myself would probably take a similar amount of time. I suspect I can get better at prompting, but I&#8217;d rather just write it myself?</p></li></ul><p>Overall, I like Copilot, and think it&#8217;s a net positive for my work. I have a bad memory, and can never remember if I should use <code>dim</code> or <code>axis</code> in NumPy. Copilot can just do stuff like that for me! Even if it only saves me a few seconds, it reduces friction by offloading trivial tasks without context-switching. But it&#8217;s still just a tool: it&#8217;s not magic, does not read my mind, and cannot do anything I don&#8217;t already know how to do, e.g. come up with a cleverer/faster way of writing something. Like other tools, it won&#8217;t be helpful if you don&#8217;t already have a good understanding of the task, and using it well takes practice. There&#8217;s nothing to verify correctness; using it naively can waste your time instead of helping you.</p><p>Although it&#8217;s clear these tools cannot generate novel ideas, they are great pattern recognizers, which is still useful! It seems like there is potential for them to help research in other ways. Terence Tao <a href="https://www.scientificamerican.com/article/ai-will-become-mathematicians-co-pilot/">thinks</a> AI will help mathematicians formalize proofs in the future<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>. Jordan Ellenberg <a href="https://www.youtube.com/watch?v=_MkbQ38_VSs">argues</a> certain types of AI proofs will not actually help our mathematical understanding, but thinks program search via LLMs might offer insight<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a>. Tons of people claim Anthropic&#8217;s new Claude 3.5 Sonnet is really good at code generation. I am curious to see where these tools go in the next few years.</p><p>The big question remains: in this year of code completion, have I become reliant on Copilot and gotten worse at programming? The answer, I think, is yes? Well, I have gotten lazier for sure. But maybe that&#8217;s okay, for these unambiguous menial tasks? I don&#8217;t know the answer exactly, but I&#8217;ll just say I am glad LLMs weren&#8217;t around when I was learning how to code and write.</p><p>Lastly, if it weren&#8217;t free, I wouldn&#8217;t pay for it. Microsoft doesn&#8217;t care about me. But if most people also feel this way, then LLM tools are hard to monetize, and it becomes clear why Big Tech is incentivized to hype up AI.</p><p>I didn&#8217;t intend this blog to be just AI rants, but somehow almost everything has turned into that. Don&#8217;t you worry, dear reader: upcoming posts will be about SCIENCE.</p><div><hr></div><p>Bonus Copilot comments (colored is mine, gray is generated):</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CVnd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc440de6f-0de9-4273-9439-5ed4d66ddeb9_1488x106.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CVnd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc440de6f-0de9-4273-9439-5ed4d66ddeb9_1488x106.png 424w, https://substackcdn.com/image/fetch/$s_!CVnd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc440de6f-0de9-4273-9439-5ed4d66ddeb9_1488x106.png 848w, https://substackcdn.com/image/fetch/$s_!CVnd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc440de6f-0de9-4273-9439-5ed4d66ddeb9_1488x106.png 1272w, https://substackcdn.com/image/fetch/$s_!CVnd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc440de6f-0de9-4273-9439-5ed4d66ddeb9_1488x106.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CVnd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc440de6f-0de9-4273-9439-5ed4d66ddeb9_1488x106.png" width="1456" height="104" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c440de6f-0de9-4273-9439-5ed4d66ddeb9_1488x106.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:104,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image" title="Image" srcset="https://substackcdn.com/image/fetch/$s_!CVnd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc440de6f-0de9-4273-9439-5ed4d66ddeb9_1488x106.png 424w, https://substackcdn.com/image/fetch/$s_!CVnd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc440de6f-0de9-4273-9439-5ed4d66ddeb9_1488x106.png 848w, https://substackcdn.com/image/fetch/$s_!CVnd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc440de6f-0de9-4273-9439-5ed4d66ddeb9_1488x106.png 1272w, https://substackcdn.com/image/fetch/$s_!CVnd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc440de6f-0de9-4273-9439-5ed4d66ddeb9_1488x106.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Copilot generates a link to a <a href="https://stackoverflow.com/questions/1401712/how-can-the-euclidean-distance-be-calculated-with-numpy">random Stack Overflow post</a> that has nothing to do with my code.</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1I9c!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6419bb01-4d40-454b-8fa2-a73df9f1a8e7_1238x58.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1I9c!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6419bb01-4d40-454b-8fa2-a73df9f1a8e7_1238x58.png 424w, https://substackcdn.com/image/fetch/$s_!1I9c!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6419bb01-4d40-454b-8fa2-a73df9f1a8e7_1238x58.png 848w, https://substackcdn.com/image/fetch/$s_!1I9c!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6419bb01-4d40-454b-8fa2-a73df9f1a8e7_1238x58.png 1272w, https://substackcdn.com/image/fetch/$s_!1I9c!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6419bb01-4d40-454b-8fa2-a73df9f1a8e7_1238x58.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1I9c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6419bb01-4d40-454b-8fa2-a73df9f1a8e7_1238x58.png" width="1238" height="58" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6419bb01-4d40-454b-8fa2-a73df9f1a8e7_1238x58.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:58,&quot;width&quot;:1238,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image" title="Image" srcset="https://substackcdn.com/image/fetch/$s_!1I9c!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6419bb01-4d40-454b-8fa2-a73df9f1a8e7_1238x58.png 424w, https://substackcdn.com/image/fetch/$s_!1I9c!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6419bb01-4d40-454b-8fa2-a73df9f1a8e7_1238x58.png 848w, https://substackcdn.com/image/fetch/$s_!1I9c!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6419bb01-4d40-454b-8fa2-a73df9f1a8e7_1238x58.png 1272w, https://substackcdn.com/image/fetch/$s_!1I9c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6419bb01-4d40-454b-8fa2-a73df9f1a8e7_1238x58.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Copilot calls me lazy.</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eFe9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb3a14d1-3e9a-45cf-b08d-5f8ee4bb15e2_1332x66.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eFe9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb3a14d1-3e9a-45cf-b08d-5f8ee4bb15e2_1332x66.jpeg 424w, https://substackcdn.com/image/fetch/$s_!eFe9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb3a14d1-3e9a-45cf-b08d-5f8ee4bb15e2_1332x66.jpeg 848w, https://substackcdn.com/image/fetch/$s_!eFe9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb3a14d1-3e9a-45cf-b08d-5f8ee4bb15e2_1332x66.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!eFe9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb3a14d1-3e9a-45cf-b08d-5f8ee4bb15e2_1332x66.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eFe9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb3a14d1-3e9a-45cf-b08d-5f8ee4bb15e2_1332x66.jpeg" width="1332" height="66" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cb3a14d1-3e9a-45cf-b08d-5f8ee4bb15e2_1332x66.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:66,&quot;width&quot;:1332,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image" title="Image" srcset="https://substackcdn.com/image/fetch/$s_!eFe9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb3a14d1-3e9a-45cf-b08d-5f8ee4bb15e2_1332x66.jpeg 424w, https://substackcdn.com/image/fetch/$s_!eFe9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb3a14d1-3e9a-45cf-b08d-5f8ee4bb15e2_1332x66.jpeg 848w, https://substackcdn.com/image/fetch/$s_!eFe9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb3a14d1-3e9a-45cf-b08d-5f8ee4bb15e2_1332x66.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!eFe9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb3a14d1-3e9a-45cf-b08d-5f8ee4bb15e2_1332x66.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Copilot has confidence in my interpretation abilities, or lack of confidence in my paper reading abilities.</figcaption></figure></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>Balint: &#8220;It&#8217;s the best thing ever!&#8221;</p><p>Me: &#8220;But won&#8217;t you start relying on it and then you&#8217;ll get worse at programming?&#8221;</p><p>Balint: &#8220;Oh absolutely!!&#8221;</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p><a href="https://openai.com/index/openai-codex/">OpenAI Codex</a>, based on GPT-3, is trained on a lot of Python.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>&#8220;&#8230;in the near term, AI will automate the boring, trivial stuff first.&#8220;</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p><a href="https://www.nature.com/articles/s41586-023-06924-6">Paper</a>: &#8220;Here we introduce FunSearch (short for searching in the function space), an evolutionary procedure based on pairing a pretrained LLM with a systematic evaluator&#8230; In contrast to most computer search approaches, FunSearch searches for programs that describe how to solve a problem, rather than what the solution is.&#8221;</p></div></div>]]></content:encoded></item></channel></rss>