Update README.md
Browse files
README.md
CHANGED
@@ -10,7 +10,6 @@ license: mit
|
|
10 |
metrics:
|
11 |
- sacrebleu
|
12 |
- BERT_score
|
13 |
-
|
14 |
inference:
|
15 |
parameters:
|
16 |
top_p: 0.9
|
@@ -23,11 +22,125 @@ widget:
|
|
23 |
- text: "summarize, simplify, and contextualize: Children in industrialized cultures typically succeed on Give-N, a test of counting ability, by age 4. On the other hand, counting appears to be learned much later in the Tsimane’, an indigenous group in the Bolivian Amazon. This study tests three hypotheses for what may cause this difference in timing: (a) Tsimane’ children may be shy in providing behavioral responses to number tasks, (b) Tsimane’ children may not memorize the verbal list of number words early in acquisition, and/or (c) home environments may not support mathematical learning in the same way as in US samples, leading Tsimane’ children to primarily acquire mathematics through formalized schooling. Our results suggest that most of our subjects are not inhibited by shyness in responding to experimental tasks. We also find that Tsimane’ children (N = 100, ages 4-11) learn the verbal list later than US children, but even upon acquiring this list, still take time to pass Give-N tasks. We find that performance in counting varies across tasks and is related to formal schooling. These results highlight the importance of formal education, including instruction in the count list, in learning the meanings of the number words."
|
24 |
---
|
25 |
|
26 |
-
# Scientific Abstract Simplification
|
27 |
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
-
The training schedule, used corpora, and configurations are to come.
|
32 |
|
33 |
-
Scientific Abstract Simplification-baseline model is brought to you by the LEADING TL;DR Team.
|
|
|
10 |
metrics:
|
11 |
- sacrebleu
|
12 |
- BERT_score
|
|
|
13 |
inference:
|
14 |
parameters:
|
15 |
top_p: 0.9
|
|
|
22 |
- text: "summarize, simplify, and contextualize: Children in industrialized cultures typically succeed on Give-N, a test of counting ability, by age 4. On the other hand, counting appears to be learned much later in the Tsimane’, an indigenous group in the Bolivian Amazon. This study tests three hypotheses for what may cause this difference in timing: (a) Tsimane’ children may be shy in providing behavioral responses to number tasks, (b) Tsimane’ children may not memorize the verbal list of number words early in acquisition, and/or (c) home environments may not support mathematical learning in the same way as in US samples, leading Tsimane’ children to primarily acquire mathematics through formalized schooling. Our results suggest that most of our subjects are not inhibited by shyness in responding to experimental tasks. We also find that Tsimane’ children (N = 100, ages 4-11) learn the verbal list later than US children, but even upon acquiring this list, still take time to pass Give-N tasks. We find that performance in counting varies across tasks and is related to formal schooling. These results highlight the importance of formal education, including instruction in the count list, in learning the meanings of the number words."
|
23 |
---
|
24 |
|
|
|
25 |
|
26 |
+
# TL;DR
|
27 |
+
|
28 |
+
Scientific Abstract Simplification-baseline *translates* hard-to-read scientific abstracts😵 into more accessible language😇. We hope it can make scientific knowledge accessible for everyone.
|
29 |
+
|
30 |
+
Try it now with Hosted inference API on the right.
|
31 |
+
You can choose an existing example or paste in any (perhaps full-of-jargon) abstract, but don't forget to include the instruction before the abstract ("summarize, simplify, and contextualize: "; notice, there is a whitespace after the colon). Local use refers to Section [Usage](#Usage).
|
32 |
+
|
33 |
+
|
34 |
+
# Model Details
|
35 |
+
|
36 |
+
## Model Description
|
37 |
+
|
38 |
+
|
39 |
+
Open science has significantly lowered the barriers to scientific papers.
|
40 |
+
However, reachable does not mean accessible. Scientific papers are usually flooded with jargon and hard to read. A lay audience would rather trust little stories on social media than read scientific papers. They are not to blame, we human like stories.
|
41 |
+
So why do not we "translate" arcane scientific abstracts into accessible, simpler, and relevant scientific stories?
|
42 |
+
Some renowned journals have already taken accessibility into consideration. For example, PNAS asks authors to submit Significance Statements targeting "an undergraduate-educated scientist." Science also includes an editor abstract for a quick dive on the following research.
|
43 |
+
We propose to rewrite scientific abstracts into understandable scientific stories using AI.
|
44 |
+
To this end, we introduce a new corpus comprising abstract and significance-statement pairs.
|
45 |
+
We finetune an encoder-decoder Transformer model (a variant of Flan-T5) with the corpus.
|
46 |
+
Our baseline model (SAS-baseline) shows promising capacity in simplifying and summarizing scientific abstracts.
|
47 |
+
We hope our work can let people better enjoy the fruits of open science.
|
48 |
+
As an ongoing effort, we are still working on boosting the model's performance of re-contextualization and avoiding certain jargon tokens during inference (which lowers readability).
|
49 |
+
|
50 |
+
<!-- We hypothesize the last mile of scientific understanding is cognitive. -->
|
51 |
+
|
52 |
+
- **Developed by:** [LEADING](https://cci.drexel.edu/mrc/leading/) Montana State University Library ("TL;DR it": Automating Article Synopses for Search Engine Optimization and Citizen Science): Mentors: Jason Clark and Hannah McKelvey; Fellows: Haining Wang and Deanna Zarrillo.
|
53 |
+
- **Language:** English
|
54 |
+
- **License:** MIT
|
55 |
+
- **Parent Model:** [FLAN-T5-large](https://huggingface.co/google/flan-t5-large)
|
56 |
+
|
57 |
+
|
58 |
+
|
59 |
+
# Usage
|
60 |
+
|
61 |
+
Use the code below to get started with the model.
|
62 |
+
|
63 |
+
```{python3}
|
64 |
+
# assume pytorch and huggingface are ready to use
|
65 |
+
|
66 |
+
import torch
|
67 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
68 |
+
INSTRUCTION = "summarize, simplify, and contextualize: "
|
69 |
+
|
70 |
+
tokenizer = AutoTokenizer.from_pretrained("haining/sas_baseline")
|
71 |
+
|
72 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("haining/sas_baseline")
|
73 |
+
|
74 |
+
input_text = "The COVID-19 pandemic presented enormous data challenges in the United States. Policy makers, epidemiological modelers, and health researchers all require up-to-date data on the pandemic and relevant public behavior, ideally at fine spatial and temporal resolution. The COVIDcast API is our attempt to fill this need: Operational since April 2020, it provides open access to both traditional public health surveillance signals (cases, deaths, and hospitalizations) and many auxiliary indicators of COVID-19 activity, such as signals extracted from deidentified medical claims data, massive online surveys, cell phone mobility data, and internet search trends. These are available at a fine geographic resolution (mostly at the county level) and are updated daily. The COVIDcast API also tracks all revisions to historical data, allowing modelers to account for the frequent revisions and backfill that are common for many public health data sources. All of the data are available in a common format through the API and accompanying R and Python software packages. This paper describes the data sources and signals, and provides examples demonstrating that the auxiliary signals in the COVIDcast API present information relevant to tracking COVID activity, augmenting traditional public health reporting and empowering research and decision-making."
|
75 |
+
|
76 |
+
encoding = tokenizer(
|
77 |
+
INSTRUCTION + input_text, max_length=672, padding='max_length', truncation=True, return_tensors='pt')
|
78 |
+
decoded_ids = model.generate(input_ids=encoding['input_ids'], attention_mask=encoding['attention_mask'], max_new_tokens=512, top_p=.9, do_sample=True)
|
79 |
+
|
80 |
+
print(tokenizer.decode(decoded_ids[0], skip_special_tokens=True))
|
81 |
+
```
|
82 |
+
|
83 |
+
|
84 |
+
# Training
|
85 |
+
|
86 |
+
## Data
|
87 |
+
|
88 |
+
For SAS-baseline, we only finetune Flan-T5 model with the Scientific Abstract-Significance (SAS) corpus.
|
89 |
+
|
90 |
+
| Scientific Abstract-Significance | # Training/Dev/Test Samples | # Training Tokens | # Validation Tokens | # Test Tokens | Automated Readability Index (std.) |
|
91 |
+
|----------------------------------|-----------------------------|-------------------|---------------------|---------------|------------------------------------|
|
92 |
+
| Abstract | 3030/200/200 | 707071 | 45697 | 46985 | 18.68 (2.85) |
|
93 |
+
| Significance | 3030/200/200 | 375433 | 24901 | 24426 | 17.89 (3.05) |
|
94 |
+
|
95 |
+
|
96 |
+
|
97 |
+
## Setup
|
98 |
+
|
99 |
+
We finetuned the base model with a standard language modeling objective: the abstracts are sources and the significance statements are targets. We inform the model with a task-spcific prefix ("summarize, simplify, and contextualize: ") during training. The training took roughly 9 hours on two Nvidia A5000 (24GB memory each) GPUs. We saved the checkpoint with the lowest validation loss for inference. We used the AdamW optimizer and a learning rate of 3e-5 with fully sharded data parallel strategy. The model (\~780M parameter) was trained on Nov. 20, 2022.
|
100 |
+
Notice, the readability of the signifiance statements is generally lower than the abstracts', but not by a large margin. Our incoming SAS-full model will leverage more corpora for scientific (re)contexutualization, summarization, and simplification.
|
101 |
+
|
102 |
+
|
103 |
+
# Evaluation
|
104 |
+
|
105 |
+
The model is evaluated on the SAS test set using the following metrics.
|
106 |
+
|
107 |
+
## Metrics
|
108 |
+
- sacreBLEU: [SacreBLEU](https://huggingface.co/spaces/evaluate-metric/sacrebleu) provides hassle-free computation of shareable, comparable, and reproducible BLEU scores. Inspired by Rico Sennrich’s multi-bleu-detok.perl, it produces the official WMT scores but works with plain text. It also knows all the standard test sets and handles downloading, processing, and tokenization for you.
|
109 |
+
- BERT Score: [BERTScore](https://huggingface.co/spaces/evaluate-metric/bertscore) leverages the pre-trained contextual embeddings from BERT and matches words in candidate and reference sentences by cosine similarity. It has been shown to correlate with human judgment on sentence-level and system-level evaluation. Moreover, BERTScore computes precision, recall, and F1 measure, which can be useful for evaluating different language generation tasks.
|
110 |
+
- ROUGLE-1/2/L: [ROUGE](https://huggingface.co/spaces/evaluate-metric/rouge), or Recall-Oriented Understudy for Gisting Evaluation, is a set of metrics and a software package used for evaluating automatic summarization and machine translation software in natural language processing. The metrics compare an automatically produced summary or translation against a reference or a set of references (human-produced) summary or translation.
|
111 |
+
- METEOR: [METEOR](https://huggingface.co/spaces/evaluate-metric/meteor), an automatic metric for machine translation evaluation that is based on a generalized concept of unigram matching between the machine-produced translation and human-produced reference translations. Unigrams can be matched based on their surface forms, stemmed forms, and meanings; furthermore, METEOR can be easily extended to include more advanced matching strategies. Once all generalized unigram matches between the two strings have been found, METEOR computes a score for this matching using a combination of unigram-precision, unigram-recall, and a measure of fragmentation that is designed to directly capture how well-ordered the matched words in the machine translation are in relation to the reference.
|
112 |
+
- SARI: [SARI](https://huggingface.co/spaces/evaluate-metric/sari) is a metric used for evaluating automatic text simplification systems. The metric compares the predicted simplified sentences against the reference and the source sentences. It explicitly measures the goodness of words that are added, deleted and kept by the system. Sari = (F1_add + F1_keep + P_del) / 3 where F1_add: n-gram F1 score for add operation F1_keep: n-gram F1 score for keep operation P_del: n-gram precision score for delete operation n = 4, as in the original paper.
|
113 |
+
- Automated Readability Index (ARI): [The Automated Readability Index (ARI)](https://www.readabilityformulas.com/automated-readability-index.php) is a readability test designed to assess the understandability of a text. Like other popular readability formulas, the ARI formula outputs a number which approximates the grade level needed to comprehend the text. For example, if the ARI outputs the number 10, this equates to a high school student, ages 15-16 years old; a number 3 means students in 3rd grade (ages 8-9 yrs. old) should be able to comprehend the text.
|
114 |
+
|
115 |
+
|
116 |
+
Implementations of sacreBLEU, BERT Score, ROUGLE, METEOR, and SARI are from Huggingface [`evaluate`](https://pypi.org/project/evaluate/) v.0.3.0. ARI is from `py-readability-metrics` v.1.4.5.
|
117 |
+
|
118 |
+
|
119 |
+
## Results
|
120 |
+
|
121 |
+
More information needed
|
122 |
+
|
123 |
+
<!-- # Model Examination -->
|
124 |
+
|
125 |
+
<!-- More information needed -->
|
126 |
+
|
127 |
+
|
128 |
+
|
129 |
+
# Contact
|
130 |
+
The project is under active maintenance. Please [contact us](mailto:hw56@indiana.edu) for any questions or suggestions.
|
131 |
+
|
132 |
+
|
133 |
+
# Disclaimer
|
134 |
+
|
135 |
+
The model (SAS-baseline) is created for and focused on making scientific abstracts more accessible. It should not be used or trusted outside of its scope. There is **NO** guarantee that the generated text is perfectly aligned with the research. Resort to human experts or original papers when a decision is critical.
|
136 |
+
|
137 |
+
|
138 |
+
# Acknowledgement
|
139 |
+
This research is supported by the Institute of Museum and Library Services (IMLS) RE-246450-OLS-20.
|
140 |
+
|
141 |
+
|
142 |
+
|
143 |
+
|
144 |
+
|
145 |
|
|
|
146 |
|
|