Skip to content
/ hyfi Public

Code for the paper "A Fully Hyperbolic Neural Model for Hierarchical Multi-class Classification"

License

Notifications You must be signed in to change notification settings

nlpAThits/hyfi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Fully Hyperbolic Neural Model for Hierarchical Multi-class Classification

Code for the paper "A Fully Hyperbolic Neural Model for Hierarchical Multi-class Classification" published at Findings of EMNLP 2020.

Model overview:

Citation

The source code and data in this repository aims at facilitating the integration of hyperbolic components into neural models for NLP. If you use the code/data, please cite it as follows:

@inproceedings{lopez2020hyfi,
    title = "A Fully Hyperbolic Neural Model for Hierarchical Multi-Class Classification",
    author = "L{\'o}pez, Federico  and Strube, Michael",
    booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2020",
    month = nov,
    year = "2020",
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/2020.findings-emnlp.42",
    pages = "460--475"
}

Dependencies

  • python 3.7
  • PyTorch 1.4
  • geoopt 0.2.0
  • tqdm
  • tensorboardX

Running experiments

1. Download data

Download and uncompress Ultra-Fine dataset, and download Poincare word embeddings:

./scripts/hyfi.sh get_data

Experiments were run with poincare_glove_100D_cosh-dist-sq_init_trick.txt.

2. Preprocess data

The parameter poin-ctx25 can be replaced to store different preprocessing configurations:

./scripts/hyfi.sh preprocess poin-ctx25

3. Train model

The name of the preprocessing used in the previous step must be given as a parameter.

./scripts/hyfi.sh train poin-ctx25

3. Do inference

./scripts/figet.sh inference poin-ctx25 models/poin-ctx25-{N}bstep.pt

N should be the number of the best epoch, according to the validation results.

Acknowledgements

We kindly thank the open-source community for their support with high quality software, and specially to:

License

MIT

About

Code for the paper "A Fully Hyperbolic Neural Model for Hierarchical Multi-class Classification"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published