Live data from Hacker News

ImageNet contains naturally occurring Apple NeuralHash collisions

blog.roboflow.com

41–50 of 530 posts

Re: ImageNet contains naturally occurring Apple NeuralHash collisions

#41

Earlier quoted context omitted.

Who is scanning your phone right now with PhotoDNA?

Microsoft, Facebook and Google. More depending on what services you use

They're not actively scanning your phone, they're actively scanning files you send them.

Re: ImageNet contains naturally occurring Apple NeuralHash collisions

#42

Earlier quoted context omitted.

Let's say I get you to click on a link. That link contains a thumbnail gallery of CSAM. With the right CSS, you might not even notice it, but it's in your browser's cache and on your filesystem. Lots of pictures - more than enough for your phone to snitch on you. All because you clicked on a link. Phishing attacks can now put you in prison, label you as a pedophile and sex offender, and destroy your life.

This is already possible with PhotoDNA. When has it happened?

Your browser cache is not being synced to iCloud; Apple doesn't see it. So no, it is not currently possible.

Re: ImageNet contains naturally occurring Apple NeuralHash collisions

#43

Earlier quoted context omitted.

Microsoft, Facebook and Google. More depending on what services you use

They're not actively scanning your phone, they're actively scanning files you send them.

That’s the same as what Apple is going to do - scan right before sending to iCloud

Re: ImageNet contains naturally occurring Apple NeuralHash collisions

#44

>By taking advantage of the birthday paradox, and a collision search algorithm that let me search in n(log n) time instead of the naive n^2 n(log n)? I thought the birtday paradox lets you expect collisions after sqrt(n) tries…

Different things; birthday paradox was testing them against each other, turning it into a sorting problem was the other.

Re: ImageNet contains naturally occurring Apple NeuralHash collisions

#45

> By taking advantage of the birthday paradox, and a collision search algorithm that let me search in n(log n) time instead of the naive n^2 Someone got more details on that? How does the birthday paradox come into play here?

Yeah I'm unclear on why this even requires a clever algorithm. I'd think that given the 1.4 million precomputed hashes, a simple/naive Python function ( (list of images with that hash) could surface all the collisions in a few seconds. (It's a cool article though! I'm glad someone tested this.)

Edit: I'm procrastinating so I tried it. It's 8 lines including IO/parsing and runs in 2.8 seconds on my laptop:

  import collections
  hash_to_filenames = collections.defaultdict(list)
  with open('hashes.txt') as f:
    for line in f.readlines():
      filename, hash = line.strip().split()
      hash_to_filenames[hash].append(filename)
  dupes = {h: fs for h, fs in hash_to_filenames.items() if len(fs) > 1}
  print(f'Done. Found {len(dupes)} dupes.')
(hashes.txt is from the zip in the github repo, and it finds 8865 dupes which looks almost right from the article text (8272 + 595 = 8867).)

Re: ImageNet contains naturally occurring Apple NeuralHash collisions

#46

> By taking advantage of the birthday paradox, and a collision search algorithm that let me search in n(log n) time instead of the naive n^2 Someone got more details on that? How does the birthday paradox come into play here?

https://en.m.wikipedia.org/wiki/Birthday_attack

Re: ImageNet contains naturally occurring Apple NeuralHash collisions

#47
> In order to test things, I decided to search the publicly available ImageNet dataset for collisions between semantically different images. I generated NeuralHashes for all 1.43 million images and searched for organic collisions. By taking advantage of the birthday paradox, and a collision search algorithm that let me search in n(log n) time instead of the naive n^2, I was able to compare the NeuralHashes of over 2 trillion image pairs in just a few hours.

I don't know what the author means by "taking advantage of the birthday paradox". If they're referring to the "birthday attack" [0], I don't think it makes sense. The birthday attack is a strategy that helps you find a collision without hashing every single image, but he states that he already generated NeuralHashes for all 1.43 million images.

Furthermore, isn't there a simple linear time algorithm to detect collisions given that you already have all the hashes? Iterate over your NeuralHashes and put them into a hash table where the NeuralHash is the key, and the number of occurrences is the value. Whenever you insert something into a bucket and there's already something there, you have a neural hash collision.

[0]: https://en.wikipedia.org/wiki/Birthday_problem#Probability_t...

Re: ImageNet contains naturally occurring Apple NeuralHash collisions

#48
post #9

> In order to test things, I decided to search the publicly available ImageNet dataset for collisions between semantically different images. I generated NeuralHashes for all 1.43 million images and searched for organic collisions. By taking advantage of the birthday paradox, and a collision search algorithm that let me search in n(log n) time instead of the naive n^2, I was able to compare the NeuralHashes of over 2…

ImageNet is a very well-known data set. Are we sure apple didn't test on it when designing this algorithm?

>This is a false-positive rate of 2 in 2 trillion image pairs (1,431,168^2). Assuming the NCMEC database has more than 20,000 images, this represents a slightly higher rate than Apple had previously reported. But, assuming there are less than a million images in the dataset, it's probably in the right ballpark.

Apple reported a pretty similar collision rate so maybe they did.

Re: ImageNet contains naturally occurring Apple NeuralHash collisions

#49

It doesn’t matter if there are collisions if the two images don’t actually look the same. Do people honestly believe a single CSAM flag from an “innocent” image is going to result in someone going to prison in America? PhotoDNA has existed for over a decade doing the same thing with no instances that I have heard of. If some corrupt government wants to get you they don’t need this. They can just unilaterally say you’…

That's not the route in which this will be exploited, and used at scale. A corrupt government has to know they want you "to just get you". Instead they will embed a collision in anti-government meme. That collision will flag you, and now they know you harbor doubts and will come get you. This is why it's a privacy concern. It's no the tech (like you said photo dna's been about forver), it's the scanning of the phone.

A corrupt government will also enjoy the “chilling effect” created by people’s fear of tainting their phone with illegal images.

Re: ImageNet contains naturally occurring Apple NeuralHash collisions

#50

Earlier quoted context omitted.

You don’t need to be sent to prison to be irreparably harmed by an accusation.

Ok sure, PhotoDNA has existed since 2008. Where are the instances of people being sent to prison?

You are commenting a lot for this many places in the thread. Are you arguing for this system or for Apple? It reads like pro-Apple and doesn't add anything except "I think it is good, therefore it is good".
Post reply on HN