【文章标题】:How Claude Watermarks AI-Generated Text
【文章标题】:克劳德如何为AI生成的文本添加水印

【文章正文】:
I recently posted a

Substack note

about Claude’s new

watermarking process

and implementation. Since it’s such a popular topic and sparked such a lively discussion, I thought it might be interesting to go into a bit more detail when explaining how it works.

我最近在Substack上发布了一篇关于Claude新水印流程及其实施的笔记。由于这个话题非常热门,并引发了热烈的讨论,我想在解释其工作原理时多展开一些细节可能会很有趣。

Instead of the usual text article, I recorded a little lecture on the topic (to change it up a bit from my usual articles). So, below is the video along with a transcript.

我没有采用通常的文字文章形式,而是录制了一个关于该主题的小讲座(为了与我平时的文章有所变化)。因此,下面是视频以及文字记录。

Originally, I planned to make 10 slides and record a short 10-min video. However, while putting it together, I added some crucial details here and there, resulting in >50 slides and a 48 min recording.

最初,我计划制作10张幻灯片并录制一个10分钟的短视频。然而,在整理过程中,我在这里和那里添加了一些关键细节,最终形成了超过50张幻灯片和48分钟的录制。

I hope that this now explains it well, though! Happy watching!

不过,我希望这能很好地解释它!祝观看愉快!

I also have a

YouTube version

if you prefer using the YouTube player

如果你更喜欢使用YouTube播放器,我也有一个YouTube版本

And here is a

link to the slides

这里是幻灯片的链接

Subscribe now

立即订阅

Video Transcript

视频文字记录

Note: The transcript below is slightly edited and cleaned up for readability but preserves the overall order and flow of the video lecture above.

注意:下面的文字记录为了可读性进行了轻微的编辑和整理,但保留了上述视频讲座的整体顺序和流程。

0:00

How Claude’s Text Watermarking Works

0:00

克劳德文本水印的工作原理

Slide 2 of 52, time stamp

第2张幻灯片(共52张),时间戳

0:00

Hi everyone. So, a few days ago, Anthropic announced that they will watermark the text outputs of their Claude models. I then did a social media post briefly explaining how that works. And yeah, this was quite the popular post. So not the watermarking itself was popular, but I guess the explanation or the mechanism behind it. Then, it might be worthwhile expanding this a bit to explain it in more detail, because this post only had one figure, and there were a lot of questions and discussions.

大家好。几天前,Anthropic宣布他们将为其Claude模型的文本输出添加水印。然后我在社交媒体上发了一个帖子,简要解释了其工作原理。是的,这个帖子相当受欢迎。所以受欢迎的不是水印本身,而是背后的解释或机制。那么,可能值得稍微扩展一下,更详细地解释,因为这个帖子只有一张图,而且有很多问题和讨论。

So, I thought, well, let’s make a few more figures. I actually originally planned to do like 10 slides and walk you through it. It ended up being 50 slides, but I hope this really explains how this watermarking technique works well, how watermarking itself can fail or be removed, and so forth. So I think it might be an interesting topic because a lot of people use LLMs these days and also consume a lot of text on the Internet that might be generated by LLMs.

所以我想,好吧,让我们多制作一些图表。我实际上原本计划做10张幻灯片并带你过一遍。结果变成了50张幻灯片,但我希望这能真正解释这种水印技术如何良好运作,水印本身如何可能失效或被移除等等。所以我认为这可能是一个有趣的话题,因为如今很多人使用LLM,并且也在互联网上消费大量可能由LLM生成的文本。

And now there’s going to be this watermarking, and there’s this, I guess, fear of watermarking making text worse, or what’s actually the benefit of this watermarking? And so what does it mean? And I think if we understand a bit better what watermarking is, that goes a long way, and then we can make up our own minds about whether that’s a good thing or not, and so forth, like the pros and cons.

现在将会有这种水印,而且我猜有人担心水印会使文本变差,或者这种水印实际上有什么好处?那么这意味着什么?我认为如果我们更好地理解水印是什么,那会很有帮助,然后我们可以自己判断这是好事还是坏事,等等,比如利弊。

