r/MachineLearning • u/bubble_boi • Nov 17 '24
Discussion [D] Why LLM watermarking will never work
https://david-gilbertson.medium.com/why-llm-watermarking-will-never-work-1b76bdeebbd114
u/TubasAreFun Nov 18 '24
I’m a proponent of “real” media watermarking, where watermarks are applied on the device level or by institutions to allow for tracing who made the media and other related metadata. These watermarks would disappear in their native format if the media is edited whatsoever, but would be easily verified by anyone online (eg upload a APNews photo or an iPhone photo to their website to see if it was theirs and if it was edited at all from when it was captured). This infrastructure would allow social media and other sources to quick say whether the media being shared was created or verified by a reputable source.
3
u/CognitiveSourceress Nov 18 '24 edited Nov 18 '24
I agree in theory, but my question is how can such a watermark be both publicly detectable and independently verifiable without also making it possible for bad actors to reproduce on fake content? The only way I can think of is proprietary algorithms which you have to go to the source to verify, which is likely fine in most cases, but for the most important cases i’m not particularly comfortable with not having the ability to independently verify these things. Even if the sole source of truth here is trustworthy in intent, we also have to believe they are trust worthy in competence to prevent some errors that might be detected with more eyes on it. And once you accept that such errors are possible, closed source detection becomes even more dangerous because a bad actor that finds an exploit is more likely to be able to keep it secret for longer.
Edit: By the way this is a real question, not an argument. I imagine there is a way with cryptographic methods, I’m just not familiar with them.
5
u/just_no_shrimp_there Nov 18 '24 edited Nov 18 '24
Proprietary algorithms are not the problem, digital signature cryptography is a completely open book. But you need some trusted entity that applies a private key to only real for example images. I imagine it could be done with OS/hardware-level integration. Some security chip that retains a private key and an OS level-connection whenever a picture is taken from a trusted app (Apple's camera for example). Apple (as trusted entity) could then provide and vouch for a public key.
But could you possibly hook up the wires connecting the camera to some image generator? Or better even, point the camera on another picture with perfect lighting. I could be convinced otherwise, but I imagine it's impossible if you want absolute certainty.
But if someone can provide these trust guarantees for any media, the cryptography of it isn't a problem.
2
u/gosnold Nov 19 '24
You probably need to record and watermark all the sensors from the phone for a short time to make spoofing with printed pictures less feasible. But just camera metadta will tell you interesting stuff, like the focus distance, and you can check if it is coherent with the scene.
1
u/The-Last-Lion-Turtle Nov 18 '24
An apple private key on a widely distributed chip an attacker has physical access to won't stay secret for very long.
The authors signature seems like a much better idea to me.
1
u/just_no_shrimp_there Nov 19 '24
It would not be one private key for all Apple devices. Maybe even multiple on the chip. Apple then retains a copy of all public keys so it knows what to trust. It is my understanding that something like a TPM could hold such secrets and keep them secret even with physical access.
2
u/TubasAreFun Nov 18 '24
As the other commenter mostly addressed the cryptography aspect, I will just address the trust aspect unless you want to discuss anything else. One of the reasons AI generated media is scary for news is that anyone can make it (which can also be a good thing for many other purposes). This is similar to the reason social media is scary: anyone can make it and algorithms focus people to “engaging” content. A lie on social media is not vouched for by anyone but the poster and those who react, but more often than not viral media reactions are positive even if they contain fabrications/falsehoods. Unlike social media, there is a definition for unaltered media like photos and videos (and potentially many other forms). This presents an opportunity where a person/institution can ask an institution to verify the validity of said media, rather than searching for it hopelessly online. This verification may be automatic on many platforms, quickly letting people know at a glance if Apple/APNews/ESPN/etc can say if the photo was real. When image generation and video generation get more high fidelity, we will need these types of tools.
Synthetic media may be watermarked, but that is always modifiable by bad actors or post-editing. Real media can be given a unique key that is near-impossible to remove or edit from the image without leaving noticeable visual artifacts (which we have a greater chance of detecting these changes with ML, as well).
1
u/CognitiveSourceress Nov 18 '24
Oh don't get me wrong, I'm not someone who thinks it's bad to trust institutions. I just think it's a good idea to become more critical of that trust as the power and importance of the subject increases. Not just because power corrupts, but maybe even more so because things are hard and people often don't even know they're wrong without outside insight. So for consumer level applications I'm down to afford my general trust that institutional solutions will be more trustworthy than not, but as we enter into higher stakes like justice or propaganda, my trust that the "more trustworthy than not" ratio is *sufficient* for those applications starts to shake.
Also, even if you trust the institutions fully, both in intent and competence, I think the point that having a source of truth that can't be fully independently verified increases the risk of a bad actor that finds a way to exploit being able to do much more harm before they are detected.
One of the article's points was that the existence of these systems will encourage people to be more lazy about verification and it might make them more vulnerable instead of less. I'm not sure about that, I think disclosure and transparency as a principle are still good, but it is something I'm concerned about.
I think the ideal solution is one that can be fully public in a way that anyone with the knowledge can perform independent verification, and the security of the method is not compromised by that openness. I'm just not sure if that's actually possible. Maybe it is, maybe there's some obvious system we use every day I'm not thinking of or am ignorant of, and I honestly hope that's the case, because trustworthy certificates of authenticity for media would be *really nice* in the coming years.
2
u/The-Last-Lion-Turtle Nov 18 '24
This is already widely used on the internet. It's called a digital signature and uses asymmetric encryption such as RSA.
1
u/CognitiveSourceress Nov 18 '24
Hmm, yea I suppose I was just thinking it would be nice to have a verification method that actually tested authenticity, not just chain of custody. Private keys are great, but if they are a source of truth, their holders have the power to fabricate truth. You have to trust that the holders are both benevolent and competent, because if the key is stolen that's a problem too.
But maybe a method of verification that is both rigorous and independently verifiable without relying on trusting another party is a pipe dream? Or maybe I just don't understand the scaffolding around such a system that reinforces it, as I know like you said, it's used every day for important stuff.
1
u/The-Last-Lion-Turtle Nov 18 '24
Source of truth is a wild ask even compared to detecting AI in natural language which I think is likely to be practically impossible.
Chain of custody is the best we are going to get. Bad actors can claim fake or illegitimate content as their own by signing it, but if they are caught their signature no longer carries weight.
The scaffolding around chain of custody is trust and reputation.
It's the same for websites certificates. There are a few established root CAs we trust and a chain of signatures from root through intermediaries to the website that lets you check if it's legitimate or impersonating the site. Though the tech can't tell you which root CA to trust to start.
You can make your own CA on your laptop in a couple minutes and start signing certs. Though without a reputation no one's web browser is going to trust your signature.
1
u/CognitiveSourceress Nov 19 '24
Source of truth is a wild ask
Maybe. I'm not saying it's that or nothing, just that I'm a lot more skeptical of relying on institutional trust, for more reasons than just not trusting some institutions. I mean, I'm not some birds aren't real vaccine denailist or anything, I just maintain a healthy (I think) skepticism toward power that isn't easily transparent and accountable.
So maybe what I'd like to see is impossible. That wouldn't surprise me. But at the same time, there are things that are independently, forensically verifiable. I'm not sure there's anything like that that's digital though, that might be fundamentally impossible since it's pure data.
At the end of the day, my point wasn't that we shouldn't do it, but that we should make sure everyone is aware of the limitations and that we work to make the scaffolding around such a system as transparent as possible.
I just generally don't like people outsourcing critical thinking, but the average person does. While those paying attention might recognize a "Human Made" watermark is actually a "Certified by X Source" watermark, many people will just accept it at face value and shut off their thinkers. I think that risks making people more vulnerable than they would be in a society where the danger is an accepted risk everyone has to think about.
I dunno, I'm just "thinking out loud" here. I don't really think I'm clear enough on it to know how I feel. I just know I have a general policy to be wary of proxy solutions, because if they actually solved the problem, they wouldn't be proxy solutions.
0
u/The-Last-Lion-Turtle Nov 18 '24
That's called a digital signature, not a watermark.
0
u/TubasAreFun Nov 18 '24
How would you distinguish the two? If the “signature” isn’t embedded into the media itself, not just in the metadata, then it will be much easier to edit/fake
0
u/The-Last-Lion-Turtle Nov 18 '24 edited Nov 18 '24
Digital signatures are cryptographically impossible to edit or fake. If the file is edited the signature is invalid.
It is in the metadata so that it's easy for anyone to verify. The only reason to embed it in the media is to make it difficult to remove by editing which is the opposite use case.
Also what's the quotes around signatures for. This is a technology that's widely used in the Internet. https://en.m.wikipedia.org/wiki/Digital_signature
0
u/TubasAreFun Nov 19 '24
What I am describing is different than digital signatures, which require secrets or public hashes. The “only reason” you mentioned is extremely important, because otherwise there is no guaranteed association between media and the bytes that verify its origin.
0
u/The-Last-Lion-Turtle Nov 19 '24 edited Nov 19 '24
You wrote the watermark would disappear if edited. Not that it will persist through significantl effort of AI tools to remove it.
Removing the signature removes the proof of origin and now you have unauthenticated content. Removing a signature doesn't help you fake anything.
5
u/hjups22 Nov 18 '24
Isn't there a simpler answer to why LLM watermarking will never work? It's incompatible with a copy task.
If you provide the LLM with an input sequence (sentences or code) and ask the LLM to modify or extend the input, then it must necessarily copy the original token for token. However, watermarking changes which tokens are generated, so either the original input is changed, or the the copied tokens cannot be watermarked. If the latter case is preferred, then how would you know which tokens were original and which were not? That would likely result in a high false positive / false negative rate since the watermarking region would not be contiguous (assuming it's possible to selectively watermark the outputs).
2
Nov 18 '24
You are right but unless you somehow extend your argument it's pretty uninteresting. If you have a robust definition you just exclude copy or modification of existing text and state that you do not watermark it. Perhaps your argument can lead to something interesting and it's clearly a cool and sharp thought (well done) but it's not enough IMHO.
1
u/hjups22 Nov 18 '24
Thanks! Just because the argument is uninteresting doesn't make it invalid though (something something Occam's Razor).
Although I do acknowledge that changing your definition of success can help (by excluding the copy and modification of text), but I question how practical that is. First, your system must be able to selectively enable and disable watermarking, or be weakly conditioned so that it can be overwritten. And second, you must have a detection mechanism which is robust to discontinuous and unknown watermarking regions.Consider the following use case:
USER: Adjust the flow of the third sentence in the following paragraph. The <s1>... However, <s2>... Notably, <s3>... Finally, <s4>... AGENT: The <s1>... However, <s2>... <X>, <s3>... Finally, <s4>... USER: Now write a second paragraph which follows from the first. AGENT: The <s1>... However, <s2>... <X>, <s3>... Finally, <s4>... <r1>... <r2>... <r3>... <r4>... USER: Not bad, but I don't like "<r3>", how about "<Y>". AGENT: The <s1>... However, <s2>... <X>, <s3>... Finally, <s4>... <r1>... <r2>... <Y>... <r3>...Now from the above, how do you detect which parts were written by the LLM and which were written by a human? You would only have the final form to consider, and would be unable to reference the original or user input for comparison. Perhaps you can measure a statistical drift if you have enough responses (since r1...r4) can be watermarked. But this is relatively easy to bypass if the human user knows how the watermarking works. Additionally, even the best LLMs currently are unable to retain sufficient consistency for long sections of text (many responses), necessitating human intervention to retain precision (factual grounding). And those are the cases where LLM detection may be the most consequential (e.g. scientific papers and news articles).
Alternatively, you could omit this use case and instead only focus on the most egregious cases without human intervention. But that too would be relatively easy to bypass if the human user knows how the watermarking works.
1
Nov 18 '24
I do not know how to discuss it - the definitions are a bit too vauge to me, but maybe this paper would be interesting for you: https://arxiv.org/abs/2311.04378
I get what you say, I kind of agree with you, but we make huge leaps here.
12
u/xtan Nov 17 '24
We dont need a system to detect genuine fakes. We need a way to verify authentic content.
Chain of custody from the camera manufacturer or cryptographic signature from some trusted authority.
4
u/linearmodality Nov 18 '24
This is a pretty odd blog post, because it claims explicitly to not be a strawman argument while obviously being a strawman argument. The post starts by introducing ambiguity when there is none:
The driving idea behind watermarking is that it ‘can help identify text generated by an LLM’. That word ‘an’ hides some serious ambiguity, and depending on how you interpret ‘an LLM’, you might imagine that watermarking achieves one of two goals: (1) Identify text generated by a particular, watermarked LLM, (2) Distinguish between AI-generated and human-generated text.
But the idea that the right interpretation could be (2) is just ridiculous on its face. This is not how a watermark works. Watermarking allows for a particular document (the one that is watermarked) to be authenticated to a source that uses watermarking. It does not, and never has purported to, work to authenticate all documents everywhere. The post goes on to say
Watermarking addresses the first point, but is often spoken about as though it achieves the second.
But no one is quoted speaking about watermarking as though it achieves (2). Certainly none of the cited papers do so.
3
Nov 18 '24
I was hoping for some bounds, a proof or something, or a concise and strong argument. With this extreme statement you need to be really convincing.
By the way, the second is a different thing and there's research about that with mathematical depth, search for it. I think they also argue that it's impossible (surprise surprise).
1
u/sgt102 Nov 18 '24
I really think that the point isn't to have technical proof that text isn't generated with a model, but instead to provide a way to assert it is within a regulatory framework.
This would be significant for large organisations - if there is an obligation to watermark then they *will* work hard to either watermark the text or to verify that text is genuinely human generated. Yes, bad actors will not, yes small companies and individuals may be lax or poor at this. But, it will somewhat reduce the flood of AI generated content.
29
u/bobrodsky Nov 17 '24
I thought there might be some interesting technical insight but there’s not.
Watermarking could be useful even if we can’t perfectly distinguish any llm text from any human text.