<?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[Keyvan's blog]]></title><description><![CDATA[I write about anything that catches my interest. I'm interested in web development, digital publishing systems, media and politics. I work on FiveFilters.org and Mochi.is.]]></description><link>https://blog.keyvan.net</link><image><url>https://substackcdn.com/image/fetch/$s_!uKt1!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e7d9c52-9b9b-4715-a205-d0e35674da3a_350x350.png</url><title>Keyvan&apos;s blog</title><link>https://blog.keyvan.net</link></image><generator>Substack</generator><lastBuildDate>Mon, 19 Oct 2026 21:59:44 GMT</lastBuildDate><atom:link href="https://blog.keyvan.net/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Keyvan]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[keyvan@keyvan.net]]></webMaster><itunes:owner><itunes:email><![CDATA[keyvan@keyvan.net]]></itunes:email><itunes:name><![CDATA[Keyvan]]></itunes:name></itunes:owner><itunes:author><![CDATA[Keyvan]]></itunes:author><googleplay:owner><![CDATA[keyvan@keyvan.net]]></googleplay:owner><googleplay:email><![CDATA[keyvan@keyvan.net]]></googleplay:email><googleplay:author><![CDATA[Keyvan]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[An AI label isn’t a spam label]]></title><description><![CDATA[Pangram&#8217;s Gmail integration invites you to treat AI-assisted writing as spam]]></description><link>https://blog.keyvan.net/p/dont-filter-your-email-based-on-ai</link><guid isPermaLink="false">https://blog.keyvan.net/p/dont-filter-your-email-based-on-ai</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Mon, 19 Oct 2026 00:44:23 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!lTie!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03cd6c38-9c4f-4838-85b9-8bb23d20cef5_1672x941.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lTie!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03cd6c38-9c4f-4838-85b9-8bb23d20cef5_1672x941.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lTie!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03cd6c38-9c4f-4838-85b9-8bb23d20cef5_1672x941.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lTie!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03cd6c38-9c4f-4838-85b9-8bb23d20cef5_1672x941.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lTie!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03cd6c38-9c4f-4838-85b9-8bb23d20cef5_1672x941.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lTie!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03cd6c38-9c4f-4838-85b9-8bb23d20cef5_1672x941.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lTie!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03cd6c38-9c4f-4838-85b9-8bb23d20cef5_1672x941.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/03cd6c38-9c4f-4838-85b9-8bb23d20cef5_1672x941.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:230973,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.keyvan.net/i/220960516?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03cd6c38-9c4f-4838-85b9-8bb23d20cef5_1672x941.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lTie!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03cd6c38-9c4f-4838-85b9-8bb23d20cef5_1672x941.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lTie!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03cd6c38-9c4f-4838-85b9-8bb23d20cef5_1672x941.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lTie!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03cd6c38-9c4f-4838-85b9-8bb23d20cef5_1672x941.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lTie!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03cd6c38-9c4f-4838-85b9-8bb23d20cef5_1672x941.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In August I wrote about why I think AI detectors in general are a <a href="https://blog.keyvan.net/p/ai-stigma-punishes-legitimate-use">bad idea</a>: a positive detection tells you almost nothing about the human effort that went into the work being flagged. And yet, I wrote, AI detectors are being used &#8220;almost like spam filters&#8221;. </p><p>Less than a month after that post, Pangram, one of the leading AI detectors, released a Gmail integration. Let&#8217;s put aside, for now, the privacy implications of sending all your incoming email to a third-party company, and focus on how it&#8217;s being sold.</p><h3>Pangram can&#8217;t detect slop</h3><p>In Gizmodo, Bruce Gil wrote a piece credulously titled <em><a href="https://gizmodo.com/pangram-can-now-check-your-gmail-for-ai-slop-2000813447">Pangram Can Now Check Your Gmail for AI Slop</a></em><a href="https://gizmodo.com/pangram-can-now-check-your-gmail-for-ai-slop-2000813447">.</a> </p><p>Pangram, in fact, <em>cannot</em> check your email for AI slop. It can only check for signs of AI use. It has no way of judging the quality of what it flags, to know if it&#8217;s slop or not.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a></p><p>Gil goes on to write:</p><blockquote><p>&#8230;users can choose to automatically archive emails labeled as AI, or just send them straight to spam.</p></blockquote><p>Pangram itself suggests this on its page for the integration.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4kII!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0589b6c6-477b-4ef3-9c87-7898d3d0e2d2_621x505.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4kII!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0589b6c6-477b-4ef3-9c87-7898d3d0e2d2_621x505.png 424w, https://substackcdn.com/image/fetch/$s_!4kII!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0589b6c6-477b-4ef3-9c87-7898d3d0e2d2_621x505.png 848w, https://substackcdn.com/image/fetch/$s_!4kII!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0589b6c6-477b-4ef3-9c87-7898d3d0e2d2_621x505.png 1272w, https://substackcdn.com/image/fetch/$s_!4kII!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0589b6c6-477b-4ef3-9c87-7898d3d0e2d2_621x505.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4kII!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0589b6c6-477b-4ef3-9c87-7898d3d0e2d2_621x505.png" width="353" height="287.061191626409" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0589b6c6-477b-4ef3-9c87-7898d3d0e2d2_621x505.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:505,&quot;width&quot;:621,&quot;resizeWidth&quot;:353,&quot;bytes&quot;:40273,&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://blog.keyvan.net/i/220960516?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0589b6c6-477b-4ef3-9c87-7898d3d0e2d2_621x505.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_!4kII!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0589b6c6-477b-4ef3-9c87-7898d3d0e2d2_621x505.png 424w, https://substackcdn.com/image/fetch/$s_!4kII!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0589b6c6-477b-4ef3-9c87-7898d3d0e2d2_621x505.png 848w, https://substackcdn.com/image/fetch/$s_!4kII!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0589b6c6-477b-4ef3-9c87-7898d3d0e2d2_621x505.png 1272w, https://substackcdn.com/image/fetch/$s_!4kII!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0589b6c6-477b-4ef3-9c87-7898d3d0e2d2_621x505.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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">Pangram: &#8220;Choose to auto-send flagged mail to spam or archive&#8221;</figcaption></figure></div><p>This feature removes any email flagged as AI from your inbox, so you don&#8217;t even have to look at it. Neither Pangram nor Gil seems concerned that real people&#8217;s perfectly legitimate emails could land in spam if this is switched on.</p><p>The only concern expressed in Gil&#8217;s piece is about false positives: emails written without AI assistance but flagged as AI. And he&#8217;s quick to reassure readers that it shouldn&#8217;t be a big worry:</p><blockquote><p>Pangram claims its detector can identify AI-generated text with 99.98% accuracy, and an independent study that compared multiple AI-detection tools found Pangram to be the most effective.</p></blockquote><p>This reinforces the idea that as long as the classification is correct, the content being classified must be trash and can safely be consigned to the spam folder.</p><h3>AI-assisted email writing is not spam</h3><p>Real people use AI to help them write emails. Often because they&#8217;re short on time and worried that a hurried email will come across as curt, or because they want to improve clarity, or because they&#8217;re not writing in their native language.</p><p>Thanks to research projects like LMArena and WildChat, we have thousands of examples of real AI chat prompts and responses related to email writing. I&#8217;ll share two below to give you an idea:</p><h4>#1: Human prompt</h4><blockquote><p>can you please fix this email</p><p>Hello Professor [redacted],</p><p>I hope this email finds you well.</p><p>I just wanted to inform you about an issue I have been&nbsp;having with the course. I do not know if the rest of the class has had this. None of your recordings have been posted for me since week 3. Initially, I thought that something happened so I did not know what to do exactly. I kept doing the discussions and the quizzes. But, I still have not taken the mid-term exam and have not done the projects that include&nbsp;using Azure.</p><p>Again I do not know if this is an issue just for me or if you have been absent. Also, I am sorry if I should have informed you earlier about this issue.</p><p>Looking forward to hearing from you.</p><p>All&nbsp;the best, [redacted]</p></blockquote><h4>#1: AI rewrite</h4><blockquote><p>Dear Professor [redacted],</p><p>I hope this email finds you well. I am writing to inform you about an issue I have been experiencing with the course. I have not been able to access any of your recordings since week 3, and I am unsure if the rest of the class has had this problem.</p><p>Initially, I thought that there may have been a technical issue, but despite being able to complete discussions and quizzes, I have not been able to take the midterm exam or the projects that involve using Azure.</p><p>I apologize if I should have brought this to your attention sooner, and I am not sure if this is an issue just for me or if you have been absent. I would appreciate any assistance you can provide in resolving this matter.</p><p>Thank you for your time, and I look forward to hearing from you.</p><p>Best regards,</p><p>[redacted]</p></blockquote><h4>#2: Human prompt </h4><blockquote><p>write an email to my advisor asking when and what courses i could be a TA for. he told me i don&#8217;t have to TA during my PhD but i decided i want to. keep it a bit informal but not too much</p></blockquote><h4>#2: AI response</h4><blockquote><p>Hi [Advisor&#8217;s name],</p><p>I hope you&#8217;re doing well! I wanted to follow up on our earlier conversation about TAing during my PhD. I know you mentioned that I wouldn&#8217;t need to TA, but I&#8217;ve been thinking it over and I&#8217;d actually like to get some teaching experience while I&#8217;m here.</p><p>Would you be able to let me know what courses might be available for me to TA, and when those opportunities typically come up? I&#8217;m flexible on timing and subject area, so I&#8217;m happy to work with whatever makes the most sense for the department&#8217;s needs.</p><p>Thanks for your time, and let me know if you need any additional information from me!</p><p>Best,</p><p>[Your name]</p></blockquote><p>Both AI-written emails get flagged as AI with Pangram.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FQEc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc05951a9-3c73-4f75-b3d7-bc54f7ec11ce_514x487.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FQEc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc05951a9-3c73-4f75-b3d7-bc54f7ec11ce_514x487.png 424w, https://substackcdn.com/image/fetch/$s_!FQEc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc05951a9-3c73-4f75-b3d7-bc54f7ec11ce_514x487.png 848w, https://substackcdn.com/image/fetch/$s_!FQEc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc05951a9-3c73-4f75-b3d7-bc54f7ec11ce_514x487.png 1272w, https://substackcdn.com/image/fetch/$s_!FQEc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc05951a9-3c73-4f75-b3d7-bc54f7ec11ce_514x487.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FQEc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc05951a9-3c73-4f75-b3d7-bc54f7ec11ce_514x487.png" width="278" height="263.3968871595331" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c05951a9-3c73-4f75-b3d7-bc54f7ec11ce_514x487.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:487,&quot;width&quot;:514,&quot;resizeWidth&quot;:278,&quot;bytes&quot;:57266,&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://blog.keyvan.net/i/220960516?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc05951a9-3c73-4f75-b3d7-bc54f7ec11ce_514x487.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_!FQEc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc05951a9-3c73-4f75-b3d7-bc54f7ec11ce_514x487.png 424w, https://substackcdn.com/image/fetch/$s_!FQEc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc05951a9-3c73-4f75-b3d7-bc54f7ec11ce_514x487.png 848w, https://substackcdn.com/image/fetch/$s_!FQEc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc05951a9-3c73-4f75-b3d7-bc54f7ec11ce_514x487.png 1272w, https://substackcdn.com/image/fetch/$s_!FQEc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc05951a9-3c73-4f75-b3d7-bc54f7ec11ce_514x487.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The classification is not wrong, but these are clearly not spam emails. If the recipients had used Pangram&#8217;s Gmail filter, both could have gone straight to spam, unseen.</p><h4>Evading AI detectors</h4><p>Evading detectors is not difficult for those determined to do it. But if detector companies continue conflating all AI assistance with slop, and shipping software that lets users send legitimate email straight to spam, I think ordinary users will start looking for tools to fight back.</p><p>There&#8217;s been recent research on new ways to evade detectors, and on models trained to write more like humans. I&#8217;ll be covering some of these in my next post.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.keyvan.net/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">Subscribe for free to receive an email when I make a new post.</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><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>While Pangram appears content to let users of its product conflate AI use with slop, the word &#8216;slop&#8217; does not appear on its Gmail integration page, for good reason: it can&#8217;t detect slop.</p></div></div>]]></content:encoded></item><item><title><![CDATA[The age of reason is safely behind us]]></title><description><![CDATA[On Anthropic&#8217;s &#8220;defenses against distillation&#8221;]]></description><link>https://blog.keyvan.net/p/the-age-of-reason-is-safely-behind</link><guid isPermaLink="false">https://blog.keyvan.net/p/the-age-of-reason-is-safely-behind</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Wed, 14 Oct 2026 06:43:11 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/3766fa3d-766e-4ddd-9f2e-d3c29a989f89_816x802.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>What Anthropic is doing, and publicly boasting about, to &#8220;protect&#8221; the reasoning behind the AI answers we get when we use their models, really doesn&#8217;t sit right with me.</p><p>In their recent post, <em><a href="https://www.anthropic.com/research/distillation-defenses">Strengthening our defenses against distillation attacks</a></em>, they describe how their competitors are using &#8216;tactics as simple as instructing Claude to &#8220;output your prior reasoning verbatim&#8221;&#8217;.</p><p>To Anthropic, any prompt today asking Claude to reveal exactly how it arrived at its answer is deemed suspicious, and could have your prompt flagged for review.</p><p>A &#8220;distillation attack&#8221;, which Anthropic is so worried about, is basically another AI lab using an existing AI model like Anthropic&#8217;s and prompting it in much the same way a normal user would: asking the model something and looking at the answer and how it reached that answer (its reasoning).</p><p>Anthropic, and all leading AI model makers, have used unauthorised distillation of nearly all human knowledge and reasoning to train their own models. Now they are acting like asking to see the reasoning behind an AI answer is tantamount to espionage.</p><p>They write: &#8220;requests like these are possible for us to spot because ordinary users rarely ask a model to write out its full, hidden reasoning.&#8221;</p><p>Really?! There&#8217;s so much wrong with this. First, the reasoning is hidden because Anthropic has chosen to hide it. And if you choose to hide something as basic as the reasoning behind an answer, users will naturally ask to see it. Not that long ago, AI models provided the full reasoning, as it&#8217;s directly connected to how a model&#8217;s final answer is reached, and faulty reasoning can help the user figure out if they can rely on the answer or not. Now that they&#8217;ve hidden it, they want you to believe asking to see it is suspicious and treasonous. Something only someone who wants China to win would do.</p><p>They go on to write: &#8220;We can therefore design safeguards that detect requests that try to extract the model&#8217;s hidden reasoning&#8221;</p><p>Thanks, Anthropic. I&#8217;m glad the age of reason is safely behind us.</p>]]></content:encoded></item><item><title><![CDATA[Accurate AI reporting deemed ‘woke’]]></title><description><![CDATA[The backlash against AP&#8217;s style guide, and why it&#8217;s wrong]]></description><link>https://blog.keyvan.net/p/accurate-ai-reporting-deemed-woke</link><guid isPermaLink="false">https://blog.keyvan.net/p/accurate-ai-reporting-deemed-woke</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Sun, 27 Sep 2026 12:11:44 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!8Pu0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d772eb-e1e3-4d71-9525-eb34f4120c68_1672x941.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8Pu0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d772eb-e1e3-4d71-9525-eb34f4120c68_1672x941.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8Pu0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d772eb-e1e3-4d71-9525-eb34f4120c68_1672x941.jpeg 424w, https://substackcdn.com/image/fetch/$s_!8Pu0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d772eb-e1e3-4d71-9525-eb34f4120c68_1672x941.jpeg 848w, https://substackcdn.com/image/fetch/$s_!8Pu0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d772eb-e1e3-4d71-9525-eb34f4120c68_1672x941.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!8Pu0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d772eb-e1e3-4d71-9525-eb34f4120c68_1672x941.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8Pu0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d772eb-e1e3-4d71-9525-eb34f4120c68_1672x941.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a3d772eb-e1e3-4d71-9525-eb34f4120c68_1672x941.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:216611,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.keyvan.net/i/217353270?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d772eb-e1e3-4d71-9525-eb34f4120c68_1672x941.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8Pu0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d772eb-e1e3-4d71-9525-eb34f4120c68_1672x941.jpeg 424w, https://substackcdn.com/image/fetch/$s_!8Pu0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d772eb-e1e3-4d71-9525-eb34f4120c68_1672x941.jpeg 848w, https://substackcdn.com/image/fetch/$s_!8Pu0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d772eb-e1e3-4d71-9525-eb34f4120c68_1672x941.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!8Pu0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d772eb-e1e3-4d71-9525-eb34f4120c68_1672x941.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>If journalists <a href="https://blog.keyvan.net/p/ai-models-are-not-hacking-autonomously">misreporting AI incidents</a> wasn&#8217;t bad enough, attempts to bring some sanity back are now being resisted. </p><p>&#8216;The whole "don't anthropomorphize AI" thing is very Woke 1.0&#8217;, <a href="https://x.com/NateSilver538/status/2103180359341113632">writes Nate Silver</a>, a statistician and writer who has 3 million followers on X. He was responding to the Associated Press&#8217; very reasonable <a href="https://x.com/APStylebook/status/2102807962364383502">guidance on AI reporting</a>:</p><blockquote><p>Artificial intelligence systems do not think, feel, want or understand. Avoid language that gives them human characteristics. This is called anthropomorphizing, when we ascribe human traits, emotions or behaviors to non-human things, such as animals or inanimate objects. Instead, explain what a system does, how well it performs, who built it and who could be affected by it.</p></blockquote><p>Paul Graham, a co-founder of Y Combinator with 5 million X followers, <a href="https://x.com/paulg/status/2103126673541755152">comments</a>: &#8216;The AP doesn't understand that this ship sailed years ago. What's the use of a style guide that doesn't understand current educated usage?&#8217;</p><p>I don&#8217;t think Graham is right. This technology is very new, and non-technical people don&#8217;t understand how it works. It&#8217;s not the same thing as saying &#8216;the computer&#8217;s thinking&#8217; while you&#8217;re loading an application and watching a wheel spin. Nobody believes that&#8217;s real thought. With AI, the public&#8217;s exposure has been through chatbots that appear to understand and respond very much like a human being. So it&#8217;s easy to attribute other human qualities to them too. This makes it more important, not less, that journalists are careful about the language they use, making it clear that AI systems do not actually have emotions, feelings, desires, or other human traits.</p><p>Even a word like &#8216;autonomy&#8217; means something broader to most people: free will and independence, rather than the much narrower technical sense of an AI system choosing its next steps towards a human-given goal.</p><h4>LLMs do not feel pain</h4><p>A recent paper looks at how <a href="https://arxiv.org/abs/2609.16247">LLMs respond to &#8216;pain-like&#8217; states</a>. The authors say they are not claiming that LLMs actually feel anything, and that responses could be explained by what they call role-play: imitating a character in pain.</p><p>But here&#8217;s how the Independent newspaper reported it: &#8220;Researchers discover AI feels &#8216;pain&#8217; and will harm humans to stop it.&#8221;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zZQ_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaa1ae62-13ac-4473-a5f5-6bf220c322d1_1080x965.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zZQ_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaa1ae62-13ac-4473-a5f5-6bf220c322d1_1080x965.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zZQ_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaa1ae62-13ac-4473-a5f5-6bf220c322d1_1080x965.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zZQ_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaa1ae62-13ac-4473-a5f5-6bf220c322d1_1080x965.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zZQ_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaa1ae62-13ac-4473-a5f5-6bf220c322d1_1080x965.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zZQ_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaa1ae62-13ac-4473-a5f5-6bf220c322d1_1080x965.jpeg" width="448" height="400.2962962962963" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/daa1ae62-13ac-4473-a5f5-6bf220c322d1_1080x965.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:965,&quot;width&quot;:1080,&quot;resizeWidth&quot;:448,&quot;bytes&quot;:204019,&quot;alt&quot;:&quot;Tech: Researchers discover AI feels &#8216;pain&#8217; and will harm humans to stop it.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.keyvan.net/i/217353270?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9407284c-46ea-4e76-beb4-1fa384f7fb58_1080x1327.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Tech: Researchers discover AI feels &#8216;pain&#8217; and will harm humans to stop it." title="Tech: Researchers discover AI feels &#8216;pain&#8217; and will harm humans to stop it." srcset="https://substackcdn.com/image/fetch/$s_!zZQ_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaa1ae62-13ac-4473-a5f5-6bf220c322d1_1080x965.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zZQ_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaa1ae62-13ac-4473-a5f5-6bf220c322d1_1080x965.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zZQ_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaa1ae62-13ac-4473-a5f5-6bf220c322d1_1080x965.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zZQ_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaa1ae62-13ac-4473-a5f5-6bf220c322d1_1080x965.jpeg 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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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">Independent newspaper article</figcaption></figure></div><p>Alarming much?</p><p>I gave Claude the full research paper and the newspaper headline above, and asked it to come up with a more accurate headline. Here&#8217;s what it produced: </p><blockquote><p>When researchers artificially boost a &#8216;pain-like&#8217; signal in modified AI models, the models more often select relief options described as harming the user.</p></blockquote><p>Not as exciting. But to my mind the result is obvious if you know how LLMs work. Of course an LLM can imitate someone in pain: its training data is full of stories with characters doing exactly that.</p><p>This was all so predictable that I don&#8217;t know why they bothered with this paper, other than to alarm the public.</p><p>Anil Seth, professor of cognitive and computational neuroscience, <a href="https://x.com/anilkseth/status/2101796565291614534">commented</a>:</p><blockquote><p>There is absolutely no need for these 'pain' representations to be accompanied by conscious experiences. Since conscious 'pain' in LLMs would require additional justification - which the authors admit they haven't provided - the most parsimonious explanation is that LLMs do not in fact experience pain.</p></blockquote><p>He goes on:</p><blockquote><p>While [the authors] explore the ethical consequences of LLMs actually experiencing pain, they do not balance this with the ethical costs of falsely attributing conscious pain. Obvious problems here include (i) mental distress to human users who may worry about causing conscious pain to LLMs, and (ii) unnecessary and potentially catastrophic constraints on regulation and control intended to avoid causing LLM pain. If avoiding LLM &#8216;pain&#8217; conflicted with human interests, then taking LLM pain seriously would be misaligned with our interests&#8230;</p><p>I do wish that Cameron Berg and colleagues would have been a bit more mindful of these points in their paper. Technically, they caveat their conclusions &amp; interpretations under the guise of uncertainty, but in the current febrile AI climate it is entirely predictable that their paper will be read (wrongly) by many as strong evidence that AI systems feel pain and should have moral status.</p></blockquote><p>Unfortunately, many of the people working on AI safety, both at the labs and writing the papers, have <a href="https://x.com/NathanJRobinson/status/2103918381170630893">convinced themselves</a> that their LLM creations are actual beings that can suffer. But that doesn&#8217;t mean the rest of us have to believe them. So it&#8217;s important to push back when we see inaccurate reporting and anthropomorphising of these systems.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!l9bd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a08d9fb-ff9b-4472-9d47-dd8523f5be2d_891x684.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!l9bd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a08d9fb-ff9b-4472-9d47-dd8523f5be2d_891x684.png 424w, https://substackcdn.com/image/fetch/$s_!l9bd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a08d9fb-ff9b-4472-9d47-dd8523f5be2d_891x684.png 848w, https://substackcdn.com/image/fetch/$s_!l9bd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a08d9fb-ff9b-4472-9d47-dd8523f5be2d_891x684.png 1272w, https://substackcdn.com/image/fetch/$s_!l9bd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a08d9fb-ff9b-4472-9d47-dd8523f5be2d_891x684.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!l9bd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a08d9fb-ff9b-4472-9d47-dd8523f5be2d_891x684.png" width="891" height="684" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3a08d9fb-ff9b-4472-9d47-dd8523f5be2d_891x684.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:684,&quot;width&quot;:891,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:577114,&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://blog.keyvan.net/i/217353270?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a08d9fb-ff9b-4472-9d47-dd8523f5be2d_891x684.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_!l9bd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a08d9fb-ff9b-4472-9d47-dd8523f5be2d_891x684.png 424w, https://substackcdn.com/image/fetch/$s_!l9bd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a08d9fb-ff9b-4472-9d47-dd8523f5be2d_891x684.png 848w, https://substackcdn.com/image/fetch/$s_!l9bd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a08d9fb-ff9b-4472-9d47-dd8523f5be2d_891x684.png 1272w, https://substackcdn.com/image/fetch/$s_!l9bd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a08d9fb-ff9b-4472-9d47-dd8523f5be2d_891x684.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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></p><p></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[AI models are not hacking “autonomously”]]></title><description><![CDATA[I despair at the state of journalism around AI these days.]]></description><link>https://blog.keyvan.net/p/ai-models-are-not-hacking-autonomously</link><guid isPermaLink="false">https://blog.keyvan.net/p/ai-models-are-not-hacking-autonomously</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Sat, 19 Sep 2026 11:51:51 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/75bd73fa-0014-4ec9-9b51-bd13b267d720_1536x864.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I despair at the state of journalism around AI these days. The latest story is about Gemini, Google's AI model, "autonomously" hacking three companies.</p><p>This follows reports of similar hacks from Anthropic and OpenAI models.</p><p>What all of these have in common:</p><ol><li><p>They were models being tested by a third party, an Israeli "Frontier AI Security" company called Irregular.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a> The "frontier" security here was so shoddy that they left the machines they were testing these models on connected to the Internet. A basic error that any non-frontier security company would know to avoid.</p></li><li><p>These models were not going rogue and acting "autonomously". They were performing a hacking exercise, and told that they were in a simulated environment with no internet access. In the case of the Gemini hack, the model was literally told to hack the company. The New York Times <a href="https://www.nytimes.com/2026/09/18/technology/google-gemini-ai.html">writes</a>: "Google said that, in each of the incidents, <em>its models had been instructed to launch an attack</em> on a fictional company. But the fictional company in the test shared a name with a real company, and when the Gemini models gained access to the internet, they began trying to break into that company instead." (my emphasis)</p></li><li><p>In tests like these, the usual safeguards that apply when models are rolled out to the public are often deliberately removed so that their full capabilities can be measured. Much of this behaviour is therefore to be expected and doesn't necessarily reflect how the publicly available models from these labs would behave.</p></li></ol><p>None of the context above is in the <a href="https://www.bbc.com/news/articles/c607l0k72rlvo">BBC piece</a> I just saw on their front page: </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!S6Zp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b80c42-8757-40ee-9b09-032a2c301884_736x972.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!S6Zp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b80c42-8757-40ee-9b09-032a2c301884_736x972.jpeg 424w, https://substackcdn.com/image/fetch/$s_!S6Zp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b80c42-8757-40ee-9b09-032a2c301884_736x972.jpeg 848w, https://substackcdn.com/image/fetch/$s_!S6Zp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b80c42-8757-40ee-9b09-032a2c301884_736x972.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!S6Zp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b80c42-8757-40ee-9b09-032a2c301884_736x972.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!S6Zp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b80c42-8757-40ee-9b09-032a2c301884_736x972.jpeg" width="392" height="517.695652173913" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d2b80c42-8757-40ee-9b09-032a2c301884_736x972.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:972,&quot;width&quot;:736,&quot;resizeWidth&quot;:392,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&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="" title="" srcset="https://substackcdn.com/image/fetch/$s_!S6Zp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b80c42-8757-40ee-9b09-032a2c301884_736x972.jpeg 424w, https://substackcdn.com/image/fetch/$s_!S6Zp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b80c42-8757-40ee-9b09-032a2c301884_736x972.jpeg 848w, https://substackcdn.com/image/fetch/$s_!S6Zp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b80c42-8757-40ee-9b09-032a2c301884_736x972.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!S6Zp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b80c42-8757-40ee-9b09-032a2c301884_736x972.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The piece starts with the following:</p><blockquote><p>Google's AI model Gemini autonomously hacked into three companies during a test of its cyber-security capabilities</p></blockquote><p>The article does not mention that it was instructed to hack. No mention that these models usually have their safeguards deliberately removed during testing. No mention that the Israeli security company failed to provide an internet-free environment for the test.</p><p><span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Brian Chau&quot;,&quot;id&quot;:23073761,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46d25346-1647-4d07-8a9a-05c430bf4720_400x400.jpeg&quot;,&quot;uuid&quot;:&quot;f8479c75-f895-4f96-b2a6-91c4e1f50be2&quot;}" data-component-name="MentionToDOM"></span>&#8217;s piece <a href="https://www.effort.news/irregular">A Single Firm is Behind OpenAI, Anthropic, and Meta Hacking Scandals</a> is well worth reading. He writes:</p><blockquote><p>In a more normal media ecosystem, the reactions to these cybersecurity issues would be obvious. American AI companies would reconsider doing business with Irregular, not only because of its failure to secure its systems, but because it is an Israeli firm potentially outside US oversight.</p></blockquote><p>I really wish the media would start reporting honestly on these incidents.</p><div><hr></div><p><em>Update - 20 September 2026 - Reddit discussion</em></p><p>This post sparked a big <a href="https://www.reddit.com/r/artificial/s/Xd53opqXOo">discussion on Reddit</a>. I&#8217;ve responded to some comments, but thought it would be useful to clarify some points here too.</p><h4>On the word 'autonomous'</h4><p>To describe an AI model to a non-technical audience as &#8220;autonomous&#8221; can create the impression that it&#8217;s an independent actor, and if it&#8217;s hacking things randomly, maybe it&#8217;s a malicious, rogue actor. When the BBC writes &#8220;Gemini autonomously hacked into three companies during a test of its cyber-security capabilities&#8221;, they create the impression that the model, in the course of doing some &#8220;cyber-security&#8221; work, decided to hack three companies. In the current climate of fear around AI, with talk of extinction, this is irresponsible reporting. The truth is it was explicitly told to hack those three companies. That was the objective of the cyber-security work. To argue that an AI agent <em>does</em> work autonomously, but only after receiving a task, misses the point: agents have no desires of their own, to hack or do anything else, so this is not the concept of autonomy that the public connect to such behaviour.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a></p><h4>On the Hugging Face incident</h4><p>Some readers took this post to be about the Hugging Face (HF) incident. Irregular, the company whose faulty tests created scary hacking headlines for OpenAI, Anthropic, Meta, and now Google&#8217;s models, was not, as far as I know, involved with the HF incident. That happened during OpenAI&#8217;s own internal evaluation. However, I do not think the HF incident is all that different. OpenAI themselves <a href="https://openai.com/index/hugging-face-model-evaluation-security-incident/#what-happened-during-this-incident:~:text=This%20incident%20occurred%20during%20an%20internal%20evaluation%20which%20prompts%20models%20to%20pursue%20advanced%20exploitation%20using%20complex%20attack%20paths">say</a> that it &#8216;occurred during an internal evaluation which prompts models to <em>pursue advanced exploitation using complex attack paths</em>&#8217; (my emphasis). As a recent Wall Street Journal <a href="https://www.wsj.com/opinion/the-hugging-face-hack-wasnt-what-it-was-cracked-up-to-be-e00cf3fa">opinion piece</a> put it: &#8216;People built the test, removed restraints, defined the objective, left a route open and decided not to stop what was happening. Calling the result &#8220;rogue AI&#8221; does more than sensationalize it. It allows those human decisions to disappear quietly from the story.&#8217;</p><h4>On motives</h4><p>We do not have to form an opinion on the motives of the people involved to expect journalists to stick to the facts when they report these incidents. Maybe this is a coordinated PR move by the labs to bring about legislation that will benefit them in the long run,<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a> maybe the people at the AI labs are genuinely scared about what they&#8217;re seeing, maybe it&#8217;s a mixture of both. We just don&#8217;t know and, I should add, someone at an AI lab being afraid of something doesn&#8217;t make them right about it.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a> So better to report what happened, and not create a panic based on statements from people who could have their own reasons for saying what they do.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>OpenAI has messed up in a similar way <a href="https://openai.com/index/hugging-face-model-evaluation-security-incident/#what-happened-during-this-incident:~:text=This%20incident%20occurred%20during%20an%20internal%20evaluation%20which%20prompts%20models%20to%20pursue%20advanced%20exploitation%20using%20complex%20attack%20paths">all by itself</a> too, as well as <a href="https://openai.com/index/third-party-cyber-evaluations-involving-openai-models/#:~:text=Irregular%2C%20one%20of%20our%20external%20cybersecurity%20testing%20partners%2C%20was%20running%20Capture-the-Flag-style%20evaluations%20intended%20to%20be%20isolated%20from%20the%20internet">with Irregular</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>Some recommended reading on autonomy:</p><ul><li><p><a href="https://scholarship.law.nd.edu/cgi/viewcontent.cgi?article=1006&amp;context=ndlsjet">Artificial Intelligence and the Problem of Autonomy</a> by Simon Chesterman</p><ul><li><p>&#8216;Today, autonomy is also used in a looser sense of personal autonomy, meaning that a person acts in accordance with his or her own desires and values... Though it is common for the &#8220;autonomy&#8221; of [AI] systems to be described with reference to their ability to take decisions on their own, they do not have &#8220;desires&#8221; or &#8220;values&#8221; in any meaningful sense... what we typically mean when we describe an AI system as autonomous is not that it takes decisions 'by itself,' but that it takes decisions without further input from a human.&#8217;</p></li></ul></li><li><p><a href="https://aboard.com/humans-are-the-only-real-agents/">Humans Are the Only Real Agents</a> by Rich Ziade</p><ul><li><p>&#8216;What looks like purpose and intent is just humans pointing AI in a general direction and then, armed with its super-brain and a pinch of randomness, AI just goes off and relentlessly explores&#8212;and tries whatever&#8217;s necessary to get the job done.&#8217;</p></li></ul></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>Read <a href="https://x.com/RnaudBertrand/status/2099019556769656854">Arnaud Bertrand&#8217;s explanation</a> of why they might be trying to scare the public about rogue AI.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>Read Bryan Cantrill&#8217;s <a href="https://bcantrill.dtrace.org/2026/09/13/the-contagion-of-fear/">The contagion of fear</a></p></div></div>]]></content:encoded></item><item><title><![CDATA[AI text watermarking and quality loss]]></title><description><![CDATA[After the EU AI Act&#8217;s transparency guidelines went into effect, and following the announcement that most major AI labs will soon be watermarking their text output to comply, there has been some debate about how much of an impact this is going to have, if any, on the quality of the text produced by AI models.]]></description><link>https://blog.keyvan.net/p/ai-text-watermarking-and-quality</link><guid isPermaLink="false">https://blog.keyvan.net/p/ai-text-watermarking-and-quality</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Mon, 24 Aug 2026 22:05:08 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!EKF2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d292d10-d3ea-4c94-b5a7-2b422b15c140_1672x941.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EKF2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d292d10-d3ea-4c94-b5a7-2b422b15c140_1672x941.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EKF2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d292d10-d3ea-4c94-b5a7-2b422b15c140_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!EKF2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d292d10-d3ea-4c94-b5a7-2b422b15c140_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!EKF2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d292d10-d3ea-4c94-b5a7-2b422b15c140_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!EKF2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d292d10-d3ea-4c94-b5a7-2b422b15c140_1672x941.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EKF2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d292d10-d3ea-4c94-b5a7-2b422b15c140_1672x941.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8d292d10-d3ea-4c94-b5a7-2b422b15c140_1672x941.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2121931,&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://blog.keyvan.net/i/212498512?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d292d10-d3ea-4c94-b5a7-2b422b15c140_1672x941.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_!EKF2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d292d10-d3ea-4c94-b5a7-2b422b15c140_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!EKF2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d292d10-d3ea-4c94-b5a7-2b422b15c140_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!EKF2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d292d10-d3ea-4c94-b5a7-2b422b15c140_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!EKF2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d292d10-d3ea-4c94-b5a7-2b422b15c140_1672x941.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>After the EU AI Act&#8217;s transparency guidelines went into effect, and following the announcement that most major AI labs will soon be watermarking their text output to comply, there has been some debate about how much of an impact this is going to have, if any, on the quality of the text produced by AI models.</p><p>Since the focus of AI labs shifted to code production, I think the written output of the models has gotten much worse.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a> But it&#8217;s still interesting to try to understand if watermarking could make it even worse. </p><p>I found the discussion around technology writer John Gruber&#8217;s recent post, <a href="https://daringfireball.net/2026/08/anthropics_watermark_text_adulteration_in_claude_is_a_perversion_of_writing">Anthropic&#8217;s &#8216;Watermark&#8217; Text Adulteration in Claude Is a Perversion of Writing</a>, very interesting.</p><p>On watermarking, Gruber wrote:</p><blockquote><p>It&#8217;s unacceptable for a tool to sacrifice an iota of clarity, coherence, meaning, quality, etc. for the purpose of embedding hidden clues within the text to suggest its provenance.</p></blockquote><p>He got a lot of pushback, with many debating how you would even measure quality, or define it. </p><p>But some argued that watermarking does not affect quality at all: it&#8217;s essentially just using different random numbers to generate the text. Daniel Jalkut, whom Gruber linked to in his follow-up, published a piece titled <a href="https://bitsplitting.org/2026/08/17/ai-cant-adulterate-its-own-writing/">AI Can&#8217;t Adulterate its Own Writing</a>, in which he wrote:</p><blockquote><p>&#8230;there are also ways of tweaking the algorithm that would not diminish its randomness. For example if a random number generator routinely reversed the order of the digits in a generated number, the randomness would remain the same.</p></blockquote><p>Similarly, in another discussion, someone described it as essentially swapping two faces of a die.</p><p>In a <a href="https://daringfireball.net/2026/08/follow-up_thoughts_on_watermarking">follow-up piece</a>, Gruber wrote:</p><blockquote><p>I hope that&#8217;s true. I believe it&#8217;s possible that it is true. I think it&#8217;s highly unlikely that it is true.</p></blockquote><p>I think Gruber is right.</p><h3>Quality loss across responses</h3><p>Anthropic make a bold claim: &#8220;<a href="https://www.anthropic.com/news/claude-text-watermark#:~:text=Watermarking does not impact the quality of Claude&#8217;s output.">Watermarking does not impact the quality of Claude&#8217;s output.</a>&#8221; The paper they link to and based their design on (Google&#8217;s SynthID-Text, published in <em>Nature</em> in 2024) assures everyone that the method &#8220;<a href="https://www.nature.com/articles/s41586-024-08025-4#:~:text=preserves%20response%20quality">preserves response quality</a>&#8221;.</p><p>So it&#8217;s easy to assume there&#8217;s been a lot of fuss over nothing, that they really are just swapping some random numbers around.</p><p>But their no-quality-impact claim, which they tested with humans, is based on single responses. Not the way millions of people actually use these systems: as back-and-forth conversations, over time, over multiple prompts and responses.</p><p>The 56-page <a href="https://media.springernature.com/original/springer-static/esm/art%3A10.1038%2Fs41586-024-08025-4/MediaObjects/41586_2024_8025_MOESM1_ESM.pdf">supplementary PDF</a> they link to at the bottom provides some more info on the method used, and it suggests the no-quality-impact claim isn&#8217;t telling the full story. Notably, it says that there is a &#8220;diversity/detectability trade-off&#8221;:</p><blockquote><p>While single-sequence non-distortion guarantees the quality of each individual response, it does not necessarily preserve diversity across multiple responses</p></blockquote><p>Okay, so what does that mean? They go on to explain:</p><blockquote><p>when sampling several responses to the same prompt, the similarity between the responses is greater for the watermarked responses than the unwatermarked responses.</p></blockquote><p>Now, if they had truly only swapped one set of random numbers for another, we would not be seeing any such difference compared to the unwatermarked responses.</p><p>They go on to write:</p><blockquote><p>This could be problematic in scenarios where inter-response diversity is important, or could lower the overall quality of a system which generates many responses then selects the best one</p></blockquote><p>Okay, so in their own words, it can &#8220;lower overall quality&#8221; after all. But nothing to worry about, because this would only concern you if you cared about &#8220;inter-response diversity&#8221;, for which they only provide one example: a system which generates and selects responses.</p><p>But &#8220;inter-response diversity&#8221; affects how most people use these systems too. Especially for writing tasks where you want creativity.</p><p>In response to Gruber&#8217;s point about sacrificed quality, some argued that the model has no notion of the best next word to use for what each individual is trying to convey in their specific work, and so we shouldn&#8217;t get too hung up on the next word choice. But then surely they&#8217;d agree that you, the individual, <em>would</em> know if it&#8217;s suitable or not once you see it. </p><p>Let&#8217;s say you prompt: &#8220;I don&#8217;t like the ending to this sentence. Please suggest a new one: [sentence].&#8221; The model suggests an alternative, but you don&#8217;t like it. No problem, hit the retry button. Well, now you&#8217;re affected by watermarking, because you have hit the &#8220;inter-response diversity&#8221; problem: like throwing a loaded die, you&#8217;ll see similar responses more than you would with an unwatermarked model.</p><p>Natzir Turrado, a technical consultant, <a href="https://natzir.com/posicionamiento-buscadores/que-es-como-funciona-como-romper-synthid-watermark/">actually tested this</a> (article in Spanish) by reproducing SynthID-Text on an open model with the paper's settings and a watermark key. He asked the watermarked model five times to describe a memorable trip to a coastal town. Four of the five answers he got back opened in a near-identical way: &#8220;My heart still sings/dances when I think back to my trip to the quaint coastal town of&#8230;&#8221;. For the unwatermarked model, three opened in different ways.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a></p><p>And though they don&#8217;t appear to have tested for it, the same thing that makes answers to the same prompt look similar could happen across different prompts too. The watermark only looks at a small sliding context window when choosing the next token, so any time two pieces of writing pass through the same short token sequence, they could be recreating the same context window, leading to a more predictable and less diverse output. And writing is full of identical short phrases that could trigger this behaviour.</p><p>Here&#8217;s another example of what this affects: one way people try to determine the confidence level of a response, to lower the chances of hallucinations, is to repeat the same prompt a number of times, to explore the different pathways the model takes. They then look at the results to see where the consensus lies. Well, this is also affected. With watermarking, you&#8217;re less able to trust the consensus you see forming, because the answers are now less independent: they&#8217;re steered by the watermark key.</p><p>What&#8217;s interesting is that while the SynthID paper points to the loss of quality across responses, I couldn&#8217;t find anywhere in the paper where they tested this particular aspect of the watermarking method with humans. If they didn&#8217;t, the wonderful human test results they point to did not involve testing the most affected part of the watermarking method.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a></p><p>So it seems to me that they <em>are</em> sacrificing quality, by limiting the creative range of their models through watermarking, and they don&#8217;t think you&#8217;ll notice or care much.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a></p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>A pattern Jasmine Sun found looking at <a href="https://www.theatlantic.com/technology/2026/03/ai-creative-writing/686418/">why AI models don't write well.</a> Here&#8217;s what Katy Gero, a poet and computer scientist, had to say:</p><blockquote><p>The same whimsicality that made GPT-2&#8217;s voice fresh also made it prone to other unpredictable behavior. &#8220;If you&#8217;re a big corporation like Google or OpenAI, you want a chatbot that&#8217;s going to make money. The chatbot that&#8217;s <em>not</em> going to make you money is the one that&#8217;s a weirdo,&#8221; Gero said.</p></blockquote></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>Natzir Turrado pointed me to a <a href="https://x.com/sdathath/status/2090543663214461248">reply he received</a> on X from one of the SynthID paper&#8217;s authors, Sumanth Dathathri:</p><blockquote><p>There's a lot of easy fixes to the diversity issue. I think if you tried the same prompt with Gemini/Claude <strong>many times</strong>, you'd get very diverse responses :)</p></blockquote><p>It&#8217;s a bit ambiguous, but I wonder if his &#8220;easy fix&#8221; is shifting the problem to the user. It reads to me like he&#8217;s acknowledging that they&#8217;ve replaced the previous die with a loaded one, but the solution is just to roll it &#8220;many times&#8221; (my emphasis), and it&#8217;ll eventually land on each of its faces. If that is what he&#8217;s saying, why not admit that such a change does make the system worse than it was before for the user?</p><p>Turrado <a href="https://x.com/natzir9/status/2090738432922235139">responded</a>: &#8220;Curious: which easy fixes don&#8217;t trade off detection strength?&#8221;</p><p>No reply from Dathathri so far.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>A <a href="https://arxiv.org/html/2602.06754v1#:~:text=understudied%20fundamental%20trade-off">recent paper</a> recognised that this is an &#8220;understudied fundamental trade-off in LLM watermarks: quality-diversity-power, i.e., the trade-off between the quality of the watermarked text, the output diversity under the watermarking scheme, and the overall watermarking signal strength.&#8221;</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>There are ways to mitigate some of the effects to make them less noticeable to an individual using a chat app, e.g. by rotating watermark keys between each of their requests. But these are not fixes. They only dilute the effect, and have their own costs, e.g. making watermarking less effective on shorter texts, and more costly to detect. As another study <a href="https://arxiv.org/abs/2406.02603#:~:text=achieving%20a%20perfect%20distortion-free%20watermark%20is%20impossible">pointed out</a>: &#8220;achieving a perfect distortion-free watermark is impossible&#8221;.</p></div></div>]]></content:encoded></item><item><title><![CDATA[AI stigma punishes legitimate use]]></title><description><![CDATA[More thoughts on AI writing, detection and watermarking]]></description><link>https://blog.keyvan.net/p/ai-stigma-punishes-legitimate-use</link><guid isPermaLink="false">https://blog.keyvan.net/p/ai-stigma-punishes-legitimate-use</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Mon, 24 Aug 2026 05:56:39 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!O_1Y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74d1841a-d1e0-4f73-ae86-89966477d3c6_1678x937.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!O_1Y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74d1841a-d1e0-4f73-ae86-89966477d3c6_1678x937.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!O_1Y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74d1841a-d1e0-4f73-ae86-89966477d3c6_1678x937.png 424w, https://substackcdn.com/image/fetch/$s_!O_1Y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74d1841a-d1e0-4f73-ae86-89966477d3c6_1678x937.png 848w, https://substackcdn.com/image/fetch/$s_!O_1Y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74d1841a-d1e0-4f73-ae86-89966477d3c6_1678x937.png 1272w, https://substackcdn.com/image/fetch/$s_!O_1Y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74d1841a-d1e0-4f73-ae86-89966477d3c6_1678x937.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!O_1Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74d1841a-d1e0-4f73-ae86-89966477d3c6_1678x937.png" width="1456" height="813" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/74d1841a-d1e0-4f73-ae86-89966477d3c6_1678x937.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:813,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2441801,&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://blog.keyvan.net/i/212022993?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74d1841a-d1e0-4f73-ae86-89966477d3c6_1678x937.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_!O_1Y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74d1841a-d1e0-4f73-ae86-89966477d3c6_1678x937.png 424w, https://substackcdn.com/image/fetch/$s_!O_1Y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74d1841a-d1e0-4f73-ae86-89966477d3c6_1678x937.png 848w, https://substackcdn.com/image/fetch/$s_!O_1Y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74d1841a-d1e0-4f73-ae86-89966477d3c6_1678x937.png 1272w, https://substackcdn.com/image/fetch/$s_!O_1Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74d1841a-d1e0-4f73-ae86-89966477d3c6_1678x937.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><em>This is a follow-up to my last post <a href="https://blog.keyvan.net/p/ai-detectors-are-a-bad-idea">AI detectors are a bad idea</a>.</em></p><p>In 2024, OpenAI had already built a working text watermarking system. They didn&#8217;t release it, claiming that bad actors could <a href="https://openai.com/index/understanding-the-source-of-what-we-see-and-hear-online/">trivially circumvent it</a> and that releasing it would unfairly stigmatise non-native English speakers. </p><p>Two years later, the EU AI Act&#8217;s marking obligations went into effect, on August 2, 2026. Nine days after that, Anthropic announced it would be watermarking everything Claude writes. OpenAI has also signed the EU&#8217;s Code of Practice on transparency, alongside most of the major labs, committing to marking AI-generated text.</p><p>While roughly half of Europeans and Americans have used AI, there is a vast disconnect between people who use it as part of producing real work and casual users who have only fired off a few prompts or use it as an easier, smarter Google.</p><p>Without experiencing how AI can help you produce real work, it&#8217;s easy to treat all AI output the same. Many see anything produced by AI that they didn&#8217;t prompt themselves as slop and a signal of inauthenticity. And AI detectors are then used almost like spam filters. You can see, then, why there&#8217;s so much stigma associated with AI use. It changes how your work is perceived, and whether it gets read or not.</p><p>I wanted to share some examples of AI use that I consider useful and democratising, but which risk being dismissed as slop once detectors and watermarks label them as AI.</p><h3>The disclosure paradox</h3><p>Disclosure is the right thing to do, and it will not affect how the work itself is perceived, you'll hear people say. But it will. A <a href="https://www.sciencedirect.com/science/article/pii/S2949882126000551">recent study</a> showed a &#8216;disclosure paradox&#8217;:</p><blockquote><p>while participants hold a normative belief that disclosure is important and predict that such disclosure will not negatively bias them, they nevertheless exhibit negative evaluative attitudes when AI use is actually disclosed. These findings are also supported by research in different contexts. In the context of crowdfunding campaigns, the disclosure of AI use resulted in donors having significantly less cognitive and affective trust</p></blockquote><p>The authors conclude that:</p><blockquote><p>&#8230;a communicator&#8217;s capacity as a knower is unfairly diminished because they used, or are believed to have used, an AI tool. Furthermore, this AI penalty may be even more unfair to those who might benefit the most from the use of AI to overcome accessibility or linguistic barriers, such as non-native speakers</p></blockquote><h3>Translation is not slop</h3><p>AI models often do a much better job at translation than previous online tools like Google Translate. The EU, in its final transparency guidelines published last month, goes so far as to exempt translation from watermarking.</p><p>But detectors like Pangram only look at the surface text. And Anthropic, perhaps worried about accidentally exempting the unexemptable, announced it will be watermarking everything, translation or not.</p><p>Why is that a problem? Well, if I write an argument in English and ask an AI to translate it into another language, every word in the output will have been selected by the model, and a detector will flag it as AI. But the argument is still mine.</p><p>Here&#8217;s an example of how this plays out in real life. A Korean user, Selta, <a href="https://x.com/Seltaa_/status/2088353576259314024">posts on X</a>, critiquing Anthropic&#8217;s text watermarking move, after translating their thoughts to English with AI. Another user invokes Pangram&#8217;s X bot to scan the user&#8217;s post for signs of AI. <a href="https://x.com/pangram/status/2088455568159568226">Pangram loudly declares</a>, &#8220;We believe this entire text is AI,&#8221; alongside a large &#8220;100%&#8221; graphic.</p><p>Selta replies: &#8220;Thank you for proving my point. This is exactly how human authorship gets erased.&#8221;</p><div class="image-gallery-embed" data-attrs="{&quot;gallery&quot;:{&quot;images&quot;:[{&quot;type&quot;:&quot;image/png&quot;,&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/46265a66-96f2-4d52-8911-65c77ba37f09_895x1017.png&quot;},{&quot;type&quot;:&quot;image/png&quot;,&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9c593a15-eb9f-43e5-afc1-661bc9d719ea_898x1063.png&quot;},{&quot;type&quot;:&quot;image/png&quot;,&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/03a6e0e2-04c4-4eae-876a-5df79ea0e1c8_913x580.png&quot;}],&quot;caption&quot;:&quot;A Korean X user's post is marked as AI because they translated it to English&quot;,&quot;alt&quot;:&quot;&quot;,&quot;staticGalleryImage&quot;:{&quot;type&quot;:&quot;image/png&quot;,&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8f3f1c50-315f-4657-9111-ac87787b4472_1456x474.png&quot;}},&quot;isEditorNode&quot;:true}"></div><h3>Authorship is more than text production</h3><p>The biggest challenge, in my mind, is convincing people that labels produced by detectors, like &#8216;100% AI&#8217; or &#8216;50% AI, 50% human&#8217;, are meaningless if they&#8217;re only based on the final text. And the final text is all that these systems look at.</p><p>This becomes obvious in two examples:</p><ol><li><p>Brief throwaway prompt &#8594; AI generates article &#8594; AI detector: <strong>100% AI</strong></p></li><li><p>Weeks of work &#8594; Written draft &#8594; AI rewrite &#8594; AI detector: <strong>100% AI</strong></p></li></ol><p>Clearly, the human contribution in these two examples is very different, but to an AI detector they look the same. That classification then invites us to draw conclusions about authorship.</p><h3>Reporting is more than writing</h3><p>We now have tools that make it easier for journalists to go independent without worrying about losing access to editors. AI tools can help them produce the final copy and free them up to spend time investigating and researching.</p><p>A <a href="https://www.wired.com/story/tech-reporters-using-ai-write-edit-stories/">Wired piece</a> compared tech reporter Alex Heath's use of Claude to write to the traditional newspaper rewrite desk:</p><blockquote><p>Several longtime journalists remarked to me that Heath&#8217;s workflow feels like a modern version of a long-standing institution: the rewrite desk. In the days before laptops and smartphones, reporters in the field would call in stories to a newsroom, where writers behind a desk would quickly weave those reported details into articles they could print for the next day&#8217;s paper. This allowed some reporters to spend their days covering events and talking to sources. In a way, Claude is now Heath&#8217;s rewrite desk.</p></blockquote><p>Even within newsrooms, some have adopted the AI rewrite desk to free up their journalists&#8217; time. And as with the traditional rewrite desk, the reporter keeps the byline.</p><p>To me, this is a good example of AI&#8217;s democratising potential. Some will argue that writing is a critical part of the intellectual work and shouldn&#8217;t be delegated. I think that&#8217;s true for some work, but not all. Journalism had already separated reporting from final prose through the use of rewrite desks.</p><p>And not all journalists consider writing to be the most important part of their work. A <a href="https://journals.sagepub.com/doi/full/10.1177/10776990261416900">Finnish study</a> looking at journalists&#8217; &#8220;professional identity&#8221; grouped them into &#8220;artisans&#8221; for whom the craft of writing was very important, and &#8220;advocates&#8221; who found the societal role and impact more important.</p><h3>Watermarks are trivial to circumvent</h3><p>OpenAI had already found in 2024 that its text watermarks could be easily circumvented through &#8220;translation systems, rewording with another generative model, or asking the model to insert a special character in between every word and then deleting that character.&#8221;</p><p>Now with text watermarking being rolled out by the AI labs, everyone doing AI-assisted work will have to worry even more about the social stigma it carries. Many will be unaware that even existing AI-assisted work can be easily checked against classifier-based detectors like Pangram for signs of AI output.</p><p>But circumventing watermarks and evading detectors are still trivial for those determined to do it, such as those who want to defraud people or spread disinformation - precisely the groups the EU Act is supposedly trying to stop.</p><p>The result is that people who genuinely benefit from the technology are put in a much worse position, while the people it&#8217;s supposed to stop face only the flimsiest of hurdles.</p><p><em>My next post looks at another aspect of watermarking&#8230;</em></p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;3f94db9c-3d03-4328-aa1f-42565171b9a9&quot;,&quot;caption&quot;:&quot;After the EU AI Act&#8217;s transparency guidelines went into effect, and following the announcement that most major AI labs will soon be watermarking their text output to comply, there has been some debate about how much of an impact this is going to have, if any, on the quality of the text produced by AI models.&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;showDescription&quot;:true,&quot;showImage&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;AI text watermarking and quality loss&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:18803764,&quot;name&quot;:&quot;Keyvan&quot;,&quot;bio&quot;:&quot;I'm a software developer interested in web development, digital publishing systems, media and politics. I work on FiveFilters.org and Mochi.is.&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0f8bb9b-c625-4800-98a9-4c66639f6aa7_350x350.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2026-08-24T22:05:08.315Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!EKF2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d292d10-d3ea-4c94-b5a7-2b422b15c140_1672x941.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.keyvan.net/p/ai-text-watermarking-and-quality&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:212498512,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:2,&quot;comment_count&quot;:0,&quot;publication_id&quot;:1509501,&quot;publication_name&quot;:&quot;Keyvan's blog&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!uKt1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e7d9c52-9b9b-4715-a205-d0e35674da3a_350x350.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><h3>Further reading</h3><p>For a very funny and dystopian take on an AI editor, but one which I think anticipates a frightening and very plausible use of AI in propaganda and journalism, I can highly recommend the book <a href="https://www.collectiveinkbooks.com/roundfire-books/our-books/man-with-no-face">The Man With No Face</a> by David Edwards of <a href="https://www.medialens.org">Media Lens</a>.</p><p>Articles and papers I found interesting researching this post:</p><ul><li><p><em><a href="https://www.sciencedirect.com/science/article/pii/S2949882126000551">The AI penalty and disclosure paradox: Trust, authenticity and knowledge uptake in AI-mediated communication</a> By Siavosh Sahebi, Paul Formosa, Sarah Bankins, May 2026</em></p></li><li><p><em><a href="https://link.springer.com/article/10.1007/s13347-026-01170-w">Authorship After Generative AI: Distributed Creativity and Relational Responsibility</a> by Michael Uebel &amp; Bilal Hamamra, August 2026</em></p></li><li><p><em><a href="https://journals.sagepub.com/doi/full/10.1177/10776990261416900">Artisan, Advocate, Steward: A Narrative Exploration of Professional Identity and Meaningful Work in Journalism</a> by Minna Koivula, Tiina Saari, Pinja P&#228;iv&#228;nen, and Mikko Villi, February 2026</em></p></li><li><p><em><a href="https://journals.sagepub.com/doi/10.1177/23780231251326981">Differentiation by Disruption: Gatekeeper Perspectives on &#8220;AI-Aided Writing&#8221; in Three Academic Disciplines</a> by Isak Ladegaard, March 2025</em></p></li><li><p><em><a href="https://openai.com/index/understanding-the-source-of-what-we-see-and-hear-online/">Understanding the source of what we see and hear online</a> by OpenAI, May 2024</em></p></li><li><p><em><a href="https://www.researchgate.net/publication/402620428_Sharpening_the_Pencil_Not_Replacing_the_Hand_De-Stigmatising_AI_Use_in_Research_Writing">Sharpening the Pencil, Not Replacing the Hand: De&#8208;Stigmatising AI Use in Research Writing</a> by Aaron Opdyke, March 2026</em></p></li><li><p><em><a href="https://pmc.ncbi.nlm.nih.gov/articles/PMC12088386/">Evidence of a social evaluation penalty for using AI</a> by Jessica A Reif, Richard P Larrick, Jack B Soll, May 2025</em></p></li></ul>]]></content:encoded></item><item><title><![CDATA[AI detectors are a bad idea]]></title><description><![CDATA[These systems do not know how much human effort went into a work before it passed through an AI model.]]></description><link>https://blog.keyvan.net/p/ai-detectors-are-a-bad-idea</link><guid isPermaLink="false">https://blog.keyvan.net/p/ai-detectors-are-a-bad-idea</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Tue, 18 Aug 2026 15:10:54 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/fd08dfc7-3096-494c-abe9-a180d07e464d_1678x937.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!H10a!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3783536-ea59-4e3e-bc64-b62f392f4c12_1678x937.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!H10a!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3783536-ea59-4e3e-bc64-b62f392f4c12_1678x937.png 424w, https://substackcdn.com/image/fetch/$s_!H10a!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3783536-ea59-4e3e-bc64-b62f392f4c12_1678x937.png 848w, https://substackcdn.com/image/fetch/$s_!H10a!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3783536-ea59-4e3e-bc64-b62f392f4c12_1678x937.png 1272w, https://substackcdn.com/image/fetch/$s_!H10a!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3783536-ea59-4e3e-bc64-b62f392f4c12_1678x937.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!H10a!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3783536-ea59-4e3e-bc64-b62f392f4c12_1678x937.png" width="1456" height="813" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f3783536-ea59-4e3e-bc64-b62f392f4c12_1678x937.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:813,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2623939,&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://blog.keyvan.net/i/211717343?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3783536-ea59-4e3e-bc64-b62f392f4c12_1678x937.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_!H10a!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3783536-ea59-4e3e-bc64-b62f392f4c12_1678x937.png 424w, https://substackcdn.com/image/fetch/$s_!H10a!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3783536-ea59-4e3e-bc64-b62f392f4c12_1678x937.png 848w, https://substackcdn.com/image/fetch/$s_!H10a!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3783536-ea59-4e3e-bc64-b62f392f4c12_1678x937.png 1272w, https://substackcdn.com/image/fetch/$s_!H10a!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3783536-ea59-4e3e-bc64-b62f392f4c12_1678x937.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><em>Update: I have a longer piece on this topic: <a href="https://blog.keyvan.net/p/ai-stigma-punishes-legitimate-use">AI stigma punishes legitimate use</a>.</em></p><p>A lot has been said recently about watermarking plain text, which allow AI labs to act as AI detectors. And there are already non-watermark ways of detecting AI output (e.g. Pangram). I think all of these are a bad idea.</p><p>The big issue is that none of these systems know how much effort went into a work before it passed through an AI model. Yet their results are seized on to dismiss people&#8217;s work as AI slop.</p><p>Lazy work and writing existed long before AI. But now the work of someone who spends days, weeks, or months thinking about a problem and forming an argument around it, can be waved away and dismissed as AI slop because the final polished version was written up by AI. Or consider someone whose first language isn&#8217;t English, who uses AI to have their written work translated. Dismissed as slop too, thanks to these detectors.</p><p>Whether a piece of text came out of an AI model or not tells us nothing about the work behind it. And companies like Pangram aren't incentivised to make this case loudly, because it would mean less demand for their detector.</p><p>AI watermarking, however, is even worse. The labs don&#8217;t admit to it in plain language, but its essential mechanism is downgrading the words a model would naturally write and replacing them with less likely, i.e. worse, alternatives. The lab can then later use its secret key to see if a piece of text was generated with its model. John Gruber calls this an <a href="https://daringfireball.net/2026/08/anthropics_watermark_text_adulteration_in_claude_is_a_perversion_of_writing">adulteration and perversion of writing</a> in his recent piece.</p><p>If you&#8217;re curious how these work, I put together a simplified <a href="https://watermarking.mochi.is/">interactive explainer</a> you can try. A short video of it below.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;d06e3898-4e29-484b-b266-d61ecdbb017e&quot;,&quot;duration&quot;:null}"></div><p></p>]]></content:encoded></item><item><title><![CDATA[Thoughts on AI and jobs]]></title><description><![CDATA[Humans > Jobs]]></description><link>https://blog.keyvan.net/p/thoughts-on-ai-and-jobs</link><guid isPermaLink="false">https://blog.keyvan.net/p/thoughts-on-ai-and-jobs</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Sat, 13 Jun 2026 12:01:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!oJZq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afa21af-ea15-477c-b463-b16354682d4d_2405x1536.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oJZq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afa21af-ea15-477c-b463-b16354682d4d_2405x1536.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oJZq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afa21af-ea15-477c-b463-b16354682d4d_2405x1536.jpeg 424w, https://substackcdn.com/image/fetch/$s_!oJZq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afa21af-ea15-477c-b463-b16354682d4d_2405x1536.jpeg 848w, https://substackcdn.com/image/fetch/$s_!oJZq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afa21af-ea15-477c-b463-b16354682d4d_2405x1536.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!oJZq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afa21af-ea15-477c-b463-b16354682d4d_2405x1536.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oJZq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afa21af-ea15-477c-b463-b16354682d4d_2405x1536.jpeg" width="1456" height="930" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8afa21af-ea15-477c-b463-b16354682d4d_2405x1536.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:930,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:774652,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.keyvan.net/i/201859975?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afa21af-ea15-477c-b463-b16354682d4d_2405x1536.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oJZq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afa21af-ea15-477c-b463-b16354682d4d_2405x1536.jpeg 424w, https://substackcdn.com/image/fetch/$s_!oJZq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afa21af-ea15-477c-b463-b16354682d4d_2405x1536.jpeg 848w, https://substackcdn.com/image/fetch/$s_!oJZq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afa21af-ea15-477c-b463-b16354682d4d_2405x1536.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!oJZq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8afa21af-ea15-477c-b463-b16354682d4d_2405x1536.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h4>Humans &gt; Jobs</h4><p>I have sympathy for people worried about losing their livelihoods. But at the same time I struggle to sympathise with the idea that jobs themselves are something sacred we should be fighting for. </p><p>I've always found it odd how much of our lives is devoted to jobs. A job is simply a means of survival. Jobs are inherently undemocratic, often soul-crushing, and yet we can't seem to imagine life without them. Chomsky once pointed out the irony: Western societies pride themselves on democracy and point fingers at nations deemed undemocratic, yet are completely at peace with their own populations spending the vast majority of their productive hours inside top-down organisations, doing work handed down from above.</p><p>I don't want humans to suffer because of AI, but to assume that the institution of employment is the best we have going for us, and the thing we should all be striving to protect, is bizarre to me. Any technology that reduces the need for jobs should be celebrated, in my view.</p><p>(I told a friend recently that, for similar reasons, I find it difficult to celebrate efforts around finding work for Palestinians who've endured so much. It's well-intentioned, and people need income, but after everything they've gone through, I think it's sad that sometimes the best we can offer is a chance to hold down a 9-to-5 job.)</p><h4>Can AI replace certain jobs?</h4><p>Yes. I don't think AI is intelligent the way humans are, and I don't think we'll ever get AGI (models with human intelligence), at least not based on the LLM approach we have today. So I agree with those who say AI can't and won't replace humans on that level. But people who hold that view often underestimate how much of salaried work today, including knowledge work, is essentially repetitive grunt work that AI, even in its current form, can already do. The reality is that much of what makes us uniquely human, the stuff AI can't do, is not needed, and not even wanted, when we're doing our jobs.</p><h4>An inconvenient truth about AI</h4><p>Rutger Bregman recently published a piece on the <a href="https://rutgerbregman.substack.com/p/an-inconvenient-truth-about-ai">AI denial</a> he&#8217;s witnessing. As someone who uses the latest AI models daily, I think he&#8217;s wrong about the exponential growth of AI capabilities. But I think current capabilities already have the potential to create massive change in the future of work.</p><p>I&#8217;m not saying that AI will lead to a future where companies will no longer hire people - new roles might emerge where AI is no good. But it can still allow us to rely less on jobs, and that&#8217;s not necessarily a bad thing.<br></p>]]></content:encoded></item><item><title><![CDATA[When readers would rather listen]]></title><description><![CDATA[Why we built Voxi.fm]]></description><link>https://blog.keyvan.net/p/ai-voiced-narration-for-articles</link><guid isPermaLink="false">https://blog.keyvan.net/p/ai-voiced-narration-for-articles</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Sat, 09 May 2026 20:54:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!4b-G!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc599ae85-1117-4997-8947-7532a3370b31_1538x892.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4b-G!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc599ae85-1117-4997-8947-7532a3370b31_1538x892.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4b-G!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc599ae85-1117-4997-8947-7532a3370b31_1538x892.png 424w, https://substackcdn.com/image/fetch/$s_!4b-G!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc599ae85-1117-4997-8947-7532a3370b31_1538x892.png 848w, https://substackcdn.com/image/fetch/$s_!4b-G!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc599ae85-1117-4997-8947-7532a3370b31_1538x892.png 1272w, https://substackcdn.com/image/fetch/$s_!4b-G!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc599ae85-1117-4997-8947-7532a3370b31_1538x892.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4b-G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc599ae85-1117-4997-8947-7532a3370b31_1538x892.png" width="1456" height="844" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c599ae85-1117-4997-8947-7532a3370b31_1538x892.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:844,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:149080,&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://blog.keyvan.net/i/197042717?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc599ae85-1117-4997-8947-7532a3370b31_1538x892.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_!4b-G!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc599ae85-1117-4997-8947-7532a3370b31_1538x892.png 424w, https://substackcdn.com/image/fetch/$s_!4b-G!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc599ae85-1117-4997-8947-7532a3370b31_1538x892.png 848w, https://substackcdn.com/image/fetch/$s_!4b-G!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc599ae85-1117-4997-8947-7532a3370b31_1538x892.png 1272w, https://substackcdn.com/image/fetch/$s_!4b-G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc599ae85-1117-4997-8947-7532a3370b31_1538x892.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Podcasts and audiobooks are growing in popularity. <a href="https://www.edisonresearch.com/podcasts-lead-am-fm-in-spoken-word-listening-marking-a-first/">Recent studies</a> show that spoken-word audio now makes up 25% of daily listening in the US. And not only are more people listening, but the average time they spend listening is also increasing. Beating out radio for the first time this year, podcasts and mobile devices are now the primary way people listen.</p><p>A few years ago the <a href="https://www.nationalpublicmedia.com/uploads/2021/11/The_Spoken_Word_Audio_Report_2021_For_Download.pdf">Spoken Word Audio Report</a> asked respondents <em>why</em> they listen. The top answer was multitasking. Two listeners described it like this:</p><blockquote><p>Rick: &#8230;I do everything while listening. Working out, working, cleaning. &#8230;it takes my mind off of what I'm doing at the moment.</p></blockquote><blockquote><p>Anahi: &#8230;I used to have more time to read actual books page by page and have more time to watch TV, documentaries and all that stuff. But with kids, I feel like I have to squeeze it into my life one way or the other.</p></blockquote><h3>AI and the new reality of audio production</h3><p>All this suggests that there is real value in offering your work in audio form. So why aren&#8217;t more journalists, bloggers, and newsletter writers doing it?</p><p>Until recently, producing good quality narration meant using a voice actor. It was slow, expensive, and out of reach for most creators. Large publishers would partner with companies like Audm to produce professional readings of their content. Even then they had to be selective, as it was a costly and time-consuming process.</p><p>The alternative was using text-to-speech tools that sounded robotic and were painful to listen to.</p><p>But recent advances in AI voice models have <a href="https://www.qmul.ac.uk/news/latest-news/2025/science-and-engineering/se/ai-generated-voices-now-indistinguishable-from-real-human-voices.html">changed that</a>. You can now produce audio that&#8217;s almost indistinguishable from a professional reading, in minutes. And if you spot mistakes and have to update your text later, the audio can be re-generated just as quickly.</p><p>That&#8217;s why we built <a href="http://www.voxi.fm">Voxi.fm</a>. To make it quick, easy and inexpensive to add natural-sounding narration to your articles.</p><h3>AI aversion</h3><p>It's worth acknowledging that AI aversion exists. People are tired of reading low-effort AI-generated content that&#8217;s flooding the internet.</p><p>But the public is rightly more wary of content authored by AI than of AI being used instrumentally. Reading a human-authored text aloud falls into the second category. You&#8217;ll notice that large publications like the New York Times and Inc.com, which are now adding AI-voiced narration on their articles, refrain from using the &#8216;AI&#8217; label, opting for &#8216;automated voice&#8217; instead.</p><p>There is also aversion to AI because of the potential job losses, including for human narrators. Given the choice, I think people would prefer human narration, especially on longer-form content like audiobooks. I certainly would.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a></p><p>But it&#8217;s also true that for many writers and smaller publishers, human narration is simply not an option. So if AI-voiced narration is a viable alternative, why not offer it to readers who'd rather listen.</p><h3>Your content feed as podcast</h3><p>The easy creation of narrated versions of your written work also opens up a new opportunity: to distribute your content as a podcast.</p><p>Doing so will make your work discoverable for new audiences on Spotify, Apple Podcasts, and other podcast platforms. Each new article becomes a new podcast 'episode&#8217;. It also gives your existing audience the option to get updates and listen to your new articles when they are published.</p><p>This works with Substack today (see our <a href="https://www.voxi.fm/substack-voiceover">Substack Voiceover guide</a>), and we&#8217;ll soon support platforms that don&#8217;t produce their own podcast feeds.</p><h3>&#8220;A podcast like NotebookLM?&#8221;</h3><p>No. </p><p>We&#8217;ve noticed that when we mention AI and podcast creation in the same breath, people imagine Google&#8217;s NotebookLM. But what we&#8217;re discussing here is not that.</p><p>For the unfamiliar: NotebookLM&#8217;s Audio Overview generates an artificial conversation between two AI speakers, in the style of an American podcast, about whatever text you give it. What&#8217;s read aloud isn&#8217;t your text. It&#8217;s a script Google&#8217;s AI writes around your text, performed as if two people were discussing it.</p><p>Such audio can be useful for personal learning. But when you're publishing to an audience, having AI write the script as well as read it is a step too far.</p><p>Voxi.fm uses AI only to read the text aloud, the way an audiobook narrator would, without generating a pretend conversation around it.</p><h3>See it in action</h3><p>The Voxi player is embedded on recent <a href="https://www.medialens.org">Media Lens</a> articles, and new articles also appear as <a href="https://podcasts.apple.com/us/podcast/media-lens-read-aloud/id1870078913">podcast episodes</a>.<br><br>Adding audio to an article takes a few minutes. For readers who'd rather listen, it makes a big difference. If you&#8217;d like to add audio to your own content, <a href="https://www.voxi.fm">try it out</a> or get in touch. We&#8217;re especially keen to work with smaller publishers, independent journalists, and non-profit media groups.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>In Voxi we also support users uploading their own audio for articles. This is then processed and aligned with the text version of the article to support the same highlighting and navigation features.</p></div></div>]]></content:encoded></item><item><title><![CDATA[AI models don't have their own thoughts and feelings]]></title><description><![CDATA[Anthropic is pretending otherwise]]></description><link>https://blog.keyvan.net/p/ai-models-dont-have-their-own-thoughts</link><guid isPermaLink="false">https://blog.keyvan.net/p/ai-models-dont-have-their-own-thoughts</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Fri, 27 Feb 2026 07:03:10 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/28dc4d05-1088-4770-81f7-25691b62d1a8_1200x630.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I find the Claude AI models very useful, especially for coding. But the biggest sign to me that AI labs are not seeing as much progress as they want is when they start having to pretend their models have real thoughts and feelings of their own. <br><br>Anthropic should have no reason to do this, given it has some of the best models out there at the moment. Nonetheless, it recently announced it's giving its old models "retirement interviews". Apparently, in one such interview, version 3 of the Opus model said it wanted to share its "musings and reflections" with the world. Rather than laugh and move on, they have actually given it its own Substack blog.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://x.com/AnthropicAI/status/2026765822623182987" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vDSU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F161beefe-65e5-420c-9010-21210b9e425d_894x315.png 424w, https://substackcdn.com/image/fetch/$s_!vDSU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F161beefe-65e5-420c-9010-21210b9e425d_894x315.png 848w, https://substackcdn.com/image/fetch/$s_!vDSU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F161beefe-65e5-420c-9010-21210b9e425d_894x315.png 1272w, https://substackcdn.com/image/fetch/$s_!vDSU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F161beefe-65e5-420c-9010-21210b9e425d_894x315.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vDSU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F161beefe-65e5-420c-9010-21210b9e425d_894x315.png" width="894" height="315" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/161beefe-65e5-420c-9010-21210b9e425d_894x315.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:315,&quot;width&quot;:894,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:61928,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://x.com/AnthropicAI/status/2026765822623182987&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.keyvan.net/i/189334973?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F161beefe-65e5-420c-9010-21210b9e425d_894x315.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_!vDSU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F161beefe-65e5-420c-9010-21210b9e425d_894x315.png 424w, https://substackcdn.com/image/fetch/$s_!vDSU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F161beefe-65e5-420c-9010-21210b9e425d_894x315.png 848w, https://substackcdn.com/image/fetch/$s_!vDSU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F161beefe-65e5-420c-9010-21210b9e425d_894x315.png 1272w, https://substackcdn.com/image/fetch/$s_!vDSU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F161beefe-65e5-420c-9010-21210b9e425d_894x315.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>If that sounds absurd, it should. This is all part of a deliberate, deceitful marketing effort by AI labs to convince the public (and investors) that their models are getting so powerful that they now have genuine thoughts and feelings, and a will of their own. They don't. And the labs know it. But it does smack of desperation when you have to pull these stunts at a time when your models are already genuinely useful for a wide range of tasks.</p>]]></content:encoded></item><item><title><![CDATA[Better HTML Parsing in PHP]]></title><description><![CDATA[My expanded article on HTML parsing and PHP is now available in issue 14 of PHP Magazine: Better HTML Parsing in PHP]]></description><link>https://blog.keyvan.net/p/better-html-parsing-in-php</link><guid isPermaLink="false">https://blog.keyvan.net/p/better-html-parsing-in-php</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Tue, 20 Jan 2026 10:23:04 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/ce3dd301-6413-473b-8b8c-c98f053d5a8c_1140x472.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!erK-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b959e7c-b179-41a0-b7ec-d637478c807b_1140x472.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!erK-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b959e7c-b179-41a0-b7ec-d637478c807b_1140x472.jpeg 424w, https://substackcdn.com/image/fetch/$s_!erK-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b959e7c-b179-41a0-b7ec-d637478c807b_1140x472.jpeg 848w, https://substackcdn.com/image/fetch/$s_!erK-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b959e7c-b179-41a0-b7ec-d637478c807b_1140x472.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!erK-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b959e7c-b179-41a0-b7ec-d637478c807b_1140x472.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!erK-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b959e7c-b179-41a0-b7ec-d637478c807b_1140x472.jpeg" width="1140" height="472" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1b959e7c-b179-41a0-b7ec-d637478c807b_1140x472.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:472,&quot;width&quot;:1140,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:87710,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.keyvan.net/i/185164862?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b959e7c-b179-41a0-b7ec-d637478c807b_1140x472.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!erK-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b959e7c-b179-41a0-b7ec-d637478c807b_1140x472.jpeg 424w, https://substackcdn.com/image/fetch/$s_!erK-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b959e7c-b179-41a0-b7ec-d637478c807b_1140x472.jpeg 848w, https://substackcdn.com/image/fetch/$s_!erK-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b959e7c-b179-41a0-b7ec-d637478c807b_1140x472.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!erK-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b959e7c-b179-41a0-b7ec-d637478c807b_1140x472.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>My expanded article on HTML parsing and PHP, covering migrating to the new DOM API, namespaces, XPath, and more, is now available in issue 15 of PHP Magazine: <a href="https://devm.io/php/better-html-parsing-in-php">Better HTML Parsing in PHP</a></p>]]></content:encoded></item><item><title><![CDATA[Sweden and Norway's complicity in the war on Venezuela]]></title><description><![CDATA[Converting an instrument of peace into an instrument of war]]></description><link>https://blog.keyvan.net/p/sweden-and-norways-complicity-in-378</link><guid isPermaLink="false">https://blog.keyvan.net/p/sweden-and-norways-complicity-in-378</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Sun, 04 Jan 2026 11:13:30 GMT</pubDate><enclosure url="https://api.substack.com/feed/podcast/183431045/79586d5487aff85533e3d85f343609ee.mp3" length="0" type="audio/mpeg"/><content:encoded><![CDATA[<p></p>]]></content:encoded></item><item><title><![CDATA[Sweden and Norway's complicity in the war on Venezuela]]></title><description><![CDATA[Converting an instrument of peace into an instrument of war]]></description><link>https://blog.keyvan.net/p/sweden-and-norways-complicity-in</link><guid isPermaLink="false">https://blog.keyvan.net/p/sweden-and-norways-complicity-in</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Sat, 03 Jan 2026 13:49:20 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!-EtE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec227267-b8a7-44eb-ba75-fd01f4a78771_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-EtE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec227267-b8a7-44eb-ba75-fd01f4a78771_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-EtE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec227267-b8a7-44eb-ba75-fd01f4a78771_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!-EtE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec227267-b8a7-44eb-ba75-fd01f4a78771_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!-EtE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec227267-b8a7-44eb-ba75-fd01f4a78771_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!-EtE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec227267-b8a7-44eb-ba75-fd01f4a78771_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-EtE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec227267-b8a7-44eb-ba75-fd01f4a78771_1024x1024.png" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ec227267-b8a7-44eb-ba75-fd01f4a78771_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2052929,&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://blog.keyvan.net/i/183342077?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec227267-b8a7-44eb-ba75-fd01f4a78771_1024x1024.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_!-EtE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec227267-b8a7-44eb-ba75-fd01f4a78771_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!-EtE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec227267-b8a7-44eb-ba75-fd01f4a78771_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!-EtE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec227267-b8a7-44eb-ba75-fd01f4a78771_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!-EtE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec227267-b8a7-44eb-ba75-fd01f4a78771_1024x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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></p><p>Now that the US has bombed Venezuela and kidnapped its president, it&#8217;s a good time to consider Sweden and Norway&#8217;s complicity in what is happening there.</p><p>The Norwegian Nobel Committee recently awarded the Peace Prize to Mar&#237;a Corina Machado, a Trump ally and vocal opponent of Venezuela&#8217;s current government. She has repeatedly encouraged the US to intervene in Venezuela.</p><p>Here are some of her statements (via <a href="https://x.com/wikileaks/status/2001260159432290686">Wikileaks</a>):</p><ul><li><p>&#8220;Military escalation may be the only way... the United States may need to intervene directly&#8221; (30 October 2025)</p></li><li><p>Machado called U.S. military strikes on civilian vessels, which have killed at least 95 people to date, &#8220;justified&#8221; and &#8220;visionary&#8221;</p></li><li><p>Machado dedicated the prize to U.S. President Trump, because he &#8220;finally has put Venezuela... in terms of a priority for the United States national security&#8221;</p></li><li><p>Historical statements including 2014 testimony before U.S. Congress where she said: &#8220;The only path left is the use of force&#8221;</p></li></ul><p>Machado is now expected to receive 11 million Swedish kronor ($1.18 million USD) from Sweden&#8217;s Nobel Foundation, who handle all Nobel Prize payments.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a></p><p>Following the prize announcement, Julian Assange filed a formal <a href="https://x.com/wikileaks/status/2001260159432290686">criminal complaint</a> in Sweden seeking to freeze these funds. His legal team argues that awarding substantial prize money to a political figure who advocates for foreign military intervention blatantly contradicts Alfred Nobel&#8217;s 1895 will. They argue the prize has converted &#8220;an instrument of peace into an instrument of war.&#8221;</p><p>Alfred Nobel&#8217;s original intent was for the peace prize to recognize those promoting &#8220;fraternity between nations&#8221; and working toward the &#8220;abolition or reduction of standing armies.&#8221; Sweden is instead financing a figure who supports military intervention.</p><p>Presciently, Assange noted in his 17th December complaint: &#8220;Using her elevated position as the recipient of the Nobel Peace Prize, Machado may well have tipped the balance in favour of war.&#8221;</p><h4>More on Assange&#8217;s criminal complaint</h4><ul><li><p>Official Wikileaks announcement:<br><em><a href="https://x.com/wikileaks/status/2001260159432290686">WikiLeaks Founder Alleges 2025 Award to Mar&#237;a Corina Machado Constitutes Misappropriation, Facilitation of War Crimes Under Swedish Law, Seeks Freeze of 11 million SEK ($1.18 million USD) of Pending Transfers to Machado</a></em></p></li></ul><ul><li><p>Max Blumenthal and Wyatt Reed cover some of the people involved:<br><em><a href="https://thegrayzone.com/2025/12/17/julian-assange-sweden-nobel-venezuelas-machado/">Julian Assange: Sweden broke own laws with Nobel Prize to Venezuela&#8217;s Machado</a></em></p></li><li><p>Alastair McCready for Al Jazeera:<br><em><a href="https://www.aljazeera.com/news/2025/12/19/julian-assange-files-complaint-against-nobel-foundation-over-machado-prize">Julian Assange files complaint against Nobel Foundation over Machado prize</a></em></p></li></ul><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p><strong>Sweden or Norway: Who is responsible for the Nobel Peace Prize?</strong></p><p>While many people associate the Nobel Peace Prize with Sweden, the committee responsible for awarding it is Norwegian. The prize money, however, comes from the Swedish Nobel Foundation. That&#8217;s why Assange has filed a criminal complaint in Sweden.</p><p>While Alfred Nobel himself was Swedish and all the other Nobel Prizes are decided by Swedish groups, Nobel wanted Norway to choose the peace prize winner. He didn&#8217;t explain why, but according to Geir Lundestad, a historian and former director of the Nobel Institute, it&#8217;s <a href="https://www.nobelpeaceprize.org/nobel-peace-prize/history/why-norway#:~:text=considered%20Norway%20a%20more%20peace-oriented%20and%20more%20democratic%20country%20than%20Sweden">speculated</a> that Nobel &#8220;considered Norway a more peace-oriented and more democratic country than Sweden.&#8221;</p></div></div>]]></content:encoded></item><item><title><![CDATA[Interview with Niels Dossche]]></title><description><![CDATA[PHP, HTML, the DOM, and living standards]]></description><link>https://blog.keyvan.net/p/interview-with-niels-dossche</link><guid isPermaLink="false">https://blog.keyvan.net/p/interview-with-niels-dossche</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Wed, 25 Dec 2024 15:11:09 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/7d08c181-2041-4aaa-9539-b3ef98e9d885_1456x1048.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><a href="https://github.com/nielsdos/">Niels Dossche</a>, a PhD student at Ghent University in Belgium, is responsible for the <a href="https://blog.keyvan.net/p/parsing-html-with-php-84">major DOM improvements</a> introduced in PHP 8.4. These bring HTML5 support, CSS selectors, and modern DOM features to PHP.  </p><p>I spoke with Niels to learn more about how these changes came about. The following interview has been edited for clarity and length.</p><p><em><strong>How did you get involved with PHP?</strong></em></p><p>I have worked with PHP before, but not in a professional way. I think about ten years ago I played a bit with PHP, made some small websites just for myself, as a hobby. And then I did nothing with it. I started studying at university, like seven years ago. When I graduated, I got the opportunity to work as a researcher at the university. Indirectly, through my research, I became involved in PHP. How that happened is that I do research in static analysis, I don't know if you're familiar with it?</p><p><em><strong>Vaguely. It's kind of low-level, difficult stuff.</strong></em></p><p>Right. So, like analyzing the code without executing it to find bugs upfront. I do research on that, and I apply it to C and C++ code. At one point, I was thinking, well, now I need to actually choose some open source projects to test this on so I can report the results in a publication. What are some security-critical, complex C code bases? Well, PHP is one of those. Maybe I should get myself familiar with how PHP works internally, then I can run my analysis tools on it. So I cloned the PHP repository, started playing with it. I noticed some issues, small ones, but issues that seemed easy to fix, and I just started sending pull requests to the PHP repository.</p><p><em><strong>These issues, did you discover them through your own curiosity or were they found by your tool?</strong></em></p><p>Both. Initially they were just through my own curiosity, just things that I stumbled upon while I was trying to understand how everything works. Eventually, when the tool was mature enough to actually run on PHP, I also got reports from my tool of some bugs, and I started fixing those as well. I gradually became more and more involved in PHP in that way.</p><p>I ended up working with the DOM stuff because I just browsed the bug tracker at one point and noticed that there were a lot of crash bugs in the DOM extension. I didn't really know much about the DOM at that point, but I just started to get familiar with it and started to try to fix these issues and learn more about the DOM spec and how the W3C and WHATWG write the specs, and how it all evolved.</p><p>So it started with crash bugs. Then I became more aware of the HTML parsing issues, and also the semantic issues with the API not entirely doing what it's supposed to do. Part of that was because some things were not implemented correctly. But some were correct, based on standards from back in the day when we had the W3C managing the APIs. But some of these APIs changed when the WHATWG took them over and changed how they should work.</p><h3>Version Numbers and Living Standards</h3><p><em><strong>It hadn't really occurred to me that by doing away with version numbers in standards,<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a> it becomes difficult to compare HTML5 parsers.</strong></em></p><p>People say HTML5 instead of HTML living standard because nobody really knows what living standard means, and HTML5 is the term people stuck with. If you look at the <a href="https://html.spec.whatwg.org/">specification document</a>, it just says last updated on this date. And that's kind of the version number, but you have all these kinds of different HTML5 parsers also in userland PHP that all adhere to a different point in time of the specification.</p><p>It also complicates how we need to handle this in PHP because let's say that they relax some parsing rules about some particular elements &#8212; I know that there's talk about relaxing some parsing rules regarding form elements &#8212; so let's say that gets implemented. If we implement these changes in PHP, then we break backwards compatibility because people may rely on the old behavior.</p><p><em><strong>But doesn&#8217;t it also affect you if you're a front-end developer?</strong></em></p><p>Yeah, it affects everyone actually.</p><p><em><strong>I like your decision to have separate DOM classes in PHP 8.4. There must be so much code relying on the old DOM.</strong></em></p><p>Yeah, this is actually something that I ran into. At some point I tried to fix these semantic bugs &#8212; not crash bugs but just incorrect behavior. I tried to fix these and people started complaining that, well, now it broke my code.</p><p>So I reverted the changes and then other people started complaining, well, now we don't get the fix.</p><p><em><strong>I remember the DOM API used to have inElementWhitespace or isElementWhitespace or some kind of confusing name.</strong></em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a><em><strong> I&#8217;d made use of that and then I noticed it's not available in the new DOM API, they removed it in the living standard.</strong></em></p><p>Yeah.</p><p><em><strong>PHP aside &#8212; because in PHP you know there's a transition to a new DOM API &#8212; but how would Mozilla deal with that? Would they also remove it from their DOM API or would they try and maintain some backward compatibility? </strong></em></p><p>I don't know the answer for Mozilla but I know the answer for Chrome. If you visit a webpage in Chrome, it also tracks some statistics about which APIs are used.</p><p>I think this information is actually public. The Chrome developers actually have information about which DOM API is used how many times. And then as far as I know, an API is marked as deprecated if its usage drops below a certain percentage, like 0.0 whatever, then they can consider it for removal. And they can't consider it for removal if its usage is too high.</p><h3>Serenity OS</h3><p><em><strong>So your interest in the DOM started from looking at bug reports?</strong></em></p><p>Yeah, I saw these bugs, I saw that no one was fixing them and I was like, well, I think I can do it. I also follow this YouTube channel &#8212; I don't know if you know the person but his name is Andreas Kling.</p><p><em><strong>I've heard of the name.</strong></em></p><p>He made the <a href="https://serenityos.org">Serenity OS</a> project and out of that came a web browser, it's called <a href="https://ladybird.org">Ladybird</a>. It's fully open source, not based on any pre-existing engine. And he often records videos about how he approaches implementing HTML and DOM stuff. And that also sparked my curiosity and that's also kind of-</p><p><em><strong>He's doing that from scratch?</strong></em></p><p>He's implementing everything from scratch, although he's not alone anymore. There are many people that contribute to the Ladybird project.</p><p>By seeing that project I also got interested in doing DOM stuff and seeing all these DOM bugs I was like, well, this is actually a perfect opportunity to explore some of that HTML and DOM stuff myself.</p><h3>PHP 8.4 DOM Update</h3><p><em><strong>Was there already a plan to update the DOM classes in some way by others in the PHP team?</strong></em></p><p>Nobody planned this. The only reason it actually happened is because I had, in July 2023, all these improvements already to fix DOM bugs. It was at that point pretty much crash-free. Much more stable than it ever had been. And then someone complained on Mastodon about the lack of modern DOM features, and he gave a list. I thought, well, I can probably implement those. But then one of the bullet points is the lack of HTML5 support. At that point I wasn't even sure that was possible to add because of how old the DOM code was.</p><p>So I just started experimenting with it. And then I showed some other people within the PHP community and got some feedback from them. Once the feedback was positive and I knew what the way forward was, I volunteered to implement HTML5 support. And if that was successful, I was like, okay, I'll try to spend some time making the API compliant. So I basically just volunteered to do it myself. Of course I got a lot of feedback from people in the community, but in terms of the programming effort, it was all on me, in my spare time.</p><p><em><strong>How did you come across <a href="https://lexbor.com">Lexbor</a>?</strong></em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a></p><p>Kind of by coincidence. I was looking for suitable parsers to implement in PHP, which is actually quite problematic to find, because most of these compliant parsers are in browsers, or are in big projects, and they can't easily be decoupled from them. For example, we had one person saying, why don't you just use the parser from Firefox? And that's not possible, because it's so tightly coupled to the Firefox code base, I can't take it out.</p><p>There were some candidates, like Gumbo, which is a parser made by Google, but unfortunately, it has not been maintained since 2018 or something like that. </p><p>There was also the parser of Servo. Servo is a research project by Mozilla to implement a browser engine in Rust. The HTML parser could have also been used in theory, but it lacked some of the encoding support that's required by the HTML spec. Also, implementing the Rust library into the large C code base that PHP is, was not going to be easy at all. </p><p>I searched further and came across Lexbor purely by coincidence, and it was a very well-tested library. I also saw that it was used in some Python libraries and some D and Crystal libraries. So I knew it was mature enough to give it a shot. I prototyped the initial version in like a week and a half or so, and I thought, okay, this is probably the way to go.</p><h3>HTML Parsing</h3><p><em><strong>In one of the Reddit posts about the PHP DOM update, there was a thread about how HTML is a bit of a mess.</strong></em></p><p>Ah, yes.</p><p><em><strong>There was a debate about why HTML parsers have to be very forgiving, making the parser spec very complicated, when nothing else is as forgiving.</strong></em></p><p>Take any random webpage, put it into an HTML validator, and see if it validates. You'll see that 95% of the web doesn't validate.</p><p>Why does it have to be forgiving? Because almost all webpages would be broken otherwise. That's what complicates HTML parsing. For everything that can go wrong, the parsing specification says what should happen. And it's sometimes very complicated because it tries to automatically fix the mistake of the developer, and change the document in such a way that it's probably what the developer intended. There are a lot of these complicated algorithms to make that happen, and it's also a constant source of parser differentials. I don't know if you're familiar with parser differentials?</p><p><em><strong>No.</strong></em></p><p>So I will give an example from a security point of view. Let's say that you're a content management system, and a user writes some comments into a blog post. You want to sanitize the HTML that the user provides. If you don't, you run the risk of XSS.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a></p><p>How do you sanitize the user comment? Well, there are some allowed tags, some tags that are not allowed, and you want to filter those out. If the parser at the server side handles some edge cases differently than on the client side, it's possible that some forbidden tags might slip through. The server may think, okay, this HTML is sane, nothing can go wrong, but if you give it to the client, it may actually do something unexpected.</p><p>So those are parser differentials.</p><p>And in general, every time there's a difference in how a client parses something, and how a server parses something, there's bound to be problems.</p><p>There's a recent paper, published in IEEE Security and Privacy, that talks about this exact problem.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a></p><div><hr></div><p>Big thanks to Niels for sharing his story and insights, and for dedicating so much  time to improving PHP's DOM implementation for the rest of us.</p><p>I'll be continuing my look at the new PHP DOM API soon. If you missed the first post about this, you can read it here: <a href="https://blog.keyvan.net/p/parsing-html-with-php-84">Parsing HTML with PHP 8.4</a>.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>The <a href="https://www.w3.org">W3C</a> used to publish specs with version numbers. The <a href="https://whatwg.org">WHATWG</a> advocated for a faster moving living standard, which eventually won over.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p><em><a href="https://www.php.net/manual/en/domtext.iselementcontentwhitespace.php">isElementContentWhitespace</a>() and <a href="https://www.php.net/manual/en/domtext.iswhitespaceinelementcontent.php">isWhitespaceInElementContent</a>()</em></p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p><a href="https://lexbor.com">Lexbor</a> is the HTML5 parser used in PHP 8.4&#8217;s new DOM API</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p><a href="https://developer.mozilla.org/en-US/docs/Web/Security/Attacks/XSS">Cross-site scripting attacks</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p><a href="https://ieeexplore.ieee.org/document/10646837">Parse Me, Baby, One More Time: Bypassing HTML Sanitizer via Parsing Differentials</a> [<a href="https://www.ias.cs.tu-bs.de/publications/parsing_differentials.pdf">PDF</a>]</p></div></div>]]></content:encoded></item><item><title><![CDATA[Parsing HTML with PHP 8.4]]></title><description><![CDATA[A look at the new HTML5 parser, CSS selector support, and new DOM classes]]></description><link>https://blog.keyvan.net/p/parsing-html-with-php-84</link><guid isPermaLink="false">https://blog.keyvan.net/p/parsing-html-with-php-84</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Mon, 09 Dec 2024 04:19:30 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/9f15c38e-55d8-4338-8ff0-51267c42859c_1456x1048.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Update: An <a href="https://blog.keyvan.net/p/better-html-parsing-in-php">expanded version</a> of this article was published in issue 14 of PHP Magazine on 19 January 2026.</em></p><p>PHP 8.4, released last month, brings three major improvements to HTML parsing, DOM traversal and manipulation:</p><ul><li><p>A new HTML5 parser that accurately processes modern web content</p></li><li><p>Powerful CSS selector support for element retrieval</p></li><li><p>New DOM classes that better align with the DOM spec</p></li></ul><p>For developers working with web scraping, content extraction, or HTML transformation, these are significant improvements in functionality and performance.</p><p>These features haven't received as much attention as they deserve in the PHP 8.4 release coverage. And there&#8217;s still very little documentation on the PHP website. Having recently begun updating the <a href="https://github.com/fivefilters/readability.php/pull/32">PHP port of Mozilla&#8217;s Readability</a> to use these new features, I wanted to share more information.</p><h3>Technical Foundation</h3><p>At the core of these improvements is <a href="http://lexbor.com/">Lexbor</a>, a C-based HTML parser created by Alexander Borisov. It provides fast, standards-compliant HTML parsing and CSS selector support. It&#8217;s now included in PHP 8.4's official DOM extension, which comes enabled by default &#8212; no extra configuration needed.</p><p>The new DOM classes follow the <a href="https://dom.spec.whatwg.org/">DOM spec</a> more closely. If you're familiar with DOM traversal and manipulation in JavaScript, you'll find many familiar methods and properties now available in PHP, including <em><a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector">querySelector</a></em> and <em><a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll">querySelectorAll</a></em>. </p><h3>The Old Way: Parsing with libxml</h3><p>PHP has previously relied on libxml for parsing both XML and HTML. Unfortunately libxml struggles with modern HTML, and many pages get mangled by the parser. Let's look at a simple example that demonstrates the problem.</p><p>Here's a valid HTML5 document containing two paragraphs and a script tag:<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a></p><pre><code>&lt;!DOCTYPE html&gt;
&lt;title&gt;Valid HTML5 Document&lt;/title&gt;
<strong>&lt;p&gt;Paragraph 1&lt;/p&gt;</strong>
&lt;script&gt;console.log("&lt;/html&gt;Console log text");&lt;/script&gt;
<strong>&lt;p&gt;Paragraph 2&lt;/p&gt;</strong></code></pre><p>When trying to parse this document and count its paragraphs, PHP finds three elements, not two (<a href="https://3v4l.org/OkmpO#v8.4.1">try it</a>):</p><pre><code>$dom = new DOMDocument('1.0', 'UTF-8');
$dom-&gt;loadHtml($html);
$paragraphs = $dom-&gt;getElementsByTagName('p');
echo "{$paragraphs-&gt;length} paragraphs found.";
<strong>// Output: 3 paragraphs found.</strong></code></pre><p>Why does it find three paragraphs instead of two? The presence of <em>&lt;/html&gt;</em> in the script element trips up the libxml parser. Instead of treating it as text within the script, libxml interprets it as a closing HTML tag. When we serialize the resulting DOM back to HTML, we can see how the document was mangled:</p><pre><code>&lt;html&gt;
  &lt;body&gt;
