Giter Club home page Giter Club logo

acce's Introduction

ACCE

Automatic Corpus-level and Concept-based Explanation for Text Classfication Models.

image image image image image

This repository is a pytorch implementation for the following arxiv paper:

Tian Shi, Xuchao Zhang, Ping Wang, Chandan K. Reddy

Requirements

  • Python 3.6.9
  • argparse=1.1
  • torch=1.4.0
  • sklearn=0.22.2.post1
  • numpy=1.18.2

Dataset

Please download processed dataset from here. Place them along side with DMSC_FEDA.

|--- ACCE
|--- Data
|    |--- imdb_data
|    |--- newsroom_data
|    |    |--- dev
|    |    |--- glove_42B_300d.npy
|    |    |--- test
|    |    |--- train
|    |    |--- vocab
|    |    |--- vocab_glove_42B_300d
|--- nats_results (results, automatically build)
|

Usuage

Training, Validate, Testing python3 run.py --task train Testing only python3 run.py --task test Evaluation python3 run.py --task evaluate keywords Extraction python3 run.py --task keywords_attnself keywords Extraction python3 run.py --task keywords_attn_abstraction Attention Weight Visualization python3 run.py --task visualization

If you want to run baselines, you may need un-comment the corresponding line in run.py.

Baselines Implemented.

Model BRIEF
CNN Convolutional Neural Network
RNNAttn Bi-LSTM + Self-Attention
RNNAttnWE RNNAttn + Pretrained Word Embedding
RNNAttnWECPT RNNAttnWE + Concept Based
RNNAttnWECPTDrop RNNAttnWECPT + Attention Weights Dropout
Bert* Replace RNN with BERT

Use Pretrained Model

Coming Soon.

Citation

@article{shi2020concept,
  title={A Concept-based Abstraction-Aggregation Deep Neural Network for Interpretable Document Classification},
  author={Shi, Tian and Zhang, Xuchao and Wang, Ping and Reddy, Chandan K},
  journal={arXiv preprint arXiv:2004.13003},
  year={2020}
}

acce's People

Contributors

tshi04 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.