Relation Extraction Via Reccurent Neural Neworks

Confusion matrix of model.

This Project is an implementation of paper entilted “Relation Classification via Recurrent Neural Network” by Dongxu Zhang et al. I use pytorch for implementing this project. After Preprocessing text data and extracting labels for each datapoint, I use bi-LSTM Network with three different conditions to train the network.

PreProcessing

  • creating dictionary with respect to tokens
  • encoding labels

Training

I use 3 Configurations for Training a bi-LSTM Network:

  • bi-LSTM using Glove Embeddings (pre-trained)
  • bi-LSTM using random initialized embedding
  • bi-LSTM using random initialized embedding with addition of max and average pooling layers

loss and accuracy during training are shown below

loss during training
loss
accuracy during training
accuracy

results

the confusion matrix for third configuration on test data is shown below

confusion matrix
confusion matrix

Amir Mesbah
Amir Mesbah
Master student in Artificial Intelligence and Robotics

My research interests include Machine Learning.