So, my goal here is really to explain how the underlying mechanism works and how they are going to implement this type of watermarking, text watermarking.

所以,我在这里的目标是真正解释底层机制如何运作,以及他们将如何实施这种类型的水印,即文本水印。

Slide 2 of 52, time stamp

第2张幻灯片(共52张),时间戳

1:41

It’s also a great example to illustrate why understanding things from scratch is actually quite useful. This watermarking technique is also a nice way to explain how conventional models or LLMs in general work under the hood. So yeah, you may know I like doing things from scratch. Like, I have my books: Build a Large Language Model From Scratch, Build a Reasoning Model From Scratch. I have some articles labeled from scratch.

这也是一个很好的例子,说明为什么从零开始理解事物实际上非常有用。这种水印技术也是解释传统模型或一般LLM如何在底层工作的好方法。是的,你可能知道我喜欢从零开始做事情。比如,我有我的书:《从零开始构建大型语言模型》、《从零开始构建推理模型》。我有一些标记为“从零开始”的文章。

So, for me, “ from scratch often includes coding. So this one will not be coding-related, but coding from scratch is actually a very, very useful technique because it really helps you understand how something is implemented. And then from that we can derive our understanding, figures, concepts, because if we don’t really implement things, if there’s no code, it’s really sometimes ambiguous. And of course, you know, as I realized, not everyone is coding from scratch anymore.

所以,对我来说,“从零开始”通常包括编码。所以这个不会与编码相关,但从零开始编码实际上是一种非常非常有用的技术,因为它确实帮助你理解某物是如何实现的。然后从中我们可以推导出我们的理解、图表、概念,因为如果我们不真正实现东西,如果没有代码,有时确实很模糊。当然,你知道,正如我意识到的,不再每个人都从零开始编码了。

Like back in the day, coding something from scratch was all we had. I mean, there were only humans coding. Nowadays, coding can be done by LLMs. However, that doesn’t mean reading code is no longer useful, because it carries a lot of information. So in this case here with this watermarking, spending some time coding an LLM from scratch really makes you realize how this sampling inside is implemented. We still have some relevant code snippets.

就像过去,从零开始编码是我们唯一拥有的。我的意思是,只有人类在编码。如今,编码可以由LLM完成。然而,这并不意味着阅读代码不再有用,因为它携带了大量信息。所以在这里关于水印的这个案例中,花一些时间从零开始编码一个LLM确实让你意识到内部的采样是如何实现的。我们仍然有一些相关的代码片段。

And then that really, in turn, helps us understand, oh, the watermarking is applied at this position, and this has so-and-so consequences and so forth. So I think even though people may not be coding from scratch, at least not all the time anymore, it is still useful being able to, let’s say, build something from scratch for educational purposes to understand something deeply and then also for research purposes to manipulate this in a transparent way that is not hidden away in tons of layers of abstraction.

然后这反过来真正帮助我们理解,哦,水印是在这个位置应用的,这会产生这样那样的后果等等。所以我认为,即使人们可能不再从零开始编码,至少不再总是这样,但为了教育目的而从零开始构建一些东西以深入理解某事物,以及为了研究目的而以透明的方式操纵它(而不是隐藏在大量抽象层之后),仍然是有用的。

But that aside, I think it’s just a coincidental nice relationship here because, for this slide deck, I actually used a lot of figures from my from-scratch coding materials.

但撇开这些,我认为这里只是一个巧合的美好关联,因为对于这个幻灯片组,我实际上使用了很多来自我从零开始编码材料的图表。

Slide 3 of 52, time stamp

第3张幻灯片(共52张),时间戳

3:58

So a few days ago (this is August 14), there was this article, How Claude’s Text Watermark Works, and there was this article here; it’s just like a screen recording, so it can have everything in the slides, but there’s plenty of detail. They update

几天前(这是8月14日),有一篇文章,《克劳德文本水印的工作原理》,这里有一篇文章;它就像一个屏幕录制,所以幻灯片里可以包含所有内容,但有很多细节。他们更新