Revolutionizing Ethical Interfaces: A Scalable Multimodal Framework Using Optimized LayoutLMv3 to Detect Dark Patterns

CSEF · 2026 Computational Science (Senior Division)

Overview

As companies transition their businesses online, their manipulative design practices evolve into dark patterns. This often leads to people, especially seniors, being exploited due to their unfamiliarity with modern technology. Our project aims to solve this problem by training LayoutLMv3 to detect dark patterns and implementing it within a simple Chrome extension for all. Our procedures involve testing the model on 200 samples, including 150 known websites and 50 popular websites outside our training set. True positives/negatives and false positives/negatives are then identified and used in evaluation metrics. Both the prototype and first revised models achieved high evaluation metrics: macro F1 scores of 0.917 and 0.911, and Matthew's Correlation Coefficients of 0.833 and 0.823, respectively. These results indicate balanced, highly correlated predictions relative to the ground-truth labels. However, both models exhibited higher false-positive rates (8.97% and 10.29%) than false-negative rates. This indicates that our model has a mildly aggressive detection tendency, favoring over-identification of dark patterns. Furthermore, a chi-square test between models suggests a strong statistical association between predictions and ground truth, with peak performance around 11.86 epochs. The second revision, however, had an MCC of -0.001 and a macro F1 score of 0.467. This leads to a surge of false positives and is no better than random guessing. Overall, the prototype and first revision achieved promising evaluation metrics, reliably detecting dark patterns and demonstrating strong potential for real-world implementation.

Competition history

  • CSEF 2026 Computational Science (Senior Division) · Entry S-07-15

Related projects

Closest projects by meaning, across every fair and year in the corpus.

Browse more like this

Source: California Science & Engineering Fair public projects

Save projects to your library

Sign in with Google to keep track of projects you find interesting, organized into folders. An account also raises your daily allowance for “Has this been done?”, and lets you create a key for the MCP server with a much higher limit than anonymous use. Browsing stays public.

Continue with Google