My first data release re-identified everyone in it
research5 min read
Builder · Applied AI

My first data release re-identified everyone in it

I studied a Nostr bot that used a language model to label strangers. The first public release of that data let anyone recover all 2,342 people in it with one lookup each, and my own leak check approved it. What broke, the rule that fixed it, and why that rule is the part of the study worth keeping.

Last summer I studied a bot on Nostr, the open social protocol, that used a language model to read other people's posts and write short labels about them. It published those labels back onto each person, tagged to their public key, so anyone could search them. Most were dull and often fair: "ad bot," "exchange promotion." A few dozen were not. Fraud, sex crimes, extremism, pinned to ordinary accounts by a model that had never met them.

I built a careful study around it, and the first data release I published let anyone recover all 2,342 people in it with one lookup each. My own leak check approved that release. This post is about how that happened and the rule it left me with, which is the one part of the study I would carry into any project where a model touches personal data.

What the release was supposed to protect

The study was about the classifier. The public files had to show what the bot did without becoming a better index of what it said about anyone. I set three rules. People appear only as salted hashes of their keys, because a plain hash of a public key is no protection at all: hash every key on the network and compare. Harmful labels are held as class codes, apart from any person. Six dossiers about named individuals are left out entirely.

Then I wrote a scan that ran before any file was written. It looked for anything shaped like a public key, and it refused to publish if it found one. It passed.

One field undid all of it

Every row of that first release carried a batch_id, and I had set it to the raw id of the bot's own note. That note is public. It lists the people it labels, in order, with their keys. The row also carried pos, the person's place in that list.

The attack takes three steps. Take the id, ask a relay for the note, read entry four. The salted hash was decoration. The person was one request away, and the note had the harmful labels printed next to their key. Walk it yourself below.

Release
One row of the public file
subject_hash
s_9f2c…e41a · salted, so it cannot be reversed
batch_id
7d1e…b03c · the raw id of the bot’s own note
pos
4 · which entry in that note
labels
H-FRAUD, ad bot · harm label as a code
    One row of each release, with shortened, made-up values in the real shape. Run the lookup against v0.1.0, then v0.2.0.

    Why my check said yes

    The scan had an allowlist, and event ids were on it. That seemed reasonable when I wrote it: an event id names a note rather than a person, and the study needed to cite notes. That exception was the whole bug. I had written the check from the builder's side, as a list of the things I meant to keep out, and what leaked was something I had chosen to let through.

    I found it the next day, in an adversarial review: five hostile readings of the release, one of them an attacker trying to put names back on rows. That reader got every name on its first try. The release had sat at a public address for about a day, on a page search engines were told to skip. Nothing suggests anyone used it, and it was still a failure.

    The rule: the public file joins to nothing

    A longer allowlist would have left the same kind of hole open. So I removed the category: the public release became counts only: each label, how many times it was used, and whether it was used once. No row is about one person or one note, so there is nothing to look up.

    The scan turned around with it. It now refuses any 64-character hex string and any field that could serve as a join key, and it allows nothing. It runs over the committed files in CI, so a release that can be joined back to a person fails the build before anyone can download it.

    The person-level data still exists, because some research needs it. It lives in a gated ledger, released only under a signed data use agreement. Even there every note id is re-keyed, so an approved researcher cannot walk the same pointer, and each export is logged before a byte leaves.

    Don't ask whether a field is sensitive. Ask whether it can be joined to something that is.

    What the counts still show

    Counts turned out to be enough for the finding, which was always about the classifier. The common labels are mostly the bot describing spam, and that part of its work was probably often right. Political labels come next. The harm is in the tail: 53 labels, none used more than a handful of times, each one a model's guess published under a real identity.

    Share of 3,056 uses of the 96 most common labels
    Spam, ads, referral, promotion61.7%
    Political stance or commentary12.4%
    Called a bot or repetitive9.8%
    Interests, kind of user7.7%
    Crypto and Bitcoin belief6.2%
    Language or country2.3%
    53harmful labels (fraud, sex crimes, extremism and the like), used 90 times in all, on ordinary accounts. None of them is common enough to appear above.
    Label uses by family, across the 96 labels used ten or more times. The harmful labels are all rarer than that, so they sit in their own strip.

    Why this is the part I kept

    The study itself is closed. The bot went quiet six days into a 56-day watch I had planned, and most of the questions that watch was built to answer stay open. I wrote that down plainly. Six days don't stretch into a result.

    The release rule is what I would reuse. A team putting a model over support tickets, applications or customer records has the same problem I had, and usually a bigger one. The pattern fits on a card:

    • Name the join keys, not just the sensitive fields.
    • Make the check fail closed and allow nothing.
    • Run it in CI on the file you actually ship.
    • Have someone attack it who did not build it.

    The same shape runs through Counting the Killings, which publishes counts and never a roster, and the Portfolio Census, where two models coded blind before anyone saw a result.

    When I'd skip this

    If the data is about no one, skip all of it. If the whole point is a public list of people, such as officials and their votes, this rule forbids the thing you need, and you want a different argument: consent, or a public role. And counts-only has a cost I should name. Nobody can re-run my analysis from the public files. The gated tier exists for exactly that, and so far nobody has asked for it.

    Experience it yourselfRead the policy
    ShareXLinkedInHacker NewsEmail

    Get the next one

    An occasional note when something genuinely new ships here — essays, free tools, projects. No schedule, no filler, easy out.

    Hiring for an AI implementation role?

    I make software work inside real organizations, and now that means AI systems a team can check: the buying, the guardrails, the training and the build. If you are filling a role like that, twenty minutes is the quickest way to see whether we fit.