
Sarcasm Detection with Transformers: A Cautionary Tale
What happens when you achieve 99.8% accuracy on sarcasm detection? You might have accidentally built a domain classifier. A cautionary ML tale about dataset bias.

What happens when you achieve 99.8% accuracy on sarcasm detection? You might have accidentally built a domain classifier. A cautionary ML tale about dataset bias.

We test three ML models on 48K congressional bills to see how well they can predict policy areas from bill text. Results show logistic regression performs best, with a certified weighted-F1 of ~0.88 within-Congress (0.877) and ~0.87 out-of-Congress (0.871).

A computational social science project that built a 47,000+ bill dataset from Congress.gov (115th-117th Congresses), with a co-sponsorship legislative graph and TF-IDF baseline models for 33-class policy-area classification (up to ~0.89 weighted F1 on full text), now available on Hugging Face.

Learn how computers understand words through mathematical vectors, from simple counting methods to contextual embeddings that power modern NLP.