Actionable and Political Text Classification using Word Embeddings and LSTM

18
Actionable and Political Text Classification using Word Embeddings and LSTM Adithya Rao, Nemanja Spasojevic Lithium Technologies | Klout

Transcript of Actionable and Political Text Classification using Word Embeddings and LSTM

Page 1: Actionable and Political Text Classification using Word Embeddings and LSTM

Actionable and Political Text Classification using Word

Embeddings and LSTMAdithya Rao, Nemanja Spasojevic

Lithium Technologies | Klout

Page 2: Actionable and Political Text Classification using Word Embeddings and LSTM

Main Contributions

● Explore contextual classification problems beyond sentiment:

○ Actionability for customer service

○ Political Leaning on social media

● Deep Learning Models are built with Word Embeddings + LSTM and analyzed

for several languages.

● 85-91 % accuracy for predicting actionability and political leaning.

● Significant improvement over traditional methods.

● Actionability models deployed in production

● Political Leaning model open to download

Page 3: Actionable and Political Text Classification using Word Embeddings and LSTM

Online Customer Service

● Sentiment is largely negative in

customer complaints.

● Just knowing sentiment by itself is not

very useful.

● Prioritizing which messages to

respond to can lead to huge cost

savings.

Page 4: Actionable and Political Text Classification using Word Embeddings and LSTM

Actionable vs Non-Actionable

Actionable

Non-Actionable

Page 5: Actionable and Political Text Classification using Word Embeddings and LSTM

Political Leaning

● Mixed sentiments on various

issues.

● Sentiment towards

candidates are not always

indicative of party lines. eg.

Primaries, #NeverTrump

Page 6: Actionable and Political Text Classification using Word Embeddings and LSTM

Political Leaning Examples

Republican

Democrat

Page 7: Actionable and Political Text Classification using Word Embeddings and LSTM

Actionability Data● Lithium Response is a

platform for customer

service.

● Labels:

○ If an agent provided a response,

then Actionable.

○ If ignored then Non-Actionable.

● 6 months of data, from Nov

2014 to May 2015

● 12 million training, 3 million

test samples across different

languages

Page 8: Actionable and Political Text Classification using Word Embeddings and LSTM

Political Leaning Dataset● Twitter Lists: Use crowdsourced topical

lists to find people with known

Republican or Democrat leaning.

● Sample messages that they posted over a

period of 3 months, between Oct 12th,

2015 to Jan 12th, 2016

● ~330k Training, ~84k Test samples

● List of users available here:

https://github.com/klout/opendata

Page 9: Actionable and Political Text Classification using Word Embeddings and LSTM

Deep Network Schematic ● Embedding layer: Maps words to a smaller

n-dimensional vector space.

● LSTM layer: Multiple memory units wirth

gates ~ deep network across timesteps.

● Dropout layer: For regularization

● Fully Connected layer: Learns non-linear

transformations of higher level features.

● Loss Layer: Binary cross-entropy loss

● Learning: Back-propagation of gradients to

train and learn weights.

Page 10: Actionable and Political Text Classification using Word Embeddings and LSTM

Language-based Performance

Page 11: Actionable and Political Text Classification using Word Embeddings and LSTM

Deep Learning vs Traditional Techniques

Page 12: Actionable and Political Text Classification using Word Embeddings and LSTM

LSTM and Embedding Units

Page 13: Actionable and Political Text Classification using Word Embeddings and LSTM

Actionability Predictions

Page 14: Actionable and Political Text Classification using Word Embeddings and LSTM

Political Leaning Predictions

Page 15: Actionable and Political Text Classification using Word Embeddings and LSTM

Political Leaning Predictions (cont.)

Page 16: Actionable and Political Text Classification using Word Embeddings and LSTM

Future Work and Improvements

● Analysis of word embeddings, mapping embeddings to word clusters.

● Exploring other architectures with LSTMs and RNNs for training.

● Choosing optimal hyperparameters.

● Time sensitivity of training models for Political Leaning.

Page 17: Actionable and Political Text Classification using Word Embeddings and LSTM

Questions?

Page 18: Actionable and Political Text Classification using Word Embeddings and LSTM

Thank you!

Contact info:

Adithya Rao [email protected] Spasojevic [email protected]

Github link: https://github.com/klout/opendata