Spaces:
Runtime error
Runtime error
amandakonet
commited on
Commit
β’
1ac8f2a
1
Parent(s):
dd4ffe9
update
Browse files
app.py
CHANGED
@@ -8,15 +8,20 @@ import os
|
|
8 |
st.title('Combatting Climate Change Misinformation with Transformers')
|
9 |
|
10 |
st.markdown("## The Gist")
|
11 |
-
|
12 |
-
st.markdown("**
|
13 |
-
st.markdown("**
|
|
|
14 |
st.markdown("* There are many steps to this pipeline. Here, I focus on fine-tuning a transformer model, ClimateBERT, using the textual entailment task.")
|
|
|
15 |
st.markdown("* Given a {claim, evidence} pair, determine whether the climate claim is supported or refuted (or neither) by the evidence")
|
16 |
|
|
|
|
|
|
|
17 |
|
18 |
# section 1: the context, problem; how to address
|
19 |
-
st.markdown("###
|
20 |
st.markdown("Misinformation about climate change spreads quickly and has direct impacts on public opinion and public policy surrounding the climate. Further, misinformation is difficult to combat, and people are able to \"verify\" false climate claims on biased sites. Ideally, people would be able to easily verify climate claims. This is where transformers come in.")
|
21 |
|
22 |
|
@@ -42,21 +47,25 @@ st.markdown("4. Social media platform investment in algorithmic detection of fak
|
|
42 |
st.markdown("However, many of the proposed solutions above require adoption of behaviors. This is difficult to acheive, particularly among news organizations and social media platforms which receive monetary benefits from misinformation in the form of ad revenue from cite usage and viewership.")
|
43 |
|
44 |
# section 3: how can transformers help?
|
45 |
-
st.markdown("### How can Transformers Help
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
|
|
|
50 |
|
51 |
# section 4: The process
|
52 |
# this is the pipeline in my notes (u are here highlight)
|
53 |
-
st.markdown("### The Process")
|
54 |
|
55 |
st.markdown("Imagine: A person is curious about whether a claim they heard about climate change is true. How can transformers help validate or refute the claim?")
|
56 |
|
57 |
st.markdown("1. User inputs a climate claim")
|
58 |
-
#input_gif = Image.open('images/input_box.gif')
|
59 |
-
#st.image(input_gif, width=100)
|
60 |
|
61 |
st.markdown("2. Retrieve evidence related to input claim \
|
62 |
- For each claim, collect N related documents. These documents are selected by finding the N documents with the highest similarity scores to the claim.")
|
@@ -74,13 +83,7 @@ st.markdown("My work focuses on step 3 of the process: Training a transformer mo
|
|
74 |
st.markdown("* evidence *supports* (entails) claim")
|
75 |
st.markdown("* evidence *refutes* (contradicts) claim")
|
76 |
st.markdown("* evidence *does not provide enough info to support or refute* (neutral) claim")
|
77 |
-
st.markdown("For this project, I fine-
|
78 |
-
|
79 |
-
st.markdown("**Model 1**: [DistilRoBERTa](https://huggingface.co/distilroberta-base)")
|
80 |
-
|
81 |
-
st.markdown("**Model 2**: [ClimateBERT](https://huggingface.co/climatebert/distilroberta-base-climate-f)")
|
82 |
-
|
83 |
-
st.markdown("**Model 3**: [RoBERTa Fine-tuned on NLI Task](https://huggingface.co/ynie/roberta-large-snli_mnli_fever_anli_R1_R2_R3-nli)")
|
84 |
|
85 |
|
86 |
# section 6: analysis
|
@@ -97,4 +100,6 @@ st.markdown("### Resource Links")
|
|
97 |
|
98 |
st.markdown("### References")
|
99 |
st.markdown("1. https://www.carbonbrief.org/guest-post-how-climate-change-misinformation-spreads-online")
|
100 |
-
st.markdown("2. https://www.brookings.edu/research/how-to-combat-fake-news-and-disinformation/")
|
|
|
|
|
|
8 |
st.title('Combatting Climate Change Misinformation with Transformers')
|
9 |
|
10 |
st.markdown("## The Gist")
|
11 |
+
|
12 |
+
st.markdown("**Problem**π€: Climate change misinformation spreads quickly and is difficult to combat. However, its important to do so, because climate change misinformation has direct impacts on public opinion and public policy surrounding climate change.")
|
13 |
+
st.markdown("**Solution**π‘: Develop a pipeline in which users can input climate change claims... and the pipeline returns whether the claim is refuted or supported by current climate science, along with the corresponding evidence.")
|
14 |
+
st.markdown("**Approach**π")
|
15 |
st.markdown("* There are many steps to this pipeline. Here, I focus on fine-tuning a transformer model, ClimateBERT, using the textual entailment task.")
|
16 |
+
st.markdown("* The dataset used is Climate FEVER, a natural language inference dataset with 1,579 {claim, [evidence], [label]} tuples")
|
17 |
st.markdown("* Given a {claim, evidence} pair, determine whether the climate claim is supported or refuted (or neither) by the evidence")
|
18 |
|
19 |
+
st.markdown("---")
|
20 |
+
|
21 |
+
st.markdown("## The Details")
|
22 |
|
23 |
# section 1: the context, problem; how to address
|
24 |
+
st.markdown("### Problem π€")
|
25 |
st.markdown("Misinformation about climate change spreads quickly and has direct impacts on public opinion and public policy surrounding the climate. Further, misinformation is difficult to combat, and people are able to \"verify\" false climate claims on biased sites. Ideally, people would be able to easily verify climate claims. This is where transformers come in.")
|
26 |
|
27 |
|
|
|
47 |
st.markdown("However, many of the proposed solutions above require adoption of behaviors. This is difficult to acheive, particularly among news organizations and social media platforms which receive monetary benefits from misinformation in the form of ad revenue from cite usage and viewership.")
|
48 |
|
49 |
# section 3: how can transformers help?
|
50 |
+
st.markdown("### How can Transformers Help?π‘")
|
51 |
+
|
52 |
+
st.markdown("**FEVER**")
|
53 |
+
st.markdown("* FEVER, or Fact Extraction and VERification, was introduced in 2018 as the first dataset containing {fact, evdience, entailment_label} information. They extracted altering sentences from Wikipedia and had annotators report the relationship between the setences: entailment, contradition, not enough information.")
|
54 |
+
st.markdown("* Since then, other researchers have expanded on this area in different domains")
|
55 |
+
st.markdown("* Here, we use $Climate FEVER^3$, a similar dataset developed and annotated by ")
|
56 |
|
57 |
+
st.markdown("**Fact Verification / Fact-Checking")
|
58 |
+
st.markdown("* This is simply an extenstion of the textual entailment task")
|
59 |
+
st.markdown("* Given two sentences, sent1 and sent2, determine the relationship: entail, contradict, neutral")
|
60 |
+
st.markdown("* With fact verification, we can think of the sentences as claim and evidence and labels as support, refute, or not enough information to refute or support.")
|
61 |
|
62 |
# section 4: The process
|
63 |
# this is the pipeline in my notes (u are here highlight)
|
64 |
+
st.markdown("### The Process π")
|
65 |
|
66 |
st.markdown("Imagine: A person is curious about whether a claim they heard about climate change is true. How can transformers help validate or refute the claim?")
|
67 |
|
68 |
st.markdown("1. User inputs a climate claim")
|
|
|
|
|
69 |
|
70 |
st.markdown("2. Retrieve evidence related to input claim \
|
71 |
- For each claim, collect N related documents. These documents are selected by finding the N documents with the highest similarity scores to the claim.")
|
|
|
83 |
st.markdown("* evidence *supports* (entails) claim")
|
84 |
st.markdown("* evidence *refutes* (contradicts) claim")
|
85 |
st.markdown("* evidence *does not provide enough info to support or refute* (neutral) claim")
|
86 |
+
st.markdown("For this project, I fine-tune $ClimateBERT_^4$ on the text entailment task.")
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
|
89 |
# section 6: analysis
|
|
|
100 |
|
101 |
st.markdown("### References")
|
102 |
st.markdown("1. https://www.carbonbrief.org/guest-post-how-climate-change-misinformation-spreads-online")
|
103 |
+
st.markdown("2. https://www.brookings.edu/research/how-to-combat-fake-news-and-disinformation/")
|
104 |
+
st.markdown("3. Climate FEVER [paper](https://arxiv.org/abs/2012.00614), [huggingface repo](https://huggingface.co/datasets/climate_fever), and [github](https://github.com/huggingface/datasets/tree/master/datasets/climate_fever)")
|
105 |
+
st.markdown("4. [ClimateBERT](https://climatebert.ai/), [paper](https://arxiv.org/abs/2110.12010))
|