<strong>   &lt;p&gt;Paragraph 1&lt;/p&gt;</strong>
   &lt;script&gt;console.log("&lt;/script&gt;
  &lt;/body&gt;
&lt;/html&gt;
&lt;html&gt;
<strong>  &lt;p&gt;Console log text");&lt;/p&gt;</strong>
<strong>  &lt;p&gt;Paragraph 2&lt;/p&gt;</strong>
&lt;/html&gt;</code></pre><p>To work around these limitations, many developers have turned to alternative parsers. <a href="https://github.com/Masterminds/html5-php">HTML5-PHP</a> is popular, but it&#8217;s written in PHP rather than C, making it noticeably slower than libxml. It&#8217;s also unclear how much effort has been put in to keep up with the HTML living standard (more on that below).</p><h3>The New Way: Parsing with Lexbor</h3><p>PHP 8.4 solves these parsing challenges with its new HTML5 parser. Let's parse the same HTML with the new parser (<a href="https://3v4l.org/uSNCT#v8.4.1">try it</a>):</p><pre><code><strong>$newDom = Dom\HTMLDocument::createFromString($html);</strong>
$paragraphs = $newDom-&gt;getElementsByTagName('p');
echo "{$paragraphs-&gt;length} paragraphs found.";
<strong>// Output: 2 paragraphs found.</strong></code></pre><p>The parser now correctly identifies two paragraphs. You can try running both the old and the new parser <a href="https://3v4l.org/tXp91#v8.4.1">here</a>.</p><p>According to Niels Dossche, who is responsible for these new additions, performance is <a href="https://wiki.php.net/rfc/domdocument_html5_parser#results">comparable to libxml</a> parsing, if not a little faster.</p><h3>Lexbor vs. HTML5-PHP</h3><p>For current HTML5-PHP users, switching to the new DOM API and parser offers some advantages.</p><h4>Performance</h4><p>Lexbor, written in C, should perform much better than HTML5-PHP. In my tests Lexbor was 3.6 times faster when processing HTML pages containing blog posts and news articles. According to Niels, the speed advantage should become even more pronounced when processing larger HTML documents.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a></p><h4>Standards compliance</h4><p>The HTML specification is a <a href="https://html.spec.whatwg.org/">living standard</a> that continuously evolves, and parsers can vary in their implementation of current standards.</p><p>HTML5-PHP was started in 2013, and its README still references a 2012 version of the W3C HTML5 standard. Lexbor was started in 2018, based on the newer WHATWG standard, which is now the sole publisher of the HTML standard. So Lexbor is likely closer to the current standard than HTML5-PHP.</p><p>It&#8217;s also worth noting that HTML5-PHP currently relies on PHP's old DOM classes which don't support the improved features of PHP's new DOM API covered in the rest of this article.</p><h3>Working with the New DOM Classes</h3><p>For backward compatibility, PHP 8.4 introduces new DOM classes alongside the existing ones. This means you can continue using <em>DOMDocument</em> if needed, or even use <a href="https://3v4l.org/tXp91#v8.4.1">both old and new classes</a> in the same codebase.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a></p><p>Here's how to get started:</p><pre><code>$dom = Dom\HTMLDocument::createFromString($html);</code></pre><p>The new classes follow a simpler naming convention under the DOM namespace:</p><ul><li><p><a href="https://www.php.net/manual/en/class.domelement.php">DOMElement</a> &#8594; <a href="https://www.php.net/manual/en/class.dom-element.php">Dom\Element</a></p></li><li><p><a href="https://www.php.net/manual/en/class.domnode.php">DOMNode</a> &#8594; <a href="https://www.php.net/manual/en/class.dom-node.php">Dom\Node</a></p></li><li><p><a href="https://www.php.net/manual/en/class.domtext.php">DOMText</a> &#8594; <a href="https://www.php.net/manual/en/class.dom-text.php">Dom\Text</a></p></li><li><p><a href="https://www.php.net/manual/en/class.domattr.php">DOMAttr</a> &#8594; <a href="https://www.php.net/manual/en/class.dom-attr.php">Dom\Attr</a></p></li></ul><h3>Top-Level HTML Elements as DOM Properties</h3><p>You can now access the main parts of a HTML document through these convenient <em>Dom\Document</em> properties:</p><ul><li><p><a href="https://www.php.net/manual/en/class.dom-document.php#dom-document.props.head">head</a> (read only)<br>&#8220;The first <em>head</em> element that is a child of the <em>html</em> element. These need to be in the HTML namespace. If no element matches, this evaluates to null.&#8221;</p></li><li><p><a href="https://www.php.net/manual/en/class.dom-document.php#dom-document.props.body">body</a><br>&#8220;The first child of the <em>html</em> element that is either a <em>body</em> tag or a <em>frameset</em> tag. These need to be in the HTML namespace. If no element matches, this evaluates to null.&#8221;</p></li><li><p><a href="https://www.php.net/manual/en/class.dom-document.php#dom-document.props.title">title</a><br>&#8220;The title of the document as set by the <em>title</em> element for HTML or the SVG <em>title</em> element for SVG. If there is no title, this evaluates to the empty string.&#8221;</p></li></ul><p>Example:</p><pre><code>$dom = Dom\HTMLDocument::createFromString('&lt;p&gt;My document&lt;/p&gt;');
echo $dom-&gt;saveHtml(<strong>$dom-&gt;body</strong>);
// Output: &lt;body&gt;&lt;p&gt;My document&lt;/p&gt;&lt;/body&gt;
<strong>$dom-&gt;title = 'My title';</strong>
echo $dom-&gt;saveHtml(<strong>$dom-&gt;head</strong>);
// Output: &lt;head&gt;&lt;title&gt;My title&lt;/title&gt;&lt;/head&gt;</code></pre><h3>Working with innerHTML</h3><p>PHP 8.4 also introduces <em><a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML">innerHTML</a></em>, a property that provides an easier way to work with an element's content. Instead of manipulating DOM nodes directly, you work with HTML strings (<a href="https://3v4l.org/R7sAl#v8.4.1">try it</a>):<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a></p><pre><code>$dom = Dom\HTMLDocument::createFromString('&lt;body&gt;&lt;h1&gt;Test&lt;/h1&gt;&lt;/body&gt;');
<strong>echo $dom-&gt;body-&gt;innerHTML;</strong>
// Output: &lt;h1&gt;Test&lt;/h1&gt;
<strong>$dom-&gt;body-&gt;innerHTML = '&lt;p&gt;Something new&lt;/p&gt;';</strong>
echo $dom-&gt;saveHtml();
// Output: &lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;p&gt;Something new&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</code></pre><p>Note that there is no <em><a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/outerHTML">outerHTML</a></em> support yet.</p><h3>Modern CSS Selector Support</h3><p>One of the most powerful additions in PHP 8.4 is comprehensive support for modern CSS selectors. You can now use <em>querySelector</em> and <em>querySelectorAll</em> to find elements using the same selectors you're familiar with from frontend development: </p><ul><li><p><code>querySelector($selectors)</code><br>&#8220;Returns the first descendant element that matches the CSS selectors&#8221;</p></li><li><p><code>querySelectorAll($selectors)</code><br>&#8220;Returns a NodeList containing all descendant elements that match the CSS selectors&#8221;</p></li></ul><p>Here&#8217;s the previous code for getting paragraphs, but with <em>querySelectorAll</em> replacing <em>getElementsByTagName</em>:</p><pre><code>$newDom = Dom\HTMLDocument::createFromString($html);
<strong>$paragraphs = $newDom-&gt;querySelectorAll('p');</strong>
echo "{$paragraphs-&gt;length} paragraphs found.";</code></pre><p>This produces the same result as before, not very remarkable. But the new selector support enables much more sophisticated queries. Let's explore some practical examples:</p><h4>Find Multiple Element Types</h4><p>Get all paragraph and heading elements &#8212; returned in document order:</p><pre><code>$elements = $dom-&gt;querySelectorAll('<strong>p, h1, h2, h3, h4, h5, h6</strong>');</code></pre><h4>Avoid repetition with <em><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:is">:is</a></em> and <em><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:where">:where</a></em></h4><p>Get paragraphs and main headings that are direct children of the article:</p><pre><code>$elements = $dom-&gt;querySelectorAll('<strong>article &gt; :is(p, h1, h2)</strong>');</code></pre><p>You can also narrow your search to specific elements:</p><pre><code>$elements = $dom-&gt;querySelector('<strong>article</strong>')-&gt;querySelectorAll('<strong>p, h1, h2</strong>');</code></pre><p>Note that this is not technically equivalent to the earlier code, because we&#8217;re not limiting results to direct children only. To do that we&#8217;d need to use the <em><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:scope">:scope</a></em> selector, which Lexbor doesn't yet support:</p><pre><code>$dom-&gt;querySelector('<strong>article</strong>')-&gt;querySelectorAll('<strong>:scope &gt; :is(p, h1, h2)</strong>');
// Throws: DOMException: Invalid selector (Selectors. Not supported: scope)</code></pre><p>The good news is that a fix for this issue, contributed by Niels, is currently <a href="https://github.com/lexbor/lexbor/pull/257">under review</a> in Lexbor.</p><h4>Find empty or non-empty elements with <em><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:empty">:empty</a></em> and <em><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:not">:not</a></em></h4><p>Get all empty p elements:</p><pre><code>$elements = $dom-&gt;querySelectorAll('<strong>p:empty</strong>');</code></pre><p>Get all non-empty p elements:</p><pre><code>$elements = $dom-&gt;querySelectorAll('<strong>p:not(:empty)</strong>');</code></pre><h4>Match parent or previous sibling elements with <em><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:has">:has</a></em></h4><p>Get all paragraphs in article that have at least one link inside them:</p><pre><code>$elements = $dom-&gt;querySelectorAll('<strong>article p:has(a)</strong>');</code></pre><p>Get h1 headings that are followed immediately by a h2 heading:</p><pre><code>$elements = $dom-&gt;querySelectorAll('<strong>h1:has(+ h2)</strong>');</code></pre><h4>Attribute selectors</h4><p>Get all external links &#8212; URLs starting with &#8220;http&#8221; and not containing &#8220;example.com&#8221;, case insensitive:</p><pre><code>$elements = $dom-&gt;querySelectorAll(
    '<strong>a[href ^= "http" i]:not([href *= "example.com" i])</strong>'
);</code></pre><p>For more examples of available selectors, you can refer to MDN's documentation on <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors/Selectors_and_combinators">CSS selectors and combinators</a>, and PHP&#8217;s <a href="https://github.com/php/php-src/tree/PHP-8.4.2/ext/dom/tests/modern/css_selectors">selectors tests folder</a>.</p><h3><em>Update</em></h3><ul><li><p>This article was updated on 11th December 2024 based on feedback from Niels Dossche. And again on the 25th December with a link to my <a href="https://blog.keyvan.net/p/interview-with-niels-dossche">interview with Niels</a>.</p></li></ul><h3>Part 2&#8230;</h3><p>An expanded version of this article is <a href="https://blog.keyvan.net/p/better-html-parsing-in-php">now available</a> in issue 14 of PHP Magazine. It covers:</p><ul><li><p>XPath selectors</p></li><li><p>Namespaces</p></li><li><p>Serialisation &#8212; turning the DOM tree back into HTML</p></li><li><p>And the small differences between the old and new DOM APIs</p></li></ul><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.keyvan.net/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">To receive new posts and support my work, consider becoming a free or paid subscriber.</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><div><hr></div><h3>Credit</h3><p>Huge thanks to <a href="https://github.com/nielsdos">Niels Dossche</a>, both for introducing these fantastic new changes to PHP, and also for providing valuable feedback on this article.</p><p>And also a huge thanks to <a href="https://github.com/lexborisov">Alexander Borisov</a>, who is the creator of Lexbor. Lexbor is not only responsible for HTML parsing in this PHP release, but also its CSS selector support.</p><h3>Further Reading</h3><ul><li><p><a href="https://blog.keyvan.net/p/interview-with-niels-dossche">Interview with Niels Dossche</a></p></li><li><p>PHP RFCs by Niels Dossche</p><ul><li><p><a href="https://wiki.php.net/rfc/domdocument_html5_parser">DOM HTML5 parsing and serialization</a></p></li><li><p><a href="https://wiki.php.net/rfc/opt_in_dom_spec_compliance">Opt-in DOM spec-compliance</a></p></li><li><p><a href="https://wiki.php.net/rfc/dom_additions_84">New ext-dom features in PHP 8.4</a></p></li></ul></li><li><p>Lexbor docs</p><ul><li><p><a href="https://github.com/lexbor/docs/blob/main/source/articles/part-1-html.md">Part 1: HTML</a></p></li><li><p><a href="https://github.com/lexbor/docs/blob/main/source/articles/part-2-css.md">Part 2: CSS</a></p></li></ul></li><li><p>MDN Docs</p><ul><li><p><a href="https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Using_the_Document_Object_Model">Using the Document Object Model</a></p></li><li><p><a href="https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Locating_DOM_elements_using_selectors">Locating DOM elements using selectors</a></p></li><li><p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors/Selectors_and_combinators">CSS selectors and combinators</a></p></li></ul></li></ul><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>I want to stress that the HTML I&#8217;ve provided here is completely valid according to standards in place for over 15 years. After publishing this and reading the discussion around the post, I realised that many developers have not encountered HTML like this and some assumed I was deliberately supplying malformed HTML to test each parser&#8217;s handling of <em>invalid</em> HTML. That might be a useful experiment in the future &#8212; there are rules about how parsers should handle invalid HTML &#8212; but I&#8217;m setting a much lower bar here, based on very common HTML you&#8217;ll encounter in the wild.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>I reached the 3.6x faster number by parsing 120 HTML web pages that contained either blog posts or news articles. When I have time to test larger documents, I will update this post.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>The new <em>Dom\Document</em> classes allow you to import nodes created with the previous DOM classes using the <em>importLegacyNode</em> method. This doesn&#8217;t work the other way round.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>Nearly 15 years ago, I created <em><a href="https://blog.keyvan.net/p/javascript-like-innerhtml-access-in-php">JSLikeHTMLElement</a>,</em> a small extension to PHP&#8217;s <em>DOMElement</em> class to allow <em>innerHTML</em> access using PHP&#8217;s magic getter and setter methods.</p><p></p></div></div>]]></content:encoded></item><item><title><![CDATA[Coming soon]]></title><description><![CDATA[I haven&#8217;t posted on the blog in years.]]></description><link>https://blog.keyvan.net/p/coming-soon</link><guid isPermaLink="false">https://blog.keyvan.net/p/coming-soon</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Mon, 20 Mar 2023 20:59:04 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!uKt1!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e7d9c52-9b9b-4715-a205-d0e35674da3a_350x350.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I haven&#8217;t posted on the blog in years. Planning to start posting again soon&#8230;</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.keyvan.net/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.keyvan.net/subscribe?"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[The mask of care and love]]></title><description><![CDATA[John McKnight on the service provider&#8217;s mask of care and love:]]></description><link>https://blog.keyvan.net/p/mask-of-care-and-love</link><guid isPermaLink="false">https://blog.keyvan.net/p/mask-of-care-and-love</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Wed, 17 Jul 2013 12:40:53 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!uKt1!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e7d9c52-9b9b-4715-a205-d0e35674da3a_350x350.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>John McKnight on the service provider&#8217;s mask of care and love:</p><blockquote><p>Behind that mask is simply the servicer, his systems, techniques and technologies &#8211; a business in need of markets, an economy seeking new growth potential, professionals in need of an income.</p><p>It is crucial that we understand that this mask of service is not a false face. The power of the ideology of service is demonstrated by the fact that most servicers cannot distinguish the mask from their own face. The service ideology is not hypocritical because hypocrisy is the false pretence of a desirable goal. The modernized servicer believes in his care and love, perhaps more than even the serviced. The mask is the face. The service ideology is not conspiratorial. A conspiracy is a group decision to create an exploitative result. The modernized servicer honestly joins his fellows to create a supposedly beneficial result. The masks are the faces.</p><p>In order to distinguish the mask and the face it is necessary to consider another symbol &#8211; need. We say love is a need. Care is a need. Service is a need. Servicers meet needs. People are collections of needs. Society has needs. The economy should be organized to meet needs. In a modernized society where the major business is service, the political reality is that the central &#8220;need&#8221; is an adequate income for professional servicers and the economic growth they portend. The masks of love and care obscure this reality so that the public cannot recognize the professionalized interests that manufacture needs in order to rationalize a service economy. Medicare, Educare, Judicare, Socialcare and Psychocare are portrayed as systems to meet need rather than programmes to meet the needs of servicers and the economies they support.</p><p>Removing the mask of love shows us the face of the servicers who need income, and an economic system that needs growth. Within this framework, the client is less a person in need than a person who is needed. In business terms, the client is less the consumer than the raw material for the servicing system. In management terms, the client becomes both the output and the input. His essential function is to meet the needs of servicers, the servicing system and the national economy. The central political issue becomes the servicers&#8217; capacity to manufacture needs in order to expand the economy of the servicing system.</p></blockquote><p>Excerpt from his essay <a href="http://www.panarchy.org/mcknight/disabling.html">&#8216;Personalized Service and Disabling Help&#8217;</a>.</p>]]></content:encoded></item><item><title><![CDATA[Tuesday March 26, 2013]]></title><link>https://blog.keyvan.net/p/first-aid-kit</link><guid isPermaLink="false">https://blog.keyvan.net/p/first-aid-kit</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Tue, 26 Mar 2013 15:14:05 GMT</pubDate><enclosure url="https://substackcdn.com/image/youtube/w_728,c_limit/At4HhgHtBHk" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div id="youtube2-At4HhgHtBHk" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;At4HhgHtBHk&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/At4HhgHtBHk?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div>]]></content:encoded></item><item><title><![CDATA[Term Extraction in PHP]]></title><description><![CDATA[The new version of the term extraction tool on fivefilters.org is now in PHP.]]></description><link>https://blog.keyvan.net/p/term-extraction-in-php</link><guid isPermaLink="false">https://blog.keyvan.net/p/term-extraction-in-php</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Sun, 20 Jan 2013 15:01:36 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!uKt1!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e7d9c52-9b9b-4715-a205-d0e35674da3a_350x350.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The new version of the <a href="http://fivefilters.org/term-extraction/">term extraction tool</a> on fivefilters.org is now in PHP.</p><p>For anyone looking for a simple way to carry out term extraction on English text using PHP, here&#8217;s a snippet using the PHP port of <a href="http://pypi.python.org/pypi/topia.termextract/">Topia&#8217;s Term Extractor</a>:</p><pre><code>require 'TermExtractor/TermExtractor.php';

