Some designs help you decide.

Others decide for you.

Dark patterns are everywhere.

One study found them in nearly 95% of the top 240 apps on Google Play.

And they’re hard to spot.

Most users can’t recognize them. Developers lack the tools to catch them.

Introducing
AidUI
Dark-pattern detection from a single screenshot.
01Visual cues
02Text
03Color & size
04Resolution

Spot the visual cues.

A Faster R-CNN detector finds the icons that tend to travel with dark patterns.

Star

→ Nagging

Like

→ Nagging

Toggle (on)

→ Default Choice

Ad

→ Nagging · Disguised Ads

trained on 16,320 synthesized screens · 91% test accuracy

Read every word.

Text is pulled from the pixels, then matched against lexical patterns for each dark pattern.

lexical patterns · spaCy
rate · ratingNAGGING
I + <decline/don’t> + <want…> to + [predicate]ATTN. DISTRACTION
sale + <ends/countdown/now>COUNTDOWN TIMER
only + [number] + in stockLOW STOCK

Weigh color and size.

Contrast and relative size give away the option you’re meant to pick.

65%
button
“No, I don’t…”

Color

A two-bin grayscale histogram marks each segment brighter or darker.

h 1.00
h 0.33

Size

Each segment is measured against its largest neighbor.

Let the cues vote.

Neighboring segments vote; their scores combine with icon detections, 80/20.

“No, I don’t want to rate” · votes
✓Text pattern matched
Neighbor text matched
✓High contrast with neighbors
✓Size difference with neighbors
top dark patterns · localized
NaggingAttention Distraction
Evaluated on ContextDP · the largest dataset of fully-localized dark patterns
0
mobile & web screenshots
0
dark-pattern instances
0
dark-pattern types
≈0.00
F1-score on five patterns: timers, scarcity & activity messages
0.65avg. F1-score across all ten patterns
0.83avg. contained IoU when localizing
36 of 243dark-pattern-free screens falsely flagged
Ablation · avg. F1-score, all 301 dark patterns

Text alone isn’t enough.

Text
0.40
Text + Color
0.42
Text + Spatial
0.63
Text + Color + Spatial
0.65

AidUI: Toward Automated Recognition of
Dark Patterns in User Interfaces

SM Hasan Mansur · Sabiha Salma · Damilola Awofisayo · Kevin Moran
ICSE 2023 · IEEE/ACM International Conference on Software Engineering