<?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 AppSec]]></title><description><![CDATA[Learn AppSec]]></description><link>https://www.learnappsec.com</link><image><url>https://substackcdn.com/image/fetch/$s_!AVHu!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcffa36d5-858c-4974-9cf7-9d012d385182_202x202.png</url><title>Learn AppSec</title><link>https://www.learnappsec.com</link></image><generator>Substack</generator><lastBuildDate>Mon, 20 Apr 2026 01:02:14 GMT</lastBuildDate><atom:link href="https://www.learnappsec.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Cezary Cerekwicki]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[learnappsec@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[learnappsec@substack.com]]></itunes:email><itunes:name><![CDATA[Cezary Cerekwicki]]></itunes:name></itunes:owner><itunes:author><![CDATA[Cezary Cerekwicki]]></itunes:author><googleplay:owner><![CDATA[learnappsec@substack.com]]></googleplay:owner><googleplay:email><![CDATA[learnappsec@substack.com]]></googleplay:email><googleplay:author><![CDATA[Cezary Cerekwicki]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Most Web Apps Have the Same Security Design Flaw]]></title><description><![CDATA[Most web applications still use an authentication pattern that is less secure, more complex, and more expensive than necessary.]]></description><link>https://www.learnappsec.com/p/most-web-apps-have-the-same-security</link><guid isPermaLink="false">https://www.learnappsec.com/p/most-web-apps-have-the-same-security</guid><dc:creator><![CDATA[Cezary Cerekwicki]]></dc:creator><pubDate>Fri, 03 Apr 2026 07:03:09 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!BF0I!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106f5d3e-690b-4627-9317-4fc25f42da60_2816x1536.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Most web applications still use an authentication pattern that is less secure, more complex, and more expensive than necessary. Modern guidance from NIST and OWASP increasingly recommends reducing reliance on memorized secrets. Password systems became the default because frameworks scaffold them and tutorials repeat them. But the design hides an architectural choice: the application becomes responsible for storing and defending user secrets indefinitely.</p><p>Passwords are the COBOL of authentication. They refuse to die.</p><p>The more interesting question is not how to secure password databases, but why we build them at all.</p><p>Authentication systems differ mainly in where secrets live &#8212; and who must protect them.</p><h1>Three Authentication Architectures</h1><p>Most web applications today use one of three authentication architectures:</p><ol><li><p>Shared secrets stored by the server (passwords).</p></li><li><p>Temporary proofs delivered through an external channel (email OTP or social login).</p></li><li><p>Public-key authentication using device-held credentials (passkeys).</p></li></ol><p>Each design moves the location of secrets and therefore the location of risk.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BF0I!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106f5d3e-690b-4627-9317-4fc25f42da60_2816x1536.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BF0I!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106f5d3e-690b-4627-9317-4fc25f42da60_2816x1536.png 424w, https://substackcdn.com/image/fetch/$s_!BF0I!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106f5d3e-690b-4627-9317-4fc25f42da60_2816x1536.png 848w, https://substackcdn.com/image/fetch/$s_!BF0I!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106f5d3e-690b-4627-9317-4fc25f42da60_2816x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!BF0I!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106f5d3e-690b-4627-9317-4fc25f42da60_2816x1536.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BF0I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106f5d3e-690b-4627-9317-4fc25f42da60_2816x1536.png" width="1456" height="794" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/106f5d3e-690b-4627-9317-4fc25f42da60_2816x1536.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:794,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:7525695,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.learnappsec.com/i/193041619?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106f5d3e-690b-4627-9317-4fc25f42da60_2816x1536.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BF0I!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106f5d3e-690b-4627-9317-4fc25f42da60_2816x1536.png 424w, https://substackcdn.com/image/fetch/$s_!BF0I!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106f5d3e-690b-4627-9317-4fc25f42da60_2816x1536.png 848w, https://substackcdn.com/image/fetch/$s_!BF0I!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106f5d3e-690b-4627-9317-4fc25f42da60_2816x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!BF0I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106f5d3e-690b-4627-9317-4fc25f42da60_2816x1536.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h1>We&#8217;ve always done it this way</h1><p>Passwords implement a shared-secret architecture. The user creates a secret and the server stores a derived version. Authentication succeeds when both sides demonstrate knowledge of the same secret.</p><p>Even when implemented correctly (with modern hashing such as argon2id, breach screening, and brute-force protection) the system must defend an attack surface created by the existence of those secrets.</p><p>Password systems introduce several attack classes: credential stuffing, password reuse, guessing, phishing, and offline cracking after database breaches.</p><p>The 2012 LinkedIn breach illustrates the problem. Once attackers obtained millions of password hashes, they could crack them offline indefinitely without interacting with LinkedIn&#8217;s servers.</p><p>Credential stuffing remains one of the most common causes of account takeover today. Attackers reuse passwords leaked from other breaches and automate login attempts across services.</p><p>Storing passwords forces you to build an entire defensive subsystem: hashing and storage, reset flows, brute-force protections, breached-password checks, and account recovery mechanisms. Password policies attempt to enforce entropy. Users respond with creativity.</p><h1>We could have done it like that</h1><p>Email-based authentication follows a different model. Instead of storing a long-lived secret, the application verifies that the user currently controls an external communication channel &#8212; usually an email inbox.</p><p>Typical flow:</p><ol><li><p>User enters email.</p></li><li><p>The system sends OTP or a magic link.</p></li><li><p>The user proves access to the inbox.</p></li></ol><p>Because the system stores no user-generated secrets, several password-specific attacks disappear entirely. There are no passwords to reuse, guess, or crack after a database breach.</p><p>However, the trust boundary shifts. Security now depends heavily on the availability and secrecy of the user&#8217;s mailbox.</p><h1>We should be heading this way</h1><p>Passkeys represent a third architecture based on public-key cryptography. During signup, the user&#8217;s device generates a key pair. The public key is registered with the server while the private key remains on the device. During login, the server sends a challenge that the device signs using the private key, typically unlocked with biometrics or a device PIN.</p><p>No shared secret exists between the server and the user. Because the server stores only public keys, credential databases become far less valuable to attackers. Passkeys also provide strong phishing resistance: authenticators verify the origin of the requesting website before signing a challenge. After Google deployed hardware security keys internally, phishing attacks against those accounts effectively dropped to zero.</p><p>In practice, passkey deployments still require recovery mechanisms (often email) which reintroduces some properties of proof-of-inbox systems.</p><h1>Comparing the Architectures</h1><p>Viewed as architectural patterns, the differences become clearer. Each model shifts where secrets live and therefore where security risks concentrate.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VT-B!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F946411bd-3dd2-4133-bd63-3c13ea2c1feb_1364x414.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VT-B!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F946411bd-3dd2-4133-bd63-3c13ea2c1feb_1364x414.png 424w, https://substackcdn.com/image/fetch/$s_!VT-B!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F946411bd-3dd2-4133-bd63-3c13ea2c1feb_1364x414.png 848w, https://substackcdn.com/image/fetch/$s_!VT-B!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F946411bd-3dd2-4133-bd63-3c13ea2c1feb_1364x414.png 1272w, https://substackcdn.com/image/fetch/$s_!VT-B!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F946411bd-3dd2-4133-bd63-3c13ea2c1feb_1364x414.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VT-B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F946411bd-3dd2-4133-bd63-3c13ea2c1feb_1364x414.png" width="1364" height="414" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/946411bd-3dd2-4133-bd63-3c13ea2c1feb_1364x414.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:414,&quot;width&quot;:1364,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:92620,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.learnappsec.com/i/193041619?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F946411bd-3dd2-4133-bd63-3c13ea2c1feb_1364x414.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VT-B!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F946411bd-3dd2-4133-bd63-3c13ea2c1feb_1364x414.png 424w, https://substackcdn.com/image/fetch/$s_!VT-B!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F946411bd-3dd2-4133-bd63-3c13ea2c1feb_1364x414.png 848w, https://substackcdn.com/image/fetch/$s_!VT-B!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F946411bd-3dd2-4133-bd63-3c13ea2c1feb_1364x414.png 1272w, https://substackcdn.com/image/fetch/$s_!VT-B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F946411bd-3dd2-4133-bd63-3c13ea2c1feb_1364x414.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>Passwords create an entire category of security problems that disappear if you stop storing them.</p><h1>Migrating from Passwords to Passkeys</h1><p>Most production systems cannot remove passwords overnight. In practice, teams migrate gradually. A common rollout starts by allowing users to register a passkey after logging in with their existing password. The device generates a key pair, and the server stores the public key alongside the existing account.</p><p>Once passkeys are registered, the login flow can begin preferring passkeys over passwords. Browsers increasingly suggest them automatically through WebAuthn, which reduces login friction. After adoption grows, passwords can be disabled for accounts that already have passkeys. Recovery typically relies on email verification or previously registered devices rather than stored user secrets.</p><p>Over time the password subsystem becomes a compatibility layer instead of the primary authentication mechanism.</p><h1>The Cost of Storing Passwords</h1><p>Authentication architecture does not just affect security risk. It determines how much operational security work your organization will have to do for the lifetime of the system.</p><p>Shared-secret authentication creates a permanent defensive obligation. Once an application stores user passwords, the organization becomes responsible for protecting a database that attackers actively want to steal. That responsibility propagates outward: password hashing infrastructure, reset and recovery flows, brute-force detection, breached-password screening, account takeover monitoring, and incident response procedures. Each layer exists because the system stores long-lived secrets.</p><p>Over time this becomes an operational cost. Credential-stuffing campaigns generate investigation noise. Account recovery flows become a common takeover vector. Authentication code requires periodic refactoring as standards evolve. Security teams spend time triaging alerts, investigating suspicious login patterns, and responding to reports from bug bounty researchers who find weaknesses in authentication flows.</p><p>Proof-of-inbox systems remove much of that lifecycle because the system no longer stores a long-term secret. Passkeys go further by eliminating shared secrets entirely: the server stores public keys rather than credentials worth stealing. The result is not perfect security, but a much smaller class of problems to defend.</p><p>From a security leadership perspective, this distinction matters. Fewer stored secrets means fewer breach targets, fewer credential-stuffing incidents, fewer account-recovery compromises, and fewer authentication bugs to fix later. In practice that translates directly into fewer investigations, fewer support tickets, and fewer engineering cycles spent hardening login systems.</p><p>The simplest way to secure a secret is not to store it in the first place. Architectures that avoid shared secrets do not just reduce risk &#8212; they reduce the amount of security work an organization will ever need to perform.</p><h1>How Passwords Create Systemic Risk</h1><p>Password systems also shift the security burden onto users. A typical user manages dozens or hundreds of accounts, each ideally requiring a unique password. In practice, passwords are reused across services. When one service is breached, attackers try those credentials elsewhere: a technique known as credential stuffing.</p><p>A single breach can cascade across hundreds of unrelated platforms because the same passwords are reused. If the web relied less on memorized secrets, this entire attack class would likely be far smaller.</p><h1>Conclusion</h1><p>Passwords became dominant because they were simple to implement in the early web. But their architecture forces applications to collect and defend user-generated secrets indefinitely.</p><p>Modern authentication systems increasingly avoid this pattern.</p><p>Passkeys eliminate shared secrets entirely using device-held cryptographic keys. Email-based authentication removes long-lived secrets but shifts trust to the email system.</p><p>For many applications the decision can be simplified:</p><ul><li><p>If your users already rely heavily on email, proof-of-inbox authentication is often the simplest architecture.</p></li><li><p>If you are building a new system with strong security requirements, passkeys remove entire classes of authentication risk.</p></li><li><p>Passwords are usually best reserved for legacy compatibility rather than new designs.</p></li></ul><p>The underlying principle is simple: <strong>the safest secret is the one your system never has to store.</strong></p><p>If you cannot deploy passkeys yet, you probably still do not need to build another password subsystem.</p><h1>References</h1><p>[1] NIST SP 800-63B, Digital Identity Guidelines<br><a href="https://pages.nist.gov/800-63-3/sp800-63b.html">https://pages.nist.gov/800-63-3/sp800-63b.html</a></p><p>[2] OWASP Authentication Cheat Sheet<br><a href="https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html">https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html</a></p><p>[3] OWASP Application Security Verification Standard, Authentication Requirements<br><a href="https://github.com/OWASP/ASVS/blob/master/5.0/en/0x15-V6-Authentication.md">https://github.com/OWASP/ASVS/blob/master/5.0/en/0x15-V6-Authentication.md</a></p><p>[4] Verizon Data Breach Investigations Report<br><a href="https://www.verizon.com/business/resources/reports/dbir/">https://www.verizon.com/business/resources/reports/dbir/</a></p><p>[5] Have I Been Pwned<br><a href="https://haveibeenpwned.com/">https://haveibeenpwned.com/</a></p><p>[6] WebAuthn Level 2 Specification<br><a href="https://www.w3.org/TR/webauthn-2/">https://www.w3.org/TR/webauthn-2/</a></p><p>[7] FIDO Alliance, Passkeys Explained<br><a href="https://fidoalliance.org/passkeys/">https://fidoalliance.org/passkeys/</a></p><p>[8] Google Security Blog, Security Keys Neutralize Phishing Attacks<br><a href="https://security.googleblog.com/2019/05/new-research-how-effective-are.html">https://security.googleblog.com/2019/05/new-research-how-effective-are.html</a></p><p>[9] Google Transparency Report, Safer Email<br><a href="https://transparencyreport.google.com/safer-email/overview">https://transparencyreport.google.com/safer-email/overview</a></p><p>[10] LinkedIn Breach 2012<br><a href="https://krebsonsecurity.com/2016/05/linkedin-confirms-account-passwords-hacked/">https://krebsonsecurity.com/2016/05/linkedin-confirms-account-passwords-hacked/</a></p>]]></content:encoded></item><item><title><![CDATA[The Unbearable Anthropomorphization of a Parrot's Being]]></title><description><![CDATA[The purpose of this text is to explain how Large Language Models (LLMs) work and to propose some suggestions to help non-technical people understand this technology.]]></description><link>https://www.learnappsec.com/p/the-unbearable-anthropomorphization</link><guid isPermaLink="false">https://www.learnappsec.com/p/the-unbearable-anthropomorphization</guid><dc:creator><![CDATA[Cezary Cerekwicki]]></dc:creator><pubDate>Tue, 22 Apr 2025 11:48:48 GMT</pubDate><enclosure url="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcvQ-DK9nLL9eS93osXtk46jOsXeK8zgf_xqn5RPIbb9HC3n4_DdT5o8tQH-Hd6xknFkE5eLAiECX4xcLU13QspmWOqZ_XdNww9MdnH0c_6l8pZexyOIlovtsnOBgwRXLeIJc1S?key=KTawhy8TDsxJASBz-TEFvE-z" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>The purpose of this text is to explain how Large Language Models (LLMs) work and to propose some suggestions to help non-technical people understand this technology. The second objective is to entertain, as this facilitates learning.</strong></p><h1>How a computer understands text</h1><p>This has had mixed results, as anyone who has tried to use automatic translators has painfully experienced. A computer is really just a big calculator. Translation consists of reading and understanding the original text and writing it anew in the target language, and the quality of the result will be directly proportional to the degree of understanding of the original.</p><p>The problem, therefore, was to find a digital representation of words that would reflect their meaning. The winner in this category turned out to be the vector, which is one row of Excel, with numbers in each cell. These numbers somehow encode the intensity of certain features of the word. Such a feature is, for example, a place in the continuum of masculinity and femininity. The word <em>beauty</em> will probably be more feminine, and the word <em>strength</em> masculine. A vector is like the DNA of a word, encoding a whole lot of associations associated with it. This DNA is not directly designed by humans, but is created by itself in the process of training a neural network, which we will talk about later.</p><p>Okay, but what about the word <em>castle</em>, for example? It could be a grand medieval fortress, a children's play structure in the backyard, or even a strong strategic position in a board game. Three very different ideas. So, what will happen in our Excel row? Well, for years nothing happened, and that's why automatic translators gave us more reasons to scoff than high-quality translations.</p><p>And that's where the scientists came in, proposing the <em>attention</em> mechanism. <em>Attention</em> is a form of vector transformation that allows us to update it based on other vectors adjacent to it; in other words, we know words by the company they keep. So if we have the word <em>drawbridge</em> and <em>castle</em> in a sentence, it will be clear both to us and to the calculator on steroids that this castle would have walls and perhaps a moat.&nbsp;</p><p>The attention mechanism allows LLMs to recalibrate word weights based on their context, so that they can focus on the most important parts of the text. This makes LLMs understand content better and generate more meaningful responses.</p><p>That's how our digital intelligence got a little less artificial.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Dr1e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd06d6319-e8e1-4e15-b13b-869a23e3ecae_1176x870.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Dr1e!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd06d6319-e8e1-4e15-b13b-869a23e3ecae_1176x870.png 424w, https://substackcdn.com/image/fetch/$s_!Dr1e!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd06d6319-e8e1-4e15-b13b-869a23e3ecae_1176x870.png 848w, https://substackcdn.com/image/fetch/$s_!Dr1e!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd06d6319-e8e1-4e15-b13b-869a23e3ecae_1176x870.png 1272w, https://substackcdn.com/image/fetch/$s_!Dr1e!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd06d6319-e8e1-4e15-b13b-869a23e3ecae_1176x870.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Dr1e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd06d6319-e8e1-4e15-b13b-869a23e3ecae_1176x870.png" width="1176" height="870" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d06d6319-e8e1-4e15-b13b-869a23e3ecae_1176x870.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:870,&quot;width&quot;:1176,&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;: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_!Dr1e!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd06d6319-e8e1-4e15-b13b-869a23e3ecae_1176x870.png 424w, https://substackcdn.com/image/fetch/$s_!Dr1e!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd06d6319-e8e1-4e15-b13b-869a23e3ecae_1176x870.png 848w, https://substackcdn.com/image/fetch/$s_!Dr1e!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd06d6319-e8e1-4e15-b13b-869a23e3ecae_1176x870.png 1272w, https://substackcdn.com/image/fetch/$s_!Dr1e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd06d6319-e8e1-4e15-b13b-869a23e3ecae_1176x870.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">Figure 1. Neural network training.</figcaption></figure></div><h1>What are GPT, LLM and neural network</h1><p>What does all this GPT in Chat GPT mean? It is an acronym for Generative Pre-trained Transformer.</p><p><em>Transformer</em> is a neural network architecture whose essence is the transformation of something into something else. The original goal of this architecture was to create a better automatic translator. The transformer architecture also handles other forms of transformation well. It can transform long text into short text, text into image, text into music, etc. Some say it also turns programmers into unemployed people.</p><p><em>Generative</em> suggests that it is a technology that creates something. This is in contrast to the first applications of neural networks, which were usually passive. The network can recognize a pattern, e.g. a fingerprint and unlock our phone based on it. Here the network generates something for us, hence it is <em>generative</em>.</p><p><em>Pretrained</em> is in turn a reference to a rather specific learning procedure, which we will discuss later.</p><p>LLM (Large Language Model) is a large language model. There is nothing unusual here. Although people in the industry like to come up with overly complicated or pretentious names, this time what you see is what you get.&nbsp;</p><p>A neural network, on the other hand, is a computational model. You can think of it as an enormous mathematical function. This immense size includes something like a large Excel, with many sheets, and each of them contains a large table with numbers (these are the <em>weights</em> in the sense of the weighted sum [2], which is calculated there). These numbers represent many small sliders, influencing the result in a certain way [4]. If our network is to recognize a fingerprint, we feed it an image (bitmap) of the finger, and we expect a decision on the output. We immodestly call such a run <em>inference</em>. The calibration of these switches so that they recognize the right fingers well and reject the wrong ones, we call <em>learning</em>.</p><p>In the case of LLMs, the neural network receives our query with context at the input, and at the output returns a vector (one row of Excel) with the probabilities of the next text fragment. We call such a fragment a token. A token can be a word, a fragment of it, or some other wonder (for simplicity we will continue to pretend that LLMs operate on words and not tokens). In any case, the important thing is that one pass of the neural network (one <em>inference</em>) gives us only one word. So, in order to get a longer text out of it, we have to wait a bit. To make the wait more pleasant, the creators of chats based on LLMs write the text to us on the screen in real time.&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_!Sao1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11960394-490a-45d2-8fdc-5f5a87edcd3f_1200x786.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Sao1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11960394-490a-45d2-8fdc-5f5a87edcd3f_1200x786.png 424w, https://substackcdn.com/image/fetch/$s_!Sao1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11960394-490a-45d2-8fdc-5f5a87edcd3f_1200x786.png 848w, https://substackcdn.com/image/fetch/$s_!Sao1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11960394-490a-45d2-8fdc-5f5a87edcd3f_1200x786.png 1272w, https://substackcdn.com/image/fetch/$s_!Sao1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11960394-490a-45d2-8fdc-5f5a87edcd3f_1200x786.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Sao1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11960394-490a-45d2-8fdc-5f5a87edcd3f_1200x786.png" width="1200" height="786" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/11960394-490a-45d2-8fdc-5f5a87edcd3f_1200x786.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:786,&quot;width&quot;:1200,&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_!Sao1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11960394-490a-45d2-8fdc-5f5a87edcd3f_1200x786.png 424w, https://substackcdn.com/image/fetch/$s_!Sao1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11960394-490a-45d2-8fdc-5f5a87edcd3f_1200x786.png 848w, https://substackcdn.com/image/fetch/$s_!Sao1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11960394-490a-45d2-8fdc-5f5a87edcd3f_1200x786.png 1272w, https://substackcdn.com/image/fetch/$s_!Sao1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11960394-490a-45d2-8fdc-5f5a87edcd3f_1200x786.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 2. Leonardo da Vinci, <em>The Last Supper</em>.</figcaption></figure></div><h1>Primary and secondary socialization of LLMs</h1><p>We send a newborn LLM to two schools - first to primary school (<em>pre-training</em>), where we will teach it basic facts about the world, as well as reading and writing. Then to vocational school (<em>fine tuning</em>), where we will teach it the profession of a helpful assistant. In primary school, something like primary socialization will take place, in which our LLM will transform into a clever token generator that complies with elementary social and grammatical norms. In vocational school, on the other hand, it will undergo secondary socialization for its final professional role.</p><p>Primary education is a bit like making scrambled eggs for breakfast. First we need the main ingredient, which will be the body of text for learning. This corpus must be of good quality, otherwise the scrambled eggs will be indigestible. At the same time, it should be large enough to satisfy our hunger for knowledge. Fortunately, we have the world wide web, where there is plenty of text. It is true that obtaining texts from the web may hurt the feelings of their authors and copyright lawyers, but as the great innovators of Silicon Valley say, to make scrambled eggs you have to break a few eggs.</p><p>These texts should naturally be subjected to strict selection. We don't want our pupil to be saturated with knowledge about women from incel forums, to learn medicine from anti-vaxxers, astronomy from flat-earthers, or ecumenism from jihadists. We also don't want our LLM to recite advertising jingles to us later. So such a carefully purified decoction of the Internet will be our learning corpus.</p><p>The learning itself consists of training a neural network to effectively predict the probability of the next word appearing in a text sequence. The algorithm roughly looks like this: we randomly select a sequence (a sentence or a few sentences) in the corpus, we give the network this sequence minus the last word (token) as input, and we see how the network assessed the probability of the last word occurring. The higher, the better - this is our objective function (at the beginning, the network parameters are set to random values, so the result will also be random). Then we do the so-called backpropagation, i.e., for each of the network parameters, we calculate which way to move it a little so that the result at the end is closer to expectations. Then we draw another sequence and so on.&nbsp;</p><p>Neural network training is simply a process of optimizing the objective function. If the function calculates the size of the error for us, we are looking for its minimum. This is our digital equivalent of frying scrambled eggs. The basic analogies hold up strongly. If we fry for too short a time, our LLM will be undertrained and may later vote for populists or hallucinate about electric sheep. If we fry too long, we will go bankrupt due to the electricity bill. The phenomenon of <em>overfitting</em> may also occur. Our network will learn the source texts by heart and instead of generalizing the given examples nicely for us, it will mindlessly recite them, including typos. This can have various unpleasant consequences. The aforementioned copyright lawyers are just waiting for such blunders.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!h1bY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F362c97e6-6927-4967-bb6d-b78d5795620d_1078x1082.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!h1bY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F362c97e6-6927-4967-bb6d-b78d5795620d_1078x1082.png 424w, https://substackcdn.com/image/fetch/$s_!h1bY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F362c97e6-6927-4967-bb6d-b78d5795620d_1078x1082.png 848w, https://substackcdn.com/image/fetch/$s_!h1bY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F362c97e6-6927-4967-bb6d-b78d5795620d_1078x1082.png 1272w, https://substackcdn.com/image/fetch/$s_!h1bY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F362c97e6-6927-4967-bb6d-b78d5795620d_1078x1082.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!h1bY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F362c97e6-6927-4967-bb6d-b78d5795620d_1078x1082.png" width="1078" height="1082" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/362c97e6-6927-4967-bb6d-b78d5795620d_1078x1082.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1082,&quot;width&quot;:1078,&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_!h1bY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F362c97e6-6927-4967-bb6d-b78d5795620d_1078x1082.png 424w, https://substackcdn.com/image/fetch/$s_!h1bY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F362c97e6-6927-4967-bb6d-b78d5795620d_1078x1082.png 848w, https://substackcdn.com/image/fetch/$s_!h1bY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F362c97e6-6927-4967-bb6d-b78d5795620d_1078x1082.png 1272w, https://substackcdn.com/image/fetch/$s_!h1bY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F362c97e6-6927-4967-bb6d-b78d5795620d_1078x1082.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 3. Leonardo da Vinci, <em>Vitruvian Parrot</em>.</figcaption></figure></div><p>Primary school for LLMs takes quite a long time, because both this body of text and our Excel with parameters really deserve the first "L" in LLM. This time is measured in months and the project budget in millions of USD. Don't try this at home.</p><p>An LLM after primary school can "only" spit out the next words to some sequence. So if we give it the first sentence of some Wikipedia article as input, it will add the rest. Incidentally, probably word for word, because copying Wikipedia into corpora of this type is standard practice. So our LLM can already write, it also has a memory saturated with source texts, which give it some elementary knowledge of the world. At this stage, our model is only a generator of the rest of the text, so it would be quite difficult to use it for any practical applications.</p><p>That's why further education in vocational school (<em>fine tuning</em>) is necessary. The goal of this is to transform our token generator into an assistant that answers questions. Here we will show our LLM scripts prepared by human experts. A script is a question and a very high quality answer. The collection of these scripts is a closely guarded secret of companies producing LLMs. The methodologies for their production are also dynamically evolving. This is where our pupil gains refinement, learns the culture of the word, respect for facts, and social conventions. To a degree, of course, proportional to their occurrence in the scripts shown to him.</p><p>The algorithm for teaching a neural network in vocational school is analogous, except that this time we teach the network to answer questions (i.e., the input to the network is a question, also called a prompt), and we evaluate the quality of the answer by comparing it with an expert script. This stage is much cheaper and faster, because there are incomparably fewer scripts than text in the primary school corpus, and also our network no longer has completely random weights. So in our breakfast analogy, this can be compared to sprinkling chives on scrambled eggs, making a sandwich and coffee.</p><h1>My scrambled eggs are better than yours</h1><p>The quality of LLM's knowledge is burdened with a number of imperfections, which are a natural consequence of the process of its construction. All the misrepresentations in the corpus will be reflected in the neural network of our model. Thus, the better a given language is represented in publicly available Internet texts, the better the LLM will learn it. That's why all LLMs will be fluent in English, but I wouldn't expect great support for the Kashubian language. Topics widely described on the web, such as IT knowledge, will be acquired very decently. However, specialized topics, available rather in books behind paywalls, or even only on paper, will remain there.</p><p>Another problem is a certain democracy of the learning process. If there are ten average texts with outdated knowledge for one great text with current and accurate knowledge, the former will win. For this reason, general-purpose LLMs will rather repeat the most common opinions on the public Internet. Unless, of course, these are controversial enough opinions to be censored either in the process of selecting data for the corpus or professional scripts. LLM chats also have built-in additional defense mechanisms, for example, before a question goes to the actual "engine", it must first pass through a censorship filter, which checks whether the question is sufficiently ethical (we do not want to help people build bombs or poisons). Sometimes we also have a post hoc filter, i.e., censorship of the response of the actual model. A certain Chinese model became famous for self-censoring after generating a factually correct but politically incorrect answer about Tiananmen Square.</p><p>Human knowledge is by no means some uncontroversial consensus. Quite the opposite. The infosphere is an area of political, economic, cultural, and aesthetic wars. Many companies would like to influence the answers of popular LLMs as to which car or washing powder is best to buy. State governments have differing opinions on the political status of Crimea or Taiwan. When preparing a corpus of text for learning, we must make a number of decisions about censoring certain points of view and promoting others. LLM is therefore a projection of the values of the cultural and political circle from which its producer originates, as well as the spirit of the time in which the corpus was created.</p><p>Show me your scrambled eggs, and I'll tell you who you are.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DcGN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd6b8ed-d81e-4950-93b0-0c86f2bc193f_1216x764.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DcGN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd6b8ed-d81e-4950-93b0-0c86f2bc193f_1216x764.png 424w, https://substackcdn.com/image/fetch/$s_!DcGN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd6b8ed-d81e-4950-93b0-0c86f2bc193f_1216x764.png 848w, https://substackcdn.com/image/fetch/$s_!DcGN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd6b8ed-d81e-4950-93b0-0c86f2bc193f_1216x764.png 1272w, https://substackcdn.com/image/fetch/$s_!DcGN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd6b8ed-d81e-4950-93b0-0c86f2bc193f_1216x764.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DcGN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd6b8ed-d81e-4950-93b0-0c86f2bc193f_1216x764.png" width="1216" height="764" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6bd6b8ed-d81e-4950-93b0-0c86f2bc193f_1216x764.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:764,&quot;width&quot;:1216,&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_!DcGN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd6b8ed-d81e-4950-93b0-0c86f2bc193f_1216x764.png 424w, https://substackcdn.com/image/fetch/$s_!DcGN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd6b8ed-d81e-4950-93b0-0c86f2bc193f_1216x764.png 848w, https://substackcdn.com/image/fetch/$s_!DcGN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd6b8ed-d81e-4950-93b0-0c86f2bc193f_1216x764.png 1272w, https://substackcdn.com/image/fetch/$s_!DcGN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd6b8ed-d81e-4950-93b0-0c86f2bc193f_1216x764.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 4. Let's hurry to love our children. They start getting smart with us so soon.</figcaption></figure></div><h1>Do stochastic parrots hallucinate about electric sheep?</h1><p>What can LLMs actually do? As we have already established, the heart of an LLM is a generator of the probability distribution of the next token in a text sequence. This is surrounded by a certain amount of logic, which provides us with a relatively safe service of a helpful assistant ready to carry out commands and answer questions. In fact, the basic competence of LLM is paraphrasing text. It can be text learned in primary or vocational school. It can be obtained from an internet search engine. It can be provided by the user. No more and no less.&nbsp;</p><p>This is where the metaphor of the <em>stochastic parrot</em> [6] comes from. LLM does not produce new knowledge, it only parrots (paraphrases) existing knowledge. In addition, it does it stochastically, so it is a kind of casino where answers are drawn in a large roulette wheel with tokens. It is not without reason that LLM producers warn against asking their products for medical, legal, or any other advice, where a wrong answer could result in bloodthirsty copyright lawyers being joined by lawyers of other specialties.</p><p>You can look at it as a glass half empty or half full. Technological skeptics will say that this is the ultimate proof of the indolence of LLMs and their inevitable inferiority to our human, shocking intellectual potential. Enthusiasts, on the other hand, will say, so what? The Internet is "only" a network of local computer networks, and it was enough to revolutionize the world. A cell phone is "only" a pocket PC with a radio. Finally, does humanity really make good use of all the knowledge already available, so that the inability of LLMs to generate new knowledge should be any particular limitation?</p><p>Paraphrasing text is a basic competence that is expected of us in the education process. Almost all exams from elementary school to professional certificates consist of either answering a series of questions about a given text, writing an essay on a topic described in another text, or solving a mathematical problem. LLMs do a great job with the first two, and for the third there is other software (e.g. Wolfram Alpha). This tells us something not only about the development of computer science, but perhaps even more about our education systems.</p><p>What is some part of the work of a translator, journalist, teacher, hotline employee, loan advisor, salesman and many, many others, if not paraphrasing text?</p><p>To some extent, we are all stochastic parrots.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!f79J!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37eaf417-bb3f-46df-ae62-cf87d0f40537_1114x1084.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!f79J!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37eaf417-bb3f-46df-ae62-cf87d0f40537_1114x1084.png 424w, https://substackcdn.com/image/fetch/$s_!f79J!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37eaf417-bb3f-46df-ae62-cf87d0f40537_1114x1084.png 848w, https://substackcdn.com/image/fetch/$s_!f79J!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37eaf417-bb3f-46df-ae62-cf87d0f40537_1114x1084.png 1272w, https://substackcdn.com/image/fetch/$s_!f79J!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37eaf417-bb3f-46df-ae62-cf87d0f40537_1114x1084.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!f79J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37eaf417-bb3f-46df-ae62-cf87d0f40537_1114x1084.png" width="1114" height="1084" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/37eaf417-bb3f-46df-ae62-cf87d0f40537_1114x1084.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1084,&quot;width&quot;:1114,&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_!f79J!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37eaf417-bb3f-46df-ae62-cf87d0f40537_1114x1084.png 424w, https://substackcdn.com/image/fetch/$s_!f79J!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37eaf417-bb3f-46df-ae62-cf87d0f40537_1114x1084.png 848w, https://substackcdn.com/image/fetch/$s_!f79J!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37eaf417-bb3f-46df-ae62-cf87d0f40537_1114x1084.png 1272w, https://substackcdn.com/image/fetch/$s_!f79J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37eaf417-bb3f-46df-ae62-cf87d0f40537_1114x1084.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 5. Edvard Munch, <em>The Scream. </em></figcaption></figure></div><h1>The Unbearable Anthropomorphization of a Parrot's Being</h1><p>People tend to project their humanity onto their surroundings. We say that the computer <em>thinks</em> when it doesn't respond for a moment. We say that the <em>computer doesn't like us</em> when something doesn't work out for us. We smile at graphical interfaces.</p><p>When we hear a given word, for example <em>child</em>, it evokes in us a number of emotional reactions, associations with our own childhood, the experience of being a parent, or familiar family stories from literature and television. It reminds us of emotions, smells, touches, sounds. We have many sources of knowledge that we can use to understand a situation and be able to relate to it.</p><p>LLM has not experienced life. He did not father a son, did not plant a tree, did not build a house. He is like an extreme autistic with an almost absolute memory, who has read the entire web and can quote it from memory. For LLM, a word is a vector in a semantic space, created in the learning process. It does not evoke feelings, it does not activate memories, because LLM does not have them. LLM has only textual memory, shining with the reflected light of the wisdom of the people who wrote the source texts. These texts may contain descriptions of emotions and sensory experiences, and these descriptions may be quoted and thus create the impression of understanding at a deeper level than it really is.</p><p>I don't like the term <em>artificial intelligence</em> and I deliberately avoided it in this text. It is a marketing term that misleads non-technical people, reinforcing the tendency to anthropomorphize this technology.</p><p>A computer is a calculator on steroids. A neural network is a large Excel. LLM is a text paraphrasing machine. Yes, it is a great technology with powerful potential and will undoubtedly drive the next wave of the digital revolution, automating more areas of our lives. However, it is not a philosopher's stone. Let's try to see it as it really is.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mcOK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb046ee-9f1f-48fd-8b4e-d32f1cb77573_964x964.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mcOK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb046ee-9f1f-48fd-8b4e-d32f1cb77573_964x964.png 424w, https://substackcdn.com/image/fetch/$s_!mcOK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb046ee-9f1f-48fd-8b4e-d32f1cb77573_964x964.png 848w, https://substackcdn.com/image/fetch/$s_!mcOK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb046ee-9f1f-48fd-8b4e-d32f1cb77573_964x964.png 1272w, https://substackcdn.com/image/fetch/$s_!mcOK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb046ee-9f1f-48fd-8b4e-d32f1cb77573_964x964.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mcOK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb046ee-9f1f-48fd-8b4e-d32f1cb77573_964x964.png" width="964" height="964" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0bb046ee-9f1f-48fd-8b4e-d32f1cb77573_964x964.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:964,&quot;width&quot;:964,&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_!mcOK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb046ee-9f1f-48fd-8b4e-d32f1cb77573_964x964.png 424w, https://substackcdn.com/image/fetch/$s_!mcOK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb046ee-9f1f-48fd-8b4e-d32f1cb77573_964x964.png 848w, https://substackcdn.com/image/fetch/$s_!mcOK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb046ee-9f1f-48fd-8b4e-d32f1cb77573_964x964.png 1272w, https://substackcdn.com/image/fetch/$s_!mcOK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0bb046ee-9f1f-48fd-8b4e-d32f1cb77573_964x964.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 6. Pieter Bruegel, <em>The Tower of Babel</em>.</figcaption></figure></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.learnappsec.com/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 AppSec! 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><h1>Bibliography</h1><p>To those who are eager for real knowledge, devoid of simplifications, jokes and memes, but properly saturated with mathematics, I recommend reading the following positions.</p><p>[1] Turing (1950),<em> Computing Machinery and Intelligence</em>, <a href="https://courses.cs.umbc.edu/471/papers/turing.pdf">https://courses.cs.umbc.edu/471/papers/turing.pdf</a>&nbsp;</p><p>[2] Rosenblatt (1958), <em>Perceptrons</em>, &nbsp; <a href="https://www.ling.upenn.edu/courses/cogs501/Rosenblatt1958.pdf">https://www.ling.upenn.edu/courses/cogs501/Rosenblatt1958.pdf</a>&nbsp;</p><p>[3] LeCun, Boser, Denker, Henderson, Howard, Hubbard (1989), <em>Backpropagation Applied to Handwritten Zip Code Recognition</em>, <a href="https://ieeexplore.ieee.org/document/6795724">https://ieeexplore.ieee.org/document/6795724</a>&nbsp;</p><p>[4] Glorot, Bordes, Bengio (2011), <em>Deep Sparse Rectifier Neural Networks</em>,&nbsp;<a href="https://proceedings.mlr.press/v15/glorot11a/glorot11a.pdf">https://proceedings.mlr.press/v15/glorot11a/glorot11a.pdf</a>&nbsp;</p><p>[5] Vaswani, Shazeer, Parmar, Uszkoreit, Jones, Gomez, Kaiser, Polosukhin (2017), <em>Attention Is All You Need</em>, <a href="https://arxiv.org/pdf/1706.03762">https://arxiv.org/pdf/1706.03762</a>&nbsp;</p><p>[6] Bender, Gebru, McMillan-Major, Shmitchell (2021) <em>On the Dangers of Stochastic Parrots: Can Language Models Be Too Big?</em>, <a href="https://dl.acm.org/doi/pdf/10.1145/3442188.3445922">https://dl.acm.org/doi/pdf/10.1145/3442188.3445922</a>&nbsp;</p><p></p>]]></content:encoded></item><item><title><![CDATA[Nieznośna antropomorfizacja bytu papugi]]></title><description><![CDATA[Celem tego tekstu jest wyja&#347;nienie jak dzia&#322;aj&#261; Du&#380;e Modele J&#281;zykowe (LLM) i zaproponowanie pewnych intuicji pomagaj&#261;cych zrozumie&#263; t&#281; technologi&#281; osobom nietechnicznym, oraz po&#380;artowanie sobie, bo na weso&#322;o lepiej si&#281; wiedza przyswaja.]]></description><link>https://www.learnappsec.com/p/nieznosna-antropomorfizacja-bytu</link><guid isPermaLink="false">https://www.learnappsec.com/p/nieznosna-antropomorfizacja-bytu</guid><dc:creator><![CDATA[Cezary Cerekwicki]]></dc:creator><pubDate>Sun, 13 Apr 2025 13:14:19 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4c14bc-c396-404c-9772-9c4ad76624c0_888x898.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Celem tego tekstu jest wyja&#347;nienie jak dzia&#322;aj&#261; Du&#380;e Modele J&#281;zykowe (LLM) i zaproponowanie pewnych intuicji pomagaj&#261;cych zrozumie&#263; t&#281; technologi&#281; osobom nietechnicznym, oraz po&#380;artowanie sobie, bo na weso&#322;o lepiej si&#281; wiedza przyswaja.</strong> </p><h1>Jak komputer rozumie tekst</h1><p>Z tym bywa&#322;o r&#243;&#380;nie, czego bole&#347;nie do&#347;wiadczy&#322; ka&#380;dy, kto pr&#243;bowa&#322; korzysta&#263; z automatycznych t&#322;umaczy. Komputer bowiem jest tak naprawd&#281; du&#380;ym kalkulatorem. T&#322;umaczenie za&#347; polega na czytaniu ze zrozumieniem tekstu w oryginale i napisaniu go od nowa w j&#281;zyku docelowym, a jako&#347;&#263; rezultatu b&#281;dzie wprost proporcjonalna do stopnia zrozumienia orygina&#322;u.&nbsp;</p><p>Problemem zatem by&#322;o znalezienie takiej cyfrowej reprezentacji s&#322;&#243;w, kt&#243;ra by oddawa&#322;a ich znaczenie. Zwyci&#281;zc&#261; w tej kategorii okaza&#322; si&#281; wektor, czyli jeden wiersz Excela, z liczbami w ka&#380;dej kom&#243;rce. Liczby te w jaki&#347; spos&#243;b koduj&#261; nat&#281;&#380;enie pewnych cech s&#322;owa. Taka cecha to na przyk&#322;ad miejsce w kontinuum m&#281;sko&#347;ci i &#380;e&#324;sko&#347;ci &#8211; s&#322;owo <em>racja</em> b&#281;dzie zapewne bardziej kobiece, a s&#322;owo <em>si&#322;a</em> m&#281;skie. Wektor jest takim jakby DNA s&#322;owa, koduj&#261;cym ca&#322;&#261; mas&#281; skojarze&#324; z nim zwi&#261;zanych. To DNA nie jest wprost zaprojektowane przez cz&#322;owieka, tylko wytwarza si&#281; samo w procesie uczenia sieci neuronowej, o kt&#243;rym sobie jeszcze opowiemy.&nbsp;</p><p>No dobrze, ale co na przyk&#322;ad ze s&#322;owem <em>zamek</em>? To mo&#380;e by&#263; co&#347;, czym zamykamy bluz&#281;, drzwi, albo transakcj&#281; na &#347;redniowiecznym rynku nieruchomo&#347;ci. Trzy bardzo r&#243;&#380;ne koncepcje. Co si&#281; zatem wydarzy w naszym wierszu Excela? Ot&#243;&#380; przez lata nic si&#281; nie dzia&#322;o i dlatego automatyczne t&#322;umacze dostarcza&#322;y nam wi&#281;cej powod&#243;w do szydery ni&#380; wysokiej jako&#347;ci t&#322;umacze&#324;.&nbsp;</p><p>I tu w&#322;a&#347;nie wjechali cali na bia&#322;o naukowcy, proponuj&#261;c mechanizm <em>uwagi</em> [5]. <em>Uwaga</em> to taka forma transformacji wektora, kt&#243;ra nam pozwala go zaktualizowa&#263; w oparciu o inne s&#261;siaduj&#261;ce z nim wektory; innymi s&#322;owy poznajemy s&#322;owa po towarzystwie, w jakim si&#281; obracaj&#261;. Zatem je&#347;li w zdaniu mamy s&#322;owo <em>rycerz</em> oraz <em>zamek</em> to b&#281;dzie jasne i dla nas i dla kalkulatora na sterydach, &#380;e ten zamek nie otwiera zbroi rycerza, tylko raczej stoi gdzie&#347; dumnie i zawstydza patodeweloper&#243;w.</p><p>Mechanizm uwagi pozwala LLM przekalibrowa&#263; wagi s&#322;&#243;w na podstawie ich kontekstu, aby m&#243;c skupi&#263; si&#281; na najwa&#380;niejszych cz&#281;&#347;ciach tekstu. To sprawia, &#380;e LLM lepiej rozumie tre&#347;ci i mo&#380;e generowa&#263; bardziej sensowne odpowiedzi.&nbsp;</p><p>Tak w&#322;a&#347;nie nasza cyfrowa inteligencja zrobi&#322;a si&#281; troch&#281; mniej sztuczna.&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_!TRoo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171d945a-2331-48f5-b43e-7e066aad0042_1176x870.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TRoo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171d945a-2331-48f5-b43e-7e066aad0042_1176x870.png 424w, https://substackcdn.com/image/fetch/$s_!TRoo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171d945a-2331-48f5-b43e-7e066aad0042_1176x870.png 848w, https://substackcdn.com/image/fetch/$s_!TRoo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171d945a-2331-48f5-b43e-7e066aad0042_1176x870.png 1272w, https://substackcdn.com/image/fetch/$s_!TRoo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171d945a-2331-48f5-b43e-7e066aad0042_1176x870.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TRoo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171d945a-2331-48f5-b43e-7e066aad0042_1176x870.png" width="1176" height="870" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/171d945a-2331-48f5-b43e-7e066aad0042_1176x870.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:870,&quot;width&quot;:1176,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1266706,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://learnappsec.substack.com/i/161228856?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171d945a-2331-48f5-b43e-7e066aad0042_1176x870.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TRoo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171d945a-2331-48f5-b43e-7e066aad0042_1176x870.png 424w, https://substackcdn.com/image/fetch/$s_!TRoo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171d945a-2331-48f5-b43e-7e066aad0042_1176x870.png 848w, https://substackcdn.com/image/fetch/$s_!TRoo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171d945a-2331-48f5-b43e-7e066aad0042_1176x870.png 1272w, https://substackcdn.com/image/fetch/$s_!TRoo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171d945a-2331-48f5-b43e-7e066aad0042_1176x870.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">Rysunek 1. Uczenie sieci neuronowej. </figcaption></figure></div><h1>Czym jest GPT, LLM i sie&#263; neuronowa</h1><p>C&#243;&#380; znaczy to ca&#322;e GPT w Chat GPT? Jest to akronim od Generative Pre-trained Transformer.&nbsp;</p><p><em>Transformer</em> to architektura sieci neuronowej, kt&#243;rej istot&#261; jest transformacja czego&#347; w co&#347;. Oryginalnym celem tej architektury by&#322;o stworzenie lepszego automatycznego t&#322;umacza. Architektura transformer radzi sobie dobrze tak&#380;e z innymi formami przekszta&#322;ce&#324;. Mo&#380;e transformowa&#263; d&#322;ugi tekst w kr&#243;tki, tekst w obraz, tekst w muzyk&#281; itp. Niekt&#243;rzy twierdz&#261;, &#380;e tak&#380;e programist&#243;w w bezrobotnych.&nbsp;</p><p><em>Generative</em> sugeruje, &#380;e jest to technologia, kt&#243;ra co&#347; tworzy. Stoi to w kontra&#347;cie do pierwszych zastosowa&#324; sieci neuronowych, kt&#243;re by&#322;y zazwyczaj pasywne. Sie&#263; potrafi&#322;a nam rozpozna&#263; jaki&#347; wz&#243;r, np. odcisku palca i na tej podstawie odblokowa&#263; nam telefon. Tutaj sie&#263; co&#347; nam generuje, st&#261;d jest <em>generative</em>.&nbsp;</p><p><em>Pretrained</em> to z kolei nawi&#261;zanie do do&#347;&#263; specyficznej procedury uczenia, o kt&#243;rej p&#243;&#378;nej.&nbsp;</p><p>LLM (Large Language Model) to du&#380;y model j&#281;zykowy. Tu nie ma nic niezwyk&#322;ego. Cho&#263; ludzie z bran&#380;y lubuj&#261; si&#281; w wymy&#347;laniu nadmiernie skomplikowanych lub przem&#261;drza&#322;ych nazw, to tu akurat ko&#324;, jaki jest, ka&#380;dy widzi.&nbsp;</p><p>Sie&#263; neuronowa natomiast to pewien model obliczeniowy. Mo&#380;na go sobie wyobrazi&#263; jako poka&#378;nych rozmiar&#243;w funkcj&#281; matematyczn&#261;. Te poka&#378;ne rozmiary obejmuj&#261; co&#347; w rodzaju du&#380;ego Excela, z wieloma arkuszami, a ka&#380;dy z nich zawiera du&#380;&#261; tabel&#281; z liczbami (to s&#261; <em>wagi</em> w rozumieniu sumy wa&#380;onej [2], kt&#243;ra tam jest kalkulowana). Te liczby reprezentuj&#261; wiele ma&#322;ych suwak&#243;w, wp&#322;ywaj&#261;cych w pewien spos&#243;b na wynik [4]. Je&#347;li nasza sie&#263; ma rozpoznawa&#263; odcisk palca, to na jej wej&#347;cie podajemy obraz (bitmap&#281;) palca, a na wyj&#347;ciu oczekujemy decyzji. Taki przebieg nazywamy nieskromnie <em>wnioskowaniem</em>. Natomiast kalibracj&#281; tych prze&#322;&#261;cznik&#243;w aby dobrze nam rozpoznawa&#322;y w&#322;a&#347;ciwe palce i gardzi&#322;y niew&#322;a&#347;ciwymi, nazywamy <em>uczeniem</em>.&nbsp;</p><p>W przypadku LLM sie&#263; neuronowa na wej&#347;ciu dostaje nasze zapytanie z kontekstem, a na wyj&#347;ciu zwraca wektor (jeden wiersz Excela) z prawdopodobie&#324;stwami kolejnego fragmentu tekstu. Taki fragment nazywamy tokenem. Tokenem mo&#380;e by&#263; s&#322;owo, jego fragment, albo inne cudo (dla uproszczenia b&#281;dziemy dalej udawa&#263;, &#380;e LLMy operuj&#261; na s&#322;owach a nie tokenach). W ka&#380;dym razie istotne jest to, &#380;e jeden przebieg sieci neuronowej (jedno <em>wnioskowanie</em>) daje nam tylko jedno s&#322;owo. Zatem, aby wyszed&#322; nam z tego d&#322;u&#380;szy tekst, musimy troch&#281; poczeka&#263;. Aby nam si&#281; milej czeka&#322;o, tw&#243;rcy czat&#243;w opartych o LLMy wypisuj&#261; nam tekst na bie&#380;&#261;co na ekranie.&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_!nk2S!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa31fc906-c276-43ae-93ff-4bda3861aa3f_1198x786.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nk2S!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa31fc906-c276-43ae-93ff-4bda3861aa3f_1198x786.png 424w, https://substackcdn.com/image/fetch/$s_!nk2S!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa31fc906-c276-43ae-93ff-4bda3861aa3f_1198x786.png 848w, https://substackcdn.com/image/fetch/$s_!nk2S!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa31fc906-c276-43ae-93ff-4bda3861aa3f_1198x786.png 1272w, https://substackcdn.com/image/fetch/$s_!nk2S!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa31fc906-c276-43ae-93ff-4bda3861aa3f_1198x786.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nk2S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa31fc906-c276-43ae-93ff-4bda3861aa3f_1198x786.png" width="1198" height="786" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a31fc906-c276-43ae-93ff-4bda3861aa3f_1198x786.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:786,&quot;width&quot;:1198,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1355660,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://learnappsec.substack.com/i/161228856?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa31fc906-c276-43ae-93ff-4bda3861aa3f_1198x786.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nk2S!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa31fc906-c276-43ae-93ff-4bda3861aa3f_1198x786.png 424w, https://substackcdn.com/image/fetch/$s_!nk2S!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa31fc906-c276-43ae-93ff-4bda3861aa3f_1198x786.png 848w, https://substackcdn.com/image/fetch/$s_!nk2S!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa31fc906-c276-43ae-93ff-4bda3861aa3f_1198x786.png 1272w, https://substackcdn.com/image/fetch/$s_!nk2S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa31fc906-c276-43ae-93ff-4bda3861aa3f_1198x786.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Rysunek 2. Leonardo da Vinci, <em>Ostatnia Wieczerza</em>. </figcaption></figure></div><h1>Socjalizacja pierwotna i wt&#243;rna LLM&#243;w</h1><p>LLMa noworodka wysy&#322;amy do dw&#243;ch szk&#243;&#322; &#8211; najpierw do podstaw&#243;wki (<em>pre-training</em>), gdzie nauczymy go podstawowych fakt&#243;w o &#347;wiecie, a tak&#380;e czyta&#263; i pisa&#263;. Nast&#281;pnie do zawod&#243;wki (<em>fine tuning</em>), gdzie nauczymy go zawodu pomocnego asystenta. W podstaw&#243;wce odb&#281;dzie si&#281; co&#347; na kszta&#322;t socjalizacji pierwotnej, w kt&#243;rej nasz LLM przekszta&#322;ci si&#281; w sprytny generator token&#243;w zgodnych z elementarnymi normami spo&#322;ecznymi i gramatycznymi. W zawod&#243;wce z kolei b&#281;dzie si&#281; socjalizowa&#263; wt&#243;rnie do swojej ostatecznej roli zawodowej.&nbsp;</p><p>Uczenie podstawowe przypomina nieco robienie jajecznicy na &#347;niadanie. Na pocz&#261;tek potrzebujemy g&#322;&#243;wnego sk&#322;adnika, kt&#243;rym b&#281;dzie korpus tekstu do nauki. Korpus ten musi by&#263; dobrej jako&#347;ci, inaczej jajecznica b&#281;dzie niestrawna. Jednocze&#347;nie powinien by&#263; odpowiednio du&#380;y, &#380;eby nasyci&#263; nasz g&#322;&#243;d wiedzy. Na szcz&#281;&#347;cie mamy world wide web, gdzie tekstu jest dostatek. Wprawdzie pozyskanie tekst&#243;w z netu mo&#380;e rani&#263; uczucia ich autor&#243;w oraz prawnik&#243;w od praw autorskich, ale jak mawiaj&#261; wielcy innowatorzy z Doliny Krzemowej, aby zrobi&#263; jajecznic&#281; trzeba rozbi&#263; par&#281; jajek.&nbsp;</p><p>Teksty te nale&#380;y naturalnie podda&#263; ostrej selekcji. Nie chcemy naszego pupila nasyca&#263; wiedz&#261; o kobietach z for&#243;w incelskich, uczy&#263; si&#281; medycyny od antyszczepionkowc&#243;w, astronomii od p&#322;askoziemc&#243;w, czy ekumenizmu od d&#380;ihadyst&#243;w. Nie chcemy te&#380;, by nasz LLM recytowa&#322; nam potem wierszyki z reklam. Tak wi&#281;c taki pieczo&#322;owicie oczyszczony z szumowin wywar z Internetu b&#281;dzie naszym korpusem do nauki.&nbsp;</p><p>Sama nauka polega na trenowaniu sieci neuronowej, aby nam skutecznie przewidywa&#322;a prawdopodobie&#324;stwo wyst&#261;pienia kolejnego wyrazu w sekwencji tekstu. Algorytm z grubsza wygl&#261;da tak: losujemy sobie w korpusie jak&#261;&#347; sekwencj&#281; (zdanie lub kilka zda&#324;), dajemy sieci na wej&#347;cie t&#281; sekwencj&#281; minus ostatni wyraz (token) i patrzymy, jak nam sie&#263; oceni&#322;a prawdopodobie&#324;stwo wyst&#261;pienia tego ostatniego. Im wy&#380;ej, tym lepiej &#8211; to jest nasza funkcja celu (na pocz&#261;tku parametry sieci s&#261; ustawiane na warto&#347;ci losowe, wi&#281;c wynik te&#380; b&#281;dzie przypadkowy). Potem robimy tak zwan&#261; propagacj&#281; wsteczn&#261; [3], czyli dla ka&#380;dego z parametr&#243;w sieci liczymy sobie, w kt&#243;r&#261; stron&#281; go troch&#281; przestawi&#263;, aby ten wynik na ko&#324;cu by&#322; bli&#380;szy oczekiwa&#324;. Potem losujemy kolejn&#261; sekwencj&#281; i tak w k&#243;&#322;ko.&nbsp;</p><p>Uczenie sieci neuronowej jest zwyczajnie procesem optymalizacji funkcji celu. Je&#347;li funkcja liczy nam wielko&#347;&#263; b&#322;&#281;du, to szukamy jej minimum. To jest nasz cyfrowy odpowiednik sma&#380;enia jajecznicy. Podstawowe analogie trzymaj&#261; si&#281; mocno. Jak zbyt kr&#243;tko b&#281;dziemy sma&#380;y&#263;, to nasz LLM b&#281;dzie niedouczony i mo&#380;e nam potem g&#322;osowa&#263; na populist&#243;w, albo halucynowa&#263; o elektrycznych owcach. Jak b&#281;dziemy sma&#380;y&#263; za d&#322;ugo, to zbankrutujemy z powodu rachunku za pr&#261;d. Mo&#380;e te&#380; wyst&#261;pi&#263; zjawisko <em>overfitting</em>. Nasza sie&#263; wykuje teksty &#378;r&#243;d&#322;owe na blach&#281; i zamiast nam pi&#281;knie uog&#243;lni&#263; podane przyk&#322;ady, to b&#281;dzie je bezmy&#347;lnie recytowa&#263; z liter&#243;wkami w&#322;&#261;cznie. To mo&#380;e mie&#263; r&#243;&#380;ne przykre konsekwencje. Wspomniani wcze&#347;niej prawnicy od praw autorskich tylko czekaj&#261; na takie wpadki.&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_!zWsB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6abf1ac-7146-4c2f-aa60-c0cf5ae00c30_890x894.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zWsB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6abf1ac-7146-4c2f-aa60-c0cf5ae00c30_890x894.png 424w, https://substackcdn.com/image/fetch/$s_!zWsB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6abf1ac-7146-4c2f-aa60-c0cf5ae00c30_890x894.png 848w, https://substackcdn.com/image/fetch/$s_!zWsB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6abf1ac-7146-4c2f-aa60-c0cf5ae00c30_890x894.png 1272w, https://substackcdn.com/image/fetch/$s_!zWsB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6abf1ac-7146-4c2f-aa60-c0cf5ae00c30_890x894.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zWsB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6abf1ac-7146-4c2f-aa60-c0cf5ae00c30_890x894.png" width="890" height="894" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e6abf1ac-7146-4c2f-aa60-c0cf5ae00c30_890x894.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:894,&quot;width&quot;:890,&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_!zWsB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6abf1ac-7146-4c2f-aa60-c0cf5ae00c30_890x894.png 424w, https://substackcdn.com/image/fetch/$s_!zWsB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6abf1ac-7146-4c2f-aa60-c0cf5ae00c30_890x894.png 848w, https://substackcdn.com/image/fetch/$s_!zWsB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6abf1ac-7146-4c2f-aa60-c0cf5ae00c30_890x894.png 1272w, https://substackcdn.com/image/fetch/$s_!zWsB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6abf1ac-7146-4c2f-aa60-c0cf5ae00c30_890x894.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Rysunek 3. Leonardo da Vinci, <em>Papuga witruwia&#324;ska</em>. </figcaption></figure></div><p>Podstaw&#243;wka dla LLM&#243;w trwa do&#347;&#263; d&#322;ugo, gdy&#380; zar&#243;wno ten korpus tekstu, jak i nasz Excel z parametrami naprawd&#281; zas&#322;u&#380;y&#322;y na pierwsze &#8220;L&#8221; w LLM. Czas ten mierzymy w miesi&#261;cach a bud&#380;et projektu w milionach USD. Nie pr&#243;bujcie tego w domu.&nbsp;</p><p>LLM po podstaw&#243;wce potrafi &#8220;tylko&#8221; wyduka&#263; kolejne s&#322;owa do jakiej&#347; sekwencji. Czyli jak mu damy na wej&#347;cie pierwsze zdanie jakiego&#347; artyku&#322;u z Wikipedii, to nam dopisze ci&#261;g dalszy. Sk&#261;din&#261;d pewnie s&#322;owo w s&#322;owo, bo kopiowanie Wikipedii do korpus&#243;w tego typu jest standardow&#261; praktyk&#261;. Zatem nasz LLM potrafi ju&#380; pisa&#263;, ma te&#380; pami&#281;&#263; nasycon&#261; tekstami &#378;r&#243;d&#322;owymi, kt&#243;re daj&#261; mu pewn&#261; elementarn&#261; wiedz&#281; o &#347;wiecie. Na tym etapie nasz model jest tylko generatorem dalszej cz&#281;&#347;ci tekstu, wi&#281;c do&#347;&#263; trudno by&#322;oby si&#281; nim pos&#322;u&#380;y&#263; do jaki&#347; praktycznych zastosowa&#324;.&nbsp;</p><p>Dlatego w&#322;a&#347;nie konieczne jest dalsze kszta&#322;cenie w zawod&#243;wce (<em>fine tuning</em>). Celem tej&#380;e jest przekszta&#322;cenie naszego generatora token&#243;w w asystenta odpowiadaj&#261;cego na pytania. Tutaj b&#281;dziemy naszemu LLMowi pokazywa&#263; skrypty przygotowane przez ludzkich ekspert&#243;w. Skrypt to pytanie i bardzo dobrej jako&#347;ci odpowied&#378;. Zbi&#243;r tych&#380;e skrypt&#243;w to pilnie strze&#380;ona tajemnica firm produkuj&#261;cych LLMy. Metodyki ich wytwarzania r&#243;wnie&#380; dynamicznie ewoluuj&#261;. To tu w&#322;a&#347;nie nasz podopieczny nabiera og&#322;ady, uczy si&#281; kultury s&#322;owa, szacunku dla fakt&#243;w, obowi&#261;zuj&#261;cych w spo&#322;ecze&#324;stwie konwenans&#243;w. W stopniu, ma si&#281; rozumie&#263;, proporcjonalnym do wyst&#281;powania tych&#380;e w pokazanych mu skryptach.&nbsp;</p><p>Algorytm uczenia sieci neuronowej w zawod&#243;wce jest analogiczny, przy czym tym razem uczymy sie&#263; odpowiadania na pytania (czyli wej&#347;ciem do sieci jest pytanie zwane te&#380; promptem), a jako&#347;&#263; odpowiedzi oceniamy poprzez por&#243;wnanie jej z eksperckim skryptem. Ten etap jest du&#380;o ta&#324;szy i szybszy, gdy&#380; skrypt&#243;w jest niepor&#243;wnanie mniej ni&#380; tekstu w podstaw&#243;wkowym korpusie, a tak&#380;e nasza sie&#263; nie ma ju&#380; ca&#322;kowicie przypadkowych wag. Zatem w naszej &#347;niadaniowej analogii mo&#380;na to por&#243;wna&#263; do posypania jajecznicy szczypiorkiem, dorobieniem kanapki i kawy.&nbsp;</p><h1>Moja jajecznica jest lepsza ni&#380; twoja jajecznica</h1><p>Jako&#347;&#263; wiedzy LLM jest obarczona szeregiem niedoskona&#322;o&#347;ci, b&#281;d&#261;cych naturaln&#261; konsekwencj&#261; procesu jej zbudowania. Wszystkie przek&#322;amania w korpusie zostan&#261; odzwierciedlone w sieci neuronowej naszego modelu. Zatem im lepiej reprezentowany jest dany j&#281;zyk w publicznie dost&#281;pnych tekstach internetowych, tym lepiej LLM si&#281; go nauczy. Dlatego te&#380; wszystkie LLMy b&#281;d&#261; &#347;miga&#263; po angielsku, ale raczej nie spodziewa&#322;bym si&#281; &#347;wietnego wsparcia dla j&#281;zyka kaszubskiego. Tematyka szeroko opisywana w sieci, na przyk&#322;ad wiedza z zakresu IT, zostanie przyswojona bardzo przyzwoicie. Natomiast tematyka specjalistyczna, dost&#281;pna raczej w ksi&#261;&#380;kach za paywallami, czy wr&#281;cz tylko na papierze, pozostanie tam&#380;e w&#322;a&#347;nie.&nbsp;</p><p>Kolejny problem to pewna demokratyczno&#347;&#263; procesu uczenia. Je&#347;li na jeden &#347;wietny tekst z wiedz&#261; aktualn&#261; i precyzyjn&#261; b&#281;dzie przypada&#263; dziesi&#281;&#263; przeci&#281;tnych z wiedz&#261; nieaktualn&#261;, to te ostatnie wygraj&#261;. Z tego powodu LLMy og&#243;lnego przeznaczenia b&#281;d&#261; raczej powtarza&#322;y najbardziej rozpowszechnione opinie w publicznym internecie. O ile, ma si&#281; rozumie&#263;, nie b&#281;d&#261; to na tyle kontrowersyjne opinie, &#380;eby je ocenzurowa&#263; albo w procesie selekcji danych do korpusu, albo skrypt&#243;w zawod&#243;wkowych. Chaty LLMowe maj&#261; te&#380; wbudowane dodatkowe mechanizmy obronne, np. zanim pytanie trafi do w&#322;a&#347;ciwego &#8220;silnika&#8221;, musi najpierw przej&#347;&#263; przez filtr cenzorski, kt&#243;ry sprawdza, czy to pytanie jest odpowiednio etyczne (nie chcemy ludziom pomaga&#263; konstruowa&#263; bomby czy trucizny). Niekiedy mamy te&#380; filtr &#224; la izba refleksji, czyli cenzura odpowiedzi modelu w&#322;a&#347;ciwego. Pewien model chi&#324;ski zas&#322;yn&#261;&#322; z tego, &#380;e po wygenerowaniu poprawnej merytorycznie, ale nie politycznie odpowiedzi o plac Tiananmen, dokona&#322; autocenzury.&nbsp;</p><p>Wiedza ludzko&#347;ci nie jest bynajmniej jakim&#347; pozbawionym kontrowersji konsensusem. Wr&#281;cz przeciwnie. Infosfera jest obszarem wojen politycznych, ekonomicznych, kulturowych, czy estetycznych. Wiele firm chcia&#322;oby wp&#322;yn&#261;&#263; na odpowiedzi popularnych LLM&#243;w co do tego jaki samoch&#243;d, czy proszek do prania najlepiej kupi&#263;. Rz&#261;dy pa&#324;stw maj&#261; rozbie&#380;ne opinie na temat statusu politycznego Krymu czy Tajwanu. Przygotowuj&#261;c korpus tekstu do nauki, musimy podj&#261;&#263; szereg decyzji co do cenzurowania okre&#347;lonych punkt&#243;w widzenia i promowania innych. LLM jest zatem projekcj&#261; warto&#347;ci kr&#281;gu kulturowego i politycznego, z kt&#243;rego si&#281; wywodzi jego producent, a tak&#380;e ducha czasu, w jakim korpus powsta&#322;.&nbsp;</p><p>Poka&#380; mi swoj&#261; jajecznic&#281;, a powiem ci kim jeste&#347;.&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_!jGo4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa996d3a1-36f5-45b5-91e1-857c35758dd9_1216x770.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jGo4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa996d3a1-36f5-45b5-91e1-857c35758dd9_1216x770.png 424w, https://substackcdn.com/image/fetch/$s_!jGo4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa996d3a1-36f5-45b5-91e1-857c35758dd9_1216x770.png 848w, https://substackcdn.com/image/fetch/$s_!jGo4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa996d3a1-36f5-45b5-91e1-857c35758dd9_1216x770.png 1272w, https://substackcdn.com/image/fetch/$s_!jGo4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa996d3a1-36f5-45b5-91e1-857c35758dd9_1216x770.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jGo4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa996d3a1-36f5-45b5-91e1-857c35758dd9_1216x770.png" width="1216" height="770" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a996d3a1-36f5-45b5-91e1-857c35758dd9_1216x770.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:770,&quot;width&quot;:1216,&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_!jGo4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa996d3a1-36f5-45b5-91e1-857c35758dd9_1216x770.png 424w, https://substackcdn.com/image/fetch/$s_!jGo4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa996d3a1-36f5-45b5-91e1-857c35758dd9_1216x770.png 848w, https://substackcdn.com/image/fetch/$s_!jGo4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa996d3a1-36f5-45b5-91e1-857c35758dd9_1216x770.png 1272w, https://substackcdn.com/image/fetch/$s_!jGo4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa996d3a1-36f5-45b5-91e1-857c35758dd9_1216x770.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Rysunek 4. Spieszmy si&#281; kocha&#263; dzieci. Tak szybko zaczynaj&#261; pyskowa&#263;. </figcaption></figure></div><h1>Czy stochastyczne papugi halucynuj&#261; o elektrycznych owcach?</h1><p>Co tak naprawd&#281; potrafi LLM? Jak ju&#380; ustalili&#347;my wcze&#347;niej, sercem LLM jest generator rozk&#322;adu prawdopodobie&#324;stwa kolejnego tokenu w sekwencji tekstu. Jest to obudowane pewn&#261; doz&#261; logiki, kt&#243;ra nam dostarcza relatywnie bezpieczn&#261; us&#322;ug&#281; pomocnego asystenta gotowego na wykonywanie polece&#324; i odpowiadanie na pytania. Tak naprawd&#281; podstawow&#261; kompetencj&#261; LLM jest parafrazowanie tekstu. Mo&#380;e to by&#263; tekstu wyuczony w podstaw&#243;wce lub zawod&#243;wce. Mo&#380;e by&#263; pozyskany z wyszukiwarki internetowej. Mo&#380;e by&#263; podany przez u&#380;ytkownika. Tylko tyle i a&#380; tyle.&nbsp;</p><p>St&#261;d w&#322;a&#347;nie wzi&#281;&#322;a si&#281; metafora <em>stochastycznej papugi</em> [6]. LLM nie wytwarza nowej wiedzy, tylko papuguje (parafrazuje) wiedz&#281; ju&#380; istniej&#261;c&#261;. W dodatku robi w spos&#243;b stochastyczny, wi&#281;c jest pewnego rodzaju kasynem, w kt&#243;rym odpowiedzi si&#281; losuj&#261; w wielkiej ruletce z tokenami. Nie bez powodu producenci LLM&#243;w ostrzegaj&#261;, by nie pyta&#263; ich produkt&#243;w o porady medyczne, prawne, czy jakiekolwiek inne, w kt&#243;rych z&#322;a odpowied&#378; mog&#322;aby spowodowa&#263;, &#380;e do krwio&#380;erczo nastawionych prawnik&#243;w od praw autorskich do&#322;&#261;czyliby prawnicy innych specjalno&#347;ci.&nbsp;</p><p>Mo&#380;na na to patrze&#263; jak na szklank&#281; do po&#322;owy pust&#261; albo do po&#322;owy pe&#322;n&#261;. Sceptycy technologiczni powiedz&#261;, &#380;e jest to ostateczny dow&#243;d na indolencj&#281; LLM&#243;w oraz ich nieuchronn&#261; ni&#380;szo&#347;&#263; wobec naszego ludzkiego, wstrz&#261;saj&#261;cego potencja&#322;u intelektualnego. Entuzja&#347;ci natomiast, &#380;e co niby z tego? Internet to &#8220;tylko&#8221; sie&#263; lokalnych sieci komputerowych, a wystarczy&#322;o, &#380;eby zrewolucjonizowa&#263; &#347;wiat. Kom&#243;rka to &#8220;tylko&#8221; kieszonkowy pecet z radiem. Wreszcie, czy ludzko&#347;&#263; aby na pewno dobrze wykorzystuje ca&#322;&#261; ju&#380; dost&#281;pn&#261; wiedz&#281;, &#380;eby brak zdolno&#347;ci LLM&#243;w do wytwarzania nowej mia&#322; by&#263; jakim&#347; szczeg&#243;lnym ograniczeniem?&nbsp;</p><p>Parafrazowanie tekstu to podstawowa kompetencja, kt&#243;rej si&#281; od nas oczekuje w procesie edukacji. Prawie wszystkie egzaminy od podstaw&#243;wki po certyfikaty zawodowe polegaj&#261; albo na odpowiedzi na szereg pyta&#324; o dany tekst, napisaniu eseju na temat opisany w innym tek&#347;cie, albo rozwi&#261;zaniu zadania matematycznego. LLMy &#347;wietnie sobie radz&#261; z dwoma pierwszymi, a do trzeciego jest inny software (np. Wolfram Alpha). To nam co&#347; m&#243;wi nie tylko o rozwoju informatyki, ale chyba nawet wi&#281;cej o naszych systemach edukacji.&nbsp;</p><p>Czym innym, jak parafrazowaniem tekstu jest jaka&#347; cz&#281;&#347;&#263; pracy t&#322;umacza, dziennikarza, nauczyciela, pracownika infolinii, doradcy kredytowego, sprzedawcy i wielu, wielu innych?&nbsp;</p><p>W jakim&#347; zakresie wszyscy jeste&#347;my stochastycznymi papugami.&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_!wYUp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4c14bc-c396-404c-9772-9c4ad76624c0_888x898.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wYUp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4c14bc-c396-404c-9772-9c4ad76624c0_888x898.png 424w, https://substackcdn.com/image/fetch/$s_!wYUp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4c14bc-c396-404c-9772-9c4ad76624c0_888x898.png 848w, https://substackcdn.com/image/fetch/$s_!wYUp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4c14bc-c396-404c-9772-9c4ad76624c0_888x898.png 1272w, https://substackcdn.com/image/fetch/$s_!wYUp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4c14bc-c396-404c-9772-9c4ad76624c0_888x898.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wYUp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4c14bc-c396-404c-9772-9c4ad76624c0_888x898.png" width="888" height="898" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3c4c14bc-c396-404c-9772-9c4ad76624c0_888x898.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:898,&quot;width&quot;:888,&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_!wYUp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4c14bc-c396-404c-9772-9c4ad76624c0_888x898.png 424w, https://substackcdn.com/image/fetch/$s_!wYUp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4c14bc-c396-404c-9772-9c4ad76624c0_888x898.png 848w, https://substackcdn.com/image/fetch/$s_!wYUp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4c14bc-c396-404c-9772-9c4ad76624c0_888x898.png 1272w, https://substackcdn.com/image/fetch/$s_!wYUp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4c14bc-c396-404c-9772-9c4ad76624c0_888x898.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Rysunek 5. Edvard Munch, <em>Krzyk. </em></figcaption></figure></div><h1>Niezno&#347;na antropomorfizacja bytu papugi</h1><p>Ludzie maj&#261; tendencj&#281; do projektowania swojego cz&#322;owiecze&#324;stwa na otoczenie. M&#243;wimy, &#380;e komputer <em>my&#347;li</em>, gdy ten przez chwil&#281; nie odpowiada. M&#243;wimy, &#380;e <em>komputer nas nie lubi,</em> gdy co&#347; nam nie wychodzi. U&#347;miechamy si&#281; do interfejs&#243;w graficznych.&nbsp;</p><p>Kiedy s&#322;yszymy dane s&#322;owo, na przyk&#322;ad <em>dziecko</em>, budzi to w nas szereg reakcji emocjonalnych, skojarze&#324; z w&#322;asnym dzieci&#324;stwem, do&#347;wiadczenia bycia rodzicem, czy znanych nam historii rodzinnych z literatury i telewizji. Przypomina nam to emocje, zapachy, dotyki, d&#378;wi&#281;ki. Mamy wiele &#378;r&#243;de&#322; wiedzy, z kt&#243;rych mo&#380;emy korzysta&#263;, aby zrozumie&#263; jak&#261;&#347; sytuacj&#281; i m&#243;c si&#281; do niej odnie&#347;&#263;.&nbsp;</p><p>LLM nie do&#347;wiadczy&#322; &#380;ycia. Nie sp&#322;odzi&#322; syna, nie zasadzi&#322; drzewa, nie zbudowa&#322; domu. To taki skrajny autystyk z pami&#281;ci&#261; niemal absolutn&#261;, kt&#243;ry przeczyta&#322; ca&#322;y web i potrafi go cytowa&#263; z pami&#281;ci. Dla LLMa s&#322;owo jest wektorem w przestrzeni semantycznej, wytworzonej w procesie uczenia. Nie budzi uczu&#263;, nie aktywuje wspomnie&#324;, bo takowych LLM nie posiada. LLM ma tylko pami&#281;&#263; tekstow&#261;, &#347;wiec&#261;c&#261; &#347;wiat&#322;em odbitym m&#261;dro&#347;ci ludzi, kt&#243;rzy napisali teksty &#378;r&#243;d&#322;owe. W tych tekstach mog&#261; si&#281; znajdowa&#263; opisy emocji i do&#347;wiadcze&#324; sensorycznych i te opisy mog&#261; by&#263; zacytowane i tym samym stworzy&#263; wra&#380;enie rozumienia na g&#322;&#281;bszym poziomie, ni&#380; ono naprawd&#281; ma miejsce.&nbsp;</p><p>Nie przepadam za okre&#347;leniem <em>sztuczna inteligencja</em> i &#347;wiadomie unika&#322;em go w tym tek&#347;cie. Jest to poj&#281;cie marketingowe, kt&#243;re wprowadza w b&#322;&#261;d osoby nietechniczne, wzmacniaj&#261;c tendencj&#281; do antropomorfizacji tej technologii.&nbsp;</p><p>Komputer to kalkulator na sterydach. Sie&#263; neuronowa to du&#380;y Excel. LLM to automat do parafrazowania tekstu. Owszem, jest to wspania&#322;a technologia o pot&#281;&#380;nym potencjale i bez w&#261;tpienia nap&#281;dzi ona kolejn&#261; fal&#281; cyfrowej rewolucji, automatyzuj&#261;c kolejne obszary naszego &#380;ycia. Nie jest to jednak kamie&#324; filozoficzny. Postarajmy si&#281; j&#261; widzie&#263; tak&#261;, jak&#261; naprawd&#281; jest.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BrC5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c79456-1b8b-47f1-a935-d9972fbb0942_1598x1600.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BrC5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c79456-1b8b-47f1-a935-d9972fbb0942_1598x1600.png 424w, https://substackcdn.com/image/fetch/$s_!BrC5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c79456-1b8b-47f1-a935-d9972fbb0942_1598x1600.png 848w, https://substackcdn.com/image/fetch/$s_!BrC5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c79456-1b8b-47f1-a935-d9972fbb0942_1598x1600.png 1272w, https://substackcdn.com/image/fetch/$s_!BrC5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c79456-1b8b-47f1-a935-d9972fbb0942_1598x1600.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BrC5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c79456-1b8b-47f1-a935-d9972fbb0942_1598x1600.png" width="1456" height="1458" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/78c79456-1b8b-47f1-a935-d9972fbb0942_1598x1600.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1458,&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_!BrC5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c79456-1b8b-47f1-a935-d9972fbb0942_1598x1600.png 424w, https://substackcdn.com/image/fetch/$s_!BrC5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c79456-1b8b-47f1-a935-d9972fbb0942_1598x1600.png 848w, https://substackcdn.com/image/fetch/$s_!BrC5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c79456-1b8b-47f1-a935-d9972fbb0942_1598x1600.png 1272w, https://substackcdn.com/image/fetch/$s_!BrC5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78c79456-1b8b-47f1-a935-d9972fbb0942_1598x1600.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Rysunek 6. Pieter Bruegel, <em>Wie&#380;a Babel</em>.</figcaption></figure></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.learnappsec.com/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">Istnieje niezerowa szansa, &#380;e jeszcze co&#347; kiedy&#347; napisz&#281;. Je&#347;li chcesz si&#281; o tym dowiedzie&#263;, zapisz si&#281; prosz&#281; na list&#281; subskrybent&#243;w. </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><h1>Literatura</h1><p>Osobom &#380;&#261;dnym prawdziwej wiedzy, pozbawionej uproszcze&#324;, &#380;art&#243;w i mem&#243;w, za to nale&#380;ycie nasyconej matematyk&#261;, polecam lektur&#281; nast&#281;puj&#261;cych pozycji.&nbsp;</p><p>[1] Turing (1950),<em> Computing Machinery and Intelligence</em>, <a href="https://courses.cs.umbc.edu/471/papers/turing.pdf">https://courses.cs.umbc.edu/471/papers/turing.pdf</a>&nbsp;</p><p>[2] Rosenblatt (1958), <em>Perceptrons</em>, &nbsp; <a href="https://www.ling.upenn.edu/courses/cogs501/Rosenblatt1958.pdf">https://www.ling.upenn.edu/courses/cogs501/Rosenblatt1958.pdf</a>&nbsp;</p><p>[3] LeCun, Boser, Denker, Henderson, Howard, Hubbard (1989), <em>Backpropagation Applied to Handwritten Zip Code Recognition</em>, <a href="https://ieeexplore.ieee.org/document/6795724">https://ieeexplore.ieee.org/document/6795724</a>&nbsp;</p><p>[4] Glorot, Bordes, Bengio (2011), <em>Deep Sparse Rectifier Neural Networks</em>,&nbsp;<a href="https://proceedings.mlr.press/v15/glorot11a/glorot11a.pdf">https://proceedings.mlr.press/v15/glorot11a/glorot11a.pdf</a>&nbsp;</p><p>[5] Vaswani, Shazeer, Parmar, Uszkoreit, Jones, Gomez, Kaiser, Polosukhin (2017), <em>Attention Is All You Need</em>, <a href="https://arxiv.org/pdf/1706.03762">https://arxiv.org/pdf/1706.03762</a>&nbsp;</p><p>[6] Bender, Gebru, McMillan-Major, Shmitchell (2021) <em>On the Dangers of Stochastic Parrots: Can Language Models Be Too Big?</em>, <a href="https://dl.acm.org/doi/pdf/10.1145/3442188.3445922">https://dl.acm.org/doi/pdf/10.1145/3442188.3445922</a>&nbsp;</p><p></p>]]></content:encoded></item><item><title><![CDATA[Binary exploitation learning path]]></title><description><![CDATA[What to do if you have a couple of years to invest]]></description><link>https://www.learnappsec.com/p/binary-exploitation-learning-path</link><guid isPermaLink="false">https://www.learnappsec.com/p/binary-exploitation-learning-path</guid><dc:creator><![CDATA[Cezary Cerekwicki]]></dc:creator><pubDate>Mon, 08 Apr 0002 19:56:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!i60J!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd373989-0063-4bf3-a97e-4ad7238f3fd3_1024x608.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>This article presents a learning path from a total noob to a mid-level binary exploitation specialist capable of understanding cutting-edge security research and writing exploits.</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!i60J!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd373989-0063-4bf3-a97e-4ad7238f3fd3_1024x608.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i60J!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd373989-0063-4bf3-a97e-4ad7238f3fd3_1024x608.png 424w, https://substackcdn.com/image/fetch/$s_!i60J!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd373989-0063-4bf3-a97e-4ad7238f3fd3_1024x608.png 848w, https://substackcdn.com/image/fetch/$s_!i60J!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd373989-0063-4bf3-a97e-4ad7238f3fd3_1024x608.png 1272w, https://substackcdn.com/image/fetch/$s_!i60J!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd373989-0063-4bf3-a97e-4ad7238f3fd3_1024x608.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i60J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd373989-0063-4bf3-a97e-4ad7238f3fd3_1024x608.png" width="1024" height="608" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fd373989-0063-4bf3-a97e-4ad7238f3fd3_1024x608.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:608,&quot;width&quot;:1024,&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;: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_!i60J!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd373989-0063-4bf3-a97e-4ad7238f3fd3_1024x608.png 424w, https://substackcdn.com/image/fetch/$s_!i60J!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd373989-0063-4bf3-a97e-4ad7238f3fd3_1024x608.png 848w, https://substackcdn.com/image/fetch/$s_!i60J!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd373989-0063-4bf3-a97e-4ad7238f3fd3_1024x608.png 1272w, https://substackcdn.com/image/fetch/$s_!i60J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd373989-0063-4bf3-a97e-4ad7238f3fd3_1024x608.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"></figcaption></figure></div><h2><strong>Why should you learn that anyhow?</strong></h2><p>Some of the greatest achievements in offensive security would be hacking a smartphone, web browser, OS kernel, IoT device or remote server. There&#8217;s only one category of offensive skills that can hit all of those targets. If you want to at least understand how those great hacks actually work, you need to acquire a certain body of knowledge. </p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.learnappsec.com/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 AppSec! Subscribe for free to receive new posts and support my work.</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>This subject is quite huge. <strong>It will take 3-5 years to get through it, depending on how much you already know and how much time you are willing to invest</strong>. So to make this more approachable, we need to make some decisions. </p><h2><strong>Choose the CPU architecture</strong></h2><p>The default choice would be x86. It&#8217;s as mainstream as it gets, which means you&#8217;ll have plenty of materials to learn from. This architecture dominates the desktop and laptop market and is also prevalent on servers. ARM would be a good choice, if you&#8217;re into smartphones and IoT.</p><p>There are quite a lot of other architectures to choose from, but unless you have good reasons to specialize in any of them, I would recommend starting your adventure with either of those two. It&#8217;s best to build strong foundations before going into any of the niches.</p><h2><strong>Choose the OS</strong></h2><p>The default choice would probably be Linux. You should know it anyhow. It&#8217;s widespread, open source, and well documented. If you later decide to pivot to Android (or even macOS), your investment in Linux will pay dividends. The <a href="https://pwn.college/">pwn.college</a> has some introductory materials. <a href="https://www.amazon.com/Linux-Basics-Hackers-Networking-Scripting/dp/1593278551">Linux Basics for Hackers</a> also comes highly recommended. If you&#8217;re a bookworm type like me, you will enjoy reading all books from people like Eric S. Raymond, Richard Stallman, and Linus Torvalds. If you aren&#8217;t, then at least skim through <a href="http://www.catb.org/~esr/writings/taoup/html/">The Art of Unix Programming</a>. </p><p>Windows is very different. It&#8217;s quite hard to learn its low-level mechanics. On the other hand, it&#8217;s used a lot in businesses and on desktops. A steeper learning curve means more hardship but also less competition. Reading <a href="https://www.amazon.com/Windows-Internals-Part-architecture-management/dp/0735684189">Windows Internals</a> by Andrea Allievi, Mark E. Russinovich, Alex Ionescu, and David A. Solomon would be a good start.</p><p>Finally, there are macOS and iOS. Likely the hardest and the most expensive to learn. The <a href="https://taomm.org/">Art of Mac Malware</a> by Patrick Wardle is highly recommended as a starting point. It&#8217;s available online for free. </p><h2><strong>Choose the assembly flavor</strong></h2><p>Default: Intel (assuming x86).</p><p>I know very few people who know both flavors well but prefer AT&amp;T. It is, however, important to be able to read it anyhow, as some books and articles use it. For starters, you can read <a href="https://en.wikipedia.org/wiki/X86_assembly_language#Syntax">this short explainer</a> of key differences.</p><p>Allright, we&#8217;ve made some key decisions, we can get started.</p><h2><strong>Learn assembly</strong></h2><p>First and foremost, learn the assembly of your chosen architecture.</p><p>You&#8217;re unlikely to ever need to write any assembly more complex and longer than a typical shell code. You need, however, to be able to understand the kind of assembly the compiler generates.</p><p>By learning to use the language, you&#8217;ll also understand how the CPU works from a programmer&#8217;s point of view, what key data structures are there, calling conventions, how memory segmentation works, and so on. The big bonus here is that these things are very similar in all architectures and operating systems, so the time invested into it is really well spent.</p><p>I learned assembly years ago from Polish books and articles. Today it&#8217;s way simpler, there are lots of materials on the web. I can recommend brand new pwn.college&#8217;s <a href="https://dojo.pwn.college/cse466/challenges/asm">Assembly Crash Course</a>.</p><h2><strong>Learn C</strong></h2><p>I used the classical &#8220;The C Programming Language&#8221; by Brian Kernighan and Dennis Ritchie. The next logical step would be reviewing <a href="https://en.cppreference.com/w/c">the standards</a>.This language is simple, so I&#8217;d suggest learning it in full. It&#8217;s a rock-solid investment. Nearly all low-level software is written in C. Reverse engineering tools use C-like pseudocode. Probably all latter languages of the imperative paradigm use plenty of C concepts.</p><p>Decent knowledge of assembly and C is an absolute must-have for any low-level security work.</p><h2><strong>Learn C++</strong></h2><p>The necessity of learning C++ today could be debated. It is, however, still a dominant language of a lot of security-critical software (like web browsers).</p><p>If you are interested only in security aspects, you don&#8217;t really have to master the language. Also, &#8220;mastering C++&#8221; is a lifelong commitment, probably not worth it. C++ is by far the most complex programming language ever invented, and that&#8217;s not a compliment. It&#8217;s hard to overstate the amount of damage caused by the fact that memory safety was never a priority of its design.</p><p>I personally started with the classical &#8220;The C++ Programming Language&#8221; by Bjarne Stroustrup. The most recent edition explains C++11.</p><p>For more recent updates and further development, I can recommend the <a href="https://www.youtube.com/user/CppCon">CppCon YT channel</a> and the <a href="https://en.cppreference.com/w/cpp/20">current revision of the C++ standard</a>.</p><h2><strong>Learn your chosen OS programmatically</strong></h2><p>Well, write some software. Read the relevant books (I suggested some starting points earlier). Get familiar with compilers, debuggers, and IDEs.</p><p>Some of the stuff you should figure out: </p><ul><li><p>What security boundaries are there (here&#8217;s <a href="https://www.microsoft.com/en-us/msrc/windows-security-servicing-criteria">a list for MS Windows</a>)?</p></li><li><p>Which code integrity controls are in place?</p></li><li><p>Which security measures are in place to protect the stack and the heap?</p></li><li><p>What are typical local privilege escalation vectors?</p></li><li><p>&#8230;and much, much more.</p></li></ul><p>Playing CTFs could be a great way of getting practically familiar with the security aspects of your chosen OS and platform. Read write-ups of CTF challenges you weren&#8217;t able to solve. Then try again. Next time you should be able to solve it on your own. Repeat the process.</p><h2><strong>Learn debugging and reverse engineering</strong></h2><p>In other words, dynamic and static analysis of a binary. A smart strategy would be to learn cross-platform open source tools for software reversing, such as <a href="https://ghidra-sre.org/">Ghidra</a>.</p><p>Choosing lldb over gdb may be a good idea if you&#8217;re working with the LLVM ecosystem across multiple OSes (even more so if one is macOS). Commands <a href="https://lldb.llvm.org/use/map.html">differ a bit</a>, which is annoying when you have to switch. </p><p>On the other hand, gdb has great extensions such as <a href="https://hugsy.github.io/gef/">GEF</a> or <a href="https://github.com/pwndbg/pwndbg">pwndbg</a>. As always, it&#8217;s best to know all of it. </p><p>For Windows, knowing <a href="https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/debugger-download-tools">WinDbg</a>, <a href="https://x64dbg.com/">x64dbg</a>, and <a href="https://visualstudio.microsoft.com/">MS Visual Studio</a>would be a nice combo.</p><h2><strong>Learn relevant vulnerabilities and attacks</strong></h2><p>Now that you know the very basics, you can read the classics with full understanding. You can start with the original <a href="https://insecure.org/stf/smashstack.html">Smashing The Stack For Fun And Profit</a> (or its <a href="https://avicoder.me/2016/02/01/smashsatck-revived/">newer rewrite</a>). Today we&#8217;d call it stack-based buffer overflow (to distinguish from two other subclasses, the global and heap-based). Reading old stuff like that is fun, but a lot has changed since then. For a much more up-to-date and comprehensive introduction I suggest attending the <a href="https://pwn.college/">pwn.college</a>.</p><p>Looking at the basic classes of vulnerabilities for <a href="https://cwe.mitre.org/data/definitions/659.html">programs written in C++</a> and those <a href="https://cwe.mitre.org/data/definitions/658.html">written in C</a> should give you an idea of what you already know and what&#8217;s still out there.</p><p>You can check out <a href="https://twitter.com/LiveOverflow">LiveOverflow&#8217;s</a> <a href="https://www.youtube.com/watch?v=iyAyN3GFM7A&amp;list=PLhixgUqwRTjxglIswKp9mpkfPNfHkzyeN">binary exploitation playlist</a>.</p><h2><strong>Learn fuzzing</strong></h2><p>The number one technique for finding bugs to exploit is fuzzing. I can recommend <a href="https://fuzzing.in/">courses</a> of my friend <a href="https://twitter.com/hardik05">Hardik</a>, some of which you can also find on YouTube. <a href="https://www.youtube.com/watch?v=m7tJkeW6H58">This one</a>, for instance, covers both Linux and Windows.</p><p>Once you know the basics, I suggest trying to rediscover some of the known CVEs. This will give you a realistic bug hunter experience. <a href="https://twitter.com/Nosoynadiemas">Antonio</a> made <a href="https://github.com/antonio-morales/Fuzzing101">a nice set of challenges</a> like this.</p><h2><strong>Learn advanced exploitation techniques</strong></h2><p>It&#8217;s worth knowing <a href="https://hovav.net/ucsd/dist/rop.pdf">Return-Oriented Programming</a>, <a href="https://n.ethz.ch/~sshivaji/publications/dop_oakland16.pdf">Data-Oriented Programming</a>, and <a href="https://www.comp.nus.edu.sg/~liangzk/papers/asiaccs11.pdf">Jump-Oriented Programming</a>.</p><p>Read the article <a href="https://sensepost.com/blog/2017/painless-intro-to-the-linux-userland-heap/">Painless intro to the Linux userland heap</a> by Javier Jimenez. Then watch Max Kamper&#8217;s <a href="https://www.youtube.com/watch?v=6-Et7M7qJJg">Introduction To GLIBC Heap Exploitation</a>, and read his <a href="https://github.com/one2blame/heaplab/blob/master/challenges/HeapLAB%20Bible.pdf">HEAPLAB. GLIBC Heap Exploitation Bible</a>.</p><p>You&#8217;d enjoy watching <a href="https://twitter.com/fuzzwalls">Evan Walls</a>&#8217;s <a href="https://www.youtube.com/watch?v=mPK0KQTegHg&amp;t=204s">How to Weaponize a Vulnerability</a> and <a href="https://www.youtube.com/watch?v=0-_Wtz5L9ZY">How to Write Shellcode</a>. I found the second part of the latter particularly beautiful in terms of how to deliver a great live programming talk.</p><p>If you&#8217;re into Windows, you can read the works of <a href="https://twitter.com/j00ru">j00ru</a> and <a href="https://twitter.com/gynvael">Gynvael</a>, such as <a href="http://vexillium.org/dl.php?/Windows_Kernel-mode_GS_Cookies_subverted.pdf">this one</a>.</p><p>Understand new mitigations such as <a href="https://arxiv.org/pdf/1802.09517.pdf">Memory Tagging</a>, <a href="https://www.qualcomm.com/content/dam/qcomm-martech/dm-assets/documents/pointer-auth-v7.pdf">Pointer Authentication on ARM</a>, and the <a href="https://googleprojectzero.blogspot.com/2019/02/examining-pointer-authentication-on.html">analysis of its resistance</a>against real-world attacks. For a nice example of what hacking a smartphone looks like, read the epic <a href="https://googleprojectzero.blogspot.com/2020/07/mms-exploit-part-1-introduction-to-qmage.html">MMS Exploit</a> series by <a href="https://twitter.com/j00ru">j00ru</a>.</p><h2><strong>Finally, reach for the cutting edge</strong></h2><p>Identify and follow experts on your chosen field of specialty. Watch their talks, read their books and articles. Follow key conferences and watch current talks from your area.</p><p>Read <a href="https://googleprojectzero.blogspot.com/">Google Project Zero blog</a>. The more you understand from those posts, the closer you are to your goal.</p><p>Well, that would be it. If I missed something, feel free to reach out to me. I&#8217;d be happy to amend the article.</p><p>Happy hacking. &#128578;</p><p><em>I&#8217;d like to thank AtomicNicos and <a href="https://twitter.com/gynvael">Gynvael Coldwind</a> for reviewing the text and suggesting improvements.</em></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.learnappsec.com/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 AppSec! Subscribe for free to receive new posts and support my work.</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>