diff --git a/.gitignore b/.gitignore index 0f16435..ca81c7c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ # TEMP -literature/ backup.tar.gz \ No newline at end of file diff --git a/README.md b/README.md index 1e3bffb..51d27b5 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,54 @@ # AI models for identifying trigger events in disinformation analysis -Final Dissertation Submission Repository ## Abstract --- todo -- +Disinformation on the internet has become a significant and growing challenge, driven by the sheer volume and speed of content generation across digital platforms. + +While prior work has thoroughly investigated tasks such as automatic disinformation detection, especially using large language models, comparatively little attention has been paid to applying these techniques to generative analyses of claims. In particular, the retrieval of structured contextual background information that explains why disinformation spreads remains underexplored. + +This paper introduces a dataset of trigger events, defined as actions or statements that influence the creation, spread or believability of disinformation claims. +The dataset is created using large language models as few-shot retrievers and subsequently validated through an ensemble classifier to ensure consistency. + +We find that we can successfully retrieve a large dataset of trigger events with high accuracy, and that the dataset proves useful in applications that can be useful in the real-world scenarios of debunking and prebunking. + + +[Project Writeup](/literature/WillJeynes-Dissertation.pdf) [Project Presentation](https://jillweynes.github.io/LLMsForDisinformationPrediction-GraphVizBuilt/presentation) -## Generated Database Link and Usage Experiments -Generated Dataset Link: [https://huggingface.co/datasets/WillJeynes/LLMsForDisinformationAnalysis-Dataset](https://huggingface.co/datasets/WillJeynes/LLMsForDisinformationAnalysis-Dataset) +## Repository Information -Graph-Based Dataset Visualisation: [https://jillweynes.github.io/LLMsForDisinformationPrediction-GraphVizBuilt/](https://jillweynes.github.io/LLMsForDisinformationPrediction-GraphVizBuilt/) +This repository contains the code for main dataset generation, as a [langchain](https://www.langchain.com/) project. -Usage Experiments (incl graph visualisation) Source Code: [https://github.com/WillJeynes/LLMsForDisinformationPrediction](https://github.com/WillJeynes/LLMsForDisinformationPrediction) +![diagram](literature/design.png) + +In **green** is claim normalisation based on [this paper](https://arxiv.org/abs/2508.17402) + +In **red** is the main AI processing, based on a simple tool invocation setup + +![tool invocation](literature/prompting.png) + +Finally, in **yellow** is an ensemble model to quantify the usefullness of the AI generated responses, compared against a human-labelled dataset + +## Generated Dataset Link + +A dataset of this pipeline ran against 2000 input claims from [StopFake](https://www.stopfake.org/en/main/) and [ScienceFeedback](https://science.feedback.org/) is available on [HuggingFace](https://huggingface.co/datasets/WillJeynes/LLMsForDisinformationAnalysis-Dataset) + + +## More information +A Graph-Based Dataset Visualisation tool is available [online](https://jillweynes.github.io/LLMsForDisinformationPrediction-GraphVizBuilt/), to show the potential usability of the content. + +This and other usage experiments can be seen on the [sister repository](https://git.host.jeynes.uk/jill/LLMsForDisinformationPrediction) # This repository: -## Solution Diagram --- todo -- ## Classifier Refinement -[See RAGAS_Service](/supporting/RAGAS_Service/) +To see more detail about the ensembkle classifier, see [this folder](/supporting/RAGAS_Service/) ## Agent Refinement -[See agent](/agent/) +To see more detail about experiments to improve the output quality, see [this folder](/agent/) ## Repository Structure @@ -40,8 +64,6 @@ Usage Experiments (incl graph visualisation) Source Code: [https://github.com/Wi | ├── input.jsonl # Response in cleaned format to give as context to agent | ├── ranked.jsonl # Cleaned trigger event response from scorer frontend | └── results.jsonl # Output from wrapper script, read and modified by scorer -├── literature/ -| └── report.pdf # Final submission report ├── agent/ # Code for main project pipeline | ├── agent.ts # Graph definition file | ├── conditionals/ # Conditional translations diff --git a/literature/WillJeynes-Dissertation.pdf b/literature/WillJeynes-Dissertation.pdf new file mode 100644 index 0000000..b2c935d Binary files /dev/null and b/literature/WillJeynes-Dissertation.pdf differ diff --git a/literature/classifierFLAN.png b/literature/classifierFLAN.png new file mode 100644 index 0000000..7736a48 Binary files /dev/null and b/literature/classifierFLAN.png differ diff --git a/literature/classifierNN.png b/literature/classifierNN.png new file mode 100644 index 0000000..7877834 Binary files /dev/null and b/literature/classifierNN.png differ diff --git a/literature/classifierOverall.png b/literature/classifierOverall.png new file mode 100644 index 0000000..11a6b03 Binary files /dev/null and b/literature/classifierOverall.png differ diff --git a/literature/classifierROBERTA.png b/literature/classifierROBERTA.png new file mode 100644 index 0000000..7399c62 Binary files /dev/null and b/literature/classifierROBERTA.png differ diff --git a/literature/design.png b/literature/design.png new file mode 100644 index 0000000..9820dc7 Binary files /dev/null and b/literature/design.png differ diff --git a/literature/prompting.png b/literature/prompting.png new file mode 100644 index 0000000..8a4d138 Binary files /dev/null and b/literature/prompting.png differ diff --git a/supporting/RAGAS_Service/README.md b/supporting/RAGAS_Service/README.md index 05440b7..b5d6bf4 100644 --- a/supporting/RAGAS_Service/README.md +++ b/supporting/RAGAS_Service/README.md @@ -2,14 +2,32 @@ Made using a dataset of 1000 labeled claims from MVP pipeline. -Roberta model trained on an augmented dataset with LLM generated adversarial examples for low frequency labels. +# Roberta model -Flan model trained using raw labelled claims, inherrent natural language ability allows for pattern recognition without the need for fake data. +Trained on an augmented dataset with LLM generated adversarial examples for low frequency labels. -Regression model trained using the roberta dataset. +![ROBERTA Diagram](/literature/classifierROBERTA.png) +# Flan model + +Trained using raw labelled claims, inherrent natural language ability allows for pattern recognition without the need for fake data. + +![FLAN Diagram](/literature/classifierFLAN.png) + +# NN Model + +Regression model trained like roberta. + +![NN Diagram](/literature/classifierNN.png) + + +# Ensemble Used ensemble model in the final version, with the component models available on Hugging Face. + +![Ensemble Diagram](/literature/classifierOverall.png) + + | Model | % Correct | % Valid taken forward|Used in ensemble|Link |------------------------------------------------------------|-----------|----------------------|----------------|- | Original | 53.22 | 61.72 |