Introduction
Neural language models (LMs) are highly effective at sequence prediction but often act as "memorization machines," inadvertently learning to associate user identities with sensitive phrases. While Differential Privacy (DP), specifically DP-SGD, is the standard defense, it imposes a significant "privacy tax" in the form of degraded utility, high computational overhead (often 10–20x slower), and disparate impact on under-represented user groups. This paper introduces two novel privacy-preserving regularization techniques—Adversarial Training and Triplet-based Loss—designed to optimize the privacy-utility trade-off without the heavy costs of DP.
Methodology
The proposed methods focus on regularizing the model's last hidden state ($h_x$) to make it "un-linkable" to a specific author.
Adversarial Training
This approach frames privacy as a minimax game between the Language Model and an Author Discriminator. The LM aims to predict the next token while simultaneously trying to "fool" the Discriminator, which attempts to identify the author from the hidden state. By minimizing a privacy loss that encourages a uniform output distribution from the Discriminator, the LM learns representations that obfuscate author identity.
Triplet-based Loss
Inverting standard triplet loss logic, this method pushes representations of the same author further apart in the embedding space while pulling representations of different authors closer together. This effectively masks the unique "fingerprint" of an author's writing style.
Experimental Results
The methods were evaluated on the Avocado (corporate emails) and Reddit datasets using a two-layer LSTM architecture.
Efficiency and Speed
Adversarial training proved highly efficient, running 15.5x faster per epoch than DP-SGD and only 1.06x slower than standard unmitigated training. This makes it viable for massive datasets where DP is computationally prohibitive.
Privacy-Utility Trade-off
The proposed regularizers demonstrated superior protection for repeated patterns ("canaries"). At comparable perplexity (utility) levels, they showed lower "exposure"—a metric for memorization—than DP, particularly for sequences repeated more than nine times. Unlike DP, which is data-agnostic, these regularizers are context-sensitive, specifically learning which sequences are linkable to authors.
Fairness and Attack Resistance
DP often exacerbates performance gaps between well-represented and under-represented users. While DP caused a 29-point utility drop gap in testing, the proposed regularizers reduced this gap to just 7 points. Furthermore, in reconstruction attacks, the proposed methods significantly outperformed DP in preventing the recovery of synthetic canary phrases.
Discussion and Future Work
While effective, these methods rely on empirical privacy metrics rather than the formal mathematical guarantees of DP. Additionally, the Discriminator's complexity scales with the number of authors, which may pose challenges for deployments with millions of users. Future research should explore the application of these regularizers to Transformer architectures and larger-scale user bases.
Summary updated