1. Amazon SageMaker
Algorithms
Edo Liberty, Director of Amazon AI Labs
Zohar Karnin, Bing Xiang, Baris Cuskon, Ramesh Nallapati, Phillip
Gautier, Madhav Jha, Ran Ding,Tim Januschowski, David Selinas,
BernieWang, Jan Gasthaus, Laurence Rouesnel, Amir Sadoughi, Piali
Das, Julio Delgado Mangas,Yury Astashonok, Can Balioglu, Saswata
Chakravarty, and Alex Smola
41. Topic Modeling: Learning topics in a large
document corpus
What are Topic Models?
• Unsupervised ML algorithm
• A topic is a distribution over words in a vocabulary
• Topics represented in terms of top 10 most
likely words in the distribution
• Words in a document is drawn from a mixture of
topics
• Documents can be soft-tagged with topics
Use cases:
• Discovering topics in the corpus automatically
• Indexing documents by topics
• Searching for similar documents
42. SageMaker Neural Topic Model (NTM)
• Based on Variational Autoencoders
• Encoder network: q(z|x): BOW latent variables z
• Decoder network: P(x|z): latent variables z word
distribution
• Latent variables z represent topic distribution for the
document
0
200
400
600
800
1000
1200
1400
LDA-Mean
Field
LDA-Gibbs NVDM GSM ProdLDA NTM
Perplexity on 20NG data: Lower is better
0
0.05
0.1
0.15
0.2
0.25
0.3
LDA-Mean
Field
LDA-Gibbs NVDM GSM ProdLDA NTM
Topic Coherence (NMPI) on 20NG data: Higher is
better
NTM offers a good balance between perplexity and topic coherence
43. NTM: Representative topics
Human Assigned Topic
Label
Top words from topics in 20 News Groups Data
Religion jesus, scripture, christian, religion, belief, islam, god, christianity, atheism, christ
Sports scoring, team, season, playoff, win, scorer, detroit, game, league, nhl
Computer Hardware ide, scsi, controller, scsi-2, drive, simms, scsi-1, isa, motherboard, floppy
Computer Security encryption, escrow, encrypted, rsa, crypto, secure, algorithm, key, nsa, clipper
Mechanics tire, noise, rear, engine, lock, brake, inch, radar, mile, detector
Human Assigned Topic
Label
WikiText–103 dataset
Navy admiral, fleet, cruiser, hm, austro, battleship, dreadnought, ship, battlecruisers, squadron
Biology protein, genetic, enzyme, dna, gene, disease, rna, molecule, organism, bacteria]
Games enix, video, remix, xbox, remixes, d, remixed, downloads, playstation, nintendo
Films film, filming, script, animated, filmed, animation, episode, screenplay, disney, movie
Music liner, recording, guitarist, beatles, orchestra, musician, opera, studio, band, concert
44. Object2Vec: Learning embeddings of high
dimensional objects
• Learns embeddings of entity pairs
• Token pairs
• Sequence pairs
• Token-sequence pairs
• Preserves semantic relationship
between entities in each pair in
the embedding space
• Learned embeddings can be used:
• For nearest neighbor search
• For clustering and visualization
• As features in downstream tasks
Left Input
Left Encoder
Comparator
Label
Right Input
Right Encoder
Can be trained using Cross-Entropy Loss,
MSE
Encoders can be layers of
Pooled Embeddings/CNNs/RNNs;
Left-right can be asymmetric
Inputs can be tokens,
or sequences of tokens
Combination of Hadamard Product,
Absolute difference,
Concatenation,
followed by FF network
45. Object2Vec: Benchmarking
0.88
0.9
0.92
0.94
0.96
0.98
1
1.02
RMSE
MovieLens Ratings Prediction
50
55
60
65
70
75
80
85
90
InferSent Object2Vec InferSent Object2Vec
CNN RNN
Accuracy
Stanford Natural Language Inference
Prediction of relationship between token pairs:
Movie recommendation
Prediction of relationship between sequence pairs:
Natural Language Inference
Prediction of similarity between embeddings of pairs of
sequences: Sentence similarity
0.5
0.55
0.6
0.65
0.7
0.75
STS'12 STS'13 STS`14 STS`15 STS'16
PearsonCorrelation
Semantic Text Similarity
PooledEmbeddings InferSent Object2Vec
Prediction of relationship between sequences and tokens:
Multi-label document classification
51. Thank you
Edo Liberty, Director of Amazon AI Labs
Zohar Karnin, Bing Xiang, Baris Cuskon, Ramesh Nallapati,
Phillip Gautier, Madhav Jha, Ran Ding, Tim Januschowski, David
Selinas, Bernie Wang, Jan Gasthaus, Laurence Rouesnel, Amir
Sadoughi, Piali Das, Julio Delgado Mangas, Yury Astashonok,
Can Balioglu, Saswata Chakravarty, and Alex Smola
Notes de l'éditeur
1) The algorithm only needs to know how to update the shared state
2) shared state is abstracted away
1) The algorithm only needs to know how to update the shared state
2) shared state is abstracted away