LabradorTransformer commited on
Commit
9cb83b9
·
verified ·
1 Parent(s): f47251f

Upload 10 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ labrador/variables/variables.data-00000-of-00001 filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ tags:
6
+ - medical
7
+ ---
8
+ # Model Card for Labrador
9
+
10
+ <!-- Provide a quick summary of what the model is/does. -->
11
+ Labrador is a pre-trained continuous Transformer model for masked ***lab*** modeling.
12
+
13
+ ## Model Details
14
+
15
+ ### Model Description
16
+
17
+ <!-- Provide a longer summary of what this model is. -->
18
+ Laboratory data are a rich source of information about a patient's health. They are often used to diagnose and monitor disease, and to guide treatment. However, lab values are continuous, often missing and therefore difficult to model with the Transformer architecture. Labrador solves this problem by jointly embedding lab values with a token for the lab test identifier so that the quantitative and qualitative information from each test is combined into a single representation.
19
+
20
+ Labrador is pre-trained on a large corpus of 100 million lab tests from over 260,000 patients. We rigorously evaluate Labrador on intrinsic and extrinsic tasks, including four real-world problems: cancer diagnosis, COVID-19 diagnosis, predicting elevated alcohol consumption and ICU mortality due to sepsis. We find that Labrador is superior to BERT across all evaluations but both are outperformed by XGBoost indicating that transfer learning from continuous EHR data is still an open problem.
21
+
22
+ We discuss the limitations of our approach and suggest future directions for research in the corresponding paper, [Labrador: Exploring the Limits of Masked Language Modeling for Laboratory Data]().
23
+
24
+
25
+ - **Developed by:** David Bellamy
26
+ - **Model type:** BERT-style transformer
27
+ - **License:** MIT
28
+
29
+ ## Uses
30
+
31
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
32
+
33
+ ### Direct Use
34
+
35
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
36
+ The base models can be used directly to impute lab values and/or MIMIC lab codes conditional on a set of lab values and lab codes.
37
+
38
+ ### Downstream Use
39
+
40
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
41
+ The associated codebase includes a fine-tuning wrapper class that can be used to repurpose these base models for downstream regression or classification tasks.
42
+
43
+ ## Bias, Risks, and Limitations
44
+
45
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
46
+ These models were solely pre-trained on patient data from [MIMIC-IV](https://mimic.mit.edu/). This population is not representative of all patients and therefore the statistical patterns that these models learned will not apply equally well to all individuals.
47
+
48
+ ### Recommendations
49
+
50
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
51
+ Caution should be used when applying these models to downstream prediction tasks. Be sure to include a fairness assessment in your evaluations in order to assess model bias.
52
+
53
+ ## How to Get Started with the Model
54
+
55
+ See the Get Started instructions in the README of the associated codebase.
56
+
57
+ ## Training & Evaluation Details
58
+
59
+ See the associated publication and codebase.
60
+
61
+
62
+ ## Environmental Impact
63
+
64
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
65
+
66
+ - **Hardware Type:** A100 PCIe 40GB
67
+ - **Hours used:** 240 (for pre-training, not counting fine-tuning evaluations)
68
+ - **Cloud Provider:** Private infrastructure
69
+ - **Compute Region:** N/A
70
+ - **Carbon Emitted:** 50 kg CO2 eq.
71
+
72
+ Carbon emissions were estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
73
+
74
+ ## Citation
75
+
76
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
77
+ If you use Labrador in your work, please cite:
78
+
79
+ **BibTeX:**
80
+
81
+
82
+ **APA:**
83
+
84
+
85
+
86
+
87
+ ## Model Card Contact
88
+
89
+ This is an anonymous model card for a conference submission.
90
+
91
+
bert194M/config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertForMaskedLM"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "hidden_act": "relu",
8
+ "hidden_dropout_prob": 0.1,
9
+ "hidden_size": 1024,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 1024,
12
+ "layer_norm_eps": 1e-12,
13
+ "max_position_embeddings": 90,
14
+ "model_type": "bert",
15
+ "num_attention_heads": 4,
16
+ "num_hidden_layers": 10,
17
+ "pad_token_id": 0,
18
+ "position_embedding_type": "absolute",
19
+ "transformers_version": "4.24.0",
20
+ "type_vocab_size": 2,
21
+ "use_cache": true,
22
+ "vocab_size": 4251
23
+ }
bert194M/tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:14d89ec2d0f9c150e99c0daefc9671a236c0e251082948a129bc2f70f627d303
3
+ size 795814180
bert68M/config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertForMaskedLM"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "hidden_act": "relu",
8
+ "hidden_dropout_prob": 0.1,
9
+ "hidden_size": 1024,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 1024,
12
+ "layer_norm_eps": 1e-12,
13
+ "max_position_embeddings": 90,
14
+ "model_type": "bert",
15
+ "num_attention_heads": 4,
16
+ "num_hidden_layers": 10,
17
+ "pad_token_id": 0,
18
+ "position_embedding_type": "absolute",
19
+ "transformers_version": "4.24.0",
20
+ "type_vocab_size": 2,
21
+ "use_cache": true,
22
+ "vocab_size": 4251
23
+ }
bert68M/tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e53c55590b3feca0fa84ec2b32983202de65316df8438c37247e22491d8fc8b5
3
+ size 292129060
labrador/config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "mask_token": 530,
3
+ "null_token": 531,
4
+ "pad_token": 0,
5
+ "vocab_size": 529,
6
+ "embedding_dim": 1024,
7
+ "transformer_activation": "relu",
8
+ "transformer_heads": 4,
9
+ "transformer_blocks": 10,
10
+ "transformer_feedforward_dim": 1024,
11
+ "continuous_head_activation": "sigmoid",
12
+ "include_head": "True",
13
+ "dropout_rate": 0.1
14
+ }
labrador/keras_metadata.pb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ddb7a849a928d9380dda489a6aa8863b9977ab9ae11f917622e6bfa57f23c8d6
3
+ size 180274
labrador/saved_model.pb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c08af327cf014e63b6c957b7255cf524feb8f1aa31f358c41075c2c1f5fbaa11
3
+ size 3909052
labrador/variables/variables.data-00000-of-00001 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f182f333f502add20487b071fee8b5f7fe817a922804e511cac8e58bde1cc42d
3
+ size 786704288
labrador/variables/variables.index ADDED
Binary file (10.7 kB). View file