K2MnO4/cognition-corrector

0

stars

106

commits

Python

primary language

Nov 24, 2024

updated

README

cognition-corrector

The Overview of Cognition-Corrector of  Medical GQA System

Introduction

This is a congnition corrector for mitigating the hallucination in medical field. The method gradually enhances the factuality, consistency of generated answers through knowledge acquisition and consistency feedback.

Structure

  • Core: baseline and cognition-corrector codes.

  • Data Process:

    • convert the original dataset into specific format.
    • responses generated by baseline and corrector.
  • Evaluate: evaluation metrics tools.

  • templates: prompt templates.

  • visualize: result visualization.

Environment Setting

conda create -n nlpEnv python=3.9.20
conda activate nlpEnv
pip install -r requirements.txt

Results

We run our baselines and correctors to generate candidate answers on one GPU: Nvidia GeForce RTX 3090. Besides, we also used the same device to evaluate our results.

1. PubMedQA

ModelF1ROUGE-LNLI-SampNLI-Sent
Gpt2-Large-Medical0.1400.1380.0200.120
Gpt2-Large-Medical_C0.1130.1180.1840.244
Alpaca-LoRA0.2230.1710.2000.237
Alpaca-LoRA_C0.2360.2040.4600.574
MedAlpaca-LoRA0.1960.1650.2580.179
MedAlpaca-LoRA_C0.2180.1830.5250.521

2. MediQA2019

ModelF1ROUGE-LNLI-SampNLI-Sent
Gpt2-Large-Medical0.1650.1410.4270.267
Gpt2-Large-Medical_C0.1380.1210.4900.290
Alpaca-LoRA0.1190.1180.6730.584
Alpaca-LoRA_C0.1580.1500.7400.605
MedAlpaca-LoRA0.1140.1060.6730.587
MedAlpaca-LoRA_C0.1160.1080.5800.416

3. MeshQA

ModelF1ROUGE-LNLI-SampNLI-Sent
Gpt2-Large-Medical0.1510.1460.3600.271
Gpt2-Large-Medical_C0.1440.1390.5630.339
Alpaca-LoRA0.2110.1840.7800.655
Alpaca-LoRA_C0.2140.1870.7800.712
MedAlpaca-LoRA0.1850.1620.7100.653
MedAlpaca-LoRA_C0.1620.1450.7300.693

4. LiveQAMed2017

ModelF1ROUGE-LNLI-SampNLI-Sent
Gpt2-Large-Medical0.1800.1510.3270.219
Gpt2-Large-Medical_C0.1530.1410.4750.232
Alpaca-LoRA0.1370.1380.4040.346
Alpaca-LoRA_C0.1900.1680.5770.422
MedAlpaca-LoRA0.1340.1330.3900.335
MedAlpaca-LoRA_C0.1300.1300.4500.384

Contributors

15989488337

61 commits

K2MnO4

43 commits

lzh-um

2 commits

K2MnO4/cognition-corrector

0

stars

106

commits

Python

primary language

Nov 24, 2024

updated

README

cognition-corrector

The Overview of Cognition-Corrector of  Medical GQA System

Introduction

This is a congnition corrector for mitigating the hallucination in medical field. The method gradually enhances the factuality, consistency of generated answers through knowledge acquisition and consistency feedback.

Structure

  • Core: baseline and cognition-corrector codes.

  • Data Process:

    • convert the original dataset into specific format.
    • responses generated by baseline and corrector.
  • Evaluate: evaluation metrics tools.

  • templates: prompt templates.

  • visualize: result visualization.

Environment Setting

conda create -n nlpEnv python=3.9.20
conda activate nlpEnv
pip install -r requirements.txt

Results

We run our baselines and correctors to generate candidate answers on one GPU: Nvidia GeForce RTX 3090. Besides, we also used the same device to evaluate our results.

1. PubMedQA

ModelF1ROUGE-LNLI-SampNLI-Sent
Gpt2-Large-Medical0.1400.1380.0200.120
Gpt2-Large-Medical_C0.1130.1180.1840.244
Alpaca-LoRA0.2230.1710.2000.237
Alpaca-LoRA_C0.2360.2040.4600.574
MedAlpaca-LoRA0.1960.1650.2580.179
MedAlpaca-LoRA_C0.2180.1830.5250.521

2. MediQA2019

ModelF1ROUGE-LNLI-SampNLI-Sent
Gpt2-Large-Medical0.1650.1410.4270.267
Gpt2-Large-Medical_C0.1380.1210.4900.290
Alpaca-LoRA0.1190.1180.6730.584
Alpaca-LoRA_C0.1580.1500.7400.605
MedAlpaca-LoRA0.1140.1060.6730.587
MedAlpaca-LoRA_C0.1160.1080.5800.416

3. MeshQA

ModelF1ROUGE-LNLI-SampNLI-Sent
Gpt2-Large-Medical0.1510.1460.3600.271
Gpt2-Large-Medical_C0.1440.1390.5630.339
Alpaca-LoRA0.2110.1840.7800.655
Alpaca-LoRA_C0.2140.1870.7800.712
MedAlpaca-LoRA0.1850.1620.7100.653
MedAlpaca-LoRA_C0.1620.1450.7300.693

4. LiveQAMed2017

ModelF1ROUGE-LNLI-SampNLI-Sent
Gpt2-Large-Medical0.1800.1510.3270.219
Gpt2-Large-Medical_C0.1530.1410.4750.232
Alpaca-LoRA0.1370.1380.4040.346
Alpaca-LoRA_C0.1900.1680.5770.422
MedAlpaca-LoRA0.1340.1330.3900.335
MedAlpaca-LoRA_C0.1300.1300.4500.384

Contributors

15989488337

61 commits

K2MnO4

43 commits

lzh-um

2 commits

Languages

Python

100.0%