JAMDEC: Unsupervised Authorship Obfuscation using Constrained Decoding over Small Language Models

Jillian Fisher, Ximing Lu, Jaehun Jung, Liwei Jiang, Zaïd Harchaoui, Yejin Choi

Abstract

JAMDEC is a novel, unsupervised framework designed to protect writer identity by rewriting text using small, open-source language models (e.g., GPT2-XL). By integrating diverse beam search with lexical constraints, JAMDEC achieves authorship obfuscation performance comparable to models 100 times its size, such as GPT-3.5, while maintaining superior fluency and content preservation.

Introduction

In an era of ubiquitous online footprints, advanced "authorship attribution" techniques pose significant risks to the privacy of anonymous writers, whistleblowers, and participants in blind academic reviews. Authorship obfuscation—the defensive task of rewriting text to mask an author's unique stylistic "voice"—is essential for maintaining anonymity.

However, effective obfuscation faces three primary challenges:

  1. Data Scarcity: There is a lack of large-scale, supervised datasets mapping original text to obfuscated versions across diverse styles.
  2. Undefined Target Style: Unlike standard style transfer, obfuscation has no fixed target; the objective is simply to deviate from the original author's style.
  3. Privacy Risks of Large Models: Utilizing proprietary LLMs via APIs (e.g., GPT-4) requires transmitting sensitive data to third parties, undermining the privacy goals of obfuscation.

Methodology

The researchers propose JAMDEC, an inference-time algorithm that enhances the capabilities of smaller language models through a three-stage pipeline.

The JAMDEC pipeline: Keyword extraction, constrained diverse beam search, and filtering.
  1. Keyword Extraction: To preserve the original meaning, JAMDEC identifies "anchor" words using KeyBERT and a novel likelihood-based approach. This approach flags words the model finds "surprising" in context, which typically represent high-information content.
  2. Over-generation via CoDi-BS: The core of JAMDEC is Constrained Diverse Beam Search (CoDi-BS). This method combines Lexically Constrained Beam Search (forcing the inclusion of keywords) with Diverse Beam Search (penalizing similar candidates). This forces the model to explore varied linguistic structures while remaining faithful to the original semantics.
  3. Filtering: The system generates multiple candidates and filters them using off-the-shelf models for content preservation (via Natural Language Inference, NLI) and grammaticality (via Corpus of Linguistic Acceptability, CoLA).

Experimental Setup

JAMDEC was evaluated on two distinct domains:

  • AMT (Extended-Brennan-Greenstadt): Scholarly paragraphs written by multiple authors on identical topics.
  • BLOG (Blog Authorship Corpus): Informal, diary-style entries.

Tests were conducted on subsets with 3, 5, and 10 authors to assess the difficulty of obfuscation within different group sizes.

Results and Discussion

JAMDEC (utilizing GPT2-XL) consistently outperformed previous state-of-the-art task-specific methods, such as Mutant-X. Notably, on the AMT-3 dataset, JAMDEC achieved "Task Scores" (a composite of obfuscation, content preservation, and quality) competitive with GPT-3.5 (175B), despite being two orders of magnitude smaller.

Qualitative comparison of authorship obfuscation methods. JAMDEC produces more coherent and natural-sounding text compared to baselines.

Human evaluations further validated these findings, with JAMDEC scoring 5% to 50% higher on grammar and fluency than competing methods. While baseline models often produced "word salad" to deceive classifiers, JAMDEC generated natural, complex sentences that effectively masked authorship.

Key Insights

  • Decoding Efficiency: Algorithmic enhancements at the decoding stage (like CoDi-BS) can bridge the performance gap between small (1.5B) and massive (175B) models.
  • Diversity as Obfuscation: Maximizing diversity in beam search serves as an effective proxy for pushing the model away from an author's default stylistic patterns.
  • Likelihood-based Constraints: Using internal model probabilities to identify keywords ensures that high-information terms are preserved, preventing the model from hallucinating or losing core meaning.

Limitations and Future Work

Despite its success, JAMDEC has a higher computational cost due to its over-generation and filtering stages. There is also a minor risk of hallucination, though mitigated by NLI filters. Furthermore, the CoLA filter may exhibit bias toward standard English dialects. Future research will focus on improving computational efficiency and ensuring filters are robust to diverse linguistic backgrounds.

Summary updated

BibTeX
@inproceedings{fisher2024jamdec,
  author = {Jillian Fisher and Ximing Lu and Jaehun Jung and Liwei Jiang and Zaïd Harchaoui and Yejin Choi},
  title = {{JAMDEC: Unsupervised Authorship Obfuscation using Constrained Decoding over Small Language Models}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.naacl-long.87},
}
Figure