In natural language processing, we often treat words as the fundamental units of meaning. However, for tasks that require identifying who wrote a text or where they are from, words can be misleading. A writer’s choice of topic—the "what"—often obscures their underlying "writeprint"—the "how."
To solve this, a growing body of research suggests looking beneath the word level. By treating text as a raw sequence of characters, researchers can capture stylistic fingerprints that are invisible to traditional semantic models.
The Intuition of Textual Texture
Think of a text not as a series of concepts, but as a visual texture. An author’s style is composed of "brushstrokes": the way they use punctuation, their preference for specific suffixes, or their idiosyncratic spelling errors.
Dell Zhang and Wee Sun Lee demonstrated in Extracting key-substring-group features for text classification that these low-level patterns are highly discriminative. Unlike complex syntactic trees, character-level features capture stylistic nuances—like the rhythm of a sentence or morphological habits—without needing deep linguistic analysis.
Robustness Across Topics
The primary challenge in authorship attribution is "topic noise." If you train a model on an author’s political essays and test it on their movie reviews, a word-based model will likely fail because the vocabulary has changed entirely.
Character-level representations solve this by focusing on features that remain stable across subjects. Thamar Solorio and Upendra Sapkota found in Cross-Topic Authorship Attribution: Will Out-Of-Topic Data Help? that character n-grams effectively encode punctuation habits and orthographic errors that persist even when the topic shifts. Similarly, Radu Tudor Ionescu and Marius Popescu showed that these features allow for "Native Language Identification" that is entirely language-independent and robust to topic shifts, as seen in Can characters reveal your native language? A language-independent approach to native language identification.
Masking Content to Isolate Style
To ensure models ignore "what" is being said, researchers have turned to "text masking" or distortion. The goal is to destroy the semantic meaning of the words while preserving the structural skeleton of the writing.
In Bots and Gender Profiling using Masking Techniques, Víctor Jiménez-Villar and Manuel Montes-y-Gómez obfuscated infrequent words and digits. This forced the model to rely on the "shape" of the document—punctuation sequences and word endings—to identify bot behavior and gender. Fredrik Johansson took this further in FOI Cross-Domain Authorship Attribution for Criminal Investigations by masking all alphabetic characters, leaving only the "structural stylometric features" like spacing and digit usage. This creates a fingerprint that is nearly impossible for an author to consciously alter.
Handling Noisy and Archaic Data
Character-level modeling is particularly effective when standard "words" don't exist or are inconsistent. This is common in:
- Dialects: James R. Glass and Yonatan Belinkov used character-level CNNs to distinguish Arabic dialects without needing a dictionary, as described in A Character-level Convolutional Neural Network for Distinguishing Similar Languages and Dialects.
- Historical Text: In AriEmozione: Identifying Emotions in Opera Verses, Alberto Barrón-Cedeño and colleagues found that character n-grams outperformed word-level models for archaic Italian, where spelling is unstandardized.
- Social Media: For code-mixed text (like Hindi-English), Manish Shrivastava showed that character n-grams capture the idiosyncratic spelling and punctuation essential for detecting sarcasm in A Corpus of English-Hindi Code-Mixed Tweets for Sarcasm Detection.
Why "Shallow" Often Beats "Deep"
While Large Language Models (LLMs) like BERT dominate most of NLP, they often struggle with authorship tasks. This is because transformers are designed to generalize across meanings, often smoothing over the very "noise" (like a double-space after a period or a specific typo) that identifies an author.
Bhuwan Dhingra and Jacob Tyo demonstrated in On the State of the Art in Authorship Attribution and Authorship Verification that traditional n-gram models still outperform BERT on many authorship benchmarks. By prioritizing sub-lexical habits over semantic content, these "shallow" character features provide a more resilient and granular fingerprint of human identity.