[Paper Review] Automated detection of dark patterns in cookie banners: how to do it poorly and why it is hard to do it any other way
This paper presents a supervised machine learning approach to automatically detect five types of dark patterns in cookie banners using a manually labeled dataset of 300 news websites. Despite achieving promising but improvable accuracy, the study highlights major interdisciplinary challenges in feature engineering, dataset quality, and the cognitive complexity of dark patterns, advocating for domain-specific, multi-modal detection pipelines with curated datasets for visuals and text.
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.
Motivation & Objective
- To investigate the feasibility of using supervised machine learning to detect dark patterns in cookie banners.
- To identify and analyze the interdisciplinary challenges in automating dark pattern detection using AI.
- To evaluate the performance of a Gradient Boosted Tree classifier on a manually labeled dataset of cookie banners.
- To highlight limitations in current datasets and feature engineering for reliable automated detection.
- To propose a roadmap for future work, including domain-specific, multi-modal detection pipelines.
Proposed method
- A dataset of 300 cookie banners from news websites was used, with each banner labeled for one of 15 possible dark pattern categories (5 types × 3 confidence levels).
- Feature engineering was applied to extract structural and textual features from banners, including position, text volume, button count, and UI design elements.
- A Gradient Boosted Tree classifier was trained using hyperparameter tuning via grid search to optimize model performance.
- Model evaluation was conducted using standard metrics, with results indicating moderate accuracy but significant room for improvement.
- The approach treats each cookie banner as a data point represented by a vector of mixed-type features (numerical, categorical, textual).
- The study emphasizes the need for domain-specific, multi-modal pipelines—especially for visual and linguistic cues—beyond current single-modality models.
Experimental results
Research questions
- RQ1Can supervised machine learning effectively detect dark patterns in cookie banners at scale?
- RQ2What are the key challenges in creating a reliable training dataset for dark pattern detection?
- RQ3How do feature engineering and data quality affect the performance of ML models in detecting dark patterns?
- RQ4Why is automated detection of dark patterns inherently difficult, even with advanced AI techniques?
- RQ5What are the most promising directions for future development of automated dark pattern detection systems?
Key findings
- The trained Gradient Boosted Tree model achieved promising but suboptimal accuracy, indicating that current approaches are not yet robust for real-world deployment.
- The dataset used was small and imbalanced, with varying frequencies of different dark pattern types, which significantly affects model generalization.
- Feature engineering proved highly challenging, as the original dataset was not designed to distinguish between specific dark pattern types, limiting model discrimination.
- The study found no clear, distinguishable features that could reliably separate dark patterns, due to the lack of engineered features in the 'found' dataset.
- The authors conclude that detecting dark patterns is a complex cognitive task that requires expertise in human-computer interaction and cognitive science, not just technical AI methods.
- Future work should focus on creating curated, domain-specific datasets for visuals and text, with features engineered to detect specific dark pattern types.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.