Datasets:
|
Download README.md from OP-R1/OP-Reddit-User: direct link, hf CLI and curl.
- Browser
- Download file 14.1 kB
-
https://huggingface.co/datasets/OP-R1/OP-Reddit-User/resolve/main/README.md
- Command line
-
hf download hf://datasets/OP-R1/OP-Reddit-User/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/datasets/OP-R1/OP-Reddit-User/resolve/main/README.md
14.1 kB
| license: other | |
| license_name: reddit-user-content | |
| license_link: https://redditinc.com/policies/user-agreement | |
| language: | |
| - en | |
| task_categories: | |
| - text-classification | |
| tags: | |
| - public-health | |
| - harm-reduction | |
| - opioid | |
| - substance-use | |
| - pseudonymized | |
| - user-level | |
| pretty_name: "OP-Reddit-User — per-user interaction structure (2016–2026)" | |
| size_categories: | |
| - 1M<n<10M | |
| configs: | |
| - config_name: default | |
| data_files: | |
| - split: train | |
| path: "data/part-*.parquet" | |
| extra_gated_heading: "Request access to the OP-R1 Reddit corpus" | |
| extra_gated_button_content: "I agree to all terms above" | |
| extra_gated_description: >- | |
| This dataset contains pseudonymized but re-identifiable social-media content | |
| about substance use. Access is reviewed manually and granted only for | |
| public-health / harm-reduction research. Requests without a verifiable | |
| institutional affiliation and a specific research purpose will be declined. | |
| extra_gated_prompt: >- | |
| **DATA USE AGREEMENT — read in full before requesting access.** | |
| This corpus contains Reddit posts and comments about drug use, including | |
| opioids. Author usernames are replaced by salted HMAC pseudonyms, but the | |
| dataset **retains original Reddit post/comment identifiers** (`id`, `link_id`, | |
| `parent_id`). Those identifiers can be resolved on reddit.com to the original | |
| content and, where not deleted, to the author's real account. **Treat every | |
| record as identifiable personal data concerning health and potentially | |
| criminal conduct.** | |
| By requesting access you represent that you have read this agreement and agree | |
| to be bound by it. | |
| **1. Permitted use.** Aggregate public-health, harm-reduction, epidemiological, | |
| computational-social-science or NLP research, conducted under the oversight of | |
| an IRB / research ethics committee (or a documented determination that such | |
| oversight is not required in your jurisdiction). | |
| **2. Prohibited uses.** You will NOT: (a) attempt to re-identify, deanonymize, | |
| unmask or determine the real-world identity of any individual, including by | |
| resolving retained Reddit identifiers, cross-referencing external data, or | |
| querying any API or web service with dataset content; (b) contact, message, | |
| survey, recruit, profile, monitor or surveil any individual represented in the | |
| data; (c) use the data for law-enforcement, prosecutorial, immigration, | |
| insurance, credit, employment or any other adverse determination about an | |
| individual; (d) use it for commercial purposes, advertising, or targeting; | |
| (e) use it to facilitate the acquisition or distribution of controlled | |
| substances; (f) publish, present or otherwise disclose any verbatim quotation, | |
| username, pseudonymous `user_id`, Reddit identifier, or any other detail that | |
| could reasonably permit identification of an individual. | |
| **3. No redistribution.** You will not republish, mirror, share, sublicense, | |
| post to any public repository or model hub, or otherwise transfer the data or | |
| any substantial derivative of it, in whole or in part, to any third party. | |
| Access is personal to you. Collaborators must request access individually. | |
| Models trained on this data must not be released if they can reproduce | |
| identifying content. | |
| **4. Security.** You will store the data on access-controlled systems, | |
| restrict access to named personnel covered by this agreement, and not upload | |
| it to third-party services (including commercial LLM APIs) that may retain, | |
| train on, or disclose it. | |
| **5. Underlying rights.** Content remains the intellectual property of its | |
| original authors and is subject to the Reddit User Agreement. This dataset is | |
| a research derivative; nothing here grants you rights in the underlying | |
| content. You are responsible for your own compliance with Reddit's terms and | |
| with all applicable law, including GDPR, HIPAA and equivalents. | |
| **6. Deletion.** You will delete all copies upon completion of the stated | |
| research, upon withdrawal of access, or on request of the maintainers. | |
| **7. Incident reporting.** You will report any accidental disclosure, | |
| re-identification, breach, or loss of control of the data to the maintainer | |
| within 72 hours. | |
| **8. Publication.** Report results in aggregate. Paraphrase rather than quote. | |
| Cite the dataset and the upstream arctic_shift project. | |
| **9. Termination.** Access may be revoked at any time, with or without cause. | |
| Breach terminates your rights immediately and obliges you to delete all copies. | |
| **10. No warranty.** Provided "as is", without warranty of any kind. The | |
| maintainers accept no liability arising from your use. The data is a | |
| non-representative convenience sample and must not be used for clinical, | |
| diagnostic, or individual decision-making purposes. | |
| extra_gated_fields: | |
| Full name: text | |
| Institutional email: text | |
| Institution / organization: text | |
| Role: | |
| type: select | |
| options: ["Faculty / PI", "Postdoc", "PhD student", "Masters/Undergrad student", "Research staff", "Industry researcher", "Other"] | |
| Country: country | |
| Supervisor or PI (if student): text | |
| Describe your specific research question and intended use: text | |
| IRB / ethics review status: | |
| type: select | |
| options: ["Approved - I can provide the protocol number", "Submitted, pending approval", "Formal determination that review is not required", "Not applicable - please explain above"] | |
| I will not attempt to re-identify or deanonymize any individual: checkbox | |
| I will not contact, survey, profile or surveil anyone in the data: checkbox | |
| I will not use the data for law-enforcement or any adverse determination about an individual: checkbox | |
| I will not redistribute the data or share my access with others: checkbox | |
| I will not publish verbatim quotes, usernames or Reddit identifiers: checkbox | |
| I will not upload the data to third-party services that may retain or train on it: checkbox | |
| I will delete all copies when my research concludes or access is withdrawn: checkbox | |
| I agree to the full Data Use Agreement above: checkbox | |
| # OP-Reddit-User — per-user interaction structure | |
| **1,132,208 users** from 37 drug-related subreddits, 2016-01-01 → 2026-07-27. | |
| Each row is one user: their profile, an interaction summary, and the **structure** | |
| of every thread they participated in. | |
| > **This dataset contains no post text.** It stores ids only, and is designed to | |
| > be joined against | |
| > [**OP-R1/OP-Reddit-Post**](https://huggingface.co/datasets/OP-R1/OP-Reddit-Post) | |
| > to materialize the text on demand. That keeps this dataset small enough to | |
| > download whole while the 47M-row text corpus stays remote. | |
| > **Access.** **Gated** — requests are reviewed manually and granted only for | |
| > public-health / harm-reduction research under ethics oversight. See the Data | |
| > Use Agreement on the access request form. IRB-gated human-subjects material. | |
| --- | |
| ## Why user-level | |
| [OP-R1](https://github.com/Tianyi-Billy-Ma) classifies a **user's role** in the | |
| opioid ecosystem (`buyer` / `seller` / `user`) with a supporting rationale. The | |
| unit of prediction is therefore a *person*, not a post — and the evidence is a | |
| person's messages **in context**. | |
| "How much for a G?" is meaningless alone and damning under a sourcing ad. So this | |
| dataset preserves *who replied to whom*, not just a flat list of a user's text. | |
| ## Schema | |
| | Column | Type | Meaning | | |
| |---|---|---| | |
| | `user_id` | `string` | Salted-HMAC pseudonym. **Joins to `OP-Reddit-Post.user_id`.** | | |
| | `n_items` / `n_posts` / `n_comments` | `int64` | Activity counts | | |
| | `n_image_posts` | `int64` | How many of this user's posts carry an image. Counted over **all** their posts, not just the threads retained below. | | |
| | `n_threads` | `int64` | Distinct threads participated in | | |
| | `first_seen` / `last_seen` | `timestamp[ms, UTC]` | First/last activity | | |
| | `active_days` | `int64` | Distinct days with activity | | |
| | `subreddits` | `list<struct>` | `{name, n, first, last}` per community, desc by `n` | | |
| | `interactions` | `struct` | See below | | |
| | `threads` | `list<struct>` | The evidence — see below | | |
| | `threads_truncated` | `bool` | True if the 500-thread cap applied | | |
| | `role` | `string` (null) | **Label slot** — buyer / seller / user | | |
| | `rationale` | `string` (null) | **Label slot** — free-text justification | | |
| ### `interactions` | |
| | Field | Meaning | | |
| |---|---| | |
| | `threads_started` | User authored the thread's anchor submission | | |
| | `replies_to_others` | Replies the user made to other people | | |
| | `replies_to_self` | Self-replies — characteristic of bumping one's own ad | | |
| | `replies_received` | **Replies the user received** — the strongest relational signal | | |
| | `distinct_repliers` | How many distinct people replied to them | | |
| | `distinct_users_replied_to` | How many distinct people they replied to | | |
| ### `threads[]` | |
| | Field | Meaning | | |
| |---|---| | |
| | `link_id` | Thread id (`t3_…`) | | |
| | `subreddit` | Community | | |
| | `user_started` / `anchor_by_user` | Did this user author the thread root? | | |
| | `anchor_id` | Bare id of the root submission — **join key for its text** | | |
| | `items[]` | This user's own contributions, chronological | | |
| ### `threads[].items[]` | |
| | Field | Meaning | | |
| |---|---| | |
| | `id` | The record's Reddit id — **join key for its text** | | |
| | `kind` | `post` or `comment` | | |
| | `created_utc` | `timestamp[ms, UTC]` | | |
| | `score` | Score at archival (nullable) | | |
| | `parent_id` | What it replied to (`t3_…` post / `t1_…` comment) | | |
| | `parent_kind` | `post` / `comment` / null | | |
| | `parent_by_user` | Was the parent authored by this same user? | | |
| | `reply_ids[]` | Ids of items replying to **this** item (capped at 20) | | |
| | `has_image` | Does this item carry an image? Always `false` for comments. | | |
| ### Image signal | |
| `n_image_posts` (top level) and `threads[].items[].has_image` (per item) mark | |
| image-bearing posts, matching the columns of the same name in | |
| **OP-Reddit-Post**. | |
| The two counters are deliberately scoped differently. `n_image_posts` covers | |
| every post the user made, while the per-item flags only cover the threads | |
| retained in `threads[]` — which is capped at 500 threads per user. For the | |
| 4,321 users who hit that cap, summing the item flags therefore undercounts. | |
| Across the corpus that is 452,196 flagged items against 457,471 in the | |
| counters. **Use `n_image_posts` for per-user totals; use the item flags to | |
| locate specific posts.** | |
| Note also that these 1,132,208 users account for 457,471 of the corpus's | |
| 656,932 image posts. The remaining 199,461 belong to users who fell below the | |
| `--min-items` threshold or whose account was deleted, and so have no row here. | |
| ## Materializing text | |
| Ids join to `OP-Reddit-Post`, which ships lookup indexes so you can fetch just | |
| what you need rather than the whole 47M-row corpus: | |
| ```python | |
| from src.data.retrieve import OpR1Retriever | |
| r = OpR1Retriever() # OP-R1/OP-Reddit-Post + this dataset | |
| user = r.get_user("18a38e35a00f09e39207") # profile + threads + text, by ranged read | |
| ``` | |
| Manually, the join keys are: | |
| | From this dataset | Fetch from OP-Reddit-Post | | |
| |---|---| | |
| | `threads[].items[].id` | the user's own message text | | |
| | `threads[].anchor_id` | the thread's opening post | | |
| | `threads[].items[].parent_id` | what they were replying to | | |
| | `threads[].items[].reply_ids[]` | what people replied back | | |
| ## Statistics | |
| | Metric | Value | | |
| |---|---| | |
| | Users | **1,132,208** | | |
| | Items covered | 39,762,155 | | |
| | Threads started (total) | 3,025,121 | | |
| | Coverage | 2016-01-01 → 2026-07-27 | | |
| | Subreddits | 37 | | |
| **Activity is heavily skewed** — plan splits and batching accordingly: | |
| | Percentile | Items/user | Threads/user | Replies received | | |
| |---|---:|---:|---:| | |
| | median | 8 | 5 | 8 | | |
| | p90 | 65 | 40 | 65 | | |
| | p99 | 453 | — | — | | |
| | max | **41,571** | **26,108** | **28,577** | | |
| 59,681 users (5.3%) received **zero** replies — isolated posters, a useful | |
| negative class. | |
| ## Inclusion rules and caps | |
| - **`--min-items 3`**: users with fewer than 3 records are excluded (1,063,112 | |
| dropped). The median user in the raw corpus has only 2 items, so this removes | |
| the long tail that carries no usable evidence. | |
| - **Deleted / removed content is retained** as thread structure. `[deleted]` and | |
| `[removed]` authors get no user row (they cannot be labeled), but their items | |
| still appear as other users' `parent_id`, `anchor_id` and `reply_ids` — the | |
| *edge* survives even when the body does not. This matters: moderation removes | |
| sourcing language hardest, so discarding tombstones would thin the `seller` | |
| class specifically. | |
| - **Caps** (recorded, not silent): `reply_ids` capped at 20 per item (101,693 | |
| lists affected); threads capped at 500 per user (4,321 users, flagged via | |
| `threads_truncated`). | |
| ## De-identification | |
| `user_id` is `HMAC-SHA256(secret_salt, username)[:20]`, using the **same salt** as | |
| `OP-Reddit-Post`, so the two datasets join. The salt is never distributed. | |
| ⚠️ **Reddit ids are retained in cleartext** (`id`, `link_id`, `parent_id`, | |
| `anchor_id`). They resolve on reddit.com to the original content and, where not | |
| deleted, to the author's real account. **No salt is required to do this.** The | |
| pseudonym prevents casual identification, not a determined linkage attack. Treat | |
| every row as identifiable personal data concerning health and potentially | |
| criminal conduct, and see the Data Use Agreement. | |
| ## Limitations | |
| - **No labels yet.** `role` and `rationale` are null placeholders. | |
| - **Survivorship bias**, most consequential here: moderation removes exactly the | |
| sourcing/transaction language distinguishing `buyer` from `seller`, so those | |
| signals are systematically under-represented. | |
| - **Not a population sample** — self-selected, skews young, Western, English. | |
| - **Text is not included**; anything requiring it needs `OP-Reddit-Post` access. | |
| ## Provenance | |
| Derived from [arctic_shift](https://github.com/ArthurHeitmann/arctic_shift) | |
| Reddit archives via the OP-R1 pipeline (`src/data/build_user_threads.py`). Reddit | |
| content belongs to its original authors. | |
| Maintainer: Tianyi (Billy) Ma · `tma2@nd.edu` · University of Notre Dame | |