Sheshera Mysore commited on
Commit
99e37dc
·
1 Parent(s): 7e9ce39

Update to markdown.

Browse files
Files changed (1) hide show
  1. README.md +17 -8
README.md CHANGED
@@ -18,19 +18,28 @@ Model included in a paper for modeling fine grained similarity between documents
18
 
19
  ## Model Card
20
 
21
- **Model description:** This model is a BERT bi-encoder model trained for similarity of title-abstract pairs in biomedical scientific papers. The model is **initialized with the SciBert model**. This model inputs the title and abstract of a paper and represents it with a single vector obtained by a scalar mix of the CLS token at every layer of the SciBert encoder. These scalar mix parameters can be important for performance in some datasets. Importantly, these scalar mix weights are not included as part of this HF model, if you wish to use these parameters please download the full model at: [`aspire-biencoder-biomed-scib-full.zip`](https://drive.google.com/file/d/1X6S5qwaKUlI3N3RDQSG-tJCzMBWAnqxP/view?usp=sharing).
22
 
23
- **Training data:** The model is trained on pairs of co-cited papers in a contrastive learning setup. The model is trained on 1.2 million biomedical paper pairs. In training the model negative examples for the contrastive loss are obtained as random in-batch negatives. Co-citations are obtained from the full text of papers, for example - the papers in brackets below are all co-cited and each pairs title and abstracts would be used as a training pair:
 
 
 
 
24
 
25
  > The idea of distant supervision has been proposed and used widely in Relation Extraction (Mintz et al., 2009; Riedel et al., 2010; Hoffmann et al., 2011; Surdeanu et al., 2012) , where the source of labels is an external knowledge base.
26
 
27
 
28
- **Training procedure:** The model was trained with the Adam Optimizer and a learning rate of 2e-5 with 1000 warm-up steps followed by linear decay of the learning rate. The model training convergence is checked with the loss on a held out dev set consisting of co-cited paper pairs.
 
 
 
 
29
 
30
- **Intended uses & limitations:** This model is trained for document similarity tasks in biomedical scientific text using a single vector per document. Here, the documents are the title and abstract of a paper. With appropriate fine-tuning the model can also be used for other tasks such as classification. Since the training data comes primarily from biomedicine, performance on other domains may be poorer.
31
 
 
32
 
33
- **How to use:** This model can be used via the `transformers` library:
34
 
35
  ```
36
  from transformers import AutoModel, AutoTokenizer
@@ -44,16 +53,16 @@ result = aspire_bienc(**inputs)
44
  clsrep = result.last_hidden_state[:,0,:]
45
  ```
46
 
47
- If you choose to use `aspire-biencoder-biomed-scib-full`, download the [`aspire-biencoder-biomed-scib-full.zip`](https://drive.google.com/file/d/1X6S5qwaKUlI3N3RDQSG-tJCzMBWAnqxP/view?usp=sharing), and use it per this example usage script: [`aspire/examples/ex_aspire_bienc.py`](https://github.com/allenai/aspire/blob/main/examples/ex_aspire_bienc.py)
48
 
49
  **Variable and metrics:**
50
  This model is evaluated on information retrieval datasets with document level queries. Here we report performance on RELISH, and TRECCOVID. These are detailed on [github](https://github.com/allenai/aspire) and in our [paper](https://arxiv.org/abs/2111.08366). These datasets represent a abstract level retrieval task, where given a query scientific abstract the task requires the retrieval of relevant candidate abstracts.
51
 
52
  We rank documents by the L2 distance between the query and candidate documents.
53
 
54
- **Evaluation results:**
55
 
56
- The released model `aspire-biencoder-biomed-scib` (and `aspire-biencoder-biomed-scib-full`) is compared against 1) `allenai/specter`. The released models `aspire-biencoder-biomed-scib` and `aspire-biencoder-biomed-scib-full` are the single best run among the 3 re-runs. <sup>*</sup> Refers to the performance reported in our paper by averaging over 3 re-runs of the model.
57
 
58
  | | TRECCOVID | TRECCOVID | RELISH | RELISH |
59
  |-------------------------------------------:|:---------:|:-------:|:------:|:-------:|
 
18
 
19
  ## Model Card
20
 
21
+ ### Model description
22
 
23
+ This model is a BERT bi-encoder model trained for similarity of title-abstract pairs in biomedical scientific papers. The model is **initialized with the SciBert model**. This model inputs the title and abstract of a paper and represents it with a single vector obtained by a scalar mix of the CLS token at every layer of the SciBert encoder. These scalar mix parameters can be important for performance in some datasets. Importantly, these scalar mix weights are not included as part of this HF model, if you wish to use these parameters please download the full model at: [`aspire-biencoder-biomed-scib-full.zip`](https://drive.google.com/file/d/1X6S5qwaKUlI3N3RDQSG-tJCzMBWAnqxP/view?usp=sharing).
24
+
25
+ ### Training data
26
+
27
+ The model is trained on pairs of co-cited papers in a contrastive learning setup. The model is trained on 1.2 million biomedical paper pairs. In training the model negative examples for the contrastive loss are obtained as random in-batch negatives. Co-citations are obtained from the full text of papers, for example - the papers in brackets below are all co-cited and each pairs title and abstracts would be used as a training pair:
28
 
29
  > The idea of distant supervision has been proposed and used widely in Relation Extraction (Mintz et al., 2009; Riedel et al., 2010; Hoffmann et al., 2011; Surdeanu et al., 2012) , where the source of labels is an external knowledge base.
30
 
31
 
32
+ ### Training procedure
33
+
34
+ The model was trained with the Adam Optimizer and a learning rate of 2e-5 with 1000 warm-up steps followed by linear decay of the learning rate. The model training convergence is checked with the loss on a held out dev set consisting of co-cited paper pairs.
35
+
36
+ ### Intended uses & limitations
37
 
38
+ This model is trained for document similarity tasks in biomedical scientific text using a single vector per document. Here, the documents are the title and abstract of a paper. With appropriate fine-tuning the model can also be used for other tasks such as classification. Since the training data comes primarily from biomedicine, performance on other domains may be poorer.
39
 
40
+ ### How to use
41
 
42
+ **`aspire-biencoder-biomed-scib`** model can be used via the `transformers` library:
43
 
44
  ```
45
  from transformers import AutoModel, AutoTokenizer
 
53
  clsrep = result.last_hidden_state[:,0,:]
54
  ```
55
 
56
+ **`aspire-biencoder-biomed-scib-full`**, can be used as follows: 1) Download the [`aspire-biencoder-biomed-scib-full.zip`](https://drive.google.com/file/d/1X6S5qwaKUlI3N3RDQSG-tJCzMBWAnqxP/view?usp=sharing), and 2) Use it per this example usage script: [`aspire/examples/ex_aspire_bienc.py`](https://github.com/allenai/aspire/blob/main/examples/ex_aspire_bienc.py)
57
 
58
  **Variable and metrics:**
59
  This model is evaluated on information retrieval datasets with document level queries. Here we report performance on RELISH, and TRECCOVID. These are detailed on [github](https://github.com/allenai/aspire) and in our [paper](https://arxiv.org/abs/2111.08366). These datasets represent a abstract level retrieval task, where given a query scientific abstract the task requires the retrieval of relevant candidate abstracts.
60
 
61
  We rank documents by the L2 distance between the query and candidate documents.
62
 
63
+ ### Evaluation results
64
 
65
+ The released model `aspire-biencoder-biomed-scib` (and `aspire-biencoder-biomed-scib-full`) is compared against `allenai/specter`. `aspire-biencoder-biomed-scib`<sup>*</sup> is the performance reported in our paper by averaging over 3 re-runs of the model. The released models `aspire-biencoder-biomed-scib` and `aspire-biencoder-biomed-scib-full` are the single best run among the 3 re-runs.
66
 
67
  | | TRECCOVID | TRECCOVID | RELISH | RELISH |
68
  |-------------------------------------------:|:---------:|:-------:|:------:|:-------:|