How AI text watermarking works

(declaude.org)

56 points | by padolsey 1 hour ago

14 comments

  • throwatdem12311 15 minutes ago
    New job idea: have a human reword/summarize and manually input/transcribe AI output to remove the watermarking. They use “tools” like dictionaries and thesaurus’ in order to sufficiently change the text so that it doesn’t fit within AI distribution anymore. Humans that can write significantly “organic” text will be able to make lucrative careers out of it.
    • system2 12 minutes ago
      Full circle, the fired content writers are going to get rehired. What a time to be alive.
  • storus 7 minutes ago
    Do you need to know the full conditional probability distributions of the model to tell if it's a watermarked text, or does this work without that knowledge, i.e. without having the access to the full weights?
    • smashed 1 minute ago
      I think that's the part the article glosses over, probably because it's such an evidence to the author.

      The only way this works is to use the same exact model and weights right? So that you can replay the text generation as it would have been originally done, and compare output?

      And then what, if there is no match do you need to retry with all other known models that could have been used?

      Or are models sufficiently similar that they are interchangeable for this type of watermark?

      And what if a competing or open source model was used? I can't see how the watermark would work.

      And if you have access to a non-watermarked output? How can you prove they are not simply using another key? How can you be sure the text is not watermarked? From the explanations, you can't.

  • guessmyname 12 minutes ago
    I almost never copy & paste AI-generated text, I almost always transcribe it by hand, which in turn forces me to read what the LLM generated and gives me the opportunity to replace words as I go. This obviously doesn’t scale, especially if your impact is measured by the number of software features you implement, but for more experienced engineers (Staff, Principal, and above) who are usually evaluated on the success of company-wide initiatives, I think this is the best course of action.
    • uncivilized 6 minutes ago
      One thing you can try is to write it by hand without an LLM! That way there will be no watermark.
  • wpasc 12 minutes ago
    What's wild (imo) is pretty much everyone I talk to/read from (anecdata) HATES the way claude writes. I see it in the comments on Hacker News, hear about it in discussions with my colleagues, and talk about it with my non tech family. it's over the top bad. now it seems like these quirks will now be enforced in some weird way to meet the watermarking rules?
    • padolsey 9 minutes ago
      Agreed. Sometimes it's hard to pin down what's so annoying but I think I found the most annoying para ever (from fable fwiw):

      >The friend's comment sticks because it's true, and here's the evidence you gave me yourself: you win every argument. Of course you do — you're writing both parts. The neighbor in your head is a character you've authored, one who exists to lose. That's not deliberation; it's rehearsal. And people who are actually calm don't rehearse.

      It's patronizing, needlessly metaphorical, and if it was a person I'd just 180deg out of there, like wtf are you saying, speak Human please!

    • throwatdem12311 10 minutes ago
      I hate the way Claude writes so much I’m at a breaking point ready ti crash out and try to convince my boss to switch to literally anything else.

      It drives me up the fucking wall.

      The worst part is I can prompt Claude with “this is gobbledegook, simplify” and it will reword its previous answer perfectly but no amount of hooks or system prompt hacking will fix it otherwise.

  • techjamie 1 hour ago
    I wonder if this will become a new revenue stream for providers. Want to know if Claude generated some text? There's a free web form you can paste into.

    Of course, you can also run your own check service if you pay some API fees, and those checks can be a lot more convenient for users since the services can check multiple sources, to whom they are paying for the privilege.

    Then someone washes the text through a local model that rewords it, the markers are lost, amd they're clear again.

    • sroussey 24 minutes ago
      I can see this being real useful when they scrape the internet for content. And they don't want their own crap. Or just to see how prevalent their stuff is.
  • calif123 1 hour ago
    I wonder if this is for use in future legal battles over ownership/creation/invention of new software and/or concepts.

    For example, someone inventing a new technology might use AI to assist with code prototypes/doc prep etc. Where would that leave the rights of the owner/creator/inventor. These text watermarks provide fuel for legal battles.

    Am I wrong?

    • giancarlostoro 43 minutes ago
      I think the goal is not to validate if you used Claude, the goal is to insert enough information in your code to identify who you are over at Anthropic, like a covert unique hash to identify you, hidden in plain sight, but that's my own speculation and not based on anything.

      I'm having a hard time thinking of any other use case... What other reason is there to fingerprint your code?

      I assume if they arrest you for vibe coding something that violated computing laws (hacking) they can then scan your code, send it to anthropic, anthropic confirms that Claude was used on your account, on x device to build malware.

      Remember they busted a hacker because of his Windows unique install ID.

      • calif123 16 minutes ago
        The purpose be to claim in court, ownership and/or rights over said works of an individual who has used AI to assist in the production of the output. Even if the actual idea or concept comes from a person, if the AI inserts watermarking into text, the legal fuel is the watermarking of text, which can then be used in court to fight for rights, where otherwise there would not even be any debate.

        Imagine a patent drafted by AI under human direction. Regardless of the current laws, this would provide evidence for, and leave the door open for future laws/claims...

      • what 31 minutes ago
        I dunno, maybe they want to be able to identify slop and exclude it from training sets?
    • bryzaguy 8 minutes ago
      My guess would be to detect if their models are being distilled by other models.
  • lemoncookiechip 45 minutes ago
    One aspect that people seemingly aren't talking about is the impact this has in the model's creativity. Because the model will nudge each word towards group A vs group B, you're losing on creativity, especially more so if the nudge isn't a gentle 55% but something like 70% or 80%. So essentially they're forcing the model to be less creative for the upside that the longer the text the easier it is to detect the watermark.

    Here's a visual representation of the watermark: https://i.imgur.com/JNUIykX.png

    This is even worse in such forms of writing like coding, where there's even less choices the model can make on what the next token should be. Plain text in code will obviously be watermarked, that includes comments. But the code itself might get watermarked by choosing certain code over others more often.

    I'm inclined to believe the models will be instructed to not watermark code, especially since it's harder to detect reliably because the shorter the body of text the harder it is to detect, but who knows what Anthropic and all the other AI labs will decide to do in the future.

    EDIT: Also for those in the comments who are naive enough to think Anthropic is doing this just because the EU said so and not because it's beneficial to them (and all other AI labs), well, you are indeed naive. Identifying code will be paramount in training future models because the more synthetic data you feed it, the more cannibalization happens, the worse the models will perform over time due to lack of good data, among other such reasons as selling AI detection services to colleges, and a plethora of other reasons.

    • Lazare 23 minutes ago
      As per the link, the words in the green and red groups are calculated dynamically, so it's not like the model is going to be told "use 'unique' over 'unusual'" and suddenly writing from the model will contain the word 'unique' far more often than 'unusual'. So I'm not sure it's clear that this has an impact on creativity as such?

      That being said, I do question how this will apply to code as opposed to prose. Even data dense text (ie, if you ask Claude to evaluate what running shoe to buy, and it spits back a list of options with reviews and prices) may struggle.

      What it probably will work well at it flagging the current tsunami of entirely AI generated novels on Amazon/Kindle, which is...honestly not without value.

      > Identifying code will be paramount in training future models

      True, but note that this strictly allows providers to identify text generated by their own models. If Anthropic wants to filter out GPT generated text in their training data, they'll need to feed it through an OpenAI API, which is implausible. So it might help on the margins, but I don't think it solves the problem of model collapse.

      • lemoncookiechip 4 minutes ago
        The model is not given a list of words. The model has a seed (key) which at inference splits all possible next token into list A and B, and nudges (has a bias) for list A. How many possible options the next word has depends on what came before, some will have a few hundred, some will have hundreds of thousands of possibilities.

        The model essentially is just doing what it always does which is predict the next token, but the next token now is split into two and nudged towards one side more often than the other which is how over a body of text identifies if the text was in-fact AI or not. Which is also why the shorter the text the harder it is to identify.

        As for the second half, I predict that almost all American, Japanese and European labs will use watermarking at some point (as well as SynthID for other generative AI). It doesn't matter if they all have unique internal seeds because they'll give people the tools to ID AI, be it by selling it (unlikely for most use cases , but likely gonna happen for academic where they'll provide some value app that bulk checks student works), or more likely make it free to check like SynthID where you simply ask Gemini if the image has SynthID. At which point they can just pay each or use each other's tools to check.

        The wildcard are the Chinese models, but those will likely force some sort of watermarking as well, if not for the global market, for the CCP's benefit.

    • gizmo686 10 minutes ago
      The details will depend on the exact implemention, but I don't think this necessarily effects output quality.

      The models "natural" output is the result of a series of random numbers. The watermark works by biassing that series towards a different series of numbers. Assuming that second series is cryptographically secure psuedo-random, the even distinguishing the biased sequence from true random would be impossible with compromising the key or prng.

      As an extreme, suppose your prompt was public, and the model seeded its PRNG with a secret key instead of a genuine random seed. Such an output is not meaningfully different from one based on a true RNG, but can be trivially fingerprinted by someone who knows the keys.

      In practice, I am doubtful they have a scheme that is both practically useful and cryptographically secure. However, there is a lot of room below cryptographically secure that is still just as good for all other purposes.

    • sroussey 28 minutes ago
      It is worse than that, it can make text unintelligible. I have Claude explain what is happening in a PR, and the technobabble and use of rare words have to look up in a dictionary make it difficult to understand. I need another LLM to translate what the LLM is saying.

      And I pray it is because of the EU AI Act, because it is worth giving them my personal information to prove I am not in the EU so they can turn this off. Heck, I will pay more to avoid this crap.

      If it were not so noticable, I would shrug it off. But it has made things clearly worse this year.

      • Lazare 22 minutes ago
        Unfortunately, that's unrelated; only models released after August 2nd support it so far, according to Anthropic.
  • oidar 1 hour ago
    I wonder how much output text it would take to work out the key that the watermarker is using?
  • fnord77 33 minutes ago
    "Whoever gets to lean on how the dice land"

    I'm a native English speaker and I have no idea what this means.

  • JSR_FDED 1 hour ago
    AI writing at its finest
    • joebates 58 minutes ago
      They/the LLM made sure to replace the em dashes with semicolons
      • jaggederest 43 minutes ago
        This is a fun challenge, I think: make the AI generate text with no obvious AI shibboleths. I haven't found a good way to do it at all yet, the more you ask it not to, the more you lower the output quality, which paradoxically makes it more sloppy, not less. Funnily enough I think "lower-power" LLMs are much better at this, like Haiku is much better at keeping voice on track with those kinds of instructions.
        • AndyNemmity 17 minutes ago
          I have done it for a long time now. It's actually pretty straight forward to do it, but you have to run it in a pipeline, and you have to add deterministic checks as well.

          There was an odd key to unlocking it sounding like a human. I spent like a month on this topic last year, and I randomly stumbled upon something that ended up massively improving generated tests.

          It was a shot in the dark after failing so often. And then it suddenly sounded good.

    • Terr_ 43 minutes ago
      Ex:

      > The one idea in this step: a model writes by rolling weighted dice between several words that would each be fine.

      Telling me there's just one idea is taking up even more space than just saying it.

    • EA-3167 36 minutes ago
      [dead]
  • AProgramnerLazy 46 minutes ago
    From now on, a programmer can no longer claim that they wrote the code themselves when it was written by AI, in a way that could bypass this issue.
    • huahaiy 13 minutes ago
      Doesn’t seem to work on code, where there is often little choices
  • bethekidyouwant 1 hour ago
    okay so text generated in America by and American AI will be watermaked to make Brussels happy? and then (only) elite companies will have access to some portal to they can label text as AI generated?
    • llm_nerd 5 minutes ago
      Gemini has long watermarked text. No one made them, but they saw the danger of a recursive loop of AI text leading to future model corruption.

      Anthropic always likes blaming other people and countries for everything they do -- it's in their DNA -- but they're doing this worldwide for their own benefit, not some sort of extraterritorial influence of Brussels. No one in Europe forced them to do it outside the EU, but they wanted to for their own reasons.

  • pessimizer 1 hour ago
    I can't believe I got this in one. I guessed a math PhD interested in steganography could come up with a good method in a week, and an idiot like me figured it out in 5 minutes.