Live data from Hacker News

Entity Resolution: The most common data science challenge

docs.magniv.io

21–28 of 28 posts

Re: Entity Resolution: The most common data science challenge

#21

Sorry to post on at topic I know nothing about. To me, this looks very similar to local sequence similarity search (e.g. BLAST), where there are very rapid methods that use tuple-lookup and banded alignment to quickly identify "homologs" (the same entity). The nice thing about similarity searching algorithms is that they give you a very accurate probability of whether two strings are "homologous" (belong to the same…

Very interesting comparison -- do you have a TLDR of how BLAST works or a good resource to read more about it?

Re: Entity Resolution: The most common data science challenge

#22
post #21

Sorry to post on at topic I know nothing about. To me, this looks very similar to local sequence similarity search (e.g. BLAST), where there are very rapid methods that use tuple-lookup and banded alignment to quickly identify "homologs" (the same entity). The nice thing about similarity searching algorithms is that they give you a very accurate probability of whether two strings are "homologous" (belong to the same…

Very interesting comparison -- do you have a TLDR of how BLAST works or a good resource to read more about it?

[deleted]

Re: Entity Resolution: The most common data science challenge

#23
this doesn't make any sense though, your write up starts with an assumption that multiple records in the dataset are "obviously" the same entity ... so we wouldn't even need entity resolution then ...

"entity resolution" as a process should moreso imply how to determine whether two records that aren't obviously the same entity are actually the same entity ... and how you would go about discovering and proving and declaring that ...

Re: Entity Resolution: The most common data science challenge

#24
post #2

Danger awaits all ye who enter this tutorial and have large datasets. The tutorial is fun marketing material and all but its FAR too slow to be used on anything at scale. Please, for your sanity, don't treat this as anything other than a fun toy example. ER wants to be an an O(n^2) problem and you have to fight very hard for it not to turn into one. Most people doing this at scale are following basically the same pla…

So much this. I work on spatiotemporal entity resolution and it requires extreme care and cleverness to not turn it into a proverbial "boiling the ocean" compute problem for all but the most trivial cases. The implied state that needs to be managed alone is often effectively intractable. At one time supercomputers were used for large-scale entity resolution problems; they may still.

The beautiful thing about spatiotemporal entities is that physical time provides "out of the box common sense" decent locality, and physical space excellent locality, for the blocking process your parent comment mentions.

It sucks to work on a whole product catalog or rolodex.

Re: Entity Resolution: The most common data science challenge

#25
post #7
post #3

Earlier quoted context omitted.

You are 100% correct, this is a toy example that I decided to put together for fun after talking to a bunch of people who mentioned it as a problem that they experience. The main idea I wanted to add to the discussion (which is not that crazy of an addition) is that you can possible use sentence embedding instead of fuzzy matching on the actual letters to get more "domain expertise" How to actually compare these embe…

Yeah, totally, I get you. I'm not trying to do a takedown, ER is just hard. The point I was trying to make is that at scale one does not simply: > compare these embeddings with all the other embeddings you have You just can't, similarity metrics (especially cosine) on 768 dim arrays are prohibitively slow. Using embeddings is quite common in the literature and in deployment (I have, in fact, deployed ER that uses emb…

You just can't, similarity metrics (especially cosine) on 768 dim arrays are prohibitively slow.

Any reason you couldn't just dump it in FAISS or Annoy? No need to do pairwise comparisons. Annoy claims to handle even up to 1,000 dimensions reasonably. https://github.com/facebookresearch/faiss/issues/95

Re: Entity Resolution: The most common data science challenge

#26
post #2

Danger awaits all ye who enter this tutorial and have large datasets. The tutorial is fun marketing material and all but its FAR too slow to be used on anything at scale. Please, for your sanity, don't treat this as anything other than a fun toy example. ER wants to be an an O(n^2) problem and you have to fight very hard for it not to turn into one. Most people doing this at scale are following basically the same pla…

This is my favourite paper on the different indexing (blocking) techniques - http://users.cecs.anu.edu.au/~Peter.Christen/publications/ch...

Very easy to read and explains the tradeoffs of the algorithms

Re: Entity Resolution: The most common data science challenge

#27
post #7

Earlier quoted context omitted.

Yeah, totally, I get you. I'm not trying to do a takedown, ER is just hard. The point I was trying to make is that at scale one does not simply: > compare these embeddings with all the other embeddings you have You just can't, similarity metrics (especially cosine) on 768 dim arrays are prohibitively slow. Using embeddings is quite common in the literature and in deployment (I have, in fact, deployed ER that uses emb…

You just can't, similarity metrics (especially cosine) on 768 dim arrays are prohibitively slow. Any reason you couldn't just dump it in FAISS or Annoy? No need to do pairwise comparisons. Annoy claims to handle even up to 1,000 dimensions reasonably. https://github.com/facebookresearch/faiss/issues/95

Yeah, ANN algos provide a logical way to do blocking. It's not quite as simple as just running it though.

First, you have to be able to actually run the server. Most ANN algos (not DiskANN or SPTAG, but basically everything else) are run in memory, so if you've got really beefy data you'll need machines that can handle the load. The search engine companies and researchers using toy problems generally don't run into this problem.

Second, Approximate Nearest Neighbors are, unsurprisingly, approximate, so if you want the top N true neighbors you actually have to 1) collect the top K*N approximate neighbors then 2) run true cosine similarity on the K*N neighbors to refine down to N.

So your new O(kn)(not the same k or n, sorry I overloaded my variables) ER algorithm is basically:

- set up ANN server

- for each entity, collect K*N approximate neighbors

- refine to N true neighbors

- perform matching step

- somehow handle the fact that you have merged entities in your ANN server (this can be weirdly tricky).

Also, I might be splitting hairs, but ANN isn't REALLY performing a similarity measure. Its doing clustering or making search trees that try to guarantee the leaf nodes will be close to within some threshold. In that sense it has more in common with a fuzzy hash or blocking algorithm than it does with an exact similarity calculation.

As you may be able to tell, I have spent more time than I would like thinking about and implementing this sort of thing.

Re: Entity Resolution: The most common data science challenge

#28
post #21

Sorry to post on at topic I know nothing about. To me, this looks very similar to local sequence similarity search (e.g. BLAST), where there are very rapid methods that use tuple-lookup and banded alignment to quickly identify "homologs" (the same entity). The nice thing about similarity searching algorithms is that they give you a very accurate probability of whether two strings are "homologous" (belong to the same…

Very interesting comparison -- do you have a TLDR of how BLAST works or a good resource to read more about it?

BLAST is so deeply embedded in modern genome biology that it is hard to find short descriptions. Basically, there are two parts:

(1) local sequence (string) similarity scores (scores that allow mismatches, but need not extend to the end of either string) are distributed as the "extreme value distribution", which means that it is very easy to distinguish between similarity by chance and similarity because of common ancestry (I think of the names for the same entity as ancestral). This is a very powerful concept, that allows one to accurately set false-positive rates (it does not help with false negatives)

(2) BLAST calculates local similarity scores at O(n^2)/K where K is very very large by first identifying significant conserved "words" using a lookup table, then looking for runs of those words along an alignment diagonal, and then trying to extend that diagonal using an efficient banded dynamic programming algorithm.

Post reply on HN