<?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[Learn and Burn]]></title><description><![CDATA[Weekly updates on advances in learnings of the machine variety.]]></description><link>https://learnandburn.ai</link><image><url>https://substackcdn.com/image/fetch/$s_!QU1V!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e644a7d-f7fd-4144-b62e-f211e05f700c_520x520.png</url><title>Learn and Burn</title><link>https://learnandburn.ai</link></image><generator>Substack</generator><lastBuildDate>Mon, 06 Apr 2026 08:41:09 GMT</lastBuildDate><atom:link href="https://learnandburn.ai/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Unbox Research]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[learnandburn@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[learnandburn@substack.com]]></itunes:email><itunes:name><![CDATA[Unbox Research]]></itunes:name></itunes:owner><itunes:author><![CDATA[Unbox Research]]></itunes:author><googleplay:owner><![CDATA[learnandburn@substack.com]]></googleplay:owner><googleplay:email><![CDATA[learnandburn@substack.com]]></googleplay:email><googleplay:author><![CDATA[Unbox Research]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Measuring a model's understanding — starting with path-finding]]></title><description><![CDATA[[Paper: Evaluating the World Model Implicit in a Generative Model]]]></description><link>https://learnandburn.ai/p/measuring-a-models-understanding</link><guid isPermaLink="false">https://learnandburn.ai/p/measuring-a-models-understanding</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Tue, 26 Nov 2024 13:24:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Dsua!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952259c9-8156-4ed0-ad27-67d4aa6647ae_2400x1254.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Oreolorun Olu-Ipinlaye</strong></h5><p>[<a href="https://arxiv.org/pdf/2406.03689">pdf of the paper</a>]</p><p>Machine learning is all about finding a function that fits a dataset and works well on new, unseen data. Take a basic linear regression task: You&#8217;ve got some feature <em>x</em> and you want to predict a target <em>y</em>. By training a model, you end up with a function <em>y = mx</em>. In very simple terms, we could say we&#8217;ve taught a model <em>y = mx</em>. Generative sequence models aren&#8217;t as easy to picture but they work similarly. Recent research has shown that they learn what&#8217;s called a <em>world model</em>, which lets them produce meaningful responses &#8212; and maybe even reason. But how do we figure out how good these world models are? That&#8217;s the question today&#8217;s paper looks to answer.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Dsua!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952259c9-8156-4ed0-ad27-67d4aa6647ae_2400x1254.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Dsua!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952259c9-8156-4ed0-ad27-67d4aa6647ae_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Dsua!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952259c9-8156-4ed0-ad27-67d4aa6647ae_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Dsua!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952259c9-8156-4ed0-ad27-67d4aa6647ae_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Dsua!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952259c9-8156-4ed0-ad27-67d4aa6647ae_2400x1254.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Dsua!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952259c9-8156-4ed0-ad27-67d4aa6647ae_2400x1254.jpeg" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/952259c9-8156-4ed0-ad27-67d4aa6647ae_2400x1254.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:343780,&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_!Dsua!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952259c9-8156-4ed0-ad27-67d4aa6647ae_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Dsua!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952259c9-8156-4ed0-ad27-67d4aa6647ae_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Dsua!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952259c9-8156-4ed0-ad27-67d4aa6647ae_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Dsua!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F952259c9-8156-4ed0-ad27-67d4aa6647ae_2400x1254.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><figcaption class="image-caption"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>So, what exactly is a "world model?" The authors explain it as a way to represent a set of states and the rules that determine how those states change. In simpler terms, a world model is how a generative sequence model understands and applies those rules. This paper points out a problem with how we currently evaluate these models. Right now, we mostly treat them as fancy next-word predictors, checking how well they guess the next token in a sequence. But the authors argue there&#8217;s a better way: Instead of focusing on the <em>immediate</em> next token, we should look further down the line. Those later tokens are harder to predict, so evaluating them would give us a clearer picture of how good the model&#8217;s world understanding really is.</p><p>To make this clearer, the authors use the game Connect 4 as an analogy. At the start of the game, when the board is empty, it&#8217;s pretty easy for a model to predict a valid move &#8212; disks can go anywhere. But as the board fills up and valid moves become fewer, the model is more likely to make mistakes and predict invalid ones. This shows that a model with a stronger world model will do better as the game progresses and the sequence gets more challenging. The takeaway? Instead of focusing on individual predictions, we should evaluate models on how well they handle longer, more complex sequences.</p><p>The researchers referenced the Myhill-Nerode theorem to create two metrics. The theorem basically says that if two sequences lead to the same state, their continuations should be the same; but if they lead to different states, their continuations should differ. Here&#8217;s how they turned that idea into metrics:</p><ul><li><p><strong>Sequence compression:</strong> Checks whether the model predicts the same continuation for two sequences that end in the same state.</p></li><li><p><strong>Sequence distinction:</strong> Checks whether the model predicts different valid continuations for sequences that end in distinct states.</p></li></ul><p>To test their metrics, the researchers trained transformer models on a dataset of New York City taxi rides, turning each trip into sequences of turn-by-turn directions, culminating in over 120M sequences. The figure below shows what these sequences look like. The numerical figures represent start and stop nodes, respectively (each intersection is taken as a node and assigned a unique index) and the letters represent cardinal directions. They trained two models, one with 89M parameters and one with 1.5B parameters.&nbsp; Impressively, these models could predict valid routes between intersections and often even find the shortest path to a given destination. But deeper analysis revealed that their internal "world models"&#8212;representations of NYC&#8217;s street map&#8212;were incoherent.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eXCm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2c47278-48b1-46a0-ad37-e759ecd8d265_1708x574.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eXCm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2c47278-48b1-46a0-ad37-e759ecd8d265_1708x574.png 424w, https://substackcdn.com/image/fetch/$s_!eXCm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2c47278-48b1-46a0-ad37-e759ecd8d265_1708x574.png 848w, https://substackcdn.com/image/fetch/$s_!eXCm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2c47278-48b1-46a0-ad37-e759ecd8d265_1708x574.png 1272w, https://substackcdn.com/image/fetch/$s_!eXCm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2c47278-48b1-46a0-ad37-e759ecd8d265_1708x574.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eXCm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2c47278-48b1-46a0-ad37-e759ecd8d265_1708x574.png" width="1456" height="489" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f2c47278-48b1-46a0-ad37-e759ecd8d265_1708x574.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:489,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1254898,&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_!eXCm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2c47278-48b1-46a0-ad37-e759ecd8d265_1708x574.png 424w, https://substackcdn.com/image/fetch/$s_!eXCm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2c47278-48b1-46a0-ad37-e759ecd8d265_1708x574.png 848w, https://substackcdn.com/image/fetch/$s_!eXCm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2c47278-48b1-46a0-ad37-e759ecd8d265_1708x574.png 1272w, https://substackcdn.com/image/fetch/$s_!eXCm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2c47278-48b1-46a0-ad37-e759ecd8d265_1708x574.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>Here&#8217;s how the team put their metrics to the test. For <em>sequence compression</em>, they picked a specific intersection (a &#8220;state&#8221;) and found two different routes leading to it. Then, they checked whether the model gave the same next turn for both routes. If it did, that meant the model understood that these were just two paths converging on the same destination. For <em>sequence distinction</em>, they looked at two different intersections and their respective routes. The goal? See whether the model&#8217;s predictions made sense for each intersection &#8212; in other words, were the turns even valid? Did they line up with the real-world map? The results were mixed: The models were poor on sequence compression, failing to recognize when routes led to the same place. But for sequence distinction, the 1.5B-parameter model did pretty well, while the 89M-parameter model struggled.</p><p>You might be thinking, "If these models can find the shortest path so accurately, why do these metrics even matter? Does having a solid world model really make a difference?" The researchers found out that it does. When the researchers threw in detours, the models struggled to reroute to the destination. Basically, when things get messy, models with weak world models perform poorly. To make this clearer, the team even reconstructed what the transformer&#8217;s world model thought the map looked like. It looks really different from the actual map:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MVIK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda373f32-4aab-42e1-ba68-78708ac90530_1600x652.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MVIK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda373f32-4aab-42e1-ba68-78708ac90530_1600x652.png 424w, https://substackcdn.com/image/fetch/$s_!MVIK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda373f32-4aab-42e1-ba68-78708ac90530_1600x652.png 848w, https://substackcdn.com/image/fetch/$s_!MVIK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda373f32-4aab-42e1-ba68-78708ac90530_1600x652.png 1272w, https://substackcdn.com/image/fetch/$s_!MVIK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda373f32-4aab-42e1-ba68-78708ac90530_1600x652.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MVIK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda373f32-4aab-42e1-ba68-78708ac90530_1600x652.png" width="1456" height="593" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/da373f32-4aab-42e1-ba68-78708ac90530_1600x652.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:593,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!MVIK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda373f32-4aab-42e1-ba68-78708ac90530_1600x652.png 424w, https://substackcdn.com/image/fetch/$s_!MVIK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda373f32-4aab-42e1-ba68-78708ac90530_1600x652.png 848w, https://substackcdn.com/image/fetch/$s_!MVIK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda373f32-4aab-42e1-ba68-78708ac90530_1600x652.png 1272w, https://substackcdn.com/image/fetch/$s_!MVIK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda373f32-4aab-42e1-ba68-78708ac90530_1600x652.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 paper feels important because it highlights that just because transformers perform well on specific tasks doesn&#8217;t mean they&#8217;ve actually nailed down a solid world model &#8212; even if older evaluation metrics made it seem like they had. And that&#8217;s a problem because if a world model isn&#8217;t strong enough, the system is way more likely to stumble when you throw unexpected changes its way.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Making LLMs scalable by replacing weights with learnable tokens]]></title><description><![CDATA[[Paper: Tokenformer: Rethinking Transformer Scaling with Tokenized Model Parameters]]]></description><link>https://learnandburn.ai/p/making-llms-scalable-by-replacing</link><guid isPermaLink="false">https://learnandburn.ai/p/making-llms-scalable-by-replacing</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Tue, 19 Nov 2024 00:35:38 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!rR8b!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedc41673-66b4-4e40-ae03-56c3b653e423_2400x1254.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Adrian Wilkins-Caruana</strong></h5><p>[<a href="https://arxiv.org/pdf/2410.23168">pdf on arxiv</a>]</p><p>Has it ever occurred to you that, somewhere in OpenAI&#8217;s ranks, there&#8217;s an engineer who pressed a button that triggered what in all likelihood amounted to GPT-4&#8217;s multi-million dollar training process? As an engineer myself, I&#8217;m sweating just thinking about it. To make an LLM larger, researchers typically increase the number of layers and tokens, as well as the length of the model&#8217;s weight vectors. Unsatisfied with this trio of variables, Wang et al. have designed a new LLM approach that offers much cheaper training. The crux of their idea is that the model&#8217;s parameters are tokens, just like its input! They call their approach <em>Tokenformer</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_!rR8b!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedc41673-66b4-4e40-ae03-56c3b653e423_2400x1254.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rR8b!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedc41673-66b4-4e40-ae03-56c3b653e423_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!rR8b!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedc41673-66b4-4e40-ae03-56c3b653e423_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!rR8b!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedc41673-66b4-4e40-ae03-56c3b653e423_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!rR8b!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedc41673-66b4-4e40-ae03-56c3b653e423_2400x1254.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rR8b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedc41673-66b4-4e40-ae03-56c3b653e423_2400x1254.jpeg" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/edc41673-66b4-4e40-ae03-56c3b653e423_2400x1254.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:78664,&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_!rR8b!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedc41673-66b4-4e40-ae03-56c3b653e423_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!rR8b!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedc41673-66b4-4e40-ae03-56c3b653e423_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!rR8b!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedc41673-66b4-4e40-ae03-56c3b653e423_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!rR8b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedc41673-66b4-4e40-ae03-56c3b653e423_2400x1254.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><figcaption class="image-caption"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>Before diving into the details, it&#8217;s helpful to first try to understand why the researchers might have explored this idea in the first place. In a regular transformer, the computation can be split into categories: one where tokens interact with static model parameters (e.g., in linear projections of queries, keys, and values, as well as the post-attention linear projections), and another where tokens interact with themselves (e.g., self-attention). The researchers noticed that the token-parameter interactions accounted for the lion&#8217;s share of computation, so it&#8217;s easy to imagine that they might have discovered Tokenformer by trying to make a model that&#8217;s more reliant on token-token interactions. In fact, Tokenformer relies <em>entirely</em> on token-token interactions.</p><p>Now let&#8217;s see how Tokenformer works. Because it only uses token-token interactions, all the linear projections need to be replaced with attention layers, which the researchers call <em>Pattention</em> layers (named from the phrase &#8220;token-<strong>p</strong>arameter <strong>attention</strong>&#8221;); they&#8217;re kind of like cross-attention layers. Actually, Tokenformer&#8217;s main attention layer consists of several Pattention modules, and a vanilla self-attention module. As tokens come into the main attention module, Tokenformer processes three copies of them in parallel in separate Pattention layers. Each Pattention layer combines the inputs with two sets of <em>parameter</em> tokens, which the researchers call <em>key</em> and <em>value parameter tokens</em>. The outputs of these three copies form the queries, keys, and values for the regular token-token attention module. Tokenformer then processes the post-attention projections using Pattention layers, too. Tokenformer&#8217;s attention layer is depicted below on the left, and the Pattention layer is on the upper-right.&nbsp;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JLgV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d08bdda-a970-4278-aa4a-cee47d42c04b_1600x777.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JLgV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d08bdda-a970-4278-aa4a-cee47d42c04b_1600x777.png 424w, https://substackcdn.com/image/fetch/$s_!JLgV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d08bdda-a970-4278-aa4a-cee47d42c04b_1600x777.png 848w, https://substackcdn.com/image/fetch/$s_!JLgV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d08bdda-a970-4278-aa4a-cee47d42c04b_1600x777.png 1272w, https://substackcdn.com/image/fetch/$s_!JLgV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d08bdda-a970-4278-aa4a-cee47d42c04b_1600x777.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JLgV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d08bdda-a970-4278-aa4a-cee47d42c04b_1600x777.png" width="1456" height="707" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6d08bdda-a970-4278-aa4a-cee47d42c04b_1600x777.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:707,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!JLgV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d08bdda-a970-4278-aa4a-cee47d42c04b_1600x777.png 424w, https://substackcdn.com/image/fetch/$s_!JLgV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d08bdda-a970-4278-aa4a-cee47d42c04b_1600x777.png 848w, https://substackcdn.com/image/fetch/$s_!JLgV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d08bdda-a970-4278-aa4a-cee47d42c04b_1600x777.png 1272w, https://substackcdn.com/image/fetch/$s_!JLgV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d08bdda-a970-4278-aa4a-cee47d42c04b_1600x777.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>By adopting this strange configuration, Tokenformer gains a new ability to scale itself by <em>progressively</em> adding more parameter tokens during training. The lower-right quadrant of the figure above shows this process. To do this, Tokenformer first undergoes some initial training with a modest amount of parameter tokens. Then, the researchers duplicated each sequence of parameter tokens, concatenating onto the end of the existing parameter token sequence before they resumed training. This process can be repeated several times to scale up further, as shown below. We can see that even with fewer overall parameters, Tokenformer models typically are better at predicting the next word (lower perplexity) with less training time than a regular transformer.&nbsp;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_VCk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29b040a1-66d1-4d19-a1b2-a38d10856e7b_1330x1016.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_VCk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29b040a1-66d1-4d19-a1b2-a38d10856e7b_1330x1016.png 424w, https://substackcdn.com/image/fetch/$s_!_VCk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29b040a1-66d1-4d19-a1b2-a38d10856e7b_1330x1016.png 848w, https://substackcdn.com/image/fetch/$s_!_VCk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29b040a1-66d1-4d19-a1b2-a38d10856e7b_1330x1016.png 1272w, https://substackcdn.com/image/fetch/$s_!_VCk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29b040a1-66d1-4d19-a1b2-a38d10856e7b_1330x1016.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_VCk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29b040a1-66d1-4d19-a1b2-a38d10856e7b_1330x1016.png" width="1330" height="1016" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/29b040a1-66d1-4d19-a1b2-a38d10856e7b_1330x1016.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1016,&quot;width&quot;:1330,&quot;resizeWidth&quot;:null,&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_!_VCk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29b040a1-66d1-4d19-a1b2-a38d10856e7b_1330x1016.png 424w, https://substackcdn.com/image/fetch/$s_!_VCk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29b040a1-66d1-4d19-a1b2-a38d10856e7b_1330x1016.png 848w, https://substackcdn.com/image/fetch/$s_!_VCk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29b040a1-66d1-4d19-a1b2-a38d10856e7b_1330x1016.png 1272w, https://substackcdn.com/image/fetch/$s_!_VCk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29b040a1-66d1-4d19-a1b2-a38d10856e7b_1330x1016.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>You might be wondering, &#8220;If we can use parameters as tokens, then what&#8217;s the difference between tokens and parameters in the first place?&#8221; There&#8217;s several ways to look at that question. One is that, after training, tokens can change but parameters typically stay the same. By this definition, the parameter tokens are still really just parameters, since they don&#8217;t change. Another way to look at it is that the length of a token&#8217;s vector is typically smaller than the length of a parameter&#8217;s vector. So parameter tokens are more like tokens in this respect, since they have the same dimensionality as regular tokens.&nbsp; Personally, I think the distinction between parameters and tokens is kind of arbitrary, and that it might be better to call these parameter tokens &#8220;token-like parameters&#8221; because they&#8217;re more like parameters than tokens. But that&#8217;s just my opinion.</p><p>Another thing you might be wondering is why this approach even works. The key change is that Tokenformer swaps linear projections (i.e., y=&#963;(xA^T+b), where A is a weight vector, b is a bias vector, and &#963; is, counterintuitively, a non-linearity) for Pattention layers. But, as it so happens, Pattention layers look an awful-lot like linear projections: Input tokens are combined with keys in the same way, while the value parameter tokens are like the bias (not exactly, though). There&#8217;s even a non-linearity too, though it&#8217;s not pictured in the first figure above. So, it&#8217;s really not that surprising that something like Tokenformer works.&nbsp;</p><p>The researchers tested Tokenformer on both vision- and language-modeling tasks, and their results indicate that the method works well in practice, but further research will need to be done to determine whether their approach has some subtle weaknesses or if it can scale up to the size of foundation models. I&#8217;ve been reading about and using transformers for years at this point, but it&#8217;s always a delight to learn about the new ways that researchers are modifying the architecture to solve new problems or address existing challenges. The idea of Tokenformer &#8212; using parameters for tokens &#8212; seems like an obvious thing to try but, as always with matters of familiarity, it&#8217;s not one that I or any other AI researchers have shown the viability of before.&nbsp;</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Image generation for infinite games]]></title><description><![CDATA[[Paper: Unbounded: A Generative Infinite Game of Character Life Simulation]]]></description><link>https://learnandburn.ai/p/image-generation-for-infinite-games</link><guid isPermaLink="false">https://learnandburn.ai/p/image-generation-for-infinite-games</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Sun, 10 Nov 2024 13:11:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!t77n!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61d90008-e9c2-4f44-9ade-0222ba92db71_2400x1254.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Adrian Wilkins-Caruana</strong></h5><p>[<a href="https://arxiv.org/abs/2410.18975">pdf on arxiv</a>]</p><p>Video games offer players a sense of interactivity and open-endedness that things like films or books often can&#8217;t. But even video games don&#8217;t offer an infinite degree of interactivity and flexibility. For instance, they might bound the area that a character can explore or limit the actions they can take. The obvious reason for this is that game designers can&#8217;t create an infinite amount of content. But what if AI could create the content instead? This is where a new game called Unbounded comes in: Its content is generated by vision and language models in real time to create an endless gaming experience.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!t77n!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61d90008-e9c2-4f44-9ade-0222ba92db71_2400x1254.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!t77n!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61d90008-e9c2-4f44-9ade-0222ba92db71_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!t77n!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61d90008-e9c2-4f44-9ade-0222ba92db71_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!t77n!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61d90008-e9c2-4f44-9ade-0222ba92db71_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!t77n!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61d90008-e9c2-4f44-9ade-0222ba92db71_2400x1254.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!t77n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61d90008-e9c2-4f44-9ade-0222ba92db71_2400x1254.jpeg" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/61d90008-e9c2-4f44-9ade-0222ba92db71_2400x1254.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:88418,&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_!t77n!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61d90008-e9c2-4f44-9ade-0222ba92db71_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!t77n!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61d90008-e9c2-4f44-9ade-0222ba92db71_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!t77n!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61d90008-e9c2-4f44-9ade-0222ba92db71_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!t77n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61d90008-e9c2-4f44-9ade-0222ba92db71_2400x1254.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><figcaption class="image-caption"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>Unbounded&#8217;s concept is quite simple: It&#8217;s a story that unfolds as the player interacts with the game. For example, the image below shows Archibus the Wizard teaching his students, but then he gets hungry, so then the player instructs him to eat some pears. The curious thing about this game is that the player can instruct Archibus to eat <em>anything</em> because Unbounded generates its content on the fly based on the player&#8217;s instructions, and the game&#8217;s narrative progresses with each turn. The researchers call it a <em>generative infinite game</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_!Q3AC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f775cf1-d5a9-4665-917f-ec0a29b3963d_1600x807.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Q3AC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f775cf1-d5a9-4665-917f-ec0a29b3963d_1600x807.png 424w, https://substackcdn.com/image/fetch/$s_!Q3AC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f775cf1-d5a9-4665-917f-ec0a29b3963d_1600x807.png 848w, https://substackcdn.com/image/fetch/$s_!Q3AC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f775cf1-d5a9-4665-917f-ec0a29b3963d_1600x807.png 1272w, https://substackcdn.com/image/fetch/$s_!Q3AC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f775cf1-d5a9-4665-917f-ec0a29b3963d_1600x807.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Q3AC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f775cf1-d5a9-4665-917f-ec0a29b3963d_1600x807.png" width="1456" height="734" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0f775cf1-d5a9-4665-917f-ec0a29b3963d_1600x807.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:734,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!Q3AC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f775cf1-d5a9-4665-917f-ec0a29b3963d_1600x807.png 424w, https://substackcdn.com/image/fetch/$s_!Q3AC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f775cf1-d5a9-4665-917f-ec0a29b3963d_1600x807.png 848w, https://substackcdn.com/image/fetch/$s_!Q3AC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f775cf1-d5a9-4665-917f-ec0a29b3963d_1600x807.png 1272w, https://substackcdn.com/image/fetch/$s_!Q3AC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f775cf1-d5a9-4665-917f-ec0a29b3963d_1600x807.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>Several recent advances in generative AI have helped to make Unbounded possible, the first being <em>latent consistency models</em>. LCMs are latent diffusion models that can generate high-resolution images in a few diffusion steps &#8212; far fewer than the tens or hundreds of steps typical of diffusion models &#8212; allowing near real-time image generation in around 1 second per image. Another pair of technologies enable consistent generation of a character from scene to scene: <em>Dreambooth</em> and <em>low-rank adapters</em> (LoRA). With a few generic images of a subject like, say, the wizard Archibus, the Dreambooth text-to-image model that can make new images of the subject, like Archibus in a classroom studying arcane magic. The researchers fine-tuned the LCM + Dreambooth system for Unbounded scene-generation task using LoRA, which is an efficient way to fine-tune models by training a low-rank matrix of weights that get added to the original model&#8217;s frozen weights.</p><p>In addition to generating consistent characters, Unbounded also needs to generate consistent environments. To do that, the researchers made a new method called <em>regional image prompt adapters</em>, which is an extension of an existing technology called <em>image prompt adapters</em>. A regular IP adapter is a really effective way to generate a new image using an image plus a text prompt. But Unbounded needs to generate scenes using <em>two</em> image prompts: One for the character, and another for the environment. So, the regional IP adapter is a way to guide the diffusion model to generate each of these prompts in different parts of the image using a <em>dynamic mask</em> (which I&#8217;ll explain shortly). The figure below shows how these components work together to generate the final scene.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yZc1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942c842b-b903-494e-a126-73638ccf25a7_1600x1123.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yZc1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942c842b-b903-494e-a126-73638ccf25a7_1600x1123.png 424w, https://substackcdn.com/image/fetch/$s_!yZc1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942c842b-b903-494e-a126-73638ccf25a7_1600x1123.png 848w, https://substackcdn.com/image/fetch/$s_!yZc1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942c842b-b903-494e-a126-73638ccf25a7_1600x1123.png 1272w, https://substackcdn.com/image/fetch/$s_!yZc1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942c842b-b903-494e-a126-73638ccf25a7_1600x1123.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yZc1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942c842b-b903-494e-a126-73638ccf25a7_1600x1123.png" width="1456" height="1022" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/942c842b-b903-494e-a126-73638ccf25a7_1600x1123.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1022,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!yZc1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942c842b-b903-494e-a126-73638ccf25a7_1600x1123.png 424w, https://substackcdn.com/image/fetch/$s_!yZc1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942c842b-b903-494e-a126-73638ccf25a7_1600x1123.png 848w, https://substackcdn.com/image/fetch/$s_!yZc1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942c842b-b903-494e-a126-73638ccf25a7_1600x1123.png 1272w, https://substackcdn.com/image/fetch/$s_!yZc1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942c842b-b903-494e-a126-73638ccf25a7_1600x1123.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 clever part about the dynamic mask is that the scene is partitioned into character parts and environment parts automatically as the model generates the scene. To do this, the researchers noticed that some parts of the image have high cross-attention to the character prompt, while other parts have lower cross-attention. So, using a predefined threshold, they selected the blocks in the image that have the highest cross-attention to the image prompt to be where the model generates the character, and the other parts for where the model generates the environment.</p><p>The researchers used quantitative experiments to show that their method generates more consistent characters and environments than other scene-generation methods, and also that the rest of the image content aligns with the other details in the prompt. The figure below also shows some examples from these experiments. (The &#8220;[V]&#8221; in the prompt is a special symbol that the model understands as the character.)</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!D7j7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64db20c-a933-42bb-9c23-f1fb4459e015_1600x1032.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!D7j7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64db20c-a933-42bb-9c23-f1fb4459e015_1600x1032.png 424w, https://substackcdn.com/image/fetch/$s_!D7j7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64db20c-a933-42bb-9c23-f1fb4459e015_1600x1032.png 848w, https://substackcdn.com/image/fetch/$s_!D7j7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64db20c-a933-42bb-9c23-f1fb4459e015_1600x1032.png 1272w, https://substackcdn.com/image/fetch/$s_!D7j7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64db20c-a933-42bb-9c23-f1fb4459e015_1600x1032.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!D7j7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64db20c-a933-42bb-9c23-f1fb4459e015_1600x1032.png" width="1456" height="939" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f64db20c-a933-42bb-9c23-f1fb4459e015_1600x1032.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:939,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!D7j7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64db20c-a933-42bb-9c23-f1fb4459e015_1600x1032.png 424w, https://substackcdn.com/image/fetch/$s_!D7j7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64db20c-a933-42bb-9c23-f1fb4459e015_1600x1032.png 848w, https://substackcdn.com/image/fetch/$s_!D7j7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64db20c-a933-42bb-9c23-f1fb4459e015_1600x1032.png 1272w, https://substackcdn.com/image/fetch/$s_!D7j7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff64db20c-a933-42bb-9c23-f1fb4459e015_1600x1032.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 turn this into a game, the researchers needed a way to make the open-ended user input into a prompt the system can understand (e.g., replace &#8220;Archibus&#8221; with &#8220;[V]&#8221;) and to describe the progression of the game&#8217;s narrative (e.g., &#8220;Archibus is hungry&#8221;). To do this, they compiled a dataset of narrative topics, and then used these topics to simulate user-LLM interactions &#8212; using another LLM in place of the user &#8212; that include various environments, character actions, and game mechanics. The researchers then use these simulations to fine-tune an LLM for prompt re-writing and narrative progression.</p><p>The Unbounded game and generative infinite games are really cool ideas, and I can&#8217;t wait to see how game designers will use them. As exciting as the idea is, though, I wonder how interesting Unbounded is to play. Though its image-generation component is quite capable, the narration component was trained on a dataset of two LLMs interacting with each other, so I&#8217;d be surprised if the narratives are enthralling. But Unbounded&#8217;s LLM could conceivably be swapped out for one that&#8217;s better at coming up with good stories. I anticipate that future iterations to Unbounded might make progress in this area, and I think it would make for some very interesting games.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Do LLMs rely on data contamination to solve math problems?]]></title><description><![CDATA[[Paper: GSM-Symbolic: Understanding the Limitations of Mathematical Reasoning in Large Language Models]]]></description><link>https://learnandburn.ai/p/do-llms-rely-on-data-contamination</link><guid isPermaLink="false">https://learnandburn.ai/p/do-llms-rely-on-data-contamination</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Sat, 02 Nov 2024 12:54:49 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!ykB1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6855a303-bb70-4bd9-bdf1-71e7c683de6b_2400x1254.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Oreolorun Olu-Ipinlaye</strong></h5><p>[<a href="https://www.alphaxiv.org/abs/2410.05229v1">pdf of the paper</a>]</p><p>Computers have always been great at math &#8212; or at least at mathematical operations. You plug in numbers and math operands and you get a result. But computers couldn&#8217;t solve word problems until LLMs arrived. That&#8217;s because solving word problems requires natural language processing (NLP) and logical reasoning. But how well do LLMs actually handle math problems? Do they logically reason through them or do they just rely on the knowledge of similar questions that they were trained on? That&#8217;s the subject of today&#8217;s 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_!ykB1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6855a303-bb70-4bd9-bdf1-71e7c683de6b_2400x1254.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ykB1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6855a303-bb70-4bd9-bdf1-71e7c683de6b_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ykB1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6855a303-bb70-4bd9-bdf1-71e7c683de6b_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ykB1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6855a303-bb70-4bd9-bdf1-71e7c683de6b_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ykB1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6855a303-bb70-4bd9-bdf1-71e7c683de6b_2400x1254.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ykB1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6855a303-bb70-4bd9-bdf1-71e7c683de6b_2400x1254.jpeg" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6855a303-bb70-4bd9-bdf1-71e7c683de6b_2400x1254.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:265601,&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_!ykB1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6855a303-bb70-4bd9-bdf1-71e7c683de6b_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ykB1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6855a303-bb70-4bd9-bdf1-71e7c683de6b_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ykB1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6855a303-bb70-4bd9-bdf1-71e7c683de6b_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ykB1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6855a303-bb70-4bd9-bdf1-71e7c683de6b_2400x1254.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><figcaption class="image-caption"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>LLMs have been quite impressive when evaluated on the Grade School Math 8K (GSM8K) dataset, a popular dataset for evaluating LLMs on multi-stage mathematical reasoning tasks. But the authors of today&#8217;s paper argue that GSM8K isn't sufficient for accessing mathematical reasoning, so they created a new dataset, GSM-Symbolic which is derived from GSM8K but lets researchers generate different versions of the same question.</p><p>As you can see in the image below, GSM-Symbolic is a template that allows for question variables to be swapped out. The researchers did this because they wanted to investigate how an LLM&#8217;s accuracy changes when one or more variables are changed. They generated 50 different variations of 100 questions in the original GSM8K dataset, for a total of 5,000 questions. They then evaluated over 20 models, both open and closed source, and I must say the results were quite surprising.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!45HG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc47bf5de-73cb-42f1-a6e5-7dd338d4f291_2078x1426.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!45HG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc47bf5de-73cb-42f1-a6e5-7dd338d4f291_2078x1426.png 424w, https://substackcdn.com/image/fetch/$s_!45HG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc47bf5de-73cb-42f1-a6e5-7dd338d4f291_2078x1426.png 848w, https://substackcdn.com/image/fetch/$s_!45HG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc47bf5de-73cb-42f1-a6e5-7dd338d4f291_2078x1426.png 1272w, https://substackcdn.com/image/fetch/$s_!45HG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc47bf5de-73cb-42f1-a6e5-7dd338d4f291_2078x1426.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!45HG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc47bf5de-73cb-42f1-a6e5-7dd338d4f291_2078x1426.png" width="1456" height="999" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c47bf5de-73cb-42f1-a6e5-7dd338d4f291_2078x1426.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:999,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:480487,&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_!45HG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc47bf5de-73cb-42f1-a6e5-7dd338d4f291_2078x1426.png 424w, https://substackcdn.com/image/fetch/$s_!45HG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc47bf5de-73cb-42f1-a6e5-7dd338d4f291_2078x1426.png 848w, https://substackcdn.com/image/fetch/$s_!45HG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc47bf5de-73cb-42f1-a6e5-7dd338d4f291_2078x1426.png 1272w, https://substackcdn.com/image/fetch/$s_!45HG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc47bf5de-73cb-42f1-a6e5-7dd338d4f291_2078x1426.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>They discovered that by simply changing the variables of a math problem, model accuracy across most LLMs varied significantly, so much so that they actually termed it a <em>distribution</em> &#8212; little wonder why when you see the image below. Not just that, but average model performance was also lower compared to evaluations done on the GSM8K dataset.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Rg_U!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e1d836-4bf7-4e1d-b9e3-d084ab3283b1_1246x574.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Rg_U!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e1d836-4bf7-4e1d-b9e3-d084ab3283b1_1246x574.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Rg_U!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e1d836-4bf7-4e1d-b9e3-d084ab3283b1_1246x574.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Rg_U!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e1d836-4bf7-4e1d-b9e3-d084ab3283b1_1246x574.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Rg_U!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e1d836-4bf7-4e1d-b9e3-d084ab3283b1_1246x574.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Rg_U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e1d836-4bf7-4e1d-b9e3-d084ab3283b1_1246x574.jpeg" width="1246" height="574" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c7e1d836-4bf7-4e1d-b9e3-d084ab3283b1_1246x574.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:574,&quot;width&quot;:1246,&quot;resizeWidth&quot;:null,&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_!Rg_U!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e1d836-4bf7-4e1d-b9e3-d084ab3283b1_1246x574.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Rg_U!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e1d836-4bf7-4e1d-b9e3-d084ab3283b1_1246x574.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Rg_U!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e1d836-4bf7-4e1d-b9e3-d084ab3283b1_1246x574.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Rg_U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7e1d836-4bf7-4e1d-b9e3-d084ab3283b1_1246x574.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>The researchers also discovered that the models were more sensitive to changes in numerical variables than to changes in names; performance dropped significantly more when numbers were changed. So why are the models so sensitive to changes in variables? The authors make a very valid argument as to why: data contamination. They argue that since the GSM8K dataset is so popular, there&#8217;s a chance that some of its questions have been used to train LLMs and the models have simply memorized these questions or learned to associate logical patterns with them.</p><p>But wait, there's more! The authors also investigated how question difficulty affects performance. They made questions simpler by removing clauses and harder by adding more, and discovered that performance drops and variance increases as question difficulty increases. Finally, they designed experiments to test whether the models actually understand mathematical concepts. They did this by sneaking in random clauses that have no relevance to the math logic required in solving the questions. As you can likely guess, model performance dropped significantly across all models, indicating that they picked up on the irrelevant clauses and attempted to use them in solving problems.</p><p>What does this all mean? We&#8217;ve all experienced token bias when using LLMs: You structure your prompt slightly differently and you get a different response. In a logical process like math, though, the expectation is that the model must have learned the underlying logic of solving similar problems &#8212; but apparently not. The fact that changing numerical values, the very essence of math problems, was a factor in accuracy is a clear indication that the models haven&#8217;t learned and don&#8217;t follow the required logical reasoning steps for solving word problems. Could it be just because of data contamination? Clearly more investigation is needed. Personally, I&#8217;d love to see how the models perform on more complex word problems since GSM-Symbolic is a grade-school level dataset.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Running an LLM on a small customizable chip]]></title><description><![CDATA[[Paper: LlamaF: An Efficient Llama2 Architecture Accelerator on Embedded FPGAs]]]></description><link>https://learnandburn.ai/p/running-an-llm-on-a-small-customizable</link><guid isPermaLink="false">https://learnandburn.ai/p/running-an-llm-on-a-small-customizable</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Wed, 30 Oct 2024 12:23:56 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!tUJ7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2953d3d-7b51-4992-9e5a-7784d7353581_2400x1254.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Adrian Wilkins-Caruana</strong></h5><p>[<a href="https://arxiv.org/pdf/2409.11424">pdf on arxiv</a>]</p><p>If you open the ChatGPT app on your phone, you&#8217;ll find that the system can reply to questions about as quickly as you can type them. This is possible thanks to the miracle of the internet: Your queries are whisked away to a data center where a big, powerful computer &#8212; the one that&#8217;s actually running the LLM &#8212; produces the response. One reason this is necessary is that your phone&#8217;s processor isn&#8217;t fast enough to handle LLM responses in real time. But our phones are quite incredible devices that can seemingly do anything, so why can&#8217;t they run LLMs? Today&#8217;s summary discusses some of the challenges and some clever solutions to them.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tUJ7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2953d3d-7b51-4992-9e5a-7784d7353581_2400x1254.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tUJ7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2953d3d-7b51-4992-9e5a-7784d7353581_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!tUJ7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2953d3d-7b51-4992-9e5a-7784d7353581_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!tUJ7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2953d3d-7b51-4992-9e5a-7784d7353581_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!tUJ7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2953d3d-7b51-4992-9e5a-7784d7353581_2400x1254.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tUJ7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2953d3d-7b51-4992-9e5a-7784d7353581_2400x1254.jpeg" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b2953d3d-7b51-4992-9e5a-7784d7353581_2400x1254.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:299698,&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_!tUJ7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2953d3d-7b51-4992-9e5a-7784d7353581_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!tUJ7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2953d3d-7b51-4992-9e5a-7784d7353581_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!tUJ7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2953d3d-7b51-4992-9e5a-7784d7353581_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!tUJ7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2953d3d-7b51-4992-9e5a-7784d7353581_2400x1254.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><figcaption class="image-caption"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>Not all processors are made equal. Some are general-purpose, while others are highly specialized for specific applications. You can think of <em>general-purpose</em> processors as being like craftsmen and of <em>specialized</em> processors as factories. Because they&#8217;re specialized, factories can make things more quickly &#8212; but with less flexibility &#8212; than craftsmen. Part of the challenge in making a factory-like processor for LLMs is finding ways to set up the factory to maximize efficiency, which is exactly what Xu et al. have done in their recent study. Specifically, they&#8217;ve efficiently implemented Llama 2 on a <em>field-programmable gate array</em>, or FPGA (which is a type of factory-like processor).&nbsp;</p><p>Their approach has many identical blocks for all the layers in Llama 2&#8217;s forward pass, and each block has three stages. The first stage, called <em>pre-processing</em>, is shown in the figure below. This stage is responsible for reading input vectors X &#8212; which might be input tokens or outputs from another layer &#8212; and preparing them for the next stage, and is responsible for reading the weights for that layer. The inputs and weights are quantized, and are accompanied by a scaling factor (xs and ws for the input and weights, respectively). Quantization is a way to compress the 32-bit floating point inputs and weights into less space (8 bits), and the scaling factors are needed to undo the compression. There are two important details here: First, the weights are streamed rather than read all at once, and second, the quantized values are cast from 8-bits to 16-bits (we&#8217;ll see why these details are important in the next paragraph).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1ift!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4e5aff1-b566-452d-b845-a176b457f653_1562x612.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1ift!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4e5aff1-b566-452d-b845-a176b457f653_1562x612.png 424w, https://substackcdn.com/image/fetch/$s_!1ift!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4e5aff1-b566-452d-b845-a176b457f653_1562x612.png 848w, https://substackcdn.com/image/fetch/$s_!1ift!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4e5aff1-b566-452d-b845-a176b457f653_1562x612.png 1272w, https://substackcdn.com/image/fetch/$s_!1ift!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4e5aff1-b566-452d-b845-a176b457f653_1562x612.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1ift!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4e5aff1-b566-452d-b845-a176b457f653_1562x612.png" width="1456" height="570" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c4e5aff1-b566-452d-b845-a176b457f653_1562x612.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:570,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!1ift!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4e5aff1-b566-452d-b845-a176b457f653_1562x612.png 424w, https://substackcdn.com/image/fetch/$s_!1ift!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4e5aff1-b566-452d-b845-a176b457f653_1562x612.png 848w, https://substackcdn.com/image/fetch/$s_!1ift!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4e5aff1-b566-452d-b845-a176b457f653_1562x612.png 1272w, https://substackcdn.com/image/fetch/$s_!1ift!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4e5aff1-b566-452d-b845-a176b457f653_1562x612.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 next stage implements the fundamental operation of neural networks: the dot product, which is essentially some &#8220;multiply&#8221; operations followed by some &#8220;add&#8221; operations. The stage is called a <em>quantized matrix-vector multiplication</em> because it&#8217;s specifically designed for the quantized inputs and weights. As the 16-bit weights are streamed into this stage, they&#8217;re multiplied by cached 16-bit input vectors. Even though the data in the inputs and weights doesn&#8217;t exceed 8-bits, the result of the multiplication might overflow an 8-bit data type, so the 16-bits ensure there&#8217;s enough capacity to prevent that. These results are then accumulated together by adding and combining pairs of results. This can be done efficiently in parallel using an <em>adder tree</em> like the one in the figure below. Preventing overflow is important here, too, so the multiply-results are cast to 32-bits before summing.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oQnN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86eb2462-6171-4db2-a78a-1a4f3af09d14_1096x1030.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oQnN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86eb2462-6171-4db2-a78a-1a4f3af09d14_1096x1030.png 424w, https://substackcdn.com/image/fetch/$s_!oQnN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86eb2462-6171-4db2-a78a-1a4f3af09d14_1096x1030.png 848w, https://substackcdn.com/image/fetch/$s_!oQnN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86eb2462-6171-4db2-a78a-1a4f3af09d14_1096x1030.png 1272w, https://substackcdn.com/image/fetch/$s_!oQnN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86eb2462-6171-4db2-a78a-1a4f3af09d14_1096x1030.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oQnN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86eb2462-6171-4db2-a78a-1a4f3af09d14_1096x1030.png" width="1096" height="1030" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/86eb2462-6171-4db2-a78a-1a4f3af09d14_1096x1030.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1030,&quot;width&quot;:1096,&quot;resizeWidth&quot;:null,&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_!oQnN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86eb2462-6171-4db2-a78a-1a4f3af09d14_1096x1030.png 424w, https://substackcdn.com/image/fetch/$s_!oQnN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86eb2462-6171-4db2-a78a-1a4f3af09d14_1096x1030.png 848w, https://substackcdn.com/image/fetch/$s_!oQnN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86eb2462-6171-4db2-a78a-1a4f3af09d14_1096x1030.png 1272w, https://substackcdn.com/image/fetch/$s_!oQnN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86eb2462-6171-4db2-a78a-1a4f3af09d14_1096x1030.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 final processing stage, called <em>accumulate</em>, is pretty straightforward. It undoes the quantization by first casting the 32-bit integer group sums to a 32-bit floating point format, and then scaling the results from the group sums by this value. These three stages &#8212; pre-processing, dot product, and accumulate &#8212; are the building blocks of the Llama 2 FPGA implementation, but another key detail is the orchestration of data through these stages. Because the weight values are streamed, the execution of the blocks can happen while weights are being copied to and from memory. For example, the figure below shows how asynchronous orchestration shortens the overall duration of the memory-copying (blue) and processing (orange) stages.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!l6Wc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3df60357-b3e9-4a07-bdba-4d937bee7c1e_1600x178.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!l6Wc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3df60357-b3e9-4a07-bdba-4d937bee7c1e_1600x178.png 424w, https://substackcdn.com/image/fetch/$s_!l6Wc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3df60357-b3e9-4a07-bdba-4d937bee7c1e_1600x178.png 848w, https://substackcdn.com/image/fetch/$s_!l6Wc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3df60357-b3e9-4a07-bdba-4d937bee7c1e_1600x178.png 1272w, https://substackcdn.com/image/fetch/$s_!l6Wc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3df60357-b3e9-4a07-bdba-4d937bee7c1e_1600x178.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!l6Wc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3df60357-b3e9-4a07-bdba-4d937bee7c1e_1600x178.png" width="1456" height="162" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3df60357-b3e9-4a07-bdba-4d937bee7c1e_1600x178.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:162,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!l6Wc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3df60357-b3e9-4a07-bdba-4d937bee7c1e_1600x178.png 424w, https://substackcdn.com/image/fetch/$s_!l6Wc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3df60357-b3e9-4a07-bdba-4d937bee7c1e_1600x178.png 848w, https://substackcdn.com/image/fetch/$s_!l6Wc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3df60357-b3e9-4a07-bdba-4d937bee7c1e_1600x178.png 1272w, https://substackcdn.com/image/fetch/$s_!l6Wc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3df60357-b3e9-4a07-bdba-4d937bee7c1e_1600x178.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>In their tests, Xu et al. measured huge gains in efficiency using their FPGA-based implementation. They used a special chip called a <em>system-on-a-chip</em>, which combines both a general-purpose processor and an FPGA. Compared with using a general-purpose processor, the FPGA-based implementation performed 23.4x more operations per second and 15.8x more tokens per second! The FPGA-based approach was also 6.1x more energy efficient.&nbsp;</p><p>These margins demonstrate just how much more efficient task-specific processors are than general-purpose ones. This is why lots of new processors are shipping with dedicated AI accelerators. These processors are highly-efficient at multiplying and accumulating, but not much else. As such accelerators become more powerful and as researchers get better at improving the performance of smaller LLMs, we may eventually be able to run ChatGPT on our phones <em>without</em> needing internet access.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Better language models with negative attention]]></title><description><![CDATA[[Paper: Differential Transformer]]]></description><link>https://learnandburn.ai/p/better-language-models-with-negative</link><guid isPermaLink="false">https://learnandburn.ai/p/better-language-models-with-negative</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Fri, 18 Oct 2024 18:57:35 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!PRGW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51bcd48-c7df-431c-8c4a-41e87be7b849_2400x1254.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Adrian Wilkins-Caruana</strong></h5><p>[<a href="https://arxiv.org/pdf/2410.05258">pdf on arxiv</a>]</p><p>Sometimes I use ChatGPT or Gemini because I&#8217;m too lazy to read something. What I do is copy and paste pages upon pages of text into the system and then ask it a very specific question about the text, hoping that it will comprehend the text well enough to find the piece of information it needs to answer my question. As you can imagine, this isn&#8217;t straightforward for LLMs (or humans, either), so LLM researchers are constantly looking for ways to make LLMs better at this task, which they call &#8220;needle-retrieval&#8221; (from the idiom &#8220;to find a needle in a haystack&#8221;). Today&#8217;s summary is about a new needle-retrieval method called the <em>differential transformer</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_!PRGW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51bcd48-c7df-431c-8c4a-41e87be7b849_2400x1254.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PRGW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51bcd48-c7df-431c-8c4a-41e87be7b849_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!PRGW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51bcd48-c7df-431c-8c4a-41e87be7b849_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!PRGW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51bcd48-c7df-431c-8c4a-41e87be7b849_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!PRGW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51bcd48-c7df-431c-8c4a-41e87be7b849_2400x1254.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PRGW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51bcd48-c7df-431c-8c4a-41e87be7b849_2400x1254.jpeg" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b51bcd48-c7df-431c-8c4a-41e87be7b849_2400x1254.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:39974,&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_!PRGW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51bcd48-c7df-431c-8c4a-41e87be7b849_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!PRGW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51bcd48-c7df-431c-8c4a-41e87be7b849_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!PRGW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51bcd48-c7df-431c-8c4a-41e87be7b849_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!PRGW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51bcd48-c7df-431c-8c4a-41e87be7b849_2400x1254.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><figcaption class="image-caption"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>The differential transformer is a variant of the original transformer architecture, with the main difference being that this variant uses <em>differential multi-head attention</em> instead of the vanilla multi-head attention. In case you need a quick refresher, <em>attention</em> is a way for a neural network to weigh how important a pair of tokens in its input sequence is relative to all the other pairs. This weighting is what enables needle retrieval since the transformer can use strong weights to make connections between information <em>about</em> the needle and the needle itself. But, there&#8217;s a problem: Transformers tend to over-attend to irrelevant context (i.e., things in its context that aren&#8217;t the needle). The figure below shows this problem. The left bar chart shows the attention score for various tokens in the LLM&#8217;s context in a needle-retrieval scenario. We can see that the answer&#8217;s score isn&#8217;t <em>that</em> much more significant than the other context (unlike differential transformer in the middle chart, where it <em>is</em> much more significant).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qa1B!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe7996a-72ee-4996-8331-d5064388f383_1600x620.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qa1B!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe7996a-72ee-4996-8331-d5064388f383_1600x620.png 424w, https://substackcdn.com/image/fetch/$s_!qa1B!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe7996a-72ee-4996-8331-d5064388f383_1600x620.png 848w, https://substackcdn.com/image/fetch/$s_!qa1B!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe7996a-72ee-4996-8331-d5064388f383_1600x620.png 1272w, https://substackcdn.com/image/fetch/$s_!qa1B!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe7996a-72ee-4996-8331-d5064388f383_1600x620.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qa1B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe7996a-72ee-4996-8331-d5064388f383_1600x620.png" width="1456" height="564" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4fe7996a-72ee-4996-8331-d5064388f383_1600x620.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;:null,&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_!qa1B!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe7996a-72ee-4996-8331-d5064388f383_1600x620.png 424w, https://substackcdn.com/image/fetch/$s_!qa1B!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe7996a-72ee-4996-8331-d5064388f383_1600x620.png 848w, https://substackcdn.com/image/fetch/$s_!qa1B!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe7996a-72ee-4996-8331-d5064388f383_1600x620.png 1272w, https://substackcdn.com/image/fetch/$s_!qa1B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fe7996a-72ee-4996-8331-d5064388f383_1600x620.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>You can think of differential attention as being kind of (but not quite) the difference between two attention heads. Each differential attention head learns a pair of query weights and a pair of key weights (as opposed to one each), and uses each pair to make a pair of query vectors and a pair of key vectors. In the&nbsp; first row of equations below, W^Q and W^K are twice as big as they would be in a vanilla transformer, and combining these with the input context yields the pairs of query (Q_1 and Q_2) and key (K_1 and K_2) vectors. The second row below shows how to use these to compute differential attention.&nbsp;</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hZOf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769e1fe-2c20-4ac2-b0bd-a80735fcdf4c_1600x297.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hZOf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769e1fe-2c20-4ac2-b0bd-a80735fcdf4c_1600x297.png 424w, https://substackcdn.com/image/fetch/$s_!hZOf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769e1fe-2c20-4ac2-b0bd-a80735fcdf4c_1600x297.png 848w, https://substackcdn.com/image/fetch/$s_!hZOf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769e1fe-2c20-4ac2-b0bd-a80735fcdf4c_1600x297.png 1272w, https://substackcdn.com/image/fetch/$s_!hZOf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769e1fe-2c20-4ac2-b0bd-a80735fcdf4c_1600x297.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hZOf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769e1fe-2c20-4ac2-b0bd-a80735fcdf4c_1600x297.png" width="1456" height="270" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e769e1fe-2c20-4ac2-b0bd-a80735fcdf4c_1600x297.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:270,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!hZOf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769e1fe-2c20-4ac2-b0bd-a80735fcdf4c_1600x297.png 424w, https://substackcdn.com/image/fetch/$s_!hZOf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769e1fe-2c20-4ac2-b0bd-a80735fcdf4c_1600x297.png 848w, https://substackcdn.com/image/fetch/$s_!hZOf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769e1fe-2c20-4ac2-b0bd-a80735fcdf4c_1600x297.png 1272w, https://substackcdn.com/image/fetch/$s_!hZOf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe769e1fe-2c20-4ac2-b0bd-a80735fcdf4c_1600x297.png 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><p>You might be thinking that doubling-up the queries and keys will make a differential transformer twice as large as a regular LLMs transformer, but no. The researchers find that a differential transformer only needs about half the amount of attention heads as a regular transformer, so they&#8217;re about the same size.</p><p>In case you&#8217;re wondering what the &#955; is in the equation above, it&#8217;s a learnable scaling factor that&#8217;s learned for each multi-head differential attention layer. The researchers proved that this formulation of differential attention (with the &#955; scaling factor) has similar gradient magnitudes during training as a regular transformer. The magnitudes differ by some constant factors, but neural network optimizers are invariant to such differences. The benefit of having similar gradient magnitudes is that training a differential transformer is identical to training a regular transformer (i.e., they can use the same hyperparameters). The figure below shows the multi-head differential attention architecture and the Python code for implementing it.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6Dle!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf337429-c69f-4e42-89ee-a710e981c814_1600x745.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6Dle!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf337429-c69f-4e42-89ee-a710e981c814_1600x745.png 424w, https://substackcdn.com/image/fetch/$s_!6Dle!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf337429-c69f-4e42-89ee-a710e981c814_1600x745.png 848w, https://substackcdn.com/image/fetch/$s_!6Dle!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf337429-c69f-4e42-89ee-a710e981c814_1600x745.png 1272w, https://substackcdn.com/image/fetch/$s_!6Dle!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf337429-c69f-4e42-89ee-a710e981c814_1600x745.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6Dle!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf337429-c69f-4e42-89ee-a710e981c814_1600x745.png" width="1456" height="678" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bf337429-c69f-4e42-89ee-a710e981c814_1600x745.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:678,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!6Dle!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf337429-c69f-4e42-89ee-a710e981c814_1600x745.png 424w, https://substackcdn.com/image/fetch/$s_!6Dle!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf337429-c69f-4e42-89ee-a710e981c814_1600x745.png 848w, https://substackcdn.com/image/fetch/$s_!6Dle!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf337429-c69f-4e42-89ee-a710e981c814_1600x745.png 1272w, https://substackcdn.com/image/fetch/$s_!6Dle!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf337429-c69f-4e42-89ee-a710e981c814_1600x745.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 figure below compares the differential transformer (right) to a regular one (left) in a multi-needle retrieval test. The horizontal axis denotes context length in thousands of tokens, and the vertical axis represents where in that context the needles are hidden. In the test, eight needles were hidden, but the LLM only needed to retrieve one needle to pass. The differential transformer had much more consistent needle-retrieval accuracy than the regular one across different depths and context lengths. The differential transformer is also much better at in-context learning, reaching accuracies 5% to 22% higher than a regular transformer in an in-context learning classification test. Finally, the researchers also found that differential transformers hallucinate less than regular ones, which is probably because they can more successfully find relevant information in their context to answer questions with (so they don&#8217;t have to resort to making stuff up).&nbsp;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!H9iN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f6c350-6211-4b2c-b0e9-bc0aa130e848_1600x655.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!H9iN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f6c350-6211-4b2c-b0e9-bc0aa130e848_1600x655.png 424w, https://substackcdn.com/image/fetch/$s_!H9iN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f6c350-6211-4b2c-b0e9-bc0aa130e848_1600x655.png 848w, https://substackcdn.com/image/fetch/$s_!H9iN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f6c350-6211-4b2c-b0e9-bc0aa130e848_1600x655.png 1272w, https://substackcdn.com/image/fetch/$s_!H9iN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f6c350-6211-4b2c-b0e9-bc0aa130e848_1600x655.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!H9iN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f6c350-6211-4b2c-b0e9-bc0aa130e848_1600x655.png" width="1456" height="596" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/64f6c350-6211-4b2c-b0e9-bc0aa130e848_1600x655.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:596,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!H9iN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f6c350-6211-4b2c-b0e9-bc0aa130e848_1600x655.png 424w, https://substackcdn.com/image/fetch/$s_!H9iN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f6c350-6211-4b2c-b0e9-bc0aa130e848_1600x655.png 848w, https://substackcdn.com/image/fetch/$s_!H9iN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f6c350-6211-4b2c-b0e9-bc0aa130e848_1600x655.png 1272w, https://substackcdn.com/image/fetch/$s_!H9iN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64f6c350-6211-4b2c-b0e9-bc0aa130e848_1600x655.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 differential transformer architecture looks really promising, and I would be interested to see if new iterations of open-source LLMs, like Llama, adopt it. The tests that the researchers used (needle-retrieval, in-context learning, and hallucination rate) are ones that favor a model that&#8217;s really good at finding specific details in its context, but we don&#8217;t yet know whether this architecture is appropriate for general-purpose LLM and chat tasks. The researchers tested differential transformer&#8217;s general-purpose performance &#8212; it showed promise against other open-source architectures after training its 3B parameters with 1T tokens &#8212; but the jury is still out on whether this approach will scale to the 400B parameter, 15T token size of Llama 3.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[A serious look at the future of AI medical advice]]></title><description><![CDATA[[Paper: A Preliminary Study of o1 in Medicine: Are We Closer to an AI Doctor?]]]></description><link>https://learnandburn.ai/p/a-serious-look-at-the-future-of-ai</link><guid isPermaLink="false">https://learnandburn.ai/p/a-serious-look-at-the-future-of-ai</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Sat, 12 Oct 2024 13:24:50 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!i6df!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff42720fd-9955-4764-a725-8c9bc8d5d8d0_2400x1254.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Oreolorun Olu-Ipinlaye</strong></h5><p>[<a href="https://arxiv.org/pdf/2409.15277">pdf of the paper</a>]</p><p>When ChatGPT came out a couple of years ago, some people said AI was going to take everyone's jobs. Fast forward two years and, well, that hasn&#8217;t happened, and it probably won't anytime soon &#8212; if ever. Don&#8217;t get me wrong, these models are super useful, but they still hallucinate, making them unreliable for performance-critical fields like medicine. We&#8217;ve seen a couple of iterations of OpenAI models (and other LLMs) since then, each bringing some improvements, but how close are we to a future where these models are actually used for performance-critical tasks? How soon might we be able to trust them to make accurate clinical diagnoses? Today&#8217;s paper aims to investigate this by looking at OpenAI&#8217;s latest preview release, o1.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!i6df!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff42720fd-9955-4764-a725-8c9bc8d5d8d0_2400x1254.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i6df!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff42720fd-9955-4764-a725-8c9bc8d5d8d0_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!i6df!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff42720fd-9955-4764-a725-8c9bc8d5d8d0_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!i6df!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff42720fd-9955-4764-a725-8c9bc8d5d8d0_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!i6df!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff42720fd-9955-4764-a725-8c9bc8d5d8d0_2400x1254.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i6df!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff42720fd-9955-4764-a725-8c9bc8d5d8d0_2400x1254.jpeg" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f42720fd-9955-4764-a725-8c9bc8d5d8d0_2400x1254.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:106512,&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_!i6df!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff42720fd-9955-4764-a725-8c9bc8d5d8d0_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!i6df!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff42720fd-9955-4764-a725-8c9bc8d5d8d0_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!i6df!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff42720fd-9955-4764-a725-8c9bc8d5d8d0_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!i6df!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff42720fd-9955-4764-a725-8c9bc8d5d8d0_2400x1254.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><figcaption class="image-caption"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>As you might know, o1 is a generative model developed by OpenAI and released separately from the GPT series. What makes o1 stand out is its ability to chain-of-thought (CoT) reason. (If you&#8217;re curious about how CoT works, <a href="https://learnandburn.ai/p/openais-o1-model">Adrian&#8217;s summary</a> from a few weeks ago gives a good rundown.) As you&#8217;d expect from a new model, o1 outperforms GPT-4 across various general language tasks, but what&#8217;s really interesting is that, according to OpenAI, its ability to CoT reason makes it a vastly superior model for technical problems in subjects such as science and math. They claim it even beats human experts on PhD-level science questions! But how does it perform in a specialized field such as medicine?</p><p>The authors of today&#8217;s paper put o1&#8217;s clinical skills to the test using 35 popular medical datasets that are used in evaluating LLMs and two custom datasets based on questions curated from <em>The Lancet</em>, <em>The New England Journal of Medicine,</em> and Medbullets. These custom datasets contain questions that are more technical than the 35 medical ones, and the authors&#8217; goal in using them was to push o1&#8217;s CoT reasoning capabilities to the limit. They divided the datasets into three categories to evaluate the model on the following aspects:</p><ul><li><p><strong>Understanding</strong>: Can the model pull out relevant info from a clinical query and give a clear summary?</p></li><li><p><strong>Reasoning</strong>: Can it think logically and reach accurate conclusions based on the info provided?&nbsp;</p></li><li><p><strong>Multilinguality</strong>: Can it handle tasks where the prompt and response languages are different?</p></li></ul><p>The researchers compared o1 to four other LLMs &#8212; GPT-4, GPT-3.5, MEDITRON, and Llama 3 &#8212; and the results are quite interesting. When it comes to <em>reasoning</em>, o1 is superior to the other LLMs in all datasets except one. But when it comes to <em>understanding,</em> o1&#8217;s performance in many datasets wasn't as dominant, and in one particular dataset it was resoundingly outmatched by Llama 3 by close to 20 percentage points. In <em>multilinguality,</em> o1 was the clear winner with superior performances in all languages surveyed.&nbsp;</p><p>The authors also performed chain-of-thought prompting over direct prompting and discovered that this marginally improved o1&#8217;s performance &#8212; which isn&#8217;t surprising:&nbsp; if you can CoT reason then CoT prompting should feel natural. And what about hallucinating? Surely the fact that o1 can reason about a problem before providing a response means hallucination is a thing of the past, right? Well, not quite. In fact in many datasets o1 hallucinated more than GPT-4!&nbsp;</p><p>I find it quite interesting that the authors of this paper didn&#8217;t include any of Anthropic&#8217;s models (the various versions of Claude) in their evaluations even though Claude 3.5 Sonnet has performed brilliantly on a lot of LLM evaluations. It's also clear that there isn't a definitive framework for evaluating LLMs on clinical topics; in this paper, the authors compared four models to o1 in some evaluations and in others just two (the hallucination evaluation).&nbsp;</p><p>So are we closer to an AI doctor? For now I'll say not quite. The fact that o1 hallucinates is a sign that GenAI still isn&#8217;t mature enough to be used in performance-critical tasks. That being said, an LLM with CoT reasoning is definitely a step in the right direction, and with further refinement we could get to a point where they become reliable tools in the hands of doctors. Then maybe, just maybe, they&#8217;ll take over the field of medicine.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[LLMs have original, research-worthy ideas]]></title><description><![CDATA[[Paper: Can LLMs Generate Novel Research Ideas? A Large-Scale Human Study with 100+ NLP Researchers]]]></description><link>https://learnandburn.ai/p/llms-have-original-research-worthy</link><guid isPermaLink="false">https://learnandburn.ai/p/llms-have-original-research-worthy</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Tue, 08 Oct 2024 12:39:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!lvO9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55713680-2650-4654-b96c-35810dfafae0_2400x1254.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Adrian Wilkins-Caruana</strong></h5><p>[<a href="https://www.alphaxiv.org/abs/2409.04109v1">Article on alphaxiv</a>]</p><p>In the early days of my PhD &#8212; which was before ChatGPT &#8212; I spent a lot of time identifying what the open problems were in my field and assessing the feasibility of tackling them. While generating new research ideas is a highly speculative exercise, it&#8217;s arguably one of the most important skills of a scientist &#8212; which is why it was such an important part of my training. But even the most skilled researchers can spend years pursuing an idea that might not work or lead to a dead end. That&#8217;s why some researchers from Stanford have studied whether AI models like ChatGPT can automate the idea-generation process.&nbsp;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lvO9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55713680-2650-4654-b96c-35810dfafae0_2400x1254.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lvO9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55713680-2650-4654-b96c-35810dfafae0_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lvO9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55713680-2650-4654-b96c-35810dfafae0_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lvO9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55713680-2650-4654-b96c-35810dfafae0_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lvO9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55713680-2650-4654-b96c-35810dfafae0_2400x1254.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lvO9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55713680-2650-4654-b96c-35810dfafae0_2400x1254.jpeg" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/55713680-2650-4654-b96c-35810dfafae0_2400x1254.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:68550,&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_!lvO9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55713680-2650-4654-b96c-35810dfafae0_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lvO9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55713680-2650-4654-b96c-35810dfafae0_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lvO9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55713680-2650-4654-b96c-35810dfafae0_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lvO9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55713680-2650-4654-b96c-35810dfafae0_2400x1254.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><figcaption class="image-caption"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>Their study involved comparing human- and LLM-generated research ideas. They broke the task of research ideation and evaluation into three steps:&nbsp;</p><ol><li><p>Generating the idea.&nbsp;</p></li><li><p>Writing-up the idea to explain and communicate it.&nbsp;</p></li><li><p>Expertly evaluating the idea.&nbsp;</p></li></ol><p>I think this three-step process is quite fitting, especially because the second and third steps are akin to grant writing and appraisal, respectively, which are essential for getting new research projects funded.</p><p>There are lots of details in the research methodology. I won&#8217;t describe them in detail, but here are the highlights:&nbsp;</p><ul><li><p>The LLM that generated the ideas was Claude 3.5, and it used something called retrieval-augmented generation, which means it could access a database of research papers and their references while generating ideas.&nbsp;</p></li><li><p>The researchers recruited 49 experts to write up ideas and 79 experts to review the write-ups (both the human- and LLM-generated ones).</p></li><li><p>Claude 3.5 also ranked the write-ups. To do this, it appraised pairs of research ideas, and picked the &#8220;better&#8221; of the two, repeating the process until all the ideas were ranked. In this context, &#8220;better&#8221; is purely Claude&#8217;s opinion, but it&#8217;s not complete baloney: The researchers found that Claude (more than other LLMs) is 71.4% accurate at picking the higher-scoring review in pairs of submissions to a famous machine learning conference (ICML).</p></li></ul><p>When the LLM appraised the pairs of papers, it evaluated them across five different axes: novelty, excitement, feasibility, expected effectiveness, and a final overall score. Across 119 human-generated ideas and 109 AI-generated ones, the researchers found &#8212; with statistical significance &#8212; that the AI-generated ideas were both more novel and more exciting than human ones. But their results didn&#8217;t reveal any statistically significant difference in feasibility, effectiveness, or overall score. The figure below compares the scores of the human (yellow) and AI (light-blue) ideas. The AI+Rerank (dark blue) bars indicate scores where one of the authors further refined Claude&#8217;s rankings.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aa_G!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2134fcdd-4f1a-430a-98ba-2a4a8feca280_1196x319.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aa_G!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2134fcdd-4f1a-430a-98ba-2a4a8feca280_1196x319.png 424w, https://substackcdn.com/image/fetch/$s_!aa_G!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2134fcdd-4f1a-430a-98ba-2a4a8feca280_1196x319.png 848w, https://substackcdn.com/image/fetch/$s_!aa_G!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2134fcdd-4f1a-430a-98ba-2a4a8feca280_1196x319.png 1272w, https://substackcdn.com/image/fetch/$s_!aa_G!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2134fcdd-4f1a-430a-98ba-2a4a8feca280_1196x319.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!aa_G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2134fcdd-4f1a-430a-98ba-2a4a8feca280_1196x319.png" width="1196" height="319" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2134fcdd-4f1a-430a-98ba-2a4a8feca280_1196x319.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:319,&quot;width&quot;:1196,&quot;resizeWidth&quot;:null,&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_!aa_G!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2134fcdd-4f1a-430a-98ba-2a4a8feca280_1196x319.png 424w, https://substackcdn.com/image/fetch/$s_!aa_G!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2134fcdd-4f1a-430a-98ba-2a4a8feca280_1196x319.png 848w, https://substackcdn.com/image/fetch/$s_!aa_G!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2134fcdd-4f1a-430a-98ba-2a4a8feca280_1196x319.png 1272w, https://substackcdn.com/image/fetch/$s_!aa_G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2134fcdd-4f1a-430a-98ba-2a4a8feca280_1196x319.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>You might be wondering what some of these ideas look like, so I&#8217;ve included two examples and their problem statements (the first section of the write-up) at the end of this summary.&nbsp;</p><p>After studying these results, the researchers noticed some limitations of current LLMs that might prevent them from being useful scientific agents. First, they found that the LLMs didn&#8217;t generate diverse ideas &#8212; across 4,000 generated ideas, only about 200 were distinct (5%). The second issue is related to judging research ideas. Human reviewers of AI research papers typically agree with each other about 70% of the time, but the best LLM reviewer (Claude) only agreed with itself 54% of the time (meaning if you asked it to rank the same pair multiple times, it would often change its answer); this is only slightly better than random guessing (50%).&nbsp;</p><p>With both of these limitations, it&#8217;s probably best not to put too much weight on the paper&#8217;s main conclusion (that AI generates more novel and exciting research ideas than people do). But I think that&#8217;s missing the point. What&#8217;s clear to me from this study is that AI can absolutely generate research ideas! Sure, there&#8217;s some uncertainty about whether these ideas are slightly more novel or slightly less feasible than human ideas, but the ideas aren&#8217;t nonsense, which I think is incredible. I for one would have been so grateful to have an AI companion &#8212; even a flawed one &#8212; when I started my research.&nbsp;&nbsp;</p><p>As promised, here are a couple of examples of AI-generated ideas for NLP research:</p><ul><li><p>Modular Calibration for Long-form Answers: Calibrating the confidence of Large Language Models (LLMs) when generating long-form answers, such as essays and code, remains an open challenge in the field of natural language processing.</p></li><li><p>Translation with LLMs through Prompting with Long-Form Context: Stable generation of text in low-resource languages is an unsolved issue in large language models.</p><div><hr></div></li></ul><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[OpenAI's o1 model]]></title><description><![CDATA[[Article: Learning to Reason with LLMs]]]></description><link>https://learnandburn.ai/p/openais-o1-model</link><guid isPermaLink="false">https://learnandburn.ai/p/openais-o1-model</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Fri, 27 Sep 2024 23:15:08 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!czmr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd73586f4-dc8d-42eb-9440-4e9323c26353_2400x1254.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Adrian Wilkins-Caruana</strong></h5><p>[<a href="https://openai.com/index/learning-to-reason-with-llms/">OpenAI o1 announcement</a>]</p><p>The folks at OpenAI have been hard at work iterating on their flagship LLM, GPT-4. While its successor, dubbed o1, isn&#8217;t quite ready for prime time yet, the company has made a preview version of it, o1-preview, available for use in ChatGPT and to some API users. We&#8217;re going to compare o1-preview&#8217;s performance to GPT-4 and take a look at how it works.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!czmr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd73586f4-dc8d-42eb-9440-4e9323c26353_2400x1254.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!czmr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd73586f4-dc8d-42eb-9440-4e9323c26353_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!czmr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd73586f4-dc8d-42eb-9440-4e9323c26353_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!czmr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd73586f4-dc8d-42eb-9440-4e9323c26353_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!czmr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd73586f4-dc8d-42eb-9440-4e9323c26353_2400x1254.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!czmr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd73586f4-dc8d-42eb-9440-4e9323c26353_2400x1254.jpeg" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d73586f4-dc8d-42eb-9440-4e9323c26353_2400x1254.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:113906,&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_!czmr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd73586f4-dc8d-42eb-9440-4e9323c26353_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!czmr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd73586f4-dc8d-42eb-9440-4e9323c26353_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!czmr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd73586f4-dc8d-42eb-9440-4e9323c26353_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!czmr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd73586f4-dc8d-42eb-9440-4e9323c26353_2400x1254.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><figcaption class="image-caption"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>OpenAI is touting substantial improvements in accuracy on a number of tasks, including math, coding, and science, as well as on other AP and SAT exams. For example, the figure below compares o1 and o1-preview to GPT-4. The shaded bars indicate the consensus of 64 model results, while the solid bars indicate single-shot accuracy (i.e., on the model&#8217;s first output). The performance of o1 and o1-preview on these tasks is quite impressive, even surpassing human-level experts on the science questions! And o1&#8217;s improvements aren&#8217;t just limited to science and math knowledge &#8212; o1 also beats GPT-4 on English literature, global facts, public relations, professional law, and econometrics exams.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!b4we!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5526746c-1fe2-460c-aa11-020a4e6c8a24_1600x629.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!b4we!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5526746c-1fe2-460c-aa11-020a4e6c8a24_1600x629.png 424w, https://substackcdn.com/image/fetch/$s_!b4we!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5526746c-1fe2-460c-aa11-020a4e6c8a24_1600x629.png 848w, https://substackcdn.com/image/fetch/$s_!b4we!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5526746c-1fe2-460c-aa11-020a4e6c8a24_1600x629.png 1272w, https://substackcdn.com/image/fetch/$s_!b4we!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5526746c-1fe2-460c-aa11-020a4e6c8a24_1600x629.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!b4we!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5526746c-1fe2-460c-aa11-020a4e6c8a24_1600x629.png" width="1456" height="572" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5526746c-1fe2-460c-aa11-020a4e6c8a24_1600x629.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:572,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!b4we!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5526746c-1fe2-460c-aa11-020a4e6c8a24_1600x629.png 424w, https://substackcdn.com/image/fetch/$s_!b4we!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5526746c-1fe2-460c-aa11-020a4e6c8a24_1600x629.png 848w, https://substackcdn.com/image/fetch/$s_!b4we!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5526746c-1fe2-460c-aa11-020a4e6c8a24_1600x629.png 1272w, https://substackcdn.com/image/fetch/$s_!b4we!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5526746c-1fe2-460c-aa11-020a4e6c8a24_1600x629.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>It seems that OpenAI has achieved these impressive results in two ways. The first is more training, specifically reinforcement learning. As opposed to standard self-supervised learning &#8212; which creates great next-word predictors &#8212; reinforcement learning is the special kind of training that&#8217;s used to make LLMs useful for things like conversations and problem solving. The second way was to give the LLM more time to think about its answers before providing them. The classic way to do this is using what&#8217;s known as a Chain of Thoughts, where the LLM solves a problem step by step. (We&#8217;ve covered a few other ways to do this on Learn and Burn; see our summaries on <a href="https://learnandburn.ai/p/paper-tree-of-thoughts-deliberate">Tree of Thoughts</a> and the more sophisticated <a href="https://learnandburn.ai/p/better-llm-problem-solving-without">Buffer of Thoughts</a> approaches.) According to their own article, OpenAI seems to be using an approach called Chain of Thoughts (CoT). The figure below shows how o1&#8217;s accuracy scales with train- and test-time compute.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1fin!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c350e62-d651-4137-991e-b107307b6163_1600x858.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1fin!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c350e62-d651-4137-991e-b107307b6163_1600x858.png 424w, https://substackcdn.com/image/fetch/$s_!1fin!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c350e62-d651-4137-991e-b107307b6163_1600x858.png 848w, https://substackcdn.com/image/fetch/$s_!1fin!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c350e62-d651-4137-991e-b107307b6163_1600x858.png 1272w, https://substackcdn.com/image/fetch/$s_!1fin!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c350e62-d651-4137-991e-b107307b6163_1600x858.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1fin!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c350e62-d651-4137-991e-b107307b6163_1600x858.png" width="1456" height="781" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6c350e62-d651-4137-991e-b107307b6163_1600x858.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:781,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!1fin!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c350e62-d651-4137-991e-b107307b6163_1600x858.png 424w, https://substackcdn.com/image/fetch/$s_!1fin!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c350e62-d651-4137-991e-b107307b6163_1600x858.png 848w, https://substackcdn.com/image/fetch/$s_!1fin!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c350e62-d651-4137-991e-b107307b6163_1600x858.png 1272w, https://substackcdn.com/image/fetch/$s_!1fin!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c350e62-d651-4137-991e-b107307b6163_1600x858.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>You might be wondering what o1&#8217;s thoughts look like. Here&#8217;s an example for a cipher-solving task:</p><p><em>oyfjdnisdr rtqwainr acxz mynzbhhx -&gt; Think step by step</em></p><p><em>Use the example above to decode:</em></p><p><em>oyekaijzdf aaptcg suaokybhai ouow aqht mynznvaatzacdfoulxxz</em></p><p>For this task, o1 thought about different hypotheses &#8212; it considered anagrams and letter substitutions &#8212; before realizing that the letter groups in the cypher text correspond to words in the decoded cypher, and that consecutive letter pairs correspond to decoded single letters (so two letters map down to one). o1 then noticed that half the sum of the alphabet positions (eg, a is 1, b is 2, etc.) for pairs of letters in the cypher text correspond to the alphabet positions of the decoded letters. So the letter-pair &#8220;oy&#8221; decodes to &#8220;t&#8221; since (15 + 25) / 2 = 20. This allowed o1 to successfully decode the cypher: <em>there are three r&#8217;s in strawberry</em>.</p><p>OpenAI says that they&#8217;re using CoT, but I think their approach deviates from the standard CoT approach from the original <a href="https://arxiv.org/pdf/2201.11903">paper</a>, which simply uses prompts to encourage the LLM to &#8220;think out loud&#8221; about its thought process. Instead, they say o1 learns to hone its chain of thought and refine the strategies it uses through reinforcement learning. I&#8217;m guessing that they mean that they use human feedback, but it&#8217;s not clear to me whether the humans provide feedback on just o1&#8217;s responses or on its thoughts, too. This is made even more opaque by OpenAI&#8217;s decision to hide o1&#8217;s thoughts from users; so it&#8217;s not clear whether they were also hidden from the people who provided o1 feedback during its training.</p><p>I think the CoT approach is a must-have for helping LLMs like o1 on advanced reasoning tasks, but I also reckon that, aside from simply scaling training and inference compute time, the o1 researchers also used many other clever tricks to eke more performance out of their LLM. For example, they might have paid close attention to curating higher-quality datasets or to eliminating any inconsistencies in their dataset of human feedback. This is just speculation though, and we can&#8217;t say much about o1 with any certainty &#8212; except for how impressive it is!</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[The subgoals of attention units in LLMs]]></title><description><![CDATA[[Paper: Attention Heads of Large Language Models: A Survey]]]></description><link>https://learnandburn.ai/p/the-subgoals-of-attention-units-in</link><guid isPermaLink="false">https://learnandburn.ai/p/the-subgoals-of-attention-units-in</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Fri, 20 Sep 2024 12:22:08 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!1ouB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f3963a5-ca0e-458a-860f-5218e061e9fe_2400x1254.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Oreolorun Olu-Ipinlaye</strong></h5><p>[<a href="https://arxiv.org/pdf/2409.03752">pdf of the paper</a>]</p><p>Large language models have shown their utility across all kinds of tasks and they&#8217;re only getting better. Improving their performance often involves increasing their parameters rather than changing their architecture or reasoning pathways because LLMs are seen as black boxes, which makes it difficult to identify areas to adjust. But researchers have begun analyzing how LLMs think, focusing on their <em>attention heads,</em> a critical portion of the transformer architecture that LLMs are built on. The authors of today&#8217;s paper looked closely at LLMs&#8217; reasoning processes by reviewing prior research on attention head interpretability.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1ouB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f3963a5-ca0e-458a-860f-5218e061e9fe_2400x1254.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1ouB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f3963a5-ca0e-458a-860f-5218e061e9fe_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!1ouB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f3963a5-ca0e-458a-860f-5218e061e9fe_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!1ouB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f3963a5-ca0e-458a-860f-5218e061e9fe_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!1ouB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f3963a5-ca0e-458a-860f-5218e061e9fe_2400x1254.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1ouB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f3963a5-ca0e-458a-860f-5218e061e9fe_2400x1254.jpeg" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3f3963a5-ca0e-458a-860f-5218e061e9fe_2400x1254.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:88714,&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_!1ouB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f3963a5-ca0e-458a-860f-5218e061e9fe_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!1ouB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f3963a5-ca0e-458a-860f-5218e061e9fe_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!1ouB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f3963a5-ca0e-458a-860f-5218e061e9fe_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!1ouB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f3963a5-ca0e-458a-860f-5218e061e9fe_2400x1254.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><figcaption class="image-caption"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>To demonstrate how attention heads work, the researchers compared them to the way human brains solve problems. According to neuroscience, the brain&#8217;s problem-solving process involves four phases:&nbsp;</p><ol><li><p>Knowledge Recalling: We recall relevant knowledge.&nbsp;</p></li><li><p>In-Context Identification: We analyze the context of the problem.&nbsp;</p></li><li><p>Latent Reasoning: We use that information to reason and come to a conclusion.&nbsp;</p></li><li><p>Expression Preparation: We express the solution in natural language.</p></li></ol><p>The authors then draw parallels between this process and attention heads, which serve a comparable problem-solving function in LLMs. In the case of Knowledge Recalling (KR), LLMs learn during the training or fine-tuning process and this knowledge is stored in the model&#8217;s parameters &#8212; this is called <em>parametric knowledge</em>. The attention heads involved in this phase recall knowledge by initially guessing or focusing on specific context to retrieve relevant parametric knowledge.</p><p>Once the LMM has retrieved that knowledge, then comes In-Context Identification (ICI). The authors quoted past research that states that there are specific attention heads involved in identifying key information in a query. These heads focus on three elements of the query:</p><ul><li><p>Structural information: overall context, positional relationships, rare words, and repeated content</p></li><li><p>Syntactic information: sentence components like subjects, predicates, and objects</p></li><li><p>Semantic information: task-relevant content, answer-related tokens, sentiment, and relationships between words</p></li></ul><p>The next phase, Latent Reasoning (LR), is where the authors say specific heads of&nbsp;the LLM combine information derived from the KR and ICI phases and perform reasoning. During this stage, the model begins to "think" through the data, combining patterns, relationships, and insights from earlier phases to draw conclusions. Finally,&nbsp; the last phase, Expression Preparation (EP), is where certain attention heads take reasoning results and turn them into natural language outputs that the user sees. EP heads aggregate information from the ICI and LR stages, amplify signals of correct choices, and ensure that the output is coherent and clear. The image below provides an overview of all four phases and the specific attention heads involved in each 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_!WSj1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6c970c8-1db5-4b41-a775-50bc69ef6063_1600x971.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WSj1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6c970c8-1db5-4b41-a775-50bc69ef6063_1600x971.png 424w, https://substackcdn.com/image/fetch/$s_!WSj1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6c970c8-1db5-4b41-a775-50bc69ef6063_1600x971.png 848w, https://substackcdn.com/image/fetch/$s_!WSj1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6c970c8-1db5-4b41-a775-50bc69ef6063_1600x971.png 1272w, https://substackcdn.com/image/fetch/$s_!WSj1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6c970c8-1db5-4b41-a775-50bc69ef6063_1600x971.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WSj1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6c970c8-1db5-4b41-a775-50bc69ef6063_1600x971.png" width="1456" height="884" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c6c970c8-1db5-4b41-a775-50bc69ef6063_1600x971.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:884,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!WSj1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6c970c8-1db5-4b41-a775-50bc69ef6063_1600x971.png 424w, https://substackcdn.com/image/fetch/$s_!WSj1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6c970c8-1db5-4b41-a775-50bc69ef6063_1600x971.png 848w, https://substackcdn.com/image/fetch/$s_!WSj1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6c970c8-1db5-4b41-a775-50bc69ef6063_1600x971.png 1272w, https://substackcdn.com/image/fetch/$s_!WSj1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6c970c8-1db5-4b41-a775-50bc69ef6063_1600x971.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>How exactly did the authors identify the functions of these attention heads? They used experimental methods that are categorized into modeling-free and modeling-required methods. Modeling-free methods modify the LLM&#8217;s internal representations while analyzing the impact on output. Modeling-required methods involve creating new models and can be split into two types: training required and training free. Training-required methods involve training classifiers or simplified models to analyze the functions of different heads. Training-free methods, on the other hand, use scores or information flow graphs to understand the heads&#8217; attributes. For example, researchers used Retrieval Score and Negative Attention Score to analyze retrieval heads and negative heads, respectively.</p><p>The researchers noted that current research on attention heads in LLMs faces limitations due to its focus on simple tasks, lack of comprehensive frameworks for head interactions, and absence of mathematical proofs. They think that future research should address these gaps by exploring complex tasks, improving experimental methods, developing robust interpretability frameworks, and integrating insights from the field of Machine Psychology. I think it's great that research is focusing on understanding how LLMs work&nbsp; &#8212; scaling parameters has worked well so far but doing so requires powerful hardware. Understanding the inner workings of LLMs could allow for a big performance leap in natural language processing (like we saw between recurrent neural networks and transformer models) without needing massive amounts of computing power.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[A model to parse body language]]></title><description><![CDATA[[Paper: Sapiens: Foundation Model for Human Vision Models]]]></description><link>https://learnandburn.ai/p/a-model-to-parse-body-language</link><guid isPermaLink="false">https://learnandburn.ai/p/a-model-to-parse-body-language</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Mon, 16 Sep 2024 22:56:33 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!omUX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dbe412-1786-47ed-94d9-b5551546571d_2400x1254.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Adrian Wilkins-Caruana</strong></h5><p>[<a href="https://arxiv.org/pdf/2408.12569">pdf of the paper</a>]</p><p>When people interact with each other, we use more than just our words to communicate: We also use body language, poses, and facial expressions. When chatting with someone over the phone or via text, misunderstandings can happen because these other communication vectors are absent. This issue is also quite frustrating for Meta, which is trying to create the metaverse, a place where people can communicate with each other through their digital avatars. I think that people will only embrace the metaverse &#8212; and that the metaverse will only succeed &#8212; if Meta can figure out a way to capture and display all of these subtle non-verbal cues in a way that feels natural. Luckily for Meta, they seem to have figured out the <em>capture</em> part of this equation.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!omUX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dbe412-1786-47ed-94d9-b5551546571d_2400x1254.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!omUX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dbe412-1786-47ed-94d9-b5551546571d_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!omUX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dbe412-1786-47ed-94d9-b5551546571d_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!omUX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dbe412-1786-47ed-94d9-b5551546571d_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!omUX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dbe412-1786-47ed-94d9-b5551546571d_2400x1254.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!omUX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dbe412-1786-47ed-94d9-b5551546571d_2400x1254.jpeg" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/27dbe412-1786-47ed-94d9-b5551546571d_2400x1254.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:93787,&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_!omUX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dbe412-1786-47ed-94d9-b5551546571d_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!omUX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dbe412-1786-47ed-94d9-b5551546571d_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!omUX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dbe412-1786-47ed-94d9-b5551546571d_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!omUX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dbe412-1786-47ed-94d9-b5551546571d_2400x1254.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><figcaption class="image-caption"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>The researchers at Meta have trained a new vision-foundation model for four important human-centric perception tasks: 2D pose estimation, body-part segmentation, depth prediction, and surface-normal prediction. The figure below shows each of these tasks. The gist of their approach is this: first, they pretrained a vision-foundation model on images of people, and then they fine-tuned the model on the four tasks I just mentioned. They named the resulting foundation model <em>Sapiens</em>.&nbsp;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TVJR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ef1b030-ada8-48ea-8064-2be7d354cb3f_1600x422.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TVJR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ef1b030-ada8-48ea-8064-2be7d354cb3f_1600x422.png 424w, https://substackcdn.com/image/fetch/$s_!TVJR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ef1b030-ada8-48ea-8064-2be7d354cb3f_1600x422.png 848w, https://substackcdn.com/image/fetch/$s_!TVJR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ef1b030-ada8-48ea-8064-2be7d354cb3f_1600x422.png 1272w, https://substackcdn.com/image/fetch/$s_!TVJR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ef1b030-ada8-48ea-8064-2be7d354cb3f_1600x422.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TVJR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ef1b030-ada8-48ea-8064-2be7d354cb3f_1600x422.png" width="1456" height="384" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4ef1b030-ada8-48ea-8064-2be7d354cb3f_1600x422.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:384,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!TVJR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ef1b030-ada8-48ea-8064-2be7d354cb3f_1600x422.png 424w, https://substackcdn.com/image/fetch/$s_!TVJR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ef1b030-ada8-48ea-8064-2be7d354cb3f_1600x422.png 848w, https://substackcdn.com/image/fetch/$s_!TVJR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ef1b030-ada8-48ea-8064-2be7d354cb3f_1600x422.png 1272w, https://substackcdn.com/image/fetch/$s_!TVJR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ef1b030-ada8-48ea-8064-2be7d354cb3f_1600x422.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>When deciding what kind of data to pretrain Sapiens on, the researchers considered two situations. They could either pretrain it on as much data as they could get their hands on, or they could curate a dataset that only contains images of people. More diverse data could help the model generalize to real-world scenarios, but curating a dataset could help Sapiens become an expert at understanding pictures of people. One of the big claims of their research is that the curated-dataset approach is the right way to go.</p><p>Starting with a proprietary dataset of about a billion images, the researchers used a person-detection model to whittle it down to about 300 million images &#8212; ones that the detector could confidently say contained a person. They then trained a human-centric, foundation vision transformer (ViT) &#8212; a model that has lots of generic information about what humans look like &#8212; using the masked autoencoding approach, which teaches the model to reconstruct a partially-masked image. To make this ViT perform tasks like pose estimation and body part segmentation, the researchers appended different &#8220;heads&#8221; (ML heads, not human heads) to the end of the model to do these things. They also created several variants of Sapiens of different sizes, ranging from 300m to 2b parameters.</p><p>The pose-estimation head predicts a <em>heat map</em> &#8212; which is like a prediction layer &#8212; for each keypoint (second index finger knuckle, left elbow, etc). The prediction value for each point in the map is the model&#8217;s estimation of the likelihood that that point is the keypoint. Sapiens predicts 308 of these keypoints, 243 in the face alone! A heatmap can contain predictions for a keypoint at several locations, since this lets it predict multiple people, as shown in the fifth example below. Using so many keypoints helps the model capture a lot more detail than existing pose estimators, which top out at 68 facial keypoints. Compared to the next-best pose estimator, the largest Sapiens variant is ~7% more accurate in terms of average precision and recall.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jyx1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbb6901-7e9d-43e8-a267-b0698c3203cb_1600x338.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jyx1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbb6901-7e9d-43e8-a267-b0698c3203cb_1600x338.png 424w, https://substackcdn.com/image/fetch/$s_!jyx1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbb6901-7e9d-43e8-a267-b0698c3203cb_1600x338.png 848w, https://substackcdn.com/image/fetch/$s_!jyx1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbb6901-7e9d-43e8-a267-b0698c3203cb_1600x338.png 1272w, https://substackcdn.com/image/fetch/$s_!jyx1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbb6901-7e9d-43e8-a267-b0698c3203cb_1600x338.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jyx1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbb6901-7e9d-43e8-a267-b0698c3203cb_1600x338.png" width="1456" height="308" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7dbb6901-7e9d-43e8-a267-b0698c3203cb_1600x338.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:308,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!jyx1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbb6901-7e9d-43e8-a267-b0698c3203cb_1600x338.png 424w, https://substackcdn.com/image/fetch/$s_!jyx1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbb6901-7e9d-43e8-a267-b0698c3203cb_1600x338.png 848w, https://substackcdn.com/image/fetch/$s_!jyx1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbb6901-7e9d-43e8-a267-b0698c3203cb_1600x338.png 1272w, https://substackcdn.com/image/fetch/$s_!jyx1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbb6901-7e9d-43e8-a267-b0698c3203cb_1600x338.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The Meta team took a similar heat-map approach for segmenting body parts, where Sapiens predicts one layer for each body part. The researchers collected 100k images annotated with 28 body parts, which is an increase from a more standard 20-part set. Again, this approach naturally handles multi-person prediction, like in the first example below. This extended set distinguishes between the upper/lower parts of limbs, and includes more facial details such as teeth and upper/lower lips. The largest Sapiens variant is ~15% more accurate than a DeepLabV3 baseline (a very capable image-segmentation model) in terms of accuracy and IoU (intersection over union, which is a way to measure similarity between a predicted region and the ground truth region it&#8217;s trying to match).</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZsKb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78028ab5-bf2f-4367-8ad0-4b1d3854f40f_1600x288.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZsKb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78028ab5-bf2f-4367-8ad0-4b1d3854f40f_1600x288.png 424w, https://substackcdn.com/image/fetch/$s_!ZsKb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78028ab5-bf2f-4367-8ad0-4b1d3854f40f_1600x288.png 848w, https://substackcdn.com/image/fetch/$s_!ZsKb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78028ab5-bf2f-4367-8ad0-4b1d3854f40f_1600x288.png 1272w, https://substackcdn.com/image/fetch/$s_!ZsKb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78028ab5-bf2f-4367-8ad0-4b1d3854f40f_1600x288.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZsKb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78028ab5-bf2f-4367-8ad0-4b1d3854f40f_1600x288.png" width="1456" height="262" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/78028ab5-bf2f-4367-8ad0-4b1d3854f40f_1600x288.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:262,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!ZsKb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78028ab5-bf2f-4367-8ad0-4b1d3854f40f_1600x288.png 424w, https://substackcdn.com/image/fetch/$s_!ZsKb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78028ab5-bf2f-4367-8ad0-4b1d3854f40f_1600x288.png 848w, https://substackcdn.com/image/fetch/$s_!ZsKb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78028ab5-bf2f-4367-8ad0-4b1d3854f40f_1600x288.png 1272w, https://substackcdn.com/image/fetch/$s_!ZsKb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78028ab5-bf2f-4367-8ad0-4b1d3854f40f_1600x288.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>I won&#8217;t go into the details of Sapeins&#8217; depth- and normal-estimation heads because the researchers followed a similar approach: They extended the current state-of-the-art approach by improving the data <em>quality</em> (as opposed to quantity), and then followed conventional modeling approaches. The researchers showed that Sapiens is more accurate than several baselines for these tasks, though not all baselines were human-centric models.&nbsp;</p><p>It&#8217;s not surprising that Meta is trying to develop models like Sapiens for human parsing. They are all-in on the metaverse and, in my opinion, it&#8217;s critical that participants&#8217; avatars are convincing and lifelike. I think the additional facial details of the pose and body-part models will be critical to achieving this, though I have doubts that a 2b-parameter model can be scaled to predict a user&#8217;s body in real time (as opposed to asynchronously, like Sapiens). But Sapiens is still a huge step towards achieving this, and I look forward to seeing how this development improves Meta&#8217;s product.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Stable diffusion can simulate video games]]></title><description><![CDATA[[Paper: Diffusion Models are Real-Time Game Engines]]]></description><link>https://learnandburn.ai/p/stable-diffusion-can-simulate-video</link><guid isPermaLink="false">https://learnandburn.ai/p/stable-diffusion-can-simulate-video</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Fri, 06 Sep 2024 12:10:58 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!zGhl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c19a8b-d882-456e-8b51-92b57dd670d5_2400x1254.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Oreolorun Olu-Ipinlaye</strong></h5><p>[<a href="https://arxiv.org/pdf/2408.14837">pdf of the paper</a>]</p><p>Video games are a joy to play &#8212; they&#8217;re a great pastime, hobby, or even job (competitive gaming).&nbsp; Developing video games, on the other hand, is no simple task: Game developers spend months handcrafting and hardcoding game states based on user inputs. But imagine if game states weren&#8217;t handcrafted and that we could use AI to generate scenes, scenarios, and characters based on user input. While this may seem like science fiction, recent advancements in computer vision generative models are bringing it closer to reality. The authors of today&#8217;s paper have shown that gen AI models can simulate dynamic, interactive game states.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zGhl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c19a8b-d882-456e-8b51-92b57dd670d5_2400x1254.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zGhl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c19a8b-d882-456e-8b51-92b57dd670d5_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zGhl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c19a8b-d882-456e-8b51-92b57dd670d5_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zGhl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c19a8b-d882-456e-8b51-92b57dd670d5_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zGhl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c19a8b-d882-456e-8b51-92b57dd670d5_2400x1254.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zGhl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c19a8b-d882-456e-8b51-92b57dd670d5_2400x1254.jpeg" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/72c19a8b-d882-456e-8b51-92b57dd670d5_2400x1254.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:127464,&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_!zGhl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c19a8b-d882-456e-8b51-92b57dd670d5_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zGhl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c19a8b-d882-456e-8b51-92b57dd670d5_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zGhl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c19a8b-d882-456e-8b51-92b57dd670d5_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zGhl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c19a8b-d882-456e-8b51-92b57dd670d5_2400x1254.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><figcaption class="image-caption"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>Their model, named GameNGen (pronounced &#8220;game engine&#8221;), can simulate the 1993 release of<a href="https://en.wikipedia.org/wiki/Doom_(1993_video_game)"> DOOM</a> to a high level of accuracy and at a visual quality comparable to the original game. But what type of model is GameNGen? It&#8217;s a diffusion model that they trained in a rather unorthodox manner. Instead of training it to just sequentially remove noise from images &#8212; as most diffusion models typically do &#8212; they trained it to generate the next frame in a sequence based on previous frames and user inputs/actions.</p><p>To do this, they needed a lot of training data. Their intention was to have GameNGen generate simulations that players would interact with, so they needed a lot of human gameplay data. As you can imagine, this could have been prohibitive due to the scale of data required, so they trained a reinforcement learning agent to play DOOM while collecting all their data from agent gameplay sessions &#8212; they called this <em>agent play</em>. One interesting thing the authors did was record agent sessions right from the start of training. They weren&#8217;t only interested in perfect gameplay sessions. which would have been archived after appropriate training. They were also interested in the early sessions where the agent played poorly because this mimics low-skilled human players.</p><p>With the human-like gameplay data collected, it was time to train GameNGen. At the core of GameNGen is a pre-trained text-to-image diffusion model &#8212; Stable Diffusion v1.4, which the researchers had repurposed by engineering the text-conditioning logic to take in user gameplay actions (e.g. key presses) rather than text. They did this by learning an embedding of each action. They also conditioned the model on previous frames, which they call <em>observations.</em> To do this, they encoded the frames into a latent space using the Stable Diffusion autoencoder, added some noise, and then concatenated them into latent channels. They then trained the model to minimize diffusion loss with velocity parametrization. The figure here illustrates these processes:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hRiW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5405d9-7672-46bc-92da-c2f23bb345bb_1423x578.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hRiW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5405d9-7672-46bc-92da-c2f23bb345bb_1423x578.jpeg 424w, https://substackcdn.com/image/fetch/$s_!hRiW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5405d9-7672-46bc-92da-c2f23bb345bb_1423x578.jpeg 848w, https://substackcdn.com/image/fetch/$s_!hRiW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5405d9-7672-46bc-92da-c2f23bb345bb_1423x578.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!hRiW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5405d9-7672-46bc-92da-c2f23bb345bb_1423x578.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hRiW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5405d9-7672-46bc-92da-c2f23bb345bb_1423x578.jpeg" width="1423" height="578" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5e5405d9-7672-46bc-92da-c2f23bb345bb_1423x578.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:578,&quot;width&quot;:1423,&quot;resizeWidth&quot;:null,&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_!hRiW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5405d9-7672-46bc-92da-c2f23bb345bb_1423x578.jpeg 424w, https://substackcdn.com/image/fetch/$s_!hRiW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5405d9-7672-46bc-92da-c2f23bb345bb_1423x578.jpeg 848w, https://substackcdn.com/image/fetch/$s_!hRiW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5405d9-7672-46bc-92da-c2f23bb345bb_1423x578.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!hRiW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5405d9-7672-46bc-92da-c2f23bb345bb_1423x578.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>After training, the researchers found that GameNGen performed well in image-quality metrics with PSNR (peak signal-to-noise ratio, a measure of similarity between a true image and an approximate image) of 29.43 and LPIPS (learned perceptual image patch similarity, an alternative to PSNR that is more aware of the quirks of human perception) of 0.249, on par with what you&#8217;d see in a lossy JPEG compressed image with a quality setting of 20&#8211;30. When it comes to video quality, because of the auto-regressive nature of the task (the model needing to generate the next frame from its own predictions), the authors discovered that the generated game images looked worse over time due to the accumulation of errors between sequential frames. They also had people evaluate the simulations, asking them to identify real gameplay footage. The evaluators were only able to correctly identify actual gameplay 60% of the time!</p><p>The authors also ran some ablation experiments to evaluate the effectiveness of certain approaches they took during training. They found that using more past frames and actions helped improve the quality of simulations up to a certain point where the model reached a plateau. They also found that adding noise to frames during the training process was highly beneficial as performance took a big hit without it. They then compared training based on data collected by random user actions to training based on agent play and found that the model trained with agent-generated data outperformed that trained with random data, albeit only slightly in some instances.</p><p>GameNGen is, in my opinion, an incredible development and a precursor to potentially great leaps in the game industry. I believe that AI can complement traditional ways of doing things rather than completely replace them. So I think systems like GameNGen could complement traditional game development as a new feature in the game logic that ensures every player has unique experiences based on their playstyle &#8212; this would be particularly beneficial in open-world games. But we&#8217;re a long way from that as GameNGen simulated a game released in 1993. It&#8217;ll take significant advancements for us to simulate games like <em>The Last of Us</em> or <em>Black Myth: Wukong</em>.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[How to build a lensless camera]]></title><description><![CDATA[[Paper: DifuzCam: Replacing Camera Lens with a Mask and a Diffusion Model]]]></description><link>https://learnandburn.ai/p/how-to-build-a-lensless-camera</link><guid isPermaLink="false">https://learnandburn.ai/p/how-to-build-a-lensless-camera</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Fri, 30 Aug 2024 12:25:50 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!hAQt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc686e0a9-49d6-4afe-b23b-ed69c01d1087_2400x1254.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Adrian Wilkins-Caruana</strong></h5><p>[<a href="https://arxiv.org/pdf/2408.07541">pdf of the paper</a>]</p><p>Have you ever wondered <em>why</em> cameras have lenses? The camera on your phone and our eyes are common examples of image sensors that have lenses in front of them to focus the light. But why is the lens necessary? In other words, why can&#8217;t you just point an image sensor <em>without</em> a lens at something you want to take a photo of? It is actually possible to take photos without lenses, though it&#8217;s quite challenging. But with some clever computational imaging tricks and the aid of diffusion models, lensless photography is becoming more tractable.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hAQt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc686e0a9-49d6-4afe-b23b-ed69c01d1087_2400x1254.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hAQt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc686e0a9-49d6-4afe-b23b-ed69c01d1087_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!hAQt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc686e0a9-49d6-4afe-b23b-ed69c01d1087_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!hAQt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc686e0a9-49d6-4afe-b23b-ed69c01d1087_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!hAQt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc686e0a9-49d6-4afe-b23b-ed69c01d1087_2400x1254.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hAQt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc686e0a9-49d6-4afe-b23b-ed69c01d1087_2400x1254.jpeg" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c686e0a9-49d6-4afe-b23b-ed69c01d1087_2400x1254.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:86517,&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_!hAQt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc686e0a9-49d6-4afe-b23b-ed69c01d1087_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!hAQt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc686e0a9-49d6-4afe-b23b-ed69c01d1087_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!hAQt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc686e0a9-49d6-4afe-b23b-ed69c01d1087_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!hAQt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc686e0a9-49d6-4afe-b23b-ed69c01d1087_2400x1254.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><figcaption class="image-caption"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>If you&#8217;ve ever used a camera with a detachable lens, you might have some idea of what an image looks like without a lens. In case you haven&#8217;t, here&#8217;s an image I found on <a href="https://www.reddit.com/r/Cameras/comments/l1aaj6/does_anyone_know_if_i_can_take_pictures_without/">Reddit</a> that shows an example. The &#8220;preview&#8221; on the right shows what the camera &#8220;sees&#8221; without its lens &#8212; it&#8217;s a blurry mess. In photography terms, the image isn&#8217;t <em>in focus</em>. Focus means that light from a single point in the scene goes to a single point on the image sensor; this is the critical role that lenses play. But in the real-world, light is bouncing around everywhere in all directions. Without a lens, light from lots of places is landing on every part of the sensor. That&#8217;s why the preview looks reddish:&nbsp; the scene is mostly reddish. So a lens plays a very important role by focussing only the light from one point in the scene onto one point on the sensor.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bB7j!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e60b677-0ee7-457c-a8ba-5179cd647ac6_1600x1100.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bB7j!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e60b677-0ee7-457c-a8ba-5179cd647ac6_1600x1100.png 424w, https://substackcdn.com/image/fetch/$s_!bB7j!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e60b677-0ee7-457c-a8ba-5179cd647ac6_1600x1100.png 848w, https://substackcdn.com/image/fetch/$s_!bB7j!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e60b677-0ee7-457c-a8ba-5179cd647ac6_1600x1100.png 1272w, https://substackcdn.com/image/fetch/$s_!bB7j!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e60b677-0ee7-457c-a8ba-5179cd647ac6_1600x1100.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bB7j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e60b677-0ee7-457c-a8ba-5179cd647ac6_1600x1100.png" width="1456" height="1001" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1e60b677-0ee7-457c-a8ba-5179cd647ac6_1600x1100.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1001,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!bB7j!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e60b677-0ee7-457c-a8ba-5179cd647ac6_1600x1100.png 424w, https://substackcdn.com/image/fetch/$s_!bB7j!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e60b677-0ee7-457c-a8ba-5179cd647ac6_1600x1100.png 848w, https://substackcdn.com/image/fetch/$s_!bB7j!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e60b677-0ee7-457c-a8ba-5179cd647ac6_1600x1100.png 1272w, https://substackcdn.com/image/fetch/$s_!bB7j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e60b677-0ee7-457c-a8ba-5179cd647ac6_1600x1100.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>Lenses are a common way to focus light, but sometimes a lens doesn&#8217;t work. For example, have you ever thought about how an X-ray image is captured? X-rays have much higher energy than visible light, so they aren&#8217;t as easily deflected by glass lenses like you&#8217;d find in a camera. (You can read more about X-ray optics on <a href="https://en.wikipedia.org/wiki/X-ray_optics">Wikipedia</a> &#8212; it&#8217;s fascinating!) So researchers are constantly looking for new ways to capture images without lenses. In 2015, a team discovered a way to capture images using a <em>mask-sensor assembly,</em> an image sensor that&#8217;s manufactured with a mask (which I&#8217;ll explain shortly) in front of the sensor that interferes with the incoming light. The diagram below shows how an image of a scene can be reconstructed from the blurry mess that the sensor captures.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OzAb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac86c7de-0649-47c6-9479-cae00002e515_1600x688.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OzAb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac86c7de-0649-47c6-9479-cae00002e515_1600x688.png 424w, https://substackcdn.com/image/fetch/$s_!OzAb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac86c7de-0649-47c6-9479-cae00002e515_1600x688.png 848w, https://substackcdn.com/image/fetch/$s_!OzAb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac86c7de-0649-47c6-9479-cae00002e515_1600x688.png 1272w, https://substackcdn.com/image/fetch/$s_!OzAb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac86c7de-0649-47c6-9479-cae00002e515_1600x688.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OzAb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac86c7de-0649-47c6-9479-cae00002e515_1600x688.png" width="1456" height="626" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ac86c7de-0649-47c6-9479-cae00002e515_1600x688.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:626,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!OzAb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac86c7de-0649-47c6-9479-cae00002e515_1600x688.png 424w, https://substackcdn.com/image/fetch/$s_!OzAb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac86c7de-0649-47c6-9479-cae00002e515_1600x688.png 848w, https://substackcdn.com/image/fetch/$s_!OzAb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac86c7de-0649-47c6-9479-cae00002e515_1600x688.png 1272w, https://substackcdn.com/image/fetch/$s_!OzAb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac86c7de-0649-47c6-9479-cae00002e515_1600x688.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>In theory, it&#8217;s possible to model how the light in the scene interacts with the sensor, and to reconstruct an image using this model. This <em>isn&#8217;t</em> possible in practice though, since there are too many unknown parameters in the model. So the researchers had the clever idea of using a mask to interfere with the incoming light for particular rows and columns of the image. The pattern on the mask is actually very important: It&#8217;s the outer product of two 1d binary patterns &#8212; one for the rows, and one for the columns. That&#8217;s why it kind of looks like an irregular checkerboard pattern. This property of the mask simplifies the computational reconstruction significantly. I won&#8217;t get into the details, but with some linear algebra (read: basically magic) an image is captured.</p><p>While helpful from a computational standpoint, masking the incoming light isn&#8217;t good for capturing crisp images. But some clever researchers from Tel Aviv University had the idea of using AI to improve the image quality. The two main components of their method are a pre-trained latent diffusion model (in this instance, it&#8217;s Stable Diffusion), and a neural network called ControlNet. ControlNet guides the image-generating diffusion process for some specific task, like reconstructing images from masked, lensless photos. The control and diffusion processes can also be guided by a text prompt to further improve the reconstruction. The researchers call this process DifuzCam, and it&#8217;s shown below. (There is one more notable bit: the <em>separable transform, </em>which<em> </em>splits the single-channel input signal into four color channels.)&nbsp;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!e_HY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd70f0abb-d5da-4a5f-b526-7a4a01da2d26_1600x748.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!e_HY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd70f0abb-d5da-4a5f-b526-7a4a01da2d26_1600x748.png 424w, https://substackcdn.com/image/fetch/$s_!e_HY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd70f0abb-d5da-4a5f-b526-7a4a01da2d26_1600x748.png 848w, https://substackcdn.com/image/fetch/$s_!e_HY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd70f0abb-d5da-4a5f-b526-7a4a01da2d26_1600x748.png 1272w, https://substackcdn.com/image/fetch/$s_!e_HY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd70f0abb-d5da-4a5f-b526-7a4a01da2d26_1600x748.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!e_HY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd70f0abb-d5da-4a5f-b526-7a4a01da2d26_1600x748.png" width="1456" height="681" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d70f0abb-d5da-4a5f-b526-7a4a01da2d26_1600x748.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:681,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!e_HY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd70f0abb-d5da-4a5f-b526-7a4a01da2d26_1600x748.png 424w, https://substackcdn.com/image/fetch/$s_!e_HY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd70f0abb-d5da-4a5f-b526-7a4a01da2d26_1600x748.png 848w, https://substackcdn.com/image/fetch/$s_!e_HY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd70f0abb-d5da-4a5f-b526-7a4a01da2d26_1600x748.png 1272w, https://substackcdn.com/image/fetch/$s_!e_HY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd70f0abb-d5da-4a5f-b526-7a4a01da2d26_1600x748.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>There are two training signals that help DifuzCam learn how to reconstruct lensless photos. The first is a simple reconstruction (l_C), which encourages the generated image to look like the target image. The researchers call the other signal a <em>separable reconstruction loss</em>, which is just the L2 loss between the target image and the result of a learned 3x3 convolution on the color-separated input. The ControlNet&#8217;s parameters are trained via supervised learning using a dataset of lensless photos and regular ones.&nbsp;</p><p>The figure below shows some of DifuzCam&#8217;s results, both with and without text guidance. It clearly generates crisper images than some of the other methods shown, and also has fewer artifacts when you zoom in. The results are a massive improvement over the simpler, original reconstruction method I described earlier. The DifuzCam process could pave the way for very thin cameras, ones could be used in phones or other situations where they need to be tiny. Of course, the tradeoff is that the images need to be processed by a hefty neural network. Still, I think these results are quite remarkable!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VeVv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa5fe82c-87a9-47fb-87aa-b005adcf3139_1476x1596.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VeVv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa5fe82c-87a9-47fb-87aa-b005adcf3139_1476x1596.png 424w, https://substackcdn.com/image/fetch/$s_!VeVv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa5fe82c-87a9-47fb-87aa-b005adcf3139_1476x1596.png 848w, https://substackcdn.com/image/fetch/$s_!VeVv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa5fe82c-87a9-47fb-87aa-b005adcf3139_1476x1596.png 1272w, https://substackcdn.com/image/fetch/$s_!VeVv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa5fe82c-87a9-47fb-87aa-b005adcf3139_1476x1596.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VeVv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa5fe82c-87a9-47fb-87aa-b005adcf3139_1476x1596.png" width="1456" height="1574" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fa5fe82c-87a9-47fb-87aa-b005adcf3139_1476x1596.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1574,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!VeVv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa5fe82c-87a9-47fb-87aa-b005adcf3139_1476x1596.png 424w, https://substackcdn.com/image/fetch/$s_!VeVv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa5fe82c-87a9-47fb-87aa-b005adcf3139_1476x1596.png 848w, https://substackcdn.com/image/fetch/$s_!VeVv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa5fe82c-87a9-47fb-87aa-b005adcf3139_1476x1596.png 1272w, https://substackcdn.com/image/fetch/$s_!VeVv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa5fe82c-87a9-47fb-87aa-b005adcf3139_1476x1596.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><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[LLMs are great geo-aware predictors]]></title><description><![CDATA[[Paper: GeoLLM: Extracting Geospatial Knowledge from Large Language Models]]]></description><link>https://learnandburn.ai/p/llms-are-great-geo-aware-predictors</link><guid isPermaLink="false">https://learnandburn.ai/p/llms-are-great-geo-aware-predictors</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Fri, 23 Aug 2024 12:11:12 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!WPsa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7cb171e-b623-4609-861f-fa38084341c5_2400x1254.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Adrian Wilkins-Caruana</strong></h5><p>[<a href="https://arxiv.org/pdf/2310.06213">pdf of the paper</a>]</p><p>Have you ever gotten lost while traveling? Losing your bearings when you&#8217;re in a new place is a common problem, one that doesn't happen as often when you're in a familiar place like your hometown. That&#8217;s because your brain builds up a sense of direction over time, which lets you navigate your surroundings with ease. This sense of place is a cognitive map that helps you understand many things about your environment and the people in it. Is this sense of direction and of place unique to humans? Do LLMs have a sense of place? A new study by researchers at Stanford suggests that they do. The researchers found that LLMs can answer a wide array of geospatial questions, about topics like population, asset wealth, and demographics.&nbsp;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WPsa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7cb171e-b623-4609-861f-fa38084341c5_2400x1254.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WPsa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7cb171e-b623-4609-861f-fa38084341c5_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!WPsa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7cb171e-b623-4609-861f-fa38084341c5_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!WPsa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7cb171e-b623-4609-861f-fa38084341c5_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!WPsa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7cb171e-b623-4609-861f-fa38084341c5_2400x1254.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WPsa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7cb171e-b623-4609-861f-fa38084341c5_2400x1254.jpeg" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f7cb171e-b623-4609-861f-fa38084341c5_2400x1254.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:148191,&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_!WPsa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7cb171e-b623-4609-861f-fa38084341c5_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!WPsa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7cb171e-b623-4609-861f-fa38084341c5_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!WPsa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7cb171e-b623-4609-861f-fa38084341c5_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!WPsa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7cb171e-b623-4609-861f-fa38084341c5_2400x1254.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><figcaption class="image-caption"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>The researchers first worked to determine what kind of geospatial location formats LLMs can understand. If I were to ask you, "Where are you right now?" you would probably answer with an address like "42 Wallaby Way, Sydney." To make sense of this, you&#8217;d need to know where in the world Sydney is, and then where in Sydney 42 Wallaby Way is. Another way to answer this question is with a set of latitude and longitude coordinates . (According to <a href="https://maps.app.goo.gl/iMD3NTgrfeko4dUR9">Google Maps</a>, the fictional dental practice from <em>Finding Nemo</em> has the coordinates &#8211;33.8690005, 151.2091858). Unless you spend a lot of time looking at maps, you're unlikely to recognize those coordinates as being located in Sydney but, with some understanding of latitude and longitude, you can probably determine that it must be somewhere in the southern and eastern hemispheres.&nbsp;</p><p>The researchers used an additional format for location that shares information about some nearby locations. They devised a way to generate these nearby locations automatically using a free API. For example, here are the locations of places near the Calyon Building on 6th Avenue in New York City:</p><p>Nearby Places:<br>"<br>0.6 km South-West: Theater District<br>0.7 km North: Columbus Circle<br>0.7 km East: Midtown East<br>0.9 km South-West: Midtown<br>1.0 km West: Hell&#8217;s Kitchen<br>1.2 km North: Lincoln Square<br>1.3 km South-West: Garment District<br>1.4 km South-East: Turtle Bay<br>1.4 km South: Jan Karski Corner<br>1.4 km South: Midtown South<br>"</p><p>The researchers then turned their attention to how LLMs can use these location formats to answer questions about various places, and how to measure their accuracy. They used several datasets of info about population densities, home values, mean income, infant mortality rates, and more. To retrieve this kind of information from the LLM, using a method they dubbed GeoLMM, the researchers made a prompt that looks like this: "&lt;Location information&gt;. What is the &lt;Question&gt; on a scale from 0.0 to 9.9?" For example, to ask about the population density of Sydney, the prompt would be "Coordinates: -33.8690005, 151.2091858, Address: ..., Nearby places: ..., What is the population density on a scale from 0.0 to 9.9?" They also restricted GeoLLM's answer to three tokens, which forced it to give a numerical answer like "7.2" or "3.5."</p><p>To measure the accuracy of GeoLLM's answers, the researchers had to turn the actual data into the 0.0&#8211;9.9 scale that GeoLLM uses. To do this, they scaled the values of the data to this range. (If the original data wasn&#8217;t uniform, then they distributed the values evenly across the range.) Once they&#8217;d done that, when GeoLLM answered a lot of these questions, they could measure how well its answers correlated with the actual data using the Pearson correlation coefficient. They then fine-tuned several LLMs so that they became accustomed to answering each specific geospatial question.&nbsp;</p><p>A fine-tuned GPT-3.5 outperformed other LLMs (Llama 2, GPT 2, and RoBERTa) and several other non-LLM baselines. Across nine tasks, GPT-3.5's correlation coefficient was between 0.55 and 0.87, which is really quite impressive! The researchers also used an ablation study to show that the Nearby Places format (used as part of the prompts) is crucial for improving the LLM's performance &#8212; without it, the LLM&#8217;s answers don't correlate as well with the actual data. (The addresses were the next most helpful piece of info and, unsurprisingly, the coordinates were the least helpful.) You can see how well GeoLLM works in the figure below: The colors (green is good) show the absolute error in quantitative questions (eg, what&#8217;s the population density?) asked about each given place. The XGBoost model does much worse than the GPT-based model, showing that LLMs can be viewed as trainable best-in-class predictors for geographic models.</p><p>This study highlights just how much knowledge an LLM accumulates during its training. Even though the LLM&#8217;s predictions were rarely perfect, they were still quite good, and they show that the LLMs have some understanding of the world we live in. One interesting application of this work would be to use the model to fill in missing data in datasets, or to provide a rough estimate of a geospatial value when the actual data isn't available. This could be especially helpful in places where data is scarce or where it's difficult to collect data, like in remote areas or in countries with limited resources.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GzXU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d89c73-fa24-48d8-8feb-6f3e3c2f61d6_1600x1436.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GzXU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d89c73-fa24-48d8-8feb-6f3e3c2f61d6_1600x1436.png 424w, https://substackcdn.com/image/fetch/$s_!GzXU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d89c73-fa24-48d8-8feb-6f3e3c2f61d6_1600x1436.png 848w, https://substackcdn.com/image/fetch/$s_!GzXU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d89c73-fa24-48d8-8feb-6f3e3c2f61d6_1600x1436.png 1272w, https://substackcdn.com/image/fetch/$s_!GzXU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d89c73-fa24-48d8-8feb-6f3e3c2f61d6_1600x1436.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GzXU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d89c73-fa24-48d8-8feb-6f3e3c2f61d6_1600x1436.png" width="1456" height="1307" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e6d89c73-fa24-48d8-8feb-6f3e3c2f61d6_1600x1436.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1307,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!GzXU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d89c73-fa24-48d8-8feb-6f3e3c2f61d6_1600x1436.png 424w, https://substackcdn.com/image/fetch/$s_!GzXU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d89c73-fa24-48d8-8feb-6f3e3c2f61d6_1600x1436.png 848w, https://substackcdn.com/image/fetch/$s_!GzXU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d89c73-fa24-48d8-8feb-6f3e3c2f61d6_1600x1436.png 1272w, https://substackcdn.com/image/fetch/$s_!GzXU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d89c73-fa24-48d8-8feb-6f3e3c2f61d6_1600x1436.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><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Spherical-graph based weather prediction]]></title><description><![CDATA[[Article: GraphCast: AI model for faster and more accurate global weather forecasting]]]></description><link>https://learnandburn.ai/p/spherical-graph-based-weather-prediction</link><guid isPermaLink="false">https://learnandburn.ai/p/spherical-graph-based-weather-prediction</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Fri, 16 Aug 2024 12:11:38 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!iSS9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45aacbef-8c80-4e59-bb3f-ba88ce0d16cf_2400x1254.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Adrian Wilkins-Caruana</strong></h5><p>[<a href="https://deepmind.google/discover/blog/graphcast-ai-model-for-faster-and-more-accurate-global-weather-forecasting/">The original DeepMind article</a>]</p><p>Last week, we discussed two amazing mathematics models from Google Deepmind: AlphaProof and AlphaGeometry 2. (Definitely give <a href="https://learnandburn.ai/p/ai-is-solving-international-level">that article</a> a read if you haven&#8217;t!) Today we&#8217;ll take a look at an interesting weather-prediction model called GraphCast, which Google DeepMind released last year. Google&#8217;s press release says that their method can predict weather conditions up to 10 days in advance faster and more accurately than an industry-standard weather simulation system. Let&#8217;s explore how systems like these work, and then discuss how and why an AI-based approach might be better.&nbsp;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iSS9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45aacbef-8c80-4e59-bb3f-ba88ce0d16cf_2400x1254.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iSS9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45aacbef-8c80-4e59-bb3f-ba88ce0d16cf_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!iSS9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45aacbef-8c80-4e59-bb3f-ba88ce0d16cf_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!iSS9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45aacbef-8c80-4e59-bb3f-ba88ce0d16cf_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!iSS9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45aacbef-8c80-4e59-bb3f-ba88ce0d16cf_2400x1254.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iSS9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45aacbef-8c80-4e59-bb3f-ba88ce0d16cf_2400x1254.jpeg" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/45aacbef-8c80-4e59-bb3f-ba88ce0d16cf_2400x1254.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:63148,&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_!iSS9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45aacbef-8c80-4e59-bb3f-ba88ce0d16cf_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!iSS9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45aacbef-8c80-4e59-bb3f-ba88ce0d16cf_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!iSS9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45aacbef-8c80-4e59-bb3f-ba88ce0d16cf_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!iSS9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45aacbef-8c80-4e59-bb3f-ba88ce0d16cf_2400x1254.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><figcaption class="image-caption"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>Meteorologists predict the weather by plugging information about what the weather is now &#8212; temperature, humidity, air pressure, etc. &#8212; into carefully designed physics equations that calculate what the weather will be in the future. This approach is called <em>numerical weather prediction</em> (NWP), and it&#8217;s used by the gold-standard NWP method called high resolution forecast (HRES). Despite how truly incredible NWP methods are, they&#8217;re not perfect. I&#8217;m not an NWP expert, but I would guess that tiny errors in weather measurements or slight differences between the equations&#8217; model and the real-world might be some examples of NWP&#8217;s limitations.</p><p>The Google DeepMind researchers think that AI-based methods may be suitable here, since they might be able to learn the complicated relationship between past and future weather observations. So the researchers designed GraphCast, a model that uses a <em>graph neural network</em> (GNN) to model weather. GNNs are actually quite similar to the common Transformer neural network architecture. The &#8220;graph&#8221; part of GNN refers to how information can flow between different parts of the NN. In a Transformer, the &#8220;graph&#8221; encodes the idea that the observed tokens affect future ones, whereas GraphCast encodes the idea that the weather at a particular location affects the weather at nearby locations. The researchers use an <em>icosahedral mesh</em> &#8212; a sphere-like structure composed of triangles &#8212; to represent the state of the weather around the globe. They actually use several mesh levels, as shown below. (I&#8217;ll explain how these levels are used shortly).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0O6Y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf67aa1a-fff1-407e-b580-b86b64e5d159_1546x418.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0O6Y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf67aa1a-fff1-407e-b580-b86b64e5d159_1546x418.png 424w, https://substackcdn.com/image/fetch/$s_!0O6Y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf67aa1a-fff1-407e-b580-b86b64e5d159_1546x418.png 848w, https://substackcdn.com/image/fetch/$s_!0O6Y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf67aa1a-fff1-407e-b580-b86b64e5d159_1546x418.png 1272w, https://substackcdn.com/image/fetch/$s_!0O6Y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf67aa1a-fff1-407e-b580-b86b64e5d159_1546x418.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0O6Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf67aa1a-fff1-407e-b580-b86b64e5d159_1546x418.png" width="1456" height="394" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bf67aa1a-fff1-407e-b580-b86b64e5d159_1546x418.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:394,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!0O6Y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf67aa1a-fff1-407e-b580-b86b64e5d159_1546x418.png 424w, https://substackcdn.com/image/fetch/$s_!0O6Y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf67aa1a-fff1-407e-b580-b86b64e5d159_1546x418.png 848w, https://substackcdn.com/image/fetch/$s_!0O6Y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf67aa1a-fff1-407e-b580-b86b64e5d159_1546x418.png 1272w, https://substackcdn.com/image/fetch/$s_!0O6Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf67aa1a-fff1-407e-b580-b86b64e5d159_1546x418.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>At each node or vertex, and at each edge in this mesh are some weights, just like in a regular neural network. As you can see in the figure above, the information at each node can be &#8220;passed&#8221;&nbsp; to neighboring nodes. This is where the different scales come in: they help pass information at different distances. GraphCast uses seven mesh levels, with the coarsest (M0) containing 12 vertices and the finest (M6) containing 40,962. The learned message-passing over the different meshes&#8217; edges happens simultaneously, so that each node is updated by all of its incoming edges, as depicted by the blue arrows in the figure.</p><p>You might be wondering, &#8220;Why don&#8217;t they just use a square grid, like latitude and longitude, and pass messages along this grid?&#8221; I can think of two key advantages of the mesh approach. First, nodes on an icosahedral mesh have five neighbors, whereas nodes in a square grid only have four &#8212; so more information gets shared. But, more importantly, the nodes on the icosahedral mesh are equally spaced around the globe. On a latitude and longitude grid some nodes are closer together because the lines of latitude converge at the poles, causing the grid cells to become smaller and more distorted as you move away from the equator.&nbsp;</p><p>This fancy neural network with its graph and icosahedrons is really cool, but it isn&#8217;t all for show. GraphCast works in three steps: First, an encoder maps information about the current state of the weather on a typical longitude/latitude grid onto nodes in the mesh. (This info consists of five Earth-surface variables &#8212; including temperature, wind speed and direction, and mean sea-level pressure &#8212; and six atmospheric variables at each of 37 levels of altitude, including humidity, wind speed and direction, and temperature.) Then, GraphCast processes information on the mesh using the message-passing technique we just discussed. Finally, GraphCast predicts what the surface and atmospheric information will be 6 hours later. Here&#8217;s what this process looks 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_!yoQS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94748f53-fbf2-4c6f-969b-3d5fe7bd3335_1600x490.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yoQS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94748f53-fbf2-4c6f-969b-3d5fe7bd3335_1600x490.png 424w, https://substackcdn.com/image/fetch/$s_!yoQS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94748f53-fbf2-4c6f-969b-3d5fe7bd3335_1600x490.png 848w, https://substackcdn.com/image/fetch/$s_!yoQS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94748f53-fbf2-4c6f-969b-3d5fe7bd3335_1600x490.png 1272w, https://substackcdn.com/image/fetch/$s_!yoQS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94748f53-fbf2-4c6f-969b-3d5fe7bd3335_1600x490.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yoQS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94748f53-fbf2-4c6f-969b-3d5fe7bd3335_1600x490.png" width="1456" height="446" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/94748f53-fbf2-4c6f-969b-3d5fe7bd3335_1600x490.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:446,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!yoQS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94748f53-fbf2-4c6f-969b-3d5fe7bd3335_1600x490.png 424w, https://substackcdn.com/image/fetch/$s_!yoQS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94748f53-fbf2-4c6f-969b-3d5fe7bd3335_1600x490.png 848w, https://substackcdn.com/image/fetch/$s_!yoQS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94748f53-fbf2-4c6f-969b-3d5fe7bd3335_1600x490.png 1272w, https://substackcdn.com/image/fetch/$s_!yoQS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94748f53-fbf2-4c6f-969b-3d5fe7bd3335_1600x490.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 train GraphCast, the researchers used a dataset called the ERA5 reanalysis archive. It contains decades of historical global weather maps, which are derived from vast amounts of historical weather observations that have been combined by the European Centre for Medium-Range Weather Forecasts (ECMWF) using traditional NWP. Using a bit of the data that describes what the weather was at a given time in history, and another bit from 6 hours prior, GraphCast learned to minimize the mean squared error of the weather 6 hours into the future. To predict the weather more than 6 hours into the future, the model&#8217;s output can be autoregressively fed back into itself, but the results become less reliable the more this is done.</p><p>The Google researchers say that GraphCast is more accurate than the gold-standard NWP methods used today, but in their <a href="https://deepmind.google/discover/blog/graphcast-ai-model-for-faster-and-more-accurate-global-weather-forecasting/">press release</a> they shared a great example of how a difference in weather prediction accuracy can have a real-world impact. In September of last year, Hurricane Lee made landfall in Nova Scotia. GraphCast predicted that this would happen 9 days before it did, while the best NWP systems couldn&#8217;t confidently say where Lee would make landfall until 6 days prior. I think that&#8217;s both quite an impressive feat, and also quite a meaningful difference!</p><p>The researchers have open-sourced GraphCast&#8217;s code, which <a href="https://github.com/google-deepmind/graphcast">you can read for yourself</a> if you&#8217;re so inclined. Also, the ECMWF are running and publishing weather predictions from GraphCast in <a href="https://charts.ecmwf.int/products/graphcast_medium-mslp-wind850">an experimental section of their website</a>. On that web page, it says that GraphCast&#8217;s resolution (0.25&#176;) isn&#8217;t fine enough to pick up on some details, and that the model doesn&#8217;t predict all the weather variables that might be of interest. Despite this, it&#8217;s great to see official groups like the ECMWF take research like this seriously. It&#8217;s amazing to think that such research&nbsp; can have a meaningful impact on our everyday lives.&nbsp;</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[AI is solving international-level math competition problems]]></title><description><![CDATA[[Article: AI achieves silver-medal standard solving International Mathematical Olympiad problems]]]></description><link>https://learnandburn.ai/p/ai-is-solving-international-level</link><guid isPermaLink="false">https://learnandburn.ai/p/ai-is-solving-international-level</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Fri, 09 Aug 2024 12:12:52 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!pClv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfce3ab5-dc51-43f5-8675-7a9b220deb64_2400x1254.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Adrian Wilkins-Caruana</strong></h5><p>[<a href="https://deepmind.google/discover/blog/ai-solves-imo-problems-at-silver-medal-level/">The original DeepMind article</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_!pClv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfce3ab5-dc51-43f5-8675-7a9b220deb64_2400x1254.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pClv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfce3ab5-dc51-43f5-8675-7a9b220deb64_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!pClv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfce3ab5-dc51-43f5-8675-7a9b220deb64_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!pClv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfce3ab5-dc51-43f5-8675-7a9b220deb64_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!pClv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfce3ab5-dc51-43f5-8675-7a9b220deb64_2400x1254.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pClv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfce3ab5-dc51-43f5-8675-7a9b220deb64_2400x1254.jpeg" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cfce3ab5-dc51-43f5-8675-7a9b220deb64_2400x1254.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:130599,&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_!pClv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfce3ab5-dc51-43f5-8675-7a9b220deb64_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!pClv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfce3ab5-dc51-43f5-8675-7a9b220deb64_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!pClv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfce3ab5-dc51-43f5-8675-7a9b220deb64_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!pClv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfce3ab5-dc51-43f5-8675-7a9b220deb64_2400x1254.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><figcaption class="image-caption"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>The International Math Olympiad (IMO) is an annual competition where rising stars in mathematics represent their country in a test of their abilities. One of the contestants in this year&#8217;s IMO was a peculiar stateless entrant, backed by the folks at Google DeepMind. The entry consisted of the joint efforts of two AI systems: AlphaProof and AlphaGeometry 2. The system scored a total of 28 out of 42 points, or, put another way, it got perfect scores on the four (out of six) problems it managed to solve, and none for the others. It placed 58th out of 609 contestants, which this year equated to a silver medal.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!74tP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4582768-10ea-4de5-a4f2-867975059ca5_1510x1378.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!74tP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4582768-10ea-4de5-a4f2-867975059ca5_1510x1378.png 424w, https://substackcdn.com/image/fetch/$s_!74tP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4582768-10ea-4de5-a4f2-867975059ca5_1510x1378.png 848w, https://substackcdn.com/image/fetch/$s_!74tP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4582768-10ea-4de5-a4f2-867975059ca5_1510x1378.png 1272w, https://substackcdn.com/image/fetch/$s_!74tP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4582768-10ea-4de5-a4f2-867975059ca5_1510x1378.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!74tP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4582768-10ea-4de5-a4f2-867975059ca5_1510x1378.png" width="1456" height="1329" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a4582768-10ea-4de5-a4f2-867975059ca5_1510x1378.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1329,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!74tP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4582768-10ea-4de5-a4f2-867975059ca5_1510x1378.png 424w, https://substackcdn.com/image/fetch/$s_!74tP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4582768-10ea-4de5-a4f2-867975059ca5_1510x1378.png 848w, https://substackcdn.com/image/fetch/$s_!74tP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4582768-10ea-4de5-a4f2-867975059ca5_1510x1378.png 1272w, https://substackcdn.com/image/fetch/$s_!74tP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4582768-10ea-4de5-a4f2-867975059ca5_1510x1378.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>First, some groundwork: Regular human contestants have just two 4.5-hour blocks to submit solutions, but Google DeepMind&#8217;s systems took longer than that. AlphaGeometry 2 solved one problem within minutes, but AlphaProof took <em>three days</em> to solve two algebra problems and one number theory problem. The systems weren&#8217;t able to solve the other two problems, which covered combinatorics. So, this AI participant wasn&#8217;t <em>really</em> a contestant, but I don&#8217;t think that takes away from Google DeepMind&#8217;s achievement.&nbsp;</p><p>As its name suggests, AlphaProof proves mathematical statements, and it does this using a combination of two things. The first is a software tool called <em>Lean</em>, which verifies whether a proof of a mathematical statement is correct. Proving something in Lean is kind of like finding a path from your house to the grocery store. The proof itself is a series of <em>moves</em> or <em>proof steps</em>, like &#8220;turn left&#8221; and &#8220;stay on Biscayne.&#8221; Lean checks each step to make sure it's valid, which is important because, depending on the state of the problem, not all moves are valid. The second part of AlphaProof is AlphaZero, which is the same path-finding AI that Google DeepMind previously used to master chess, shogi, and Go, and it works in much the same way as AlphaProof: by evaluating which paths show promise.&nbsp;</p><p>But doing mathematical proofs is quite different from playing chess or Go. The researchers needed to train the system on the types of problems that AlphaProof would encounter in the IMO. So they fine-tuned a Gemini LLM to translate natural language problem statements into formal ones. Then, using a dataset of ~100k formal problem statements, the researchers trained AlphaProof to prove or disprove them by searching over possible proof steps (i.e., <em>moves</em>) using Lean. When Lean says that the series of steps satisfies the original problem statement, it&#8217;s done! Each proof that AlphaProof finds reinforces it, enhancing its ability to solve problems. The figure below shows this process.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DsWL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaf32930-7fc3-4fc7-b63e-97f82f2d3ce9_1600x523.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DsWL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaf32930-7fc3-4fc7-b63e-97f82f2d3ce9_1600x523.png 424w, https://substackcdn.com/image/fetch/$s_!DsWL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaf32930-7fc3-4fc7-b63e-97f82f2d3ce9_1600x523.png 848w, https://substackcdn.com/image/fetch/$s_!DsWL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaf32930-7fc3-4fc7-b63e-97f82f2d3ce9_1600x523.png 1272w, https://substackcdn.com/image/fetch/$s_!DsWL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaf32930-7fc3-4fc7-b63e-97f82f2d3ce9_1600x523.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DsWL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaf32930-7fc3-4fc7-b63e-97f82f2d3ce9_1600x523.png" width="1456" height="476" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aaf32930-7fc3-4fc7-b63e-97f82f2d3ce9_1600x523.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:476,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!DsWL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaf32930-7fc3-4fc7-b63e-97f82f2d3ce9_1600x523.png 424w, https://substackcdn.com/image/fetch/$s_!DsWL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaf32930-7fc3-4fc7-b63e-97f82f2d3ce9_1600x523.png 848w, https://substackcdn.com/image/fetch/$s_!DsWL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaf32930-7fc3-4fc7-b63e-97f82f2d3ce9_1600x523.png 1272w, https://substackcdn.com/image/fetch/$s_!DsWL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaf32930-7fc3-4fc7-b63e-97f82f2d3ce9_1600x523.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>AlphaGeometry 2 takes a slightly different approach. The Google DeepMind researchers describe it as a &#8220;neuro-symbolic&#8221; hybrid system since it uses a language model (based on Gemini) and a symbolic engine. This approach starts by representing the geometric problem as a graph (or network) of geometric symbols (e.g., a point, line, angle, circle, segment, etc.). Then, a language model suggests some next steps (e.g., construct D: midpoint BC). Next, using some primitive geometric relationships like the behavior of parallel lines or midpoints, the symbolic engine searches over possible next steps (kind of like AlphaZero) to see if it can reach the goal of the proof. For instance, in the example below, the language model suggests a construction that helps prove that the triangle is isosceles where, in the right frame, the first blue statement represents the construction, and the subsequent ones represent the subsequent symbolic deductions.&nbsp;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WX5g!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b36210c-bf36-48a4-a55b-cd7ceca205e8_1600x405.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WX5g!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b36210c-bf36-48a4-a55b-cd7ceca205e8_1600x405.png 424w, https://substackcdn.com/image/fetch/$s_!WX5g!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b36210c-bf36-48a4-a55b-cd7ceca205e8_1600x405.png 848w, https://substackcdn.com/image/fetch/$s_!WX5g!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b36210c-bf36-48a4-a55b-cd7ceca205e8_1600x405.png 1272w, https://substackcdn.com/image/fetch/$s_!WX5g!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b36210c-bf36-48a4-a55b-cd7ceca205e8_1600x405.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WX5g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b36210c-bf36-48a4-a55b-cd7ceca205e8_1600x405.png" width="1456" height="369" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3b36210c-bf36-48a4-a55b-cd7ceca205e8_1600x405.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:369,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!WX5g!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b36210c-bf36-48a4-a55b-cd7ceca205e8_1600x405.png 424w, https://substackcdn.com/image/fetch/$s_!WX5g!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b36210c-bf36-48a4-a55b-cd7ceca205e8_1600x405.png 848w, https://substackcdn.com/image/fetch/$s_!WX5g!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b36210c-bf36-48a4-a55b-cd7ceca205e8_1600x405.png 1272w, https://substackcdn.com/image/fetch/$s_!WX5g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b36210c-bf36-48a4-a55b-cd7ceca205e8_1600x405.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>TWIST! What I described just above was actually AlphaGeometry (the original, which was announced in January 2024), not its successor. AlphaGeometry 2 includes three main enhancements that help it solve much more challenging problems:</p><ul><li><p>It&#8217;s trained on an order of magnitude more synthetic data.</p></li><li><p>Its symbolic engine is two orders of magnitude faster, allowing it to expand its search for solutions.</p></li><li><p>It uses a novel <em>knowledge sharing</em> mechanism, which lets the deduction engine share information from disparate steps/constructions and their subsequent deductions, and &#8212; if helpful &#8212; combine these disparate steps.&nbsp;</p></li></ul><p>When I was studying math in school, I often found myself using <a href="https://www.wolframalpha.com/">WolframAlpha</a> to check my answers or my work. I see Google DeepMind&#8217;s system as an extension of this idea, where mathematicians can use tools like this to help them solve and verify solutions to problems. To some extent, this is already happening!&nbsp;</p><p>This year, Australian mathematician Terrence Tao <a href="https://www.youtube.com/watch?v=AayZuuDDKP0">presented a talk on &#8220;machine assisted proofs,&#8221;</a> where he said that he suspects it&#8217;s ~20x harder to write formal proofs (ones computers can verify) than informal ones (ones that mathematicians write, publish, and peer-review). However, he also said that AI integration could change this, potentially tipping the balance in favor of formal proofs, which would have a dramatic impact on the field of mathematics. If we extrapolate the rate of progress made by AlphaGeometry over this year alone, it seems that the balance is definitely shifting, and potentially quite rapidly.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[How to use LLMs with spreadsheets]]></title><description><![CDATA[[Paper: SPREADSHEETLLM: Encoding Spreadsheets for Large Language Models]]></description><link>https://learnandburn.ai/p/how-to-use-llms-with-spreadsheets</link><guid isPermaLink="false">https://learnandburn.ai/p/how-to-use-llms-with-spreadsheets</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Fri, 02 Aug 2024 12:22:09 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!J_i_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0698c291-6f2a-42c7-8716-1f430427083d_2400x1254.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Adrian Wilkins-Caruana</strong></h5><p>[<a href="https://arxiv.org/pdf/2407.09025">pdf of the paper</a>]</p><p>When I hear people say &#8220;AI is going to take all our jobs,&#8221; what I think they mean is that LLMs like ChatGPT will automate more and more tasks to the point where many tasks don&#8217;t require a human anymore. There&#8217;s a bit of hand-waving involved in that inference, but I think it&#8217;s pretty fair. But LLMs are just text generators, and most jobs involve more than just pressing keys on a keyboard. So, how can we use LLMs to, say, automate a job that involves manipulating spreadsheets? How would it read the spreadsheet, let alone use it to answer questions about the data? Today&#8217;s summary is about a new method that lets an LLM do exactly that.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!J_i_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0698c291-6f2a-42c7-8716-1f430427083d_2400x1254.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!J_i_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0698c291-6f2a-42c7-8716-1f430427083d_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!J_i_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0698c291-6f2a-42c7-8716-1f430427083d_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!J_i_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0698c291-6f2a-42c7-8716-1f430427083d_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!J_i_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0698c291-6f2a-42c7-8716-1f430427083d_2400x1254.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!J_i_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0698c291-6f2a-42c7-8716-1f430427083d_2400x1254.jpeg" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0698c291-6f2a-42c7-8716-1f430427083d_2400x1254.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:271514,&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_!J_i_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0698c291-6f2a-42c7-8716-1f430427083d_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!J_i_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0698c291-6f2a-42c7-8716-1f430427083d_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!J_i_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0698c291-6f2a-42c7-8716-1f430427083d_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!J_i_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0698c291-6f2a-42c7-8716-1f430427083d_2400x1254.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><figcaption class="image-caption"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>Let&#8217;s pretend that <em>we</em> are AI engineers and our job is to make an LLM manipulate a spreadsheet. How might we do this? One way might be to describe each cell using text. Let&#8217;s use this approach to describe a very important spreadsheet of mine:&nbsp;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!z8H2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b39a50-2c9d-4c83-a843-3d976468017a_952x326.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!z8H2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b39a50-2c9d-4c83-a843-3d976468017a_952x326.png 424w, https://substackcdn.com/image/fetch/$s_!z8H2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b39a50-2c9d-4c83-a843-3d976468017a_952x326.png 848w, https://substackcdn.com/image/fetch/$s_!z8H2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b39a50-2c9d-4c83-a843-3d976468017a_952x326.png 1272w, https://substackcdn.com/image/fetch/$s_!z8H2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b39a50-2c9d-4c83-a843-3d976468017a_952x326.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!z8H2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b39a50-2c9d-4c83-a843-3d976468017a_952x326.png" width="952" height="326" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c9b39a50-2c9d-4c83-a843-3d976468017a_952x326.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:326,&quot;width&quot;:952,&quot;resizeWidth&quot;:null,&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_!z8H2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b39a50-2c9d-4c83-a843-3d976468017a_952x326.png 424w, https://substackcdn.com/image/fetch/$s_!z8H2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b39a50-2c9d-4c83-a843-3d976468017a_952x326.png 848w, https://substackcdn.com/image/fetch/$s_!z8H2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b39a50-2c9d-4c83-a843-3d976468017a_952x326.png 1272w, https://substackcdn.com/image/fetch/$s_!z8H2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9b39a50-2c9d-4c83-a843-3d976468017a_952x326.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>We can describe this spreadsheet like this:</p><p><em>The following text describes a spreadsheet for tracking foods and their ratings. Here&#8217;s the data:</em></p><ul><li><p><em>Cell A1. Text: &#8220;Food&#8221;. Formula: None. Formatting: Bold, and centered.&nbsp;</em></p></li><li><p><em>Cell A2. Text: &#8220;Ice cream&#8221;. Formula: None. Formatting: None.&nbsp;</em></p></li><li><p><em>Cell A3. Text: &#8220;Milk &amp; cookies&#8221;. Formula: None. Formatting: None.&nbsp;</em></p></li><li><p>&#8230;</p></li></ul><p>We could then ask the LLM to do some work for us, like &#8220;Please tell me how to calculate the average rating,&#8221; and it might say:</p><p><code>Cell B6. Text: None. Formula: "=Average(C2:C5)". Formatting: "Numeric, two decimal places"</code>.</p><p>There are, however, two main issues with this naive approach and others like it: It&#8217;s unnecessarily verbose, and its index-first structure isn&#8217;t ideal for an LLM. The next bit of this summary explores some clever techniques &#8212; developed by Microsoft researchers &#8212; to fix these problems.&nbsp;</p><p>When you make a spreadsheet, do you use whitespace/empty cells to delineate particular tables or separate different kinds of info? So do I! But it turns out that this whitespace is really unhelpful for an LLM, since it adds a lot of useless, distracting information to a text-encoded spreadsheet. So the researchers came up with a technique called <em>structural anchors,</em> a heuristic-based algorithm that essentially draws boxes around useful information in a spreadsheet. The method then extracts the cells inside these anchors (and a little bit outside the anchors, just in case the structure isn&#8217;t perfect), and remaps the addresses so that they make sense without the whitespace.&nbsp;</p><p>Continuing on the theme of &#8220;things about spreadsheets that humans like but LLMs don&#8217;t&#8221; are the 2d matrix format, our repetition of some values (e.g., &#8220;Dessert&#8221; in my spreadsheet), and that we sometimes scatter useful bits of info at seemingly random places. The researchers found that LLMs, being the language-lovers that they are, much prefer a dictionary-like format. So, the researchers created an inverse index&#8211;based translation method that flips a spreadsheet on its head. It uses the <em>values</em> of the cells as the primary keys, not the cell indexes. The dictionary values are lists of cell indexes, so the encoding can easily represent repeated values. My spreadsheet above might look like this:</p><pre><code><code>{
    &#8220;Food&#8221;: A1,
    &#8220;Category&#8221;: B1,
    &#8220;Rating&#8221;: C1,
    &#8220;Ice cream&#8221;: A2,
    &#8220;Dessert&#8221;: B2, B3,
    &#8220;9&#8221;: C2,
    ...
}</code></code></pre><p>The researchers realized one more way they could better represent the spreadsheet for an LLM. To understand this trick, keep in mind that spreadsheet-aware LLMs don&#8217;t actually have to do any computing on their own, because they can produce commands that are executed by the spreadsheet software. In other words, they simply ask the spreadsheet to perform the calculations, just as a human would. Because of this, the LLM doesn&#8217;t need to know the specific numeric values of the cells &#8212; it just needs to know what format they are (for example, an integer). So the encoding can represent numeric cells &#8212; like integers, floating point numbers, percentages, dates, etc. &#8212; using some text that describes their format. In my example above, the encoding represents the Rating values in the dictionary format like this: <code>"IntNum: C2:C5"</code>.</p><p>Overall, these three tricks reduce the number of tokens needed to represent the spreadsheet by 25x compared to one of the naive encoding methods the researchers considered. They tested their approach on a Spreadsheet QA task, and found that regardless of which base LLM they used (e.g., Llama 3, Mistral 3, GPT-4, etc.), LLMs that use these techniques equalled or outperformed the existing spreadsheet analyzing technique, called TableSense-CNN. The GPT-4 model had the best F1 score on this benchmark, on average scoring 9% higher (76%) than TableSense-CNN (67%).&nbsp;</p><p>The researchers also conducted ablation experiments, individually excluding one of their three techniques (anchoring, inverse-index/dictionary encoding, and data type aggregation). While the first two techniques tended to improve the F1 scores with GPT-4, surprisingly, the last technique actually made the F1 scores slightly <em>worse;</em> the best score achieved on their benchmark was 79%, using GPT-4 without aggregation. The researchers hypothesize that this might be because the data types are a bit too abstract for the LLM. Nonetheless, they suggest that the aggregation could be necessary for some models that have a limited context length, since the aggregation reduces the number of tokens the model needs to represent the spreadsheet significantly.&nbsp;</p><p>I think it&#8217;s remarkable that an LLM can work with spreadsheets so well considering that spreadsheets are&nbsp; fundamentally designed for humans, not computers. It seems to me that a spreadsheet is really an unsuitable tool for an LLM to use for solving problems. Still, the techniques presented in this paper could be really helpful to humans when we use spreadsheet software. For example, we could use it to ask questions like &#8220;How can I forecast next month&#8217;s expenses?&#8221; or &#8220;When will we break even?&#8221; Given that this paper comes from Microsoft researchers, I&#8217;m sure that such features are coming to Excel soon!</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Physical neural networks]]></title><description><![CDATA[[Paper: Training of Physical Neural Networks]]]></description><link>https://learnandburn.ai/p/physical-neural-networks</link><guid isPermaLink="false">https://learnandburn.ai/p/physical-neural-networks</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Fri, 26 Jul 2024 12:05:06 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!hET6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff57f84a6-b262-41f5-b64e-d712db878098_2400x1254.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Adrian Wilkins-Caruana</strong></h5><p>[<a href="https://arxiv.org/pdf/2406.03372">pdf of the paper</a>]</p><p>In a 2007 essay called <em><a href="https://www.damninteresting.com/on-the-origin-of-circuits/">The Origin of Circuits</a></em>, Alan Bellows tells a fascinating story about an experiment that Dr. Adrian Thompson conducted in the 1990s. Thompson arranged a 10 x 10 array of logic gates (in a configuration now known as an FPGA) and tried to see if he could evolve a program encoded by these gates to reliably distinguish between signals of two different audio frequencies. With sophisticated logic configurations (like complicated signal processors), this was a trivial task at the time, but even though the array was so small, Thompson found that there were indeed logic configurations that could reliably detect these signals.&nbsp;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hET6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff57f84a6-b262-41f5-b64e-d712db878098_2400x1254.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hET6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff57f84a6-b262-41f5-b64e-d712db878098_2400x1254.png 424w, https://substackcdn.com/image/fetch/$s_!hET6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff57f84a6-b262-41f5-b64e-d712db878098_2400x1254.png 848w, https://substackcdn.com/image/fetch/$s_!hET6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff57f84a6-b262-41f5-b64e-d712db878098_2400x1254.png 1272w, https://substackcdn.com/image/fetch/$s_!hET6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff57f84a6-b262-41f5-b64e-d712db878098_2400x1254.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hET6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff57f84a6-b262-41f5-b64e-d712db878098_2400x1254.png" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f57f84a6-b262-41f5-b64e-d712db878098_2400x1254.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;:null,&quot;bytes&quot;:2357304,&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_!hET6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff57f84a6-b262-41f5-b64e-d712db878098_2400x1254.png 424w, https://substackcdn.com/image/fetch/$s_!hET6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff57f84a6-b262-41f5-b64e-d712db878098_2400x1254.png 848w, https://substackcdn.com/image/fetch/$s_!hET6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff57f84a6-b262-41f5-b64e-d712db878098_2400x1254.png 1272w, https://substackcdn.com/image/fetch/$s_!hET6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff57f84a6-b262-41f5-b64e-d712db878098_2400x1254.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"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>Aside from this main result, there are two other remarkable things about Thompson&#8217;s experiment. First, the logic configuration was updated iteratively in an evolutionary manner that&#8217;s quite similar to evolutionary machine learning algorithms. The other is that, upon investigating the most successful configuration, Thompson noticed a section of the array that was logically disconnected from the array&#8217;s output yet, without it, the array couldn&#8217;t reliably classify the signals. This means that the disconnected logic section was influencing the classification through some mechanism other than digital logic, and that the evolutionary algorithm seemed to account for the effects of this mechanism as it updated the program. (It turns out some of the logically-disconnected gates were influencing the voltage of other nearby gates via magnetic flux.) I highly recommend giving Bellows&#8217;s essay a read if you haven&#8217;t before.</p><p>With three decades of hindsight, we can see that Thompson&#8217;s array of logic gates was an example of a <em>physical neural network</em>, or PNN. PNNs are neural-like networks that aren&#8217;t built from silicon chips (though they could be) but instead from components that harness other physical phenomena, like light or sound. In a sense, PNNs offer an alternative paradigm of machine learning, one which isn&#8217;t necessarily constrained by the limitations of digital logic. That is to say, PNNs can let us harness various physical phenomena to solve problems with machine learning. Today&#8217;s summary explores training PNNs, i.e., the different ways that PNNs&#8217; parameters can be updated to solve particular problems.&nbsp;</p><p>Before exploring how PNNs are trained, let me quickly describe the concept of <em>back propagation</em> (BP), the workhorse of traditional, digital neural network training. When an NN makes a prediction (sometimes called a <em>forward pass</em>) and we know what that prediction should be, we can calculate the error in the network's prediction. We can then propagate the error backwards through the network (sometimes called a <em>backward pass</em>), updating the network&#8217;s parameters so that it's more likely to give a more accurate answer the next time it runs on similar inputs.</p><p>One way of training a PNN, called <em>in silico training</em>, mirrors BP quite closely. In silico training involves digitally simulating and optimizing physical parameters (&#952;) using a digital twin, which is an emulation of the physical hardware within a computer environment. Similar to BP in traditional neural networks, in silico training uses these digital models to compute gradients and update weights, which you can then apply to the physical system through some other process. This approach benefits from the rapid, cost-effective iteration and testing of PNN architectures, but it might not work well if the digital twin isn&#8217;t perfect. This means that the entire process is simulated, and the physical model is only given the learned weights at the end.</p><p>Another training approach, called <em>Physics-aware BP training</em> (PAT), is a hybrid of in situ (meaning not simulated) and in silico methods. In PAT, the physical system handles the forward pass, while the backward pass is performed by differentiating a digital model that is an approximation of the physical system. This means the info for the forward pass will still be precise while maintaining the versatility of performing the backward pass on a computer. You still need an accurate digital twin to effectively model the backward pass, and the larger and more complicated the PNN is, the harder it is to make an accurate model of it.</p><p>Both of the methods described above are, in a sense, cheating, since they aim to train PNNs using conventional digital NN techniques. But there&#8217;s good reason for this, since BP has been shown to be much more effective than other techniques for training digital NNs. But, as we&#8217;ve seen with in silico training and PAT, it can be hard to accurately back propagate error signals through a PNN. Are there any other ways? Here are two:</p><ul><li><p><strong>Feedback alignment (FA) </strong>is an alternative to BP whereby some of the terms in the weight-update algorithm of BP are replaced by random terms. This essentially transforms the update rule into a random walk in weight space. This means that, unlike BP, we don&#8217;t need to know exactly what the weights were in the forward pass to know how to update them.&nbsp;</p></li></ul><ul><li><p><strong>Physical local learning</strong> uses a concept called <em>local learning</em> to train the weights in each block or layer independently (i.e., without any BP). There are lots of different ways that local learning could be achieved, but they typically all try to define some objective function using the layer&#8217;s activations, one that indicates whether the activations are doing something useful, like compression or providing useful information for the next layer/block. Geoffery Hinton&#8217;s forward-forward technique is one example of local learning, and <a href="https://arxiv.org/abs/2212.13345">one study</a> has already used it&nbsp; to train an optical NN with a contrastive-based approach.</p></li></ul><p>These methods aren&#8217;t quite as effective as BP, though, so other studies try to reproduce BP without the need for a physical twin; they essentially encode the BP algorithm directly into the physical system. For this to work, the system needs to utilize some physical process that&#8217;s a linear reciprocal function, i.e., a system that behaves like y = 1 / x (I&#8217;ve omitted the coefficients for simplicity). Two examples are waves propagating through a linear medium in a photonic system, or a peculiar electrical device called a memristor crossbar array. There are also other techniques for in situ training, such as a one called <em>continual learning</em> that updates the model&#8217;s parameters as it&#8217;s used.&nbsp;</p><p>At the end of their review, the authors arrived at three qualities that would be great for a PNN to have, although nothing meets all three (yet):</p><ul><li><p>They don&#8217;t depend on the model used.&nbsp;</p></li><li><p>They give a speed or efficiency advantage over regular NNs.&nbsp;</p></li><li><p>They are more resilient to noise.&nbsp;</p></li></ul><p>But a PNN doesn&#8217;t need to have all three of these qualities to be useful. It just means a bit more effort might need to go into developing them, since we can&#8217;t yet say for certain things like, &#8220;Oh, this particular learning algorithm works best for this kind of PNN or this kind of application.&#8221; Given the current pace of AI developments, the possibility of realizing all three at once could be on the horizon, which could open the doors to an entirely new domain of AI.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Predicting depth data from a single image]]></title><description><![CDATA[[Paper: Depth Anything V2]]]></description><link>https://learnandburn.ai/p/predicting-depth-data-from-a-single</link><guid isPermaLink="false">https://learnandburn.ai/p/predicting-depth-data-from-a-single</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Fri, 19 Jul 2024 11:05:40 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!nBOA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff40876eb-bb6f-4160-b13f-0ff180b87b0c_2400x1254.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Adrian Wilkins-Caruana</strong></h5><p>[<a href="https://arxiv.org/pdf/2406.09414">pdf of the paper</a>]</p><p>Last week we discussed a new method for resolving the 3d structure of a scene from two perspectives or photos of it. I mentioned how our brains can do this too, using the images from each of our eyes to perceive things in 3d. But what if you close one eye; do you lose your ability to see in 3d? The answer is a resounding &#8220;No!&#8221; Our brains can still perceive a lot of 3d info from a single, unmoving image. In fact, we do this all the time when we look at photos and use things like occlusions and shadows to infer depth and scale. This is why we find optical illusions like the Penrose Triangle perplexing.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nBOA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff40876eb-bb6f-4160-b13f-0ff180b87b0c_2400x1254.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nBOA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff40876eb-bb6f-4160-b13f-0ff180b87b0c_2400x1254.png 424w, https://substackcdn.com/image/fetch/$s_!nBOA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff40876eb-bb6f-4160-b13f-0ff180b87b0c_2400x1254.png 848w, https://substackcdn.com/image/fetch/$s_!nBOA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff40876eb-bb6f-4160-b13f-0ff180b87b0c_2400x1254.png 1272w, https://substackcdn.com/image/fetch/$s_!nBOA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff40876eb-bb6f-4160-b13f-0ff180b87b0c_2400x1254.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nBOA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff40876eb-bb6f-4160-b13f-0ff180b87b0c_2400x1254.png" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f40876eb-bb6f-4160-b13f-0ff180b87b0c_2400x1254.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;:null,&quot;bytes&quot;:973455,&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_!nBOA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff40876eb-bb6f-4160-b13f-0ff180b87b0c_2400x1254.png 424w, https://substackcdn.com/image/fetch/$s_!nBOA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff40876eb-bb6f-4160-b13f-0ff180b87b0c_2400x1254.png 848w, https://substackcdn.com/image/fetch/$s_!nBOA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff40876eb-bb6f-4160-b13f-0ff180b87b0c_2400x1254.png 1272w, https://substackcdn.com/image/fetch/$s_!nBOA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff40876eb-bb6f-4160-b13f-0ff180b87b0c_2400x1254.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"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>If our brains can perceive the depth of objects using information in an image, then computers probably can, too. This process, known as monocular depth estimation (MDE), has been an active area of machine learning research for some time now. Before discussing that research, let&#8217;s learn a bit more about MDE. The figure below shows relative depth estimates on some images predicted by a model called Depth Anything V2. The redness/blueness of the results indicate parts of the image that are closest/farthest from the camera, respectively.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!T9rm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3322e180-b207-45a2-a9cc-11473f147b36_1600x1068.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!T9rm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3322e180-b207-45a2-a9cc-11473f147b36_1600x1068.png 424w, https://substackcdn.com/image/fetch/$s_!T9rm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3322e180-b207-45a2-a9cc-11473f147b36_1600x1068.png 848w, https://substackcdn.com/image/fetch/$s_!T9rm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3322e180-b207-45a2-a9cc-11473f147b36_1600x1068.png 1272w, https://substackcdn.com/image/fetch/$s_!T9rm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3322e180-b207-45a2-a9cc-11473f147b36_1600x1068.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!T9rm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3322e180-b207-45a2-a9cc-11473f147b36_1600x1068.png" width="1456" height="972" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3322e180-b207-45a2-a9cc-11473f147b36_1600x1068.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:972,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!T9rm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3322e180-b207-45a2-a9cc-11473f147b36_1600x1068.png 424w, https://substackcdn.com/image/fetch/$s_!T9rm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3322e180-b207-45a2-a9cc-11473f147b36_1600x1068.png 848w, https://substackcdn.com/image/fetch/$s_!T9rm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3322e180-b207-45a2-a9cc-11473f147b36_1600x1068.png 1272w, https://substackcdn.com/image/fetch/$s_!T9rm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3322e180-b207-45a2-a9cc-11473f147b36_1600x1068.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>Depth Anything V2 is an impressive model. But the story of its success isn&#8217;t just &#8220;more data&#8221; or &#8220;bigger model.&#8221; To appreciate it, we first need to review how we got here:</p><ul><li><p><a href="https://arxiv.org/pdf/1907.01341">MiDaS</a> is an impressive MDE method that broke onto the scene in 2020. It predicts the relative depth of pixels in an image, and was trained using supervised learning on a dataset of over a million images with depth labels. When it was released, it was the state of the art for MDE.</p></li><li><p>The MiDaS team made incremental improvements, and its third iteration was the state of the art until this year. Despite its success, it struggles to predict depth on images that are different from its training data (that is, zero-shot prediction).</p></li><li><p>In January, the researchers behind Depth Anything V2 released <a href="https://arxiv.org/pdf/2401.10891v1">Depth Anything</a> (V1). While this model introduced several innovations to help zero-shot generalization (like augmentation and a special loss term), its real innovation &#8212; and the one that ultimately helped improve its zero-shot generalization &#8212;&nbsp;was its use of <em>unlabeled</em> training images. (I&#8217;ll explain how this is possible shortly!)</p></li><li><p>Finally, we now have Depth Anything V2 a short six months after V1. In terms of data, V2 took a drastic approach, ditching labeled data entirely for synthetic data! As we&#8217;ll see, it improves upon V1 in a number of ways, including fine-grained details, accuracy, and its ability to not be fooled by confusing surfaces like windows and mirrors.</p></li></ul><p>From this MDE timeline, it&#8217;s clear that training data has played a pivotal role in MDE iteration. If you think about this for a moment, it kind of makes sense. The depth &#8220;labels&#8221; &#8212;&nbsp;which are generated from a number of depth-sensing sources like RGBD cameras (yep, the &#8220;D&#8221; is for &#8220;depth&#8221;) or LIDAR &#8212;&nbsp;can have a lot of issues, like not being as high-resolution as their corresponding image, or they might be noisy or just not very accurate. So MDE models trained on this data will be fundamentally limited by it.&nbsp;</p><p>In Depth Anything V1, the researchers came up with a way to use unlabeled images (i.e., regular images) as training data. To do this, they first trained the best model they could on the labeled dataset, then used this model to predict the depth on unlabeled images, and used these predictions as <em>pseudo labels</em>. This is called a student-teacher approach, where the big model trained on the labeled data is the teacher, and its knowledge (i.e., predictions) are used to teach the student model, which is nice to have because it&#8217;s much smaller (and so more convenient to work with) than the teacher model. The reason I&#8217;m taking time to specifically mention this aspect of V1 (and not any of the other clever tricks they invented) is because it&#8217;s crucial for V2. The figure below shows a rough schematic of the student-teacher process, where the solid lines indicate the flow of labeled data/images, and dashed lines represent the flow for unlabeled ones. (The &#8220;semantic preservation&#8221; is one of the tricks I mentioned, and it prevents the encoder from varying too much from when it was trained on labeled data).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6w7U!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e241d9-fd49-48a6-9044-343e2eaefc7c_1600x426.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6w7U!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e241d9-fd49-48a6-9044-343e2eaefc7c_1600x426.png 424w, https://substackcdn.com/image/fetch/$s_!6w7U!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e241d9-fd49-48a6-9044-343e2eaefc7c_1600x426.png 848w, https://substackcdn.com/image/fetch/$s_!6w7U!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e241d9-fd49-48a6-9044-343e2eaefc7c_1600x426.png 1272w, https://substackcdn.com/image/fetch/$s_!6w7U!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e241d9-fd49-48a6-9044-343e2eaefc7c_1600x426.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6w7U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e241d9-fd49-48a6-9044-343e2eaefc7c_1600x426.png" width="1456" height="388" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d1e241d9-fd49-48a6-9044-343e2eaefc7c_1600x426.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:388,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!6w7U!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e241d9-fd49-48a6-9044-343e2eaefc7c_1600x426.png 424w, https://substackcdn.com/image/fetch/$s_!6w7U!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e241d9-fd49-48a6-9044-343e2eaefc7c_1600x426.png 848w, https://substackcdn.com/image/fetch/$s_!6w7U!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e241d9-fd49-48a6-9044-343e2eaefc7c_1600x426.png 1272w, https://substackcdn.com/image/fetch/$s_!6w7U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e241d9-fd49-48a6-9044-343e2eaefc7c_1600x426.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>So, Depth Anything V1 used unlabeled data to address the zero-shot generalization problem of MiDaS. V2 goes further to improve the accuracy and robustness of the predictions by extensively using synthetic data, which you can think of as renderings of 3d scenes &#8212;&nbsp;like from a video game &#8212;&nbsp;where the depth can be measured using the information in the 3d model. While it sounds insane, the choice to completely ditch labeled data actually makes a lot of sense. If the labeled data isn&#8217;t accurate enough, just replace it with highly accurate synthetic data, right? Well, there are two very good reasons <em>not</em> to do this: Synthetic data is typically quite different from and far less diverse than real imagery. So there&#8217;s a large domain shift between synthetic and real data. But combining synthetic data with both the student-teacher approach and unlabeled real images alleviated these two problems and yielded a model that&#8217;s both accurate and has good zero-shot generalization.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!F_PJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F222921f2-4122-4ab9-87ae-33548781d0e7_1600x462.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!F_PJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F222921f2-4122-4ab9-87ae-33548781d0e7_1600x462.png 424w, https://substackcdn.com/image/fetch/$s_!F_PJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F222921f2-4122-4ab9-87ae-33548781d0e7_1600x462.png 848w, https://substackcdn.com/image/fetch/$s_!F_PJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F222921f2-4122-4ab9-87ae-33548781d0e7_1600x462.png 1272w, https://substackcdn.com/image/fetch/$s_!F_PJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F222921f2-4122-4ab9-87ae-33548781d0e7_1600x462.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!F_PJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F222921f2-4122-4ab9-87ae-33548781d0e7_1600x462.png" width="1456" height="420" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/222921f2-4122-4ab9-87ae-33548781d0e7_1600x462.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:420,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!F_PJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F222921f2-4122-4ab9-87ae-33548781d0e7_1600x462.png 424w, https://substackcdn.com/image/fetch/$s_!F_PJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F222921f2-4122-4ab9-87ae-33548781d0e7_1600x462.png 848w, https://substackcdn.com/image/fetch/$s_!F_PJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F222921f2-4122-4ab9-87ae-33548781d0e7_1600x462.png 1272w, https://substackcdn.com/image/fetch/$s_!F_PJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F222921f2-4122-4ab9-87ae-33548781d0e7_1600x462.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 think the best way to demonstrate why using only synthetic data is so helpful is to take another look at the pictures of the bridge and the room above. In the bridge image, there's a lot of fine-grained detail that a depth sensor might not be able to capture. And, in the room image, notice how the depth indicates the window, not the objects that you can see through the window. This is the kind of depth detail that&#8217;s really difficult to accurately capture in the real world.</p><p>&#8220;But Adrian!&#8221; I hear you screaming, &#8220;Surely there must be <em>some</em> value in all that labeled data.&#8221; Well, the Depth Anything V2 authors thought that too. So, when training the student with the pseudo labels on unlabeled images, they tried including a little bit of labeled data &#8212; the highest-quality labeled data they had. But they found that mixing in just 5% labeled data (keeping 95% synthetic) seemed to harm performance, particularly for fine-grained details. You might need to squint, but the figure below shows that the model that used synthetic data only (middle column) is definitely superior.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!94Eq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f87cfb7-ee9a-4e8b-a463-382d03e29434_1600x1111.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!94Eq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f87cfb7-ee9a-4e8b-a463-382d03e29434_1600x1111.png 424w, https://substackcdn.com/image/fetch/$s_!94Eq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f87cfb7-ee9a-4e8b-a463-382d03e29434_1600x1111.png 848w, https://substackcdn.com/image/fetch/$s_!94Eq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f87cfb7-ee9a-4e8b-a463-382d03e29434_1600x1111.png 1272w, https://substackcdn.com/image/fetch/$s_!94Eq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f87cfb7-ee9a-4e8b-a463-382d03e29434_1600x1111.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!94Eq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f87cfb7-ee9a-4e8b-a463-382d03e29434_1600x1111.png" width="1456" height="1011" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3f87cfb7-ee9a-4e8b-a463-382d03e29434_1600x1111.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1011,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!94Eq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f87cfb7-ee9a-4e8b-a463-382d03e29434_1600x1111.png 424w, https://substackcdn.com/image/fetch/$s_!94Eq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f87cfb7-ee9a-4e8b-a463-382d03e29434_1600x1111.png 848w, https://substackcdn.com/image/fetch/$s_!94Eq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f87cfb7-ee9a-4e8b-a463-382d03e29434_1600x1111.png 1272w, https://substackcdn.com/image/fetch/$s_!94Eq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f87cfb7-ee9a-4e8b-a463-382d03e29434_1600x1111.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 really like the authors&#8217; approach in the Depth Anything V2 paper, and I think their model&#8217;s results are quite impressive. It&#8217;s a very &#8220;outside-the-box&#8221; idea, and I&#8217;m curious to see if researchers in other domains can use similar ideas to make other AI breakthroughs. I highly recommend taking a look at the <a href="https://depth-anything-v2.github.io/">paper&#8217;s webpage</a> to see more examples of what they accomplished.&nbsp;</p><p>I&#8217;ll leave you with one more Depth Anything V2 example below, one that yet again shows how impressive it is while also being a bit of a contradiction to the authors' claims of robustness. Specifically, they claim that the model is quite robust to domain shift (which it certainly is), but they use these depth-prediction results on drawings and paintings (shown below), among others, as an exemplar of this idea. But what <em>is</em> the correct result in this case? Should it be a realistic depth (as Depth Anything V2 predicts) or just the depth of a planar surface, since the paper or canvas is presumably flat? I think it should be flat, since this would be more in-line with predicting windows instead of what&#8217;s shown through the window. What do you think?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!G-DG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb5f3555-04dc-47c4-ab64-26c533f671e7_1600x740.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!G-DG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb5f3555-04dc-47c4-ab64-26c533f671e7_1600x740.png 424w, https://substackcdn.com/image/fetch/$s_!G-DG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb5f3555-04dc-47c4-ab64-26c533f671e7_1600x740.png 848w, https://substackcdn.com/image/fetch/$s_!G-DG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb5f3555-04dc-47c4-ab64-26c533f671e7_1600x740.png 1272w, https://substackcdn.com/image/fetch/$s_!G-DG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb5f3555-04dc-47c4-ab64-26c533f671e7_1600x740.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!G-DG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb5f3555-04dc-47c4-ab64-26c533f671e7_1600x740.png" width="1456" height="673" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fb5f3555-04dc-47c4-ab64-26c533f671e7_1600x740.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:673,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!G-DG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb5f3555-04dc-47c4-ab64-26c533f671e7_1600x740.png 424w, https://substackcdn.com/image/fetch/$s_!G-DG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb5f3555-04dc-47c4-ab64-26c533f671e7_1600x740.png 848w, https://substackcdn.com/image/fetch/$s_!G-DG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb5f3555-04dc-47c4-ab64-26c533f671e7_1600x740.png 1272w, https://substackcdn.com/image/fetch/$s_!G-DG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb5f3555-04dc-47c4-ab64-26c533f671e7_1600x740.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><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Vision transformers can see in stereo]]></title><description><![CDATA[[Paper: Grounding Image Matching in 3D with MASt3R]]]></description><link>https://learnandburn.ai/p/vision-transformers-can-see-in-stereo</link><guid isPermaLink="false">https://learnandburn.ai/p/vision-transformers-can-see-in-stereo</guid><dc:creator><![CDATA[Unbox Research]]></dc:creator><pubDate>Fri, 12 Jul 2024 20:34:11 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!petz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feda1f729-c295-4b97-94c3-07fad3ec366a_2400x1254.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h5><strong>Summary by Adrian Wilkins-Caruana</strong></h5><p>[<a href="https://arxiv.org/pdf/2312.14132">DUSt3R paper</a> | <a href="https://arxiv.org/pdf/2406.09756">MASt3R paper</a>]</p><p>Your brain is amazing. Whenever you open your eyes and look around, you experience your surroundings in 3d despite only having two 2d views of it, one from each eye. This 3d environment that you perceive is so good that, without much effort at all, you can accurately judge things like how hard and in what direction you need to throw a ball so that it gets to a specific person, or how far it is between your car and a red traffic light in the distance.&nbsp;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!petz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feda1f729-c295-4b97-94c3-07fad3ec366a_2400x1254.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!petz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feda1f729-c295-4b97-94c3-07fad3ec366a_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!petz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feda1f729-c295-4b97-94c3-07fad3ec366a_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!petz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feda1f729-c295-4b97-94c3-07fad3ec366a_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!petz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feda1f729-c295-4b97-94c3-07fad3ec366a_2400x1254.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!petz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feda1f729-c295-4b97-94c3-07fad3ec366a_2400x1254.jpeg" width="1456" height="761" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/eda1f729-c295-4b97-94c3-07fad3ec366a_2400x1254.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:761,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:151200,&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_!petz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feda1f729-c295-4b97-94c3-07fad3ec366a_2400x1254.jpeg 424w, https://substackcdn.com/image/fetch/$s_!petz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feda1f729-c295-4b97-94c3-07fad3ec366a_2400x1254.jpeg 848w, https://substackcdn.com/image/fetch/$s_!petz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feda1f729-c295-4b97-94c3-07fad3ec366a_2400x1254.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!petz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feda1f729-c295-4b97-94c3-07fad3ec366a_2400x1254.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><figcaption class="image-caption"><em>Illustration by Giulia Zerbini</em></figcaption></figure></div><p>To give you an idea of why it&#8217;s amazing that your brain can do this, let&#8217;s quickly break down the process of <em>multi-view stereo</em> (MVS)<em> </em>reconstruction, which is computer-speak for &#8220;How do I turn the two flat images from these two cameras into a 3d model of what they saw?&#8221; First, a computer needs to identify and match the same parts of the images. Then, using information about where each image was taken and other details like the parameters of the camera&#8217;s lens, along with some complicated mathematics, it can reconstruct where in 3d-space each of those parts of the image must have been. Believe it or not, that&#8217;s actually an <em>oversimplification. </em>The figure below, <a href="https://demuc.de/papers/schoenberger2016sfm.pdf">taken from the paper of a popular MVS technique called COLMAP</a>, shows a breakdown of an actual MVS pipeline.&nbsp;</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!65qy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2323ff8-483c-401b-b930-6d15dbb90c50_1600x327.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!65qy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2323ff8-483c-401b-b930-6d15dbb90c50_1600x327.png 424w, https://substackcdn.com/image/fetch/$s_!65qy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2323ff8-483c-401b-b930-6d15dbb90c50_1600x327.png 848w, https://substackcdn.com/image/fetch/$s_!65qy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2323ff8-483c-401b-b930-6d15dbb90c50_1600x327.png 1272w, https://substackcdn.com/image/fetch/$s_!65qy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2323ff8-483c-401b-b930-6d15dbb90c50_1600x327.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!65qy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2323ff8-483c-401b-b930-6d15dbb90c50_1600x327.png" width="1456" height="298" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d2323ff8-483c-401b-b930-6d15dbb90c50_1600x327.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:298,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!65qy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2323ff8-483c-401b-b930-6d15dbb90c50_1600x327.png 424w, https://substackcdn.com/image/fetch/$s_!65qy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2323ff8-483c-401b-b930-6d15dbb90c50_1600x327.png 848w, https://substackcdn.com/image/fetch/$s_!65qy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2323ff8-483c-401b-b930-6d15dbb90c50_1600x327.png 1272w, https://substackcdn.com/image/fetch/$s_!65qy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2323ff8-483c-401b-b930-6d15dbb90c50_1600x327.png 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><p>The approach taken by COLMAP and other MVS techniques &#8212; that is, using mathematics and algorithms &#8212; seems perfectly sensible to me, and it works quite well. But is this what our brains are doing when they see the world? Maybe. Or maybe our brains operate more like a new machine learning-based approach called DUSt3R.&nbsp;</p><p>Like COLMAP, DUSt3R turns images into a 3d point cloud, but in a completely different way. Here&#8217;s how it works: First, the model extracts small patches from two images, and then separately encodes them using the same Vision Transformer (ViT) encoder. Then, two ViT decoders share information about these patches via cross-attention to generate one feature vector for each patch in each image. Finally, a &#8220;head&#8221; (a fully-connected layer) predicts the 3d positions {x, y, z} of each pixel in each image, as well as a confidence value that indicates how confident the network is about each pixel&#8217;s prediction. Importantly, the 3d positions predicted by the head for the second image are in <em>the same</em> coordinate space as the one from the first image.&nbsp;</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VeXe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c29c9e4-d4ab-496c-9eb7-c01825d8e4c8_1600x395.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VeXe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c29c9e4-d4ab-496c-9eb7-c01825d8e4c8_1600x395.png 424w, https://substackcdn.com/image/fetch/$s_!VeXe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c29c9e4-d4ab-496c-9eb7-c01825d8e4c8_1600x395.png 848w, https://substackcdn.com/image/fetch/$s_!VeXe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c29c9e4-d4ab-496c-9eb7-c01825d8e4c8_1600x395.png 1272w, https://substackcdn.com/image/fetch/$s_!VeXe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c29c9e4-d4ab-496c-9eb7-c01825d8e4c8_1600x395.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VeXe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c29c9e4-d4ab-496c-9eb7-c01825d8e4c8_1600x395.png" width="1456" height="359" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6c29c9e4-d4ab-496c-9eb7-c01825d8e4c8_1600x395.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:359,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!VeXe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c29c9e4-d4ab-496c-9eb7-c01825d8e4c8_1600x395.png 424w, https://substackcdn.com/image/fetch/$s_!VeXe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c29c9e4-d4ab-496c-9eb7-c01825d8e4c8_1600x395.png 848w, https://substackcdn.com/image/fetch/$s_!VeXe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c29c9e4-d4ab-496c-9eb7-c01825d8e4c8_1600x395.png 1272w, https://substackcdn.com/image/fetch/$s_!VeXe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c29c9e4-d4ab-496c-9eb7-c01825d8e4c8_1600x395.png 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><p>The authors used supervised learning to train their model, which means they needed the corresponding 3d locations of pixels in image pairs of the same scene. Their training dataset consisted of about 8 million examples of this kind of data, and contained both indoor and outdoor images, as well as images of objects. Then, to optimize the model&#8217;s parameters, they used a regression loss, which is just the average error, or distance, of where DUSt3R thinks the pixels are versus where they actually were. These errors were each scaled by the confidence value that DUSt3R predicts, which is helpful because sometimes it&#8217;s really hard to know the exact location of particular pixels, like ones in the sky or in reflections.</p><p>Compared to about a dozen other MVS methods (some neural network-based, others more traditional), DUSt3R performed the best in terms of absolute relative error. But the more impressive result is DUSt3R&#8217;s zero-shot prediction accuracy (its accuracy on datasets it wasn&#8217;t trained on), where it was almost as good or sometimes even <em>better</em> than non-zero-shot neural approaches. Note that the traditional approaches should also be considered zero-shot, since they weren&#8217;t designed for any specific dataset &#8212; but DUSt3R still seems to outperform these approaches more often than not. And remember: DUSt3R doesn&#8217;t need information about the cameras&#8217; poses or their intrinsic parameters either!</p><p>The DUSt3R researchers recently followed up their method with an extension they call MASt3R. MASt3R improves on DUSt3R&#8217;s approach by emphasizing pixel matching: matching each pixel in one input image with the pixel of the same point (in the 3d scene) in the other input image. Here&#8217;s an example of pixel matching between two input 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_!R521!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6ef5f6-5cd0-423f-9f9d-0edd874f6b63_1600x1118.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!R521!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6ef5f6-5cd0-423f-9f9d-0edd874f6b63_1600x1118.png 424w, https://substackcdn.com/image/fetch/$s_!R521!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6ef5f6-5cd0-423f-9f9d-0edd874f6b63_1600x1118.png 848w, https://substackcdn.com/image/fetch/$s_!R521!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6ef5f6-5cd0-423f-9f9d-0edd874f6b63_1600x1118.png 1272w, https://substackcdn.com/image/fetch/$s_!R521!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6ef5f6-5cd0-423f-9f9d-0edd874f6b63_1600x1118.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!R521!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6ef5f6-5cd0-423f-9f9d-0edd874f6b63_1600x1118.png" width="1456" height="1017" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8a6ef5f6-5cd0-423f-9f9d-0edd874f6b63_1600x1118.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1017,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!R521!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6ef5f6-5cd0-423f-9f9d-0edd874f6b63_1600x1118.png 424w, https://substackcdn.com/image/fetch/$s_!R521!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6ef5f6-5cd0-423f-9f9d-0edd874f6b63_1600x1118.png 848w, https://substackcdn.com/image/fetch/$s_!R521!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6ef5f6-5cd0-423f-9f9d-0edd874f6b63_1600x1118.png 1272w, https://substackcdn.com/image/fetch/$s_!R521!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a6ef5f6-5cd0-423f-9f9d-0edd874f6b63_1600x1118.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 figure below shows MASt3R&#8217;s architecture, which adds an additional head onto the ViT&#8217;s decoder. From the image patches, this head generates a vector of features for each pixel in each image; this new vector-per-pixel data provides the additional info MASt3R uses to match pixels across the input images. And MASt3R&#8217;s loss function is the same as DUSt3R&#8217;s confidence-weighted regression loss, but with an additional loss term that penalizes the model for every pixel that it incorrectly matches.&nbsp;</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KQNj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe17a4f38-425b-4f48-b447-f567d83ef97e_1600x337.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KQNj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe17a4f38-425b-4f48-b447-f567d83ef97e_1600x337.png 424w, https://substackcdn.com/image/fetch/$s_!KQNj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe17a4f38-425b-4f48-b447-f567d83ef97e_1600x337.png 848w, https://substackcdn.com/image/fetch/$s_!KQNj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe17a4f38-425b-4f48-b447-f567d83ef97e_1600x337.png 1272w, https://substackcdn.com/image/fetch/$s_!KQNj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe17a4f38-425b-4f48-b447-f567d83ef97e_1600x337.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KQNj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe17a4f38-425b-4f48-b447-f567d83ef97e_1600x337.png" width="1456" height="307" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e17a4f38-425b-4f48-b447-f567d83ef97e_1600x337.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:307,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&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_!KQNj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe17a4f38-425b-4f48-b447-f567d83ef97e_1600x337.png 424w, https://substackcdn.com/image/fetch/$s_!KQNj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe17a4f38-425b-4f48-b447-f567d83ef97e_1600x337.png 848w, https://substackcdn.com/image/fetch/$s_!KQNj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe17a4f38-425b-4f48-b447-f567d83ef97e_1600x337.png 1272w, https://substackcdn.com/image/fetch/$s_!KQNj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe17a4f38-425b-4f48-b447-f567d83ef97e_1600x337.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Without going too deep into the details of MASt3R, this extension (pixelwise matching) adds a lot of additional complexity (efficient pixel-matching is non-obvious), but the authors introduce clever algorithms for solving this and other related problems. All this effort is worth it, though, since MASt3R is both more accurate and more robust to viewpoint and illumination changes than DUSt3R. Also, aside from the main purpose of predicting point clouds, these models&#8217; results can be used for things like camera calibration, inferring the cameras&#8217; pose, depth estimation, and dense 3d reconstruction.</p><p>Being neural network-based, DUSt3R and MASt3R share afflictions similar to neural networks in other domains. Despite their impressive zero-shot performance, these approaches might need to be retrained to work effectively in contexts that differ substantially from their training data, such as in underwater or aerial imagery, or imagery with very wide or very long lenses. Traditional MVS approaches would be more robust to these sorts of changes, provided their models can be adjusted for these settings.&nbsp;</p><p>In either case, there&#8217;s no one-model-fits-all approach to MVS, much like how our brains are particularly well adapted to MVS from our two eyes, but would need to be &#8220;retrained&#8221; if our vision was suddenly inverted or if the shape and composition of our eyes suddenly changed in some way.This paper hasn&#8217;t brought us any closer to understanding how our brains do MVS, but it has shown that there&#8217;s more than one process that can achieve it. Maybe our brains work like DUSt3R, or maybe they have their own method that&#8217;s still a mystery.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://learnandburn.ai/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Learn and Burn! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item></channel></rss>