File size: 4,923 Bytes
9e2df92 447c094 9e2df92 447c094 9e2df92 447c094 9e2df92 447c094 9e2df92 447c094 9e2df92 447c094 9e2df92 447c094 9e2df92 447c094 9e2df92 447c094 9e2df92 447c094 9e2df92 447c094 9e2df92 447c094 9e2df92 447c094 9e2df92 447c094 9e2df92 447c094 9e2df92 447c094 9e2df92 447c094 9e2df92 447c094 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
---
language: en
license: mit
tags:
- text-classification
- fallacy-detection
- logical-fallacies
- argument-analysis
- nlp
- transformers
datasets:
- custom
metrics:
- accuracy: 1.0
- f1: 1.0
model-index:
- name: FallacyFinder
results:
- task:
type: text-classification
name: Fallacy Detection
dataset:
type: custom
name: Balanced Fallacy Dataset
metrics:
- type: accuracy
value: 1.0
- type: f1
value: 1.0
widget:
- text: "You're just a stupid liberal, so your opinion doesn't matter"
example_title: "Ad Hominem Example"
- text: "So you're saying we should let all criminals run free?"
example_title: "Strawman Example"
- text: "What about when you made the same mistake last year?"
example_title: "Whataboutism Example"
- text: "I understand your perspective, but here's why I disagree based on the evidence"
example_title: "No Fallacy Example"
---
# FallacyFinder: Advanced Logical Fallacy Detection Model
## Model Description
FallacyFinder is a state-of-the-art text classification model trained to detect 16 different types of logical fallacies in text. Built on DistilBERT architecture, this model achieves perfect accuracy in identifying argumentative fallacies and healthy logical discourse.
## Supported Fallacy Types
The model can detect the following 16 categories:
1. **Ad Hominem** - Personal attacks instead of addressing arguments
2. **Strawman** - Misrepresenting someone's position to make it easier to attack
3. **Whataboutism** - Deflecting criticism by pointing to other issues
4. **Gaslighting** - Making someone question their own reality or memory
5. **False Dichotomy** - Presenting only two options when more exist
6. **Appeal to Emotion** - Using emotional manipulation instead of logical reasoning
7. **DARVO** - Deny, Attack, and Reverse Victim and Offender
8. **Moving Goalposts** - Changing the criteria for acceptance when challenged
9. **Cherry Picking** - Selecting only evidence that supports your position
10. **Appeal to Authority** - Inappropriate reliance on authority figures
11. **Slippery Slope** - Claiming that one event will lead to extreme consequences
12. **Motte and Bailey** - Defending a weak position by conflating it with a stronger one
13. **Gish Gallop** - Overwhelming opponents with many weak arguments
14. **Kafkatrapping** - Claiming that denial of guilt proves guilt
15. **Sealioning** - Persistent bad-faith requests for evidence
16. **No Fallacy** - Healthy, logical communication
## Performance
- **Accuracy**: 100% on test set
- **Average Confidence**: 98.2%
- **Minimum Confidence**: 77.1%
- **F1 Score**: 1.0 (macro average)
## Usage
```python
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load model and tokenizer
model_name = "SamanthaStorm/fallacyfinder"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# Function to predict fallacy
def predict_fallacy(text):
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True, max_length=512)
with torch.no_grad():
outputs = model(**inputs)
predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
predicted_class_id = predictions.argmax().item()
confidence = predictions.max().item()
predicted_label = model.config.id2label[predicted_class_id]
return predicted_label, confidence
# Example usage
text = "You're just being emotional and can't think rationally"
fallacy_type, confidence = predict_fallacy(text)
print(f"Fallacy Type: {fallacy_type}")
print(f"Confidence: {confidence:.3f}")
```
## Training Data
The model was trained on a carefully curated dataset of 3,200 examples (200 per fallacy type) with high-quality, diverse examples covering:
- Personal relationships
- Political discourse
- Workplace communication
- Online discussions
- Academic debates
- Social media interactions
## Model Architecture
- **Base Model**: DistilBERT (distilbert-base-uncased)
- **Task**: Multi-class text classification
- **Classes**: 16 fallacy types
- **Max Sequence Length**: 512 tokens
- **Training Epochs**: 3
- **Batch Size**: 16
## Limitations and Considerations
- Trained primarily on English text
- Performance may vary on highly ambiguous or context-dependent cases
- Best suited for clear argumentative text
- May require fine-tuning for domain-specific applications
## Citation
If you use this model in your research, please cite:
```bibtex
@misc{fallacyfinder2024,
author = {SamanthaStorm},
title = {FallacyFinder: Advanced Logical Fallacy Detection Model},
year = {2024},
publisher = {Hugging Face},
url = {https://huggingface.co/SamanthaStorm/fallacyfinder}
}
```
## License
This model is released under the MIT License.
## Contact
For questions or issues, please open an issue on the model repository.
|