seanfarrell commited on
Commit
efaa070
1 Parent(s): 4d6d0d0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +84 -0
README.md CHANGED
@@ -1,3 +1,87 @@
1
  ---
2
  license: openrail
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: openrail
3
+ language:
4
+ - en
5
+ pipeline_tag: fill-mask
6
+ tags:
7
+ - biology
8
+ - medical
9
  ---
10
+
11
+ # PetBERT
12
+
13
+ PetBERT is a masked language model based on the BERT architecture further trained on over 500 million additional words from first-opinion veterinary clinicians from across the UK
14
+
15
+ ## Paper Abstract
16
+ Effective public health surveillance requires consistent monitoring of disease signals such that researchers and decision-makers can react dynamically to changes in disease occurrence. However, whilst surveillance initiatives exist in production animal veterinary medicine, comparable frameworks for companion animals are lacking. First-opinion veterinary electronic health records (EHRs) have the potential to reveal disease signals and often represent the initial reporting of clinical syndromes in animals presenting for medical attention, highlighting their possible significance in early disease detection. Yet despite their availability, there are limitations surrounding their free text-based nature, inhibiting the ability for national-level mortality and morbidity statistics to occur. This paper presents PetBERT, a large language model trained on over 500 million words from 5.1 million EHRs across the UK. PetBERT-ICD is the additional training of PetBERT as a multi-label classifier for the automated coding of veterinary clinical EHRs with the International Classification of Disease 11 framework, achieving F1 scores exceeding 83% across 20 disease codings with minimal annotations. PetBERT-ICD effectively identifies disease outbreaks, outperforming current clinician-assigned point-of-care labelling strategies up to 3 weeks earlier. The potential for PetBERT-ICD to enhance disease surveillance in veterinary medicine represents a promising avenue for advancing animal health and improving public health outcomes.
17
+
18
+ - **Developed by:** SAVSNET
19
+ - **Model type:** Masked Language Model
20
+ - **Language(s) (NLP):** English
21
+ - **License:** openrail
22
+ - **Finetuned from model [optional]:** [More Information Needed]
23
+
24
+ ### Model Sources
25
+
26
+ - **Repository:** https://github.com/SAVSNET/PetBERT
27
+ - **Paper [optional]:** https://www.nature.com/articles/s41598-023-45155-7
28
+
29
+
30
+ ## How to Get Started with the Model
31
+
32
+
33
+
34
+ ## Training Details
35
+
36
+ ### Training Data
37
+
38
+ Electronic health records have been collected since March 2014 by SAVSNET, the Small Animal Veterinary Surveillance Network, comprising a sentinel network of 253 volunteer veterinary practices across the United Kingdom. A complete description of SAVSNET has been presented elsewhere5. In summary, based on convenience, veterinary practices with compatible practice management software with the SAVSNET data exchange are recruited. Within these participating practices, data is collected from each booked consultation (where an appointment has been made to see a veterinary practitioner or nurse). All owners within these practices can opt-out at the time of consultation, and therefore, their data will be excluded. Data is collected on a consultation-by-consultation basis and includes information such as species, breed, sex, neuter status, age, owner’s postcode, insurance and microchipping status, and crucial to this study, a free-text clinical narrative outlining the events that occurred within that consultation. At the end of each consultation, veterinary practitioners are given 10 ‘main presenting complaint’ (MPC) groups to categorise the main reason the animal presented; these are gastrointestinal, respiratory, pruritus, tumour, renal, trauma, post-operative checkups, vaccination and, other healthy and other unwell. Sensitive information, such as personal identifiers, is cleaned from the data without further preprocessing. SAVSNET has ethical approval from the University of Liverpool Research Ethics Committee (RETH001081). Table 4 summarises the cleaned SAVSNET dataset after the above process for cats and dogs only. We segregated EHRs into training and testing sets based on their respective source practices. This stratification approach ensures that the clinical notes used for testing were separate from those generated by clinicians who had contributed to the training sets, thereby fortifying the robustness of our results and mitigating potential bias.
39
+
40
+ ### Dataset availability statement:
41
+ The datasets analysed during the current study are not publicly available due to issues surrounding owner confidentiality. Reasonable requests can be made to the SAVSNET Data Access and Publication Panel ([email protected]) for researchers who meet the criteria for access to confidential data.
42
+
43
+ ### Training Procedure
44
+
45
+ Adaption of the ULMFiT framework was utilised in the production of ‘PetBERT’ based upon minimal modifications to the BERT architecture. Firstly, the pre-trained BERT-base model previously exposed to the general-purpose language of Wikipedia and BooksCorpus was further fine-tuned on the 500 million token dataset of first opinion clinical free-text narratives on a simultaneous training task of Masked Language (MLM) and Next Sentence Prediction (NSP), mimicking the tasks used in the initial pre-training of BERT. For MLM training, 15% of the words within a given clinical narrative were masked randomly across the entire training dataset. The model was tasked to substitute the masked word with a suitable word, requiring a deep bidirectional understanding of the text. For NSP training, sentences between narratives were randomly split and rejoined either to the same sentence or to a random sentence with a [SEP] token in between. The model had to determine whether the new sentence pairs made sense, enabling a cross-sentence understanding of the text. The model had a 10% evaluation set created randomly to calculate a validation loss to determine the number of training epochs required. The training ended when evaluation loss increased, occurring beyond epoch 8, with the final model selected for downstream tasks. Training took 450 hours on a single Nvidia A100 GPU.
46
+
47
+
48
+
49
+
50
+ ## Model Examination [optional]
51
+
52
+ <!-- Relevant interpretability work for the model goes here -->
53
+
54
+ [More Information Needed]
55
+
56
+ ## Environmental Impact
57
+
58
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
59
+
60
+
61
+ - **Hardware Type:** 1 x NVidia A100
62
+ - **Hours used:** ~450 hours
63
+ - **Cloud Provider:** https://www.dur.ac.uk/arc/nvidiacuda/
64
+ - **Carbon Emitted:** ~30kg CO2 eq. *[Machine Learning Impact calculator](https://mlco2.github.io/impact#compute)
65
+
66
+
67
+ ## Citation
68
+
69
+ **BibTeX:**
70
+
71
+ @article{Farrell2023PetBERT:Records,
72
+ title = {{PetBERT: automated ICD-11 syndromic disease coding for outbreak detection in first opinion veterinary electronic health records}},
73
+ year = {2023},
74
+ journal = {Scientific Reports 2023 13:1},
75
+ author = {Farrell, Sean and Appleton, Charlotte and Noble, Peter John Mäntylä and Al Moubayed, Noura},
76
+ number = {1},
77
+ month = {10},
78
+ pages = {1--14},
79
+ volume = {13},
80
+ publisher = {Nature Publishing Group},
81
+ url = {https://www.nature.com/articles/s41598-023-45155-7},
82
+ isbn = {0123456789},
83
+ doi = {10.1038/s41598-023-45155-7},
84
+ issn = {2045-2322},
85
+ pmid = {37865683},
86
+ keywords = {Data mining, Machine learning}
87
+ }