Logical Fallacy Detection
Paper • 2202.13758 • Published
13-way classifier fine-tuned on the LOGIC dataset from Jin et al. 2022, Logical Fallacy Detection (arXiv:2202.13758).
Base model: google/electra-base-discriminator.
ad hominem, ad populum, appeal to emotion, circular reasoning, equivocation,
fallacy of credibility, fallacy of extension, fallacy of logic,
fallacy of relevance, false causality, false dilemma, faulty generalization,
intentional
| metric | value |
|---|---|
| accuracy | 0.643 |
| macro-F1 | 0.552 |
| weighted-F1 | 0.625 |
Comparable to the paper's plain-ELECTRA baseline (~0.533 F1 in Table 3).
| metric | value |
|---|---|
| accuracy | 0.210 |
| macro-F1 | 0.183 |
Sharp drop on out-of-domain transfer, in line with the paper's Table 4 findings (their best model drops from 0.588 to 0.272 F1).
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
repo = "heavyhelium/electra-base-logic-fallacy"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForSequenceClassification.from_pretrained(repo).eval()
text = "Everyone I know drives a Toyota, so Toyotas must be the best cars."
enc = tok(text, return_tensors="pt", truncation=True, max_length=128)
with torch.no_grad():
pred_id = model(**enc).logits.argmax(-1).item()
print(model.config.id2label[pred_id]) # -> ad populum
equivocation, ~2% of training data) are under-predicted; equivocation test F1 is 0.00 in both in-domain and transfer settings.@inproceedings{jin-etal-2022-logical,
title = "Logical Fallacy Detection",
author = "Jin, Zhijing and Lalwani, Abhinav and Vaidhya, Tejas and Shen, Xiaoyu and Ding, Yiwen and Lyu, Zhiheng and Sachan, Mrinmaya and Mihalcea, Rada and Sch{\"o}lkopf, Bernhard",
booktitle = "Findings of EMNLP 2022",
year = "2022",
url = "https://arxiv.org/abs/2202.13758",
}
Base model
google/electra-base-discriminator