News for hackers. Stuff that matters.
Re:ImageNet contains naturally occurring Apple NeuralHash co... by criticaltinker on Thursday August 19, 2021 @01:00PM (#28236321)
> 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.

> 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.

It's great to see the ingenuity and attention this whole debacle is receiving from the community. Maybe it will lead to advances in perceptual hashing (and also advances in consumer awareness of tech related privacy issues).

Re:ImageNet contains naturally occurring Apple NeuralHash co... by SilasX on Thursday August 19, 2021 @01:37PM (#28236833)
>2 in 2 trillion image pairs

Reporting the collision rate per image pair feels misleading. What you really want to know is the number of false positives per image in the relevant set, not image pair, as that's the figure that indicates how frequently you'll hit a false positive.

Re:ImageNet contains naturally occurring Apple NeuralHash co... by dhosek on Thursday August 19, 2021 @03:54PM (#28238547)
In fact, I'd argue that the collision rate per image pair is overestimating the collision rate. It's the flip side of the birthday paradox. We don't care that any two images have the same hash, we care about any image having the same hash as one in the set that we're testing against.
Re:ImageNet contains naturally occurring Apple NeuralHash co... by SilasX on Thursday August 19, 2021 @04:35PM (#28239030)
>We don't care that any two images have the same hash,

Why not?

Re:ImageNet contains naturally occurring Apple NeuralHash co... by snet0 on Thursday August 19, 2021 @06:16PM (#28240035)
Based on the pigeonhole principle alone, it will always be the case that collisions exist. The size of the digest is very likely smaller than the size of any given image.
Re:ImageNet contains naturally occurring Apple NeuralHash co... by SilasX on Thursday August 19, 2021 @09:09PM (#28241279)
How is that relevant to whether “per image” or “Per image pair” is the right metric?

Heck, how is it relevant to anything given that hash functions avoid collisions in practice, even given the pigeonhole principle?

Re:ImageNet contains naturally occurring Apple NeuralHash co... by LodeOfCode on Friday August 20, 2021 @01:51PM (#28249155)
Those should only differ by a factor of 2 [the collision rate for an image is the number of collisions it has divided by the number of other images, so the average collision rate is the total collisions divided by n(n-1) vs. n(n-1)/2 pairs] which isn't particularly relevant at this scale
Re:ImageNet contains naturally occurring Apple NeuralHash co... by SilasX on Friday August 20, 2021 @02:05PM (#28249351)
You care about the total number of collisions, not collisions for a specific image, so they differ by a square -- hence the 1 in a trillion vs million difference.
Re:ImageNet contains naturally occurring Apple NeuralHash co... by bawolff on Thursday August 19, 2021 @01:06PM (#28236398)
ImageNet is a very well-known data set. Are we sure apple didn't test on it when designing this algorithm?
Re:ImageNet contains naturally occurring Apple NeuralHash co... by slg on Thursday August 19, 2021 @01:21PM (#28236632)
>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 co... by yeldarb on Thursday August 19, 2021 @01:53PM (#28237035)
Their reported collision rate was against their CSAM hash database[1].

> In Apple’s tests against 100 million non-CSAM images, it encountered 3 false positives when compared against NCMEC’s database. In a separate test of 500,000 adult pornography images matched against NCMEC’s database, it found no false positives.

[1] https://tidbits.com/2021/08/13/new-csam-detection-details-em...

Re:ImageNet contains naturally occurring Apple NeuralHash co... by slg on Thursday August 19, 2021 @02:25PM (#28237408)
I don't follow the point you are making here. The goal of the algorithm is to match images so I would expect similar collision rates regardless of what image was matched against what set of hashes. The exact rate of collision will obviously vary slightly.
Re:ImageNet contains naturally occurring Apple NeuralHash co... by javierbyte on Thursday August 19, 2021 @04:10PM (#28238721)
I think the point is that if Apple did optimize the algorithm using ImageNet then they and we are seeing the same best case scenario.
Re:ImageNet contains naturally occurring Apple NeuralHash co... by pfranz on Thursday August 19, 2021 @05:41PM (#28239723)
The only number I've heard from Apple is, "the likelihood that the system would incorrectly identify any given account is less than one in one trillion per year."[1] Which I read as enough false hits to flag an account that year (some interview said that threshold was around 30). That depends on the average number of new photos uploaded to iCloud, the size of the NCMEC database, the threshold for flagging the account, and the error rate of the match. Without knowing most of those numbers it's hard to gauge how close it is.

https://www.apple.com/child-safety/pdf/Expanded_Protections_...

Re:ImageNet contains naturally occurring Apple NeuralHash co... by robertoandred on Thursday August 19, 2021 @03:57PM (#28238583)
Nah, the consensus online seems to be that Apple hires naive, inept script kiddies and that any rando on GitHub can prove without question that Apple’s solution is flawed.