Neural Name MatchingAn Overview
Philip Blair, Senior Research Engineer
Agenda
● Why Name Matching is Hard
● How to Approach Name Matching?
● Non-Neural Approach
● Deep Learning Approach
● Bonus: Beyond Transliterations
● Q&A
Name Matching is a Hard Problem
● Script
● Language
● Order
How to Start?
Idea: What if we had a machine which could transliterate names?
We can then "ask" it how good of a transliteration we have.
HMM-Based Name Matching
Step One: Modeling Sequences of Characters
J o h n
e a
r t
Step One: Modeling Sequences of Characters
J o h n
Step Two: Modeling Transliterations
ジ
オ
ョ
ホ
ン
J o h n
Step Two: Modeling Transliterations
ジ
オ
ョ
ホ
ン
J o h nGiven a sequence of characters in the source language...
...what is the probability of the corresponding sequence of characters in the target language?
This probability is our score!
Issues with HMM-Based Name Matching
ジ
オ
ョ
J oEnglish Character(s) Japanese Equivalent
o オ
yo ヨ
ji ジ
jo ジョ
...but this represents just "o", not "o following a 'j'"
Issues with HMM-Based Name Matching
ジ
オ
ョ
J o
...but this represents just "o", not "o following a 'j'"
Problems with HMMs:
● Multi-character equivalents
● Morphological effects on
pronunciation
○ Arabic
○ Similar: "photograph" vs
"photography"
Common Thread: Missing Context!
Deep Learning for HLT
This is super awful
This is super awful
Context-free statistical
representation
Neural Language
Model
Context-enriched statistical
representation
Further Reading: https://allennlp.org/elmo
Starting Over
How Would You Transliterate a Name?
John Titor
ジョ ン ・ タイ ター
How Would You Transliterate a Name?
John Titor
ジョ ン ・ タイ ター
Enter Deep Learning
Step One: Learning to Transliterate
"Tupac" English Name Reader
Japanese Name Generator
"トゥパック"
Step One: Learning to Transliterate
T u p a c
ト ゥ ー パ ッ ク
First we "read"
the English
name...
...then we
generate the
translation
Step Two: Running the Transliterator in Reverse to Score
"Tupac" English Name Reader
Japanese Name Generator
"トゥパック"
0.790
Step Two: Running the Transliterator in Reverse to Score
T u p a c
ト ゥ ー パ ッ ク
First we "read"
the English
name...
...then we pass in
the Japanese
name...
0.790
...to produce a
score.
Broader HLT Applications
Key Idea: Read text and use a representation to produce data
● Many Manifestations
○ Learn to produce translated names (shown here)
○ Learn to answer questions (Amazon Alexa, Google Assistant, etc.)
● Similar idea from machine learning at large: Variational Autoencoders
○ Train a model to learn a "compressed" version of the input
○ Two compressed representations can be compared for similarity
● In general, deep neural networks help us model context
Beyond Transliterations
Text Embeddings
"king" - [0.1, 0.3, ...]
"queen" - [0.0, 0.4, ...] "woman" - [0.2, 0.3, ...]
"man" - [0.3, 0.2, ...]
"king" - "queen" ≈ "man" - "woman"
Multilingual Text Embeddings
"Company" "会社" "شركة"
"Company" 1.0 0.69528 0.69764
"会社" 0.69528 1.0 0.51733
"شركة" 0.69764 0.51733 1.0
* In all language pairs, the translation is the closest word.
What's the point of this?
Semantic Name Matching
Nippon Telegraph and Telephone Corporation
日本電信電話株式会社(Nippon Denshin Denwa Kabushiki Gaisha)
Virtually No Phonetic Relationship!
Bringing it all Together
● Each of the models shown here have their strengths
○ Traditional methods provide good performance and decent baseline results
○ Deep transliteration systems better handle context
○ Multilingual text embeddings enable semantic matching
● Successful systems incorporate all of the above into an ensemble approach
○ Pull from the strengths of each to deliver the optimal results