# Automated detection of dark patterns in cookie banners: how to do it poorly and why it is hard to do it any other way

arXiv: https://arxiv.org/abs/2204.11836 · HTML: https://mlsanity.com/paper/2204.11836/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Builds on 14 of its 74 references that are in the map.
- First posted on arXiv 21 Apr 2022.

## Builds on (most cited first, 14 of 14)

- [Universal Sentence Encoder](https://mlsanity.com/paper/1803.11175/) (2018)
- [Dark Patterns after the GDPR: Scraping Consent Pop-ups and Demonstrating their Influence](https://mlsanity.com/paper/2001.02479/) (2020)
- [(Un)informed Consent: Studying GDPR Consent Notices in the Field](https://mlsanity.com/paper/1909.02638/) (2019)
- [What Makes a Dark Pattern... Dark? Design Attributes, Normative Considerations, and Measurement Methods](https://mlsanity.com/paper/2101.04843/) (2021)
- [Do Cookie Banners Respect my Choice? Measuring Legal Compliance of Banners from IAB Europe's Transparency and Consent Framework](https://mlsanity.com/paper/1911.09964/) (2019)
- [I am Definitely Manipulated, Even When I am Aware of it. It s Ridiculous! -- Dark Patterns from the End-User Perspective](https://mlsanity.com/paper/2104.12653/) (2021)
- [Circumvention by design -- dark patterns in cookie consents for online news outlets](https://mlsanity.com/paper/2006.13985/) (2020)
- [Dark Patterns and the Legal Requirements of Consent Banners: An Interaction Criticism Perspective](https://mlsanity.com/paper/2009.10194/) (2020)
- [Consent Management Platforms under the GDPR: processors and/or controllers?](https://mlsanity.com/paper/2104.06861/) (2021)
- [Digital Voodoo Dolls](https://mlsanity.com/paper/2105.02738/) (2021)
- [Are cookie banners indeed compliant with the law? Deciphering EU legal requirements on consent and technical means to verify compliance of cookie banners](https://mlsanity.com/paper/1912.07144/) (2019)
- [Accept All: The Landscape of Cookie Banners in Greece and the UK](https://mlsanity.com/paper/2104.05750/) (2021)
- [Basic tasks of sentiment analysis](https://mlsanity.com/paper/1710.06536/) (2017)
- [Dark Patterns in the Interaction with Cookie Banners](https://mlsanity.com/paper/2103.14956/) (2021)

## Built on by (most cited first, 3 of 3)

- [Dark patterns in e-commerce: a dataset and its baseline evaluations](https://mlsanity.com/paper/2211.06543/) (2022)
- [Automatically Detecting Online Deceptive Patterns](https://mlsanity.com/paper/2411.07441/) (2024)
- [N"urnberg NLP at ChildSafeAds 2026: Structurally Dissimilar Voter Ensembles under Four Levels of Data Access](https://mlsanity.com/paper/2609.34986/) (2026)

## Abstract (arXiv)

Cookie banners, the pop ups that appear to collect your consent for data collection, are a tempting ground for dark patterns. Dark patterns are design elements that are used to influence the user's choice towards an option that is not in their interest. The use of dark patterns renders consent elicitation meaningless and voids the attempts to improve a fair collection and use of data. Can machine learning be used to automatically detect the presence of dark patterns in cookie banners? In this work, a dataset of cookie banners of 300 news websites was used to train a prediction model that does exactly that. The machine learning pipeline we used includes feature engineering, parameter search, training a Gradient Boosted Tree classifier and evaluation. The accuracy of the trained model is promising, but allows a lot of room for improvement. We provide an in-depth analysis of the interdisciplinary challenges that automated dark pattern detection poses to artificial intelligence. The dataset and all the code created using machine learning is available at the url to repository removed for review.
