#966 · Primary category: Education & Research

attention-networks-for-classification

deep-learning document-classification hierarchical-attention-networks lstm nlp pytorch

Hierarchical Attention Networks for Document Classification in PyTorch

Project last updated:03/04/20

GitHub Stars

606

Forks

130

Contributors

2

License

Other

Why we included this project

This is a PyTorch implementation of the Hierarchical Attention Network from the NAACL 2016 paper, built around the idea that documents have a natural structure: words combine into sentences, and sentences into documents. Instead of letting the model discover that structure on its own, the code feeds it in explicitly through word-level and sentence-level attention over a bidirectional GRU. The included notebook trains the model on a movie review dataset, so you get a complete, runnable example of the pipeline rather than isolated snippets. It's a good starting point for researchers or students who want to see how attention-based document classification actually works under the hood. Just keep in mind the repo hasn't seen updates since early 2020, so treat it as a teaching tool and a base for your own experiments, not something to wire into production.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category