GithubHelp home page GithubHelp logo

gueneumann / mil-rbert Goto Github PK

View Code? Open in Web Editor NEW

This project forked from suamin/mil-rbert

0.0 0.0 0.0 126 KB

MIL-RBERT: A Data-driven Approach for Noise Reduction in Distantly Supervised Biomedical Relation Extraction (BioNLP @ ACL 2020)

Home Page: https://www.aclweb.org/anthology/2020.bionlp-1.20

Python 100.00%

mil-rbert's Introduction

UMLS-MEDLINE Biomedical Distant RE for Bag-level Multiple Instance Learning

Code for the paper BioNLP 2020 paper A Data-driven Approach for Noise Reduction in Distantly Supervised Biomedical Relation Extraction.

Model Architecture

Requirements

pip install -r requirements.txt

Data

To run the code, please obtain the data as follows:

UMLS

Install the UMLS tools by following the steps here. Once installed, under INSTALLED_DIR/2019AB/META, you can find MRREL.RRF and MRCONSO.RRF, copy the files and place under data/UMLS.

MEDLINE

Download MEDLINE abstracts medline_abs.txt (~24.5GB) and place under data/MEDLINE. UPDATE: Please follow the discussion here: suamin#2

Data Creation
  1. From project base dir, call the script to process UMLS as: python -m data_utils.process_umls. This will create an object data/umls_vocab.pkl.
  2. Next, run the script python -m data_utils.extract_unique_sentences_medline. This might take a while. This will create a file data/MEDLINE/medline_unique_sentences.txt.
  3. Link the entities with texts: python -m data_utils.link_entities (see config.py to adjust linking settings).
Data Splits

To reproduce the data splits used reported in the paper for k-tag setting, run wit default options as python -m data_utils.create_split. This will take a while for the first time because of generating the one time file data/MEDLINE/linked_sentences_to_groups.jsonl. For next runs, it will use the cached version. For s-tag, set the flag k_tag=False in config.py. For s-tag+exprels, additionally set the flag expand_rels=True.

Features

Run python -m data_utils.features. Running the job with multi-processing will be significantly faster.

Train

Run python train.py.

Checkpoint

Download the best model checkpoint here.

Citation

If you use this code for your research, please consider citing:

@inproceedings{amin-etal-2020-data,
    title = "A Data-driven Approach for Noise Reduction in Distantly Supervised Biomedical Relation Extraction",
    author = "Amin, Saadullah and Dunfield, Katherine Ann and Vechkaeva, Anna and Neumann, G{\"u}nter",
    booktitle = "Proceedings of the 19th SIGBioMed Workshop on Biomedical Language Processing",
    month = jul,
    year = "2020",
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2020.bionlp-1.20",
    doi = "10.18653/v1/2020.bionlp-1.20",
    pages = "187--194"
}

Also, check our follow up work introducing a new benchmark using PubMed abstracts and SNOMED CT knowledge base, MedDistant19:

@inproceedings{amin-etal-2022-meddistant19,
    title = "{M}ed{D}istant19: Towards an Accurate Benchmark for Broad-Coverage Biomedical Relation Extraction",
    author = "Amin, Saadullah and Minervini, Pasquale and Chang, David and Stenetorp, Pontus and Neumann, G{\"u}nter",
    booktitle = "Proceedings of the 29th International Conference on Computational Linguistics",
    month = oct,
    year = "2022",
    address = "Gyeongju, Republic of Korea",
    publisher = "International Committee on Computational Linguistics",
    url = "https://aclanthology.org/2022.coling-1.198",
    pages = "2259--2277",
}

Acknowledgements

We thank Qin Dai ([email protected]) for guiding us on steps to obtain the relevant triples data from the UMLS in private communication.

mil-rbert's People

Contributors

suamin avatar pminervini 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.