ABSTRACT:Dark patterns are deceptive user-interface design choices engineered to manipulate users into actions that serve business interests at the expense of user autonomy, financial well-being, or privacy. As e-commerce and platform economies expand globally, dark patterns have proliferated across websites and mobile applications, drawing regulatory attention from the European Union's Digital Services Act (DSA 2022), India's Consumer Protection Act and CCPA Guidelines (2023), and the United States Federal Trade Commission (FTC Clickto-Cancel Rule, 2024). Despite this regulatory momentum, automated real-time detection of dark patterns at the browser level remains largely unsolved. This paper presents Dark Pattern Sentinel (DPS), a research-grade Google Chrome extension implementing a novel two-stage hybrid detection pipeline. In the first stage, fourteen purpose-built deterministic heuristic scanners parse the live Document Object Model (DOM) to flag elements matching known dark-pattern families. In the second stage, a Large Language Model (Llama 3.3 70B via Groq) provides semantic verification for detections with intermediate confidence (45–78%), dramatically reducing false positives without incurring unnecessary API cost. Detected patterns are highlighted in real-time using a Shadow DOM overlay, and a logarithmic trust-scoring algorithm aggregates findings into a 0–100 page-level trust score with letter grades. The system covers fourteen dark-pattern categories spanning all major regulatory taxonomies, and exports structured JSON evidence suitable for legal or research documentation. Preliminary evaluation on a purposely-constructed adversarial demo page containing nine dark-pattern types demonstrates detection within one second of page load, with per-element red highlight boxes and explanatory tooltips. The system is designed for use in longitudinal e-commerce studies, cross-jurisdictional analysis, and regulatory enforcement support, establishing a foundation for automated dark-pattern auditing at scale.

KEYWORDS: dark patterns, deceptive design, browser extension, DOM heuristics, large language models, Groq, Llama 3.3, trust score, UI manipulation, CCPA, GDPR, DSA, digital consumer protection, Chrome Manifest V3

DARK PATTERN SENTINEL: A HYBRID DOM HEURISTICS AND LLM-BASED REAL-TIME DETECTION SYSTEM FOR DECEPTIVE WEB UI PATTERNS

MAYUR HEMNATH KARVE