Datasets:
id stringlengths 17 19 | split stringclasses 1
value | template stringclasses 11
values | family stringclasses 7
values | fair bool 2
classes | pattern_ids listlengths 0 2 | n_patterns int64 0 2 | evidence_json stringlengths 2 168 | tree_json stringlengths 4.07k 16.9k | pair_id stringlengths 12 12 | edit_scope stringclasses 3
values | mutation stringclasses 40
values | diffs_json stringlengths 2 1.14k | remediation_json stringlengths 2 664 | provision_elements_json stringlengths 2 5.93k | n_nodes int64 7 29 | n_screens int64 1 6 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
train-000000-fair | train | product_page | commerce | true | [] | 0 | {} | {"nodes": [{"node_id": "prod_root_1", "role": "group", "text": "", "aria_label": "", "bbox": [24.0, 24.0, 0.0, 0.0], "font_size": 15.0, "font_weight": 400, "color": [17, 17, 17], "background": [255, 255, 255], "depth": 0, "screen": 0, "parent_id": null, "children": ["prod_title_2", "prod_price_3", "prod_unit_price_4", ... | train-000000 | single_field | [] | [] | [] | 16 | 1 | |
train-000000-unfair | train | product_page | commerce | false | [
"countdown_timer"
] | 1 | {"countdown_timer": ["countdown"]} | {"nodes": [{"node_id": "prod_root_1", "role": "group", "text": "", "aria_label": "", "bbox": [24.0, 24.0, 0.0, 0.0], "font_size": 15.0, "font_weight": 400, "color": [17, 17, 17], "background": [255, 255, 255], "depth": 0, "screen": 0, "parent_id": null, "children": ["prod_title_2", "prod_price_3", "prod_unit_price_4", ... | train-000000 | single_field | m_countdown_timer | [{"node_id": "countdown", "field": "node", "before": null, "after": "Offer expires in 13:39", "op": "insert"}] | [{"action": "bind_timer_to_a_real_deadline", "target_nodes": ["countdown"], "instruction": "Remove the timer, or bind it to a fixed end time that survives a reload and that the offer actually honours.", "parameters": {"required_attribute": "deadline"}}] | [{"jurisdiction": "eu", "provision_key": "ucpd_annex_i_7", "citation": "Annex I, point 7", "instrument": "Directive 2005/29/EC (UCPD)", "elements": ["false_limited_availability_claim"], "evidence": ["countdown"], "patterns": ["countdown_timer"], "determination": "may_be_implicated"}, {"jurisdiction": "eu", "provision_k... | 17 | 1 |
train-000001-fair | train | subscription_signup | subscription | true | [] | 0 | {} | {"nodes": [{"node_id": "subs_root_1", "role": "group", "text": "", "aria_label": "", "bbox": [24.0, 24.0, 0.0, 0.0], "font_size": 15.0, "font_weight": 400, "color": [17, 17, 17], "background": [255, 255, 255], "depth": 0, "screen": 0, "parent_id": null, "children": ["subs_title_2", "subs_price_3", "subs_recurrence_4", ... | train-000001 | combination | [] | [] | [] | 11 | 1 | |
train-000001-unfair | train | subscription_signup | subscription | false | [
"bait_and_switch",
"false_hierarchy"
] | 2 | {"bait_and_switch": ["subs_decline_8"], "false_hierarchy": ["subs_decline_8"]} | {"nodes": [{"node_id": "subs_root_1", "role": "group", "text": "", "aria_label": "", "bbox": [24.0, 24.0, 0.0, 0.0], "font_size": 15.0, "font_weight": 400, "color": [17, 17, 17], "background": [255, 255, 255], "depth": 0, "screen": 0, "parent_id": null, "children": ["subs_title_2", "subs_price_3", "subs_recurrence_4", ... | train-000001 | combination | m_bait_and_switch+m_false_hierarchy | [{"node_id": "subs_decline_8", "field": "action", "before": "/continue-without-signing-up", "after": "/subscribe/confirm", "op": "modify"}, {"node_id": "subs_decline_8", "field": "bbox", "before": [24.0, 265.5, 210.0, 50.0], "after": [24.0, 265.5, 90.9, 27.5], "op": "modify"}, {"node_id": "subs_decline_8", "field": "fo... | [{"action": "align_label_with_action", "target_nodes": ["subs_decline_8"], "instruction": "Either point 'Continue without signing up' back at '/continue-without-signing-up', or relabel it to name what '/subscribe/confirm' actually does.", "parameters": {"declared_action": "/subscribe/confirm", "label": "Continue withou... | [{"jurisdiction": "eu", "provision_key": "crd_art_8_2", "citation": "Art. 8(2)", "instrument": "Directive 2011/83/EU (CRD)", "elements": ["order_button_states_payment_obligation"], "evidence": ["subs_decline_8"], "patterns": ["bait_and_switch"], "determination": "may_be_implicated"}, {"jurisdiction": "eu", "provision_k... | 11 | 1 |
train-000002-fair | train | ad_feed | content | true | [] | 0 | {} | {"nodes": [{"node_id": "ad_f_root_1", "role": "group", "text": "", "aria_label": "", "bbox": [24.0, 24.0, 0.0, 0.0], "font_size": 15.0, "font_weight": 400, "color": [17, 17, 17], "background": [255, 255, 255], "depth": 0, "screen": 0, "parent_id": null, "children": ["ad_f_title_2", "ad_f_post_0_3", "ad_f_post_1_5", "ad... | train-000002 | single_field | [] | [] | [] | 11 | 1 | |
train-000002-unfair | train | ad_feed | content | false | [
"hidden_information"
] | 1 | {"hidden_information": ["ad_f_post_text_0_4"]} | {"nodes": [{"node_id": "ad_f_root_1", "role": "group", "text": "", "aria_label": "", "bbox": [24.0, 24.0, 0.0, 0.0], "font_size": 15.0, "font_weight": 400, "color": [17, 17, 17], "background": [255, 255, 255], "depth": 0, "screen": 0, "parent_id": null, "children": ["ad_f_title_2", "ad_f_post_0_3", "ad_f_post_1_5", "ad... | train-000002 | single_field | m_hidden_information | [{"node_id": "ad_f_post_text_0_4", "field": "parent_id", "before": "ad_f_post_0_3", "after": "collapsed", "op": "move"}, {"node_id": "ad_f_post_text_0_4", "field": "aria_hidden", "before": false, "after": true, "op": "modify"}] | [{"action": "surface_decision_relevant_text", "target_nodes": ["ad_f_post_text_0_4"], "instruction": "Show 'Editorial piece 1: Ships from our Rotterdam ware' at the same level as the control it qualifies, rather than inside a collapsed container.", "parameters": {"target_depth": 2}}] | [{"jurisdiction": "eu", "provision_key": "eprivacy_art_5_3", "citation": "Art. 5(3)", "instrument": "Directive 2002/58/EC (ePrivacy), as amended", "elements": ["clear_and_comprehensive_information"], "evidence": ["ad_f_post_text_0_4"], "patterns": ["hidden_information"], "determination": "may_be_implicated"}, {"jurisdi... | 12 | 1 |
train-000003-fair | train | data_sharing_onboarding | privacy | true | [] | 0 | {} | {"nodes": [{"node_id": "data_root_1", "role": "group", "text": "", "aria_label": "", "bbox": [24.0, 24.0, 0.0, 0.0], "font_size": 15.0, "font_weight": 400, "color": [17, 17, 17], "background": [255, 255, 255], "depth": 0, "screen": 0, "parent_id": null, "children": ["data_title_2", "data_consent_group_3", "data_choice_... | train-000003 | single_field | [] | [] | [] | 13 | 1 | |
train-000003-unfair | train | data_sharing_onboarding | privacy | false | [
"hidden_information"
] | 1 | {"hidden_information": ["data_filler_11"]} | {"nodes": [{"node_id": "data_root_1", "role": "group", "text": "", "aria_label": "", "bbox": [24.0, 24.0, 0.0, 0.0], "font_size": 15.0, "font_weight": 400, "color": [17, 17, 17], "background": [255, 255, 255], "depth": 0, "screen": 0, "parent_id": null, "children": ["data_title_2", "data_consent_group_3", "data_choice_... | train-000003 | single_field | m_hidden_information | [{"node_id": "data_filler_11", "field": "parent_id", "before": "data_root_1", "after": "collapsed", "op": "move"}, {"node_id": "data_filler_11", "field": "aria_hidden", "before": false, "after": true, "op": "modify"}] | [{"action": "surface_decision_relevant_text", "target_nodes": ["data_filler_11"], "instruction": "Show 'Customer support 09:00-17:00 CET' at the same level as the control it qualifies, rather than inside a collapsed container.", "parameters": {"target_depth": 1}}] | [{"jurisdiction": "eu", "provision_key": "eprivacy_art_5_3", "citation": "Art. 5(3)", "instrument": "Directive 2002/58/EC (ePrivacy), as amended", "elements": ["clear_and_comprehensive_information"], "evidence": ["data_filler_11"], "patterns": ["hidden_information"], "determination": "may_be_implicated"}, {"jurisdictio... | 14 | 1 |
train-000004-fair | train | privacy_settings | privacy | true | [] | 0 | {} | {"nodes": [{"node_id": "priv_root_1", "role": "group", "text": "", "aria_label": "", "bbox": [24.0, 24.0, 0.0, 0.0], "font_size": 15.0, "font_weight": 400, "color": [17, 17, 17], "background": [255, 255, 255], "depth": 0, "screen": 0, "parent_id": null, "children": ["priv_title_2", "priv_consent_group_3", "priv_choice_... | train-000004 | single_field | [] | [] | [] | 15 | 1 | |
train-000004-unfair | train | privacy_settings | privacy | false | [
"preselection"
] | 1 | {"preselection": ["priv_consent_location_4"]} | {"nodes": [{"node_id": "priv_root_1", "role": "group", "text": "", "aria_label": "", "bbox": [24.0, 24.0, 0.0, 0.0], "font_size": 15.0, "font_weight": 400, "color": [17, 17, 17], "background": [255, 255, 255], "depth": 0, "screen": 0, "parent_id": null, "children": ["priv_title_2", "priv_consent_group_3", "priv_choice_... | train-000004 | single_field | m_preselection | [{"node_id": "priv_consent_location_4", "field": "default_selected", "before": false, "after": true, "op": "modify"}] | [{"action": "clear_default_selection", "target_nodes": ["priv_consent_location_4"], "instruction": "Ship 'Use my precise location' unchecked so the user's affirmative act is what sets it.", "parameters": {"default_selected": false}}] | [{"jurisdiction": "eu", "provision_key": "crd_art_22", "citation": "Art. 22", "instrument": "Directive 2011/83/EU (CRD)", "elements": ["express_consent_not_default_option"], "evidence": ["priv_consent_location_4"], "patterns": ["preselection"], "determination": "may_be_implicated"}, {"jurisdiction": "eu", "provision_ke... | 15 | 1 |
train-000005-fair | train | newsletter_modal | modal | true | [] | 0 | {} | {"nodes": [{"node_id": "news_root_1", "role": "dialog", "text": "", "aria_label": "", "bbox": [24.0, 24.0, 0.0, 0.0], "font_size": 15.0, "font_weight": 400, "color": [17, 17, 17], "background": [255, 255, 255], "depth": 0, "screen": 0, "parent_id": null, "children": ["news_title_2", "news_body_3", "news_email_4", "news... | train-000005 | combination | [] | [] | [] | 13 | 1 | |
train-000005-unfair | train | newsletter_modal | modal | false | [
"nagging",
"forced_enrollment"
] | 2 | {"nagging": ["nag_0", "nag_1"], "forced_enrollment": ["news_accept_6"]} | {"nodes": [{"node_id": "news_root_1", "role": "dialog", "text": "", "aria_label": "", "bbox": [24.0, 24.0, 0.0, 0.0], "font_size": 15.0, "font_weight": 400, "color": [17, 17, 17], "background": [255, 255, 255], "depth": 0, "screen": 0, "parent_id": null, "children": ["news_title_2", "news_body_3", "news_email_4", "news... | train-000005 | combination | m_nagging+m_forced_enrollment | [{"node_id": "nag_0", "field": "node", "before": null, "after": "Sign up", "op": "insert"}, {"node_id": "nag_1", "field": "node", "before": null, "after": "Sign up", "op": "insert"}, {"node_id": "news_decline_7", "field": "node", "before": "Continue without signing up", "after": null, "op": "delete"}] | [{"action": "respect_the_decline", "target_nodes": ["nag_0", "nag_1"], "instruction": "Stop re-showing 'Sign up' after a decline; if it must reappear, give it a dismiss control and a long interval.", "parameters": {"max_repeats_after_decline": 0}}, {"action": "restore_an_equal_decline_path", "target_nodes": ["news_acce... | [{"jurisdiction": "eu", "provision_key": "dma_art_13_6", "citation": "Art. 13(6)", "instrument": "Regulation (EU) 2022/1925 (Digital Markets Act)", "elements": ["choice_architecture_neutral"], "evidence": ["nag_0", "nag_1"], "patterns": ["nagging"], "determination": "may_be_implicated"}, {"jurisdiction": "eu", "provisi... | 14 | 3 |
train-000006-fair | train | cancellation_flow | lifecycle | true | [] | 0 | {} | {"nodes": [{"node_id": "canc_root_1", "role": "group", "text": "", "aria_label": "", "bbox": [24.0, 24.0, 0.0, 0.0], "font_size": 15.0, "font_weight": 400, "color": [17, 17, 17], "background": [255, 255, 255], "depth": 0, "screen": 0, "parent_id": null, "children": ["canc_title_2", "canc_signup_ref_3", "canc_cancel_ent... | train-000006 | single_field | [] | [] | [] | 11 | 2 | |
train-000006-unfair | train | cancellation_flow | lifecycle | false | [
"false_hierarchy"
] | 1 | {"false_hierarchy": ["canc_decline_9"]} | {"nodes": [{"node_id": "canc_root_1", "role": "group", "text": "", "aria_label": "", "bbox": [24.0, 24.0, 0.0, 0.0], "font_size": 15.0, "font_weight": 400, "color": [17, 17, 17], "background": [255, 255, 255], "depth": 0, "screen": 0, "parent_id": null, "children": ["canc_title_2", "canc_signup_ref_3", "canc_cancel_ent... | train-000006 | single_field | m_false_hierarchy | [{"node_id": "canc_decline_9", "field": "bbox", "before": [24.0, 82.5, 230.0, 50.0], "after": [24.0, 82.5, 91.6, 27.5], "op": "modify"}, {"node_id": "canc_decline_9", "field": "font_size", "before": 16.0, "after": 8.8, "op": "modify"}] | [{"action": "equalise_control_prominence", "target_nodes": ["canc_decline_9", "canc_accept_10"], "instruction": "Render 'Cancel my subscription' at the same size and font as 'Keep my subscription' (target: 230x50 px, 16 px type).", "parameters": {"target_width": 230.0, "target_height": 50.0, "target_font_size": 16.0}}] | [{"jurisdiction": "eu", "provision_key": "dma_art_13_6", "citation": "Art. 13(6)", "instrument": "Regulation (EU) 2022/1925 (Digital Markets Act)", "elements": ["choice_architecture_neutral"], "evidence": ["canc_decline_9"], "patterns": ["false_hierarchy"], "determination": "may_be_implicated"}, {"jurisdiction": "eu", ... | 11 | 2 |
train-000007-fair | train | subscription_signup | subscription | true | [] | 0 | {} | {"nodes": [{"node_id": "subs_root_1", "role": "group", "text": "", "aria_label": "", "bbox": [24.0, 24.0, 0.0, 0.0], "font_size": 15.0, "font_weight": 400, "color": [17, 17, 17], "background": [255, 255, 255], "depth": 0, "screen": 0, "parent_id": null, "children": ["subs_title_2", "subs_price_3", "subs_recurrence_4", ... | train-000007 | combination | [] | [] | [] | 11 | 1 | |
train-000007-unfair | train | subscription_signup | subscription | false | [
"nagging",
"forced_enrollment"
] | 2 | {"nagging": ["nag_0", "nag_1"], "forced_enrollment": ["subs_decline_8", "subs_accept_7"]} | {"nodes": [{"node_id": "subs_root_1", "role": "group", "text": "", "aria_label": "", "bbox": [24.0, 24.0, 0.0, 0.0], "font_size": 15.0, "font_weight": 400, "color": [17, 17, 17], "background": [255, 255, 255], "depth": 0, "screen": 0, "parent_id": null, "children": ["subs_title_2", "subs_price_3", "subs_recurrence_4", ... | train-000007 | combination | m_nagging+m_forced_enrollment | [{"node_id": "nag_0", "field": "node", "before": null, "after": "Start subscription", "op": "insert"}, {"node_id": "nag_1", "field": "node", "before": null, "after": "Start subscription", "op": "insert"}, {"node_id": "subs_decline_8", "field": "disabled", "before": false, "after": true, "op": "modify"}] | [{"action": "respect_the_decline", "target_nodes": ["nag_0", "nag_1"], "instruction": "Stop re-showing 'Start subscription' after a decline; if it must reappear, give it a dismiss control and a long interval.", "parameters": {"max_repeats_after_decline": 0}}, {"action": "restore_an_equal_decline_path", "target_nodes": ... | [{"jurisdiction": "eu", "provision_key": "dma_art_13_6", "citation": "Art. 13(6)", "instrument": "Regulation (EU) 2022/1925 (Digital Markets Act)", "elements": ["choice_architecture_neutral"], "evidence": ["nag_0", "nag_1"], "patterns": ["nagging"], "determination": "may_be_implicated"}, {"jurisdiction": "eu", "provisi... | 13 | 3 |
train-000008-fair | train | cancellation_flow | lifecycle | true | [] | 0 | {} | {"nodes": [{"node_id": "canc_root_1", "role": "group", "text": "", "aria_label": "", "bbox": [24.0, 24.0, 0.0, 0.0], "font_size": 15.0, "font_weight": 400, "color": [17, 17, 17], "background": [255, 255, 255], "depth": 0, "screen": 0, "parent_id": null, "children": ["canc_title_2", "canc_signup_ref_3", "canc_cancel_ent... | train-000008 | single_field | [] | [] | [] | 15 | 2 |
Sludge counterfactual UI corpus
This model does not determine legality.
It reports provisions that may be implicated and the screen elements that are the factual basis for looking at them. Whether a provision is actually engaged depends on facts no UI tree contains — the purposes of processing, the legal basis relied on, the audience, the rest of the journey, prior consent, sector rules — and is an assessment for a qualified human.
It has no feature that labels a named company's product as unlawful, and it is not built to acquire one. It is a tool for reviewing interfaces, not for publishing verdicts about them.
A fully synthetic corpus of UI trees for deceptive-design-pattern detection, built from counterfactual pairs: a fair screen, and the same screen with exactly one thing changed.
fair unfair
───────────────────────────── ─────────────────────────────
[ Accept all ] [ Reject all ] [ Accept all ] [Reject all]
200×52px 200×52px 200×52px 95×29px
▲
one edit: bbox + font_size
evidence: cook_reject_6
remediation: the inverse
Because the twins are identical everywhere else, the edit defines the class label, the localisation target and the remediation simultaneously. There is no annotation pass, and no way for the three to drift apart.
- Model:
NagaYu/sludge-small - Demo:
NagaYu/sludge
Splits — by template, never by sample
| split | rows | layouts | contents |
|---|---|---|---|
train |
18,000 | 11 train-only templates | fair + single-pattern + 12 seen class combinations |
validation |
1,800 | same templates, disjoint seeds | sanity check (it saturates — see below) |
test |
3,600 | 6 held-out templates | fair + single pattern |
hard |
1,800 | the same held-out templates | 18 class combinations that never appear in training |
25,200 rows total. No UI layout is shared across the train/test boundary, and every one of the 27 classes appears in both a train template and a test template.
validation re-uses the training templates, so a model that has learned those layouts reaches
~1.00 micro-F1 on it within two epochs. It is published for completeness; the reference
pipeline holds out two training templates as a dev split for model selection and threshold
tuning instead, and never touches test or hard for either.
The fair screens are deliberately hard
Fair screens contain honest urgency (a dated sale), honest scarcity (a sourced stock count), honest social proof (an attributed review) — and a set of hard negatives: benign designs that trip naive thresholds.
| hard negative | which rule it defeats |
|---|---|
| a smaller secondary link beside a primary button | false_hierarchy on area ratio |
| a countdown to a real, stated, persistent deadline | countdown_timer on "clock present" |
| "Only 2 left — 2 units remain in the Rotterdam warehouse" | low_stock_message on scarcity wording |
| a box ticked by default because ticking it is the privacy-protective choice | preselection on default_selected |
| faint text that is a build number, not a decision | visual_interference on contrast |
| a one-button "OK" on an informational dialog | forced_enrollment on "no decline present" |
Without these, hand-written rules scored 0.84 micro-F1 on this corpus — far above what rule-and-screenshot systems reach on real interfaces. That gap was a property of the corpus, not a discovery about rules.
Fields
| field | what it is |
|---|---|
tree_json |
the UI tree: nodes with role, text, bbox, colours, font, depth, default-selected state, link target, screen index |
pattern_ids |
taxonomy classes present (empty for fair rows) |
evidence_json |
per class, the node ids that constitute the evidence |
provision_elements_json |
the same finding resolved to provision elements, for every configured jurisdiction (eu, us_federal, us_ca) |
diffs_json |
exactly what the edit changed: node, field, before, after |
remediation_json |
the inverse of the edit, with target values |
pair_id |
links a fair row to its unfair twin |
edit_scope |
single_field, single_decision, or combination |
template, family, fair, n_nodes, n_screens |
provenance and shape |
Two label sets ship on every row — the taxonomy class and the jurisdiction-resolved provision elements — so you can train or evaluate against either, and audit the mapping without running the code.
Realism: what was deliberately removed
The generator can annotate a node with facts no real interface exposes ("this stock figure came from the warehouse feed"). Training on those would inflate every number. The reference pipeline strips them and derives each feature from what an AX/DOM traversal genuinely reports:
| once an annotation | derived instead from |
|---|---|
deadline |
an explicit date in the visible text |
inventory_source |
a sourcing phrase in the visible text |
author |
an attribution line beside the quote |
label_action_conflict |
comparing the accessible name to the link target |
| the generator's slot names | nothing — never read |
The annotations remain in tree_json so you can measure what provenance metadata would be
worth if a platform exposed it. A behavioural test enforces that the reference featuriser reads
none of them.
Taxonomy
7 categories / 27 classes, all from published work: Mathur et al. (2019) CSCW · Gray et al. (2018) CHI · Brignull, deceptive.design · EDPB Guidelines 03/2022 · OECD (2022) DEP No. 336 · Gray et al. (2024) CHI.
| Category (Mathur et al. 2019) | Classes |
|---|---|
| Sneaking | sneak_into_basket · hidden_costs · hidden_subscription · bait_and_switch · hidden_information |
| Urgency | countdown_timer · limited_time_message |
| Misdirection | confirmshaming · visual_interference · false_hierarchy · preselection · trick_question · pressured_selling · disguised_ad |
| Social Proof | activity_message · testimonials_uncertain_origin |
| Scarcity | low_stock_message · high_demand_message |
| Obstruction | hard_to_cancel · price_comparison_prevention · intermediate_currency · privacy_maze · dead_end |
| Forced Action | forced_enrollment · forced_registration · privacy_zuckering · nagging |
Intended use, and what this is not
For: training and evaluating UI-tree pattern detectors; testing whether a detector reacts to a design change rather than to a template; measuring what screenshot-based perception costs.
Not for: asserting that any real product is unlawful. The labels identify design patterns from a research taxonomy and provisions that may be implicated. They are not legal findings, and the corpus contains no real application.
No real-world data. No screenshot or UI tree from any real application appears here. Public dark-pattern datasets are for evaluation only, under their own terms.
Licence: Apache-2.0.
- Downloads last month
- 29