Home

Awesome

Convolutional Neural Network for Relation Extraction

Note: This project is mostly based on https://github.com/yuhaozhang/sentence-convnet


Requirements

To download wikipedia articles (distant_supervision.py)

To visualize the results (visualize.ipynb)

Data

Usage

Preprocess

python ./util.py

It creates vocab.txt, ids.txt and emb.npy files.

Training

Caution: A wrong value for input-data-dependent options (sent_len, vocab_size and num_class) may cause an error. If you want to train the model on another dataset, please check these values.

Evaluation

python ./eval.py --train_dir=./train/1473898241

Replace the --train_dir with the output from the training.

Run TensorBoard

tensorboard --logdir=./train/1473898241

Architecture

CNN Architecture

Results

PRFAUCinit_lrl2_reg
ER-CNN0.94100.86300.90030.93030.0050.05
MLMI-CNN0.82050.64060.71950.74241e-31e-4
MLMI-CONT0.88190.71580.79020.81561e-31e-4

F1 AUC Loss PR_Curve ER-CNN Embeddings MLMI-CNN Embeddings MLMI-CONT Left Embeddings MLMI-CONT Right Embeddings

*As you see above, these models somewhat suffer from overfitting ...

References