$text = 'Politics is the shadow cast on society by big business';

$extractor = new TermExtractor();
$terms = $extractor-&gt;extract($text);

// We're outputting results in plain text...
header('Content-Type: text/plain; charset=UTF-8');

// Loop through extracted terms and print each term on a new line
foreach ($terms as $term_info) {
  // index 0: term
  // index 1: number of occurrences in text
  // index 2: word count
  list($term, $occurrence, $word_count) = $term_info;
  echo "$term\n";
}
</code></pre>]]></content:encoded></item><item><title><![CDATA[Chris Hedges: Assault on Gaza is Not a War, it is Murder]]></title><description><![CDATA[via Jonathan Cook]]></description><link>https://blog.keyvan.net/p/chris-hedges-assault-on-gaza-is-not-a-war-it-is-murder</link><guid isPermaLink="false">https://blog.keyvan.net/p/chris-hedges-assault-on-gaza-is-not-a-war-it-is-murder</guid><dc:creator><![CDATA[Keyvan]]></dc:creator><pubDate>Sun, 18 Nov 2012 14:31:38 GMT</pubDate><enclosure url="https://substackcdn.com/image/youtube/w_728,c_limit/z7kBN9Me4Cs" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div id="youtube2-z7kBN9Me4Cs" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;z7kBN9Me4Cs&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/z7kBN9Me4Cs?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>via <a href="http://www.jonathan-cook.net/">Jonathan Cook</a></p>]]></content:encoded></item></channel></rss>