All Projects → ZhixiuYe → Intra Bag And Inter Bag Attentions

ZhixiuYe / Intra Bag And Inter Bag Attentions

Code for NAACL 2019 paper: Distant Supervision Relation Extraction with Intra-Bag and Inter-Bag Attentions

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Intra Bag And Inter Bag Attentions

Bert Attributeextraction
USING BERT FOR Attribute Extraction in KnowledgeGraph. fine-tuning and feature extraction. 使用基于bert的微调和特征提取方法来进行知识图谱百度百科人物词条属性抽取。
Stars: ✭ 224 (+128.57%)
Mutual labels:  deeplearning, relation-extraction
Ngsim env
Learning human driver models from NGSIM data with imitation learning.
Stars: ✭ 96 (-2.04%)
Mutual labels:  deeplearning
Flops Counter.pytorch
Flops counter for convolutional networks in pytorch framework
Stars: ✭ 1,223 (+1147.96%)
Mutual labels:  deeplearning
Micromlp
A micro neural network multilayer perceptron for MicroPython (used on ESP32 and Pycom modules)
Stars: ✭ 92 (-6.12%)
Mutual labels:  deeplearning
Tf Mobilenet V2
Mobilenet V2(Inverted Residual) Implementation & Trained Weights Using Tensorflow
Stars: ✭ 85 (-13.27%)
Mutual labels:  deeplearning
Classification Of Hyperspectral Image
Classification of the Hyperspectral Image Indian Pines with Convolutional Neural Network
Stars: ✭ 93 (-5.1%)
Mutual labels:  deeplearning
Kamonohashi
AI開発プラットフォームKAMONOHASHI
Stars: ✭ 80 (-18.37%)
Mutual labels:  deeplearning
The Nlp Pandect
A comprehensive reference for all topics related to Natural Language Processing
Stars: ✭ 1,349 (+1276.53%)
Mutual labels:  deeplearning
Bdrar
Code for the ECCV 2018 paper "Bidirectional Feature Pyramid Network with Recurrent Attention Residual Modules for Shadow Detection"
Stars: ✭ 95 (-3.06%)
Mutual labels:  deeplearning
Lipreading Densenet3d
DenseNet3D Model In "LRW-1000: A Naturally-Distributed Large-Scale Benchmark for Lip Reading in the Wild", https://arxiv.org/abs/1810.06990
Stars: ✭ 91 (-7.14%)
Mutual labels:  deeplearning
Pytorch Seq2seq
An open source framework for seq2seq models in PyTorch.
Stars: ✭ 1,297 (+1223.47%)
Mutual labels:  deeplearning
Novel Deep Learning Model For Traffic Sign Detection Using Capsule Networks
capsule networks that achieves outstanding performance on the German traffic sign dataset
Stars: ✭ 88 (-10.2%)
Mutual labels:  deeplearning
360sd Net
Pytorch implementation of ICRA 2020 paper "360° Stereo Depth Estimation with Learnable Cost Volume"
Stars: ✭ 94 (-4.08%)
Mutual labels:  deeplearning
Mobilenet Ssd
MobileNet-SSD(MobileNetSSD) + Neural Compute Stick(NCS) Faster than YoloV2 + Explosion speed by RaspberryPi · Multiple moving object detection with high accuracy.
Stars: ✭ 84 (-14.29%)
Mutual labels:  deeplearning
Relation extraction
Relation Extraction using Deep learning(CNN)
Stars: ✭ 96 (-2.04%)
Mutual labels:  relation-extraction
Deeplearning
Neural network base on c++14, support any number of layers 基于C++14元编程的深度学习神经网络模板类,支持任意层数
Stars: ✭ 80 (-18.37%)
Mutual labels:  deeplearning
Wb color augmenter
WB color augmenter improves the accuracy of image classification and image semantic segmentation methods by emulating different WB effects (ICCV 2019) [Python & Matlab].
Stars: ✭ 89 (-9.18%)
Mutual labels:  deeplearning
Specgan
SpecGAN - generate audio with adversarial training
Stars: ✭ 92 (-6.12%)
Mutual labels:  deeplearning
Exposure correction
Reference code for the paper "Learning Multi-Scale Photo Exposure Correction", CVPR 2021.
Stars: ✭ 98 (+0%)
Mutual labels:  deeplearning
Copymtl
AAAI20 "CopyMTL: Copy Mechanism for Joint Extraction of Entities and Relations with Multi-Task Learning"
Stars: ✭ 97 (-1.02%)
Mutual labels:  relation-extraction

Intra-Bag and Inter-Bag Attentions

Dependencies

The code is written in Python 3.6 and pytorch 0.3.0.

Evaluation Results

precision/recall curves

Precion/recall curves of CNN+ATT_BL, CNN+ATT_BL+BAG_ATT, CNN+ATT_RA, CNN+ATT RA+BAG ATT

Precion/recall curves of PCNN+ATT_BL, PCNN+ATT_BL+BAG_ATT, PCNN+ATT_RA, PCNN+ATT_RA+BAG_ATT

AUC Results

Model no BAG_ATT BAG_ATT
CNN+ATT_BL 0.376 0.388
CNN+ATT_RA 0.398 0.407
PCNN+ATT_BL 0.388 0.403
PCNN+ATT_RA 0.403 0.422

Usage

  1. upzip the file NYT_data/NYT_data.zip

  2. make data folder in the following structure

Intra-Bag-and-Inter-Bag-Attentions
|-- figure
    |-- CNNmethods.pdf
    |-- PCNNmethods.pdf
|-- model
    |-- embedding.py
    |-- model_bagatt.py
    |-- pcnn.py
|-- NYT_data
    |-- relation2id.txt
    |-- test.txt
    |-- train.txt
    |-- vec.bin
|-- preprocess
    |-- data2pkl.py
    |-- extract.cpp
    |-- pickledata.py
    |-- preprocess.sh
|-- plot.py
|-- README.md
|-- train.py
  1. preprocess NYT data
cd preprocess; bash preprocess.sh; cd ..
  1. train model
CUDA_VISIBLE_DEVICES=0 python train.py --pretrain --use_RA --sent_encoding pcnn --modelname PCNN_ATTRA
  1. plot the precision/recall curve
python plot.py --model_name PCNN_ATTRA_BAGATT

Cite

If you use the code, please cite the following paper: "Distant Supervision Relation Extraction with Intra-Bag and Inter-Bag Attentions" Zhi-Xiu Ye, Zhen-Hua Ling. NAACL (2019)

@inproceedings{ye-ling-2019-distant,
    title = "Distant Supervision Relation Extraction with Intra-Bag and Inter-Bag Attentions",
    author = "Ye, Zhi-Xiu  and
      Ling, Zhen-Hua",
    booktitle = "Proceedings of the 2019 Conference of the North {A}merican Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)",
    month = jun,
    year = "2019",
    address = "Minneapolis, Minnesota",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/N19-1288",
    pages = "2810--2819",
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].