Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo!...

21
Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

Transcript of Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo!...

Page 1: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

Song Intersection by Approximate Nearest Neighbours

Michael Casey, Goldsmiths

Malcolm Slaney, Yahoo! Inc.

Page 2: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

Overview

• Large Databases: Everywhere!– 8B web pages– 50M audio files on web– 2M songs

• Find duplicates with shingles– Text-based – LSH - Randomized projections

• Results – Best features– 2018 song subset

Page 3: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

The Need for Normalization

• Recommendations– Apply one song’s rating to another– – > Better matches

• Playlists– Find matches to user requests– Remove adult/child music

• Search results– Don’t show duplicates

Page 4: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

Specificity Spectrum

Cover songsRemixes

Look for specificexact

matches

Bag of Features

model

Our work(nearestneighbor)

Fingerprinting Genre

Page 5: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

Remixes of One Title

Page 6: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

Remix Examples

Abba Gimme Gimme

Madonna Hung Up

Tracy Young Remixof Hung Up

Tracy Young Remix 2of Hung Up

Page 7: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

How Remix Recognition Works

• Algorithm– Matched filter best (ICASSP2005 result)

– Nearest neighbor in 360–1200D space• Ill posed?

• Efficient implementation– Audio shingles– Like web-duplicate search– Locality-sensitive hashing– Probabilistic guarantee

Page 8: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

Audio Processing

Page 9: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

Remix Distance

N-best matches Matched filter(implemented as nearest neighbor)

Page 10: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

Choosing r0

Page 11: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

Hashing

• Types of hashes– String : put casey vs cased in different bins– Locality sensitive : find nearest neighbors

• High-dimensional and probabilistic

• Two Nearest Neighbor implementations– Pair-wise distance computation

– 1,000,000,000,000 comparisons in 2M song database

– Hash bucket collisions– 1,000,000,000 hash projections

Page 12: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

Random Projections

• Random projections estimate distance

• Multiple projections improve estimate

Page 13: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

Locality Sensitive Hashing

• Hash function is a random projection

• No pair-wise computation

• Collisions are nearest neighbors Distant Vector

Distant Vector

Page 14: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

Remix Nearest Neighbour Algorithm 1

1.Extract database audio shingles

2.Eliminate shingles < song’s mean power

3.Compute remix distance for all pairs

4.Choose pairs with remix distance < r0

Page 15: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

1.Extract database audio shingles

2.Eliminate shingles < song’s mean power

3.Hash remaining shingles, bin width=r0

4.Collisions are near neighbour shingles

Remix Nearest Neighbour Algorithm Revisited

Page 16: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

Method

• Choose 20 Query Songs

• Each has 3-10 Remixes

• 306 Madonna Songs

• 2018 Madonna+Miles

Page 17: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

Results

Page 18: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

Conclusions

• Remixes are hard, but well-posed

• Brute force distances too expensive

• LSH is 1-2 orders of magnitude faster

• LSH Remix Recognition is Accurate

Page 19: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

Conclusions

• Remixes are hard, but well-posed

• Brute force distances too expensive

• LSH is 1-2 orders of magnitude faster

• LSH Remix Recognition is Accurate

Page 20: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

Conclusions

• Remixes are hard, but well-posed

• Brute force distances too expensive

• LSH is 1-2 orders of magnitude faster

• LSH Remix Recognition is Accurate

Page 21: Song Intersection by Approximate Nearest Neighbours Michael Casey, Goldsmiths Malcolm Slaney, Yahoo! Inc.

Conclusions

• Remixes are hard, but well-posed

• Brute force distances too expensive

• LSH is 1-2 orders of magnitude faster

• LSH Remix Recognition is Accurate