Views
No views yet
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 |
| metric | value |
|---|---|
| accuracy | 0.210 |
| macro-F1 | 0.183 |
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3
4repo = "heavyhelium/electra-base-logic-fallacy"
5tok = AutoTokenizer.from_pretrained(repo)
6model = AutoModelForSequenceClassification.from_pretrained(repo).eval()
7
8text = "Everyone I know drives a Toyota, so Toyotas must be the best cars."
9enc = tok(text, return_tensors="pt", truncation=True, max_length=128)
10with torch.no_grad():
11 pred_id = model(**enc).logits.argmax(-1).item()
12print(model.config.id2label[pred_id]) # -> ad populumequivocation, ~2% of training data) are under-predicted; equivocation test F1 is 0.00 in both in-domain and transfer settings.1@inproceedings{jin-etal-2022-logical,
2 title = "Logical Fallacy Detection",
3 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",
4 booktitle = "Findings of EMNLP 2022",
5 year = "2022",
6 url = "https://arxiv.org/abs/2202.13758",
7}