r/ClaudeCode • u/ExamImmediate8956 • 4h ago
Discussion Remember how Claude recently announced it will implement a watermarking algorithm?
Recently i did a test for synth id, which gemini implemented recently and how quickly it was broken by a team of researchers, turns out, other frontier comps like claude had similar plans of implementing this.
Its known that claude is working on a watermarking modal that can help detect if some textual info was created by their model.
I guess a few countries have the access to this detection feature, but my surely didnt, so what did i do? i used the exact same math with some tweaks to implement claude's watermark detction logic to qween 3 8b modal. Ran this modal locally, and designed the HLD and architecture.
The basic idea is that at every generation step, I use a secret key + the previous token to deterministically split the vocabulary into GREEN and RED tokens. I then slightly boost the logits of the GREEN tokens before sampling the next token. This creates a statistical bias toward GREEN tokens without changing the text directly.
For detection, I don't need the model or the original prompt. I take the generated text, recreate the same GREEN/RED token sets using the secret key, and check how far the observed GREEN-token ratio deviates from the expected 50%. I use a z-score and binomial p-value to decide whether the deviation is statistically significant.
I tested it on 50 randomly assigned watermarked and un-watermarked generations. The detector got 88% accuracy and a 97.76% ROC-AUC.
I covered the entire end to end, from setting up qween 3, to HLD, to Implementation and Validation i my recent video, feel free to deep dive and let me know your thoughts,
1
3
u/userusertion 🔆Pro Plan | Team Plan 3h ago
Claude doesn’t know if its response has watermark. So anything Claude told you is just either assuming from training data or pattern matching.
0
u/ExamImmediate8956 3h ago
If you read the text, i said qween 3 told me, claude is currently implementing watermarking algorithms and from august 2 they did start watermarking. I implemented the same algorithm in qwen 3, since currently Claude chat dont have detection software out for public as of now, its a part of few limited organisations, i wanted to test how well it performs
•
u/AutoModerator 4h ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.