In 2013 a crime novel called The Cuckoo's Calling came out under the name Robert Galbraith. After a tip to a newspaper, two academics, Patrick Juola and Peter Millican, ran the text through software that compared it against several authors, including J.K. Rowling. Rowling came out as the most likely match on most of the tests. She confirmed it within days.

That's stylometry: identifying an author statistically from how they write rather than what they say. It's been used on the Federalist Papers, on disputed Shakespeare plays, and in court. For anyone keeping a pseudonym, it's the leak you can't fix with software settings.

What gets measured

Surprisingly, the most useful features are the dull ones. Topic words change with the subject, but the little words don't. How often you use "the", "of", "upon", "while" versus "whilst", "that" versus "which" stays fairly constant across everything you write. The 1964 Mosteller and Wallace study of the disputed Federalist Papers rested heavily on this: Madison wrote "whilst", Hamilton wrote "while", and the rates of words like "upon" differed sharply.

Modern methods add a lot more:

  • Character n-grams, short sequences of letters including spaces and punctuation, which capture spelling, morphology and habits all at once
  • Average sentence and word length, and how much they vary
  • Punctuation habits: Oxford commas, double spaces after full stops, ellipses, semicolons, how you write quotation marks
  • Spelling variants (colour/color, organise/organize) and consistent misspellings
  • Capitalisation, emoji use, how you open and close messages
  • Formatting: line breaks, bullet styles, how you quote others

Feed enough of these into a classifier with samples from candidate authors, and it'll rank the candidates. The key limitation is that it needs candidates and enough text from each.

Outside the lab

The Unabomber case is the famous non-computer example. When the Washington Post and New York Times published his manifesto in 1995, David Kaczynski recognised his brother's ideas and phrasing and went to the FBI. Linguistic analysis comparing the manifesto with Ted Kaczynski's letters formed part of the case for the search warrant. One often-mentioned detail is the manifesto's use of the less common form of the cake idiom, "eat your cake and have it too".

For online pseudonyms, the threat is usually an investigator, a journalist or a dedicated harasser who has a short list of suspects and can gather their public writing: blog posts, forum history, GitHub commit messages, reviews. Researchers at Drexel University's Privacy, Security and Automation Lab built tools (JStylo for analysis and Anonymouth to help authors evade it) and showed both that attribution among dozens of candidates works well with enough text and that deliberately changing your style helps a lot.

Reducing the risk

None of this is perfect. These are the things that actually help, roughly from easiest to hardest.

Write less

Short posts give less signal. If the pseudonym doesn't need long essays, don't write them. If it does, accept that this is your weakest point.

Strip your quirks

Make a list of your habits. Look at your own emails: do you always start with "Hey" and end with "Cheers"? Use ".." instead of "..."? Write "alot"? Use British spelling? For the pseudonymous identity, pick different defaults and stick to them. Turning on a spellchecker set to a different English variant handles some of this automatically.

Avoid content leaks

Style isn't the only thing that identifies you. Specialised knowledge, references to your local area, the books you mention, and opinions you've stated elsewhere all narrow the field. This overlaps with general OPSEC: a technically anonymous account that knows exactly how your office's expense system works has a small pool of suspects.

Rewrite mechanically

Round-trip translation (into another language and back) was a popular trick. It flattens style but produces awkward text and isn't reliable. Paraphrasing with a language model is more effective at removing surface quirks. If you do this, run it locally rather than pasting sensitive drafts into a cloud service that keeps logs, which would be an obvious compartmentalization failure. Then edit the output yourself so it reads naturally, and so you don't end up with a new, recognisable "machine" style.

Don't cross the streams

The strongest attacks compare your anonymous writing with a body of known writing. If the pseudonym writes about knitting and your real name only writes code reviews, attribution is much harder than if both write long opinion pieces about the same politics.

Time and rhythm

Closely related to style is behaviour: when you post, how quickly you reply, how long your sessions last. A pseudonym that is always active during your lunch break and silent while you're on a flight is easy to correlate with a known person's schedule. Scheduling posts, or simply varying when you write, helps a bit. It's the same family of problem as traffic analysis, just at a human scale.

If this all sounds discouraging, keep perspective. Stylometry needs someone motivated to collect samples and compare. For most pseudonyms, the realistic risk is that a person who knows you well recognises your voice, as David Kaczynski did. Write as someone they wouldn't recognise.

#stylometry #authorship-attribution #anonymity #writing