Explainable Disentangled Representation Learning for Generalizable Authorship Attribution in the Era of Generative AI

Hieu Man, Van-Cuong Pham, Nghia Trung Ngo, Franck Dernoncourt, Thien Huu Nguyen

TL;DR

The Explainable Authorship Variational Autoencoder (EAVAE) framework introduces an architectural "separation-by-design" approach to cleanly isolate an author's writing style from text content. By pairing contrastive pretraining with an explainable Variational Autoencoder, EAVAE achieves state-of-the-art performance in cross-domain authorship attribution and few-shot AI text detection, while generating natural language explanations for its decisions.

What Problem Does This Paper Address?

In authorship attribution (identifying who wrote a text) and AI-generated text detection, models frequently suffer from content-style entanglement (also known as topic confusion). Instead of learning an author's unique stylistic fingerprint, deep learning models often pick up on spurious correlations between authors and the topics they frequently discuss.

An example of content-style entanglement where a model confuses topic with author style.

As illustrated in Figure 1, a standard model might mistakenly classify a detective story written by Agatha Christie as a work by Sir Arthur Conan Doyle simply because it associates the content (Detective Fiction) with Conan Doyle. This prevents models from generalizing well across different domains or accurately identifying machine-generated text when the topic shifts. Furthermore, most existing style-retrieval models operate as black boxes, offering no explanation for why they think two pieces of text share an author.

Methods

To solve this, the authors propose EAVAE, a two-stage framework designed to explicitly factor out style from content:

  1. Contrastive Pretraining: The model initializes authorial representations using a large language model backbone (Qwen2-1.5B) modified with bidirectional attention. It undergoes supervised contrastive learning paired with BM25-based hard negative mining to force the model to differentiate between documents that are lexically similar but written by different authors.
  2. Disentangled VAE Fine-tuning: The architecture splits into dual encoders: a style encoder ($E_s$) and a content encoder ($E_c$). These map the text into independent latent spaces, assuming style and content are orthogonal. A shared reconstructor ($G_{rec}$) then attempts to rebuild the original document from these separate embeddings.
The architecture of the Explainable Authorship Variational Autoencoder (EAVAE).
  1. Explainable Discriminator: To enforce strict disentanglement, the framework introduces a generator-based discriminator ($G_{expl}$). Given pairs of style or content representations, it doesn't just output a binary classification (same/different author or topic); it uses a hybrid prompting mechanism (mixing fixed templates with learnable soft prompts) to generate a natural language explanation justifying its decision.
The architecture of the unified generator with a hybrid prompting mechanism.

Datasets

The authors compiled and utilized several massive datasets for training and evaluation:

  • Pretraining Dataset: A massive collection of 27.4 million documents from 1.3 million unique authors compiled from 16 public sources, including Reddit, Twitter, Amazon Product Reviews, StackExchange, and Wikipedia.
  • EAVAE Fine-tuning Dataset: 132k document pairs from 12k unique authors, intentionally curated using GTE-Qwen2-1.5B and K-means clustering to find "hard pairs" (e.g., same author writing on different topics, or different authors writing on the same topic). QwQ-32B was used to generate ground-truth explanations for training the discriminator.
  • Evaluation Benchmarks: Evaluated on Amazon Reviews and PAN21 for author-level attribution; the five-domain cross-topic HRS corpus for document-level attribution; and the M4 benchmark (ArXiv, PeerRead, WikiHow, Wikipedia) for few-shot AI-generated text detection.

Key Insights and Ideas

  • Separation-by-Design: Relying on contrastive loss alone implicitly conflates style and topic. Forcing an architectural split via independent VAE latent spaces guarantees cleaner factor isolation.
  • Explanations as a Regularizer: Generating natural language rationales isn't just a post-hoc feature for human readability. The task of explaining why a style matches forces the discriminator to actively ignore content words and focus on structural, syntactic, and colloquial markers.
  • Zero-Shot AI Detection Capability: Because EAVAE learns a pure representation of human authorial style independent of topic, it naturally excels at identifying machine-generated text in a zero-shot/few-shot manner without ever being explicitly trained on LLM outputs.

Key Results

Authorship Attribution

EAVAE achieved state-of-the-art performance on standard author-level benchmarks, reaching 97.0% Mean Reciprocal Rank (MRR) on Amazon Reviews and 61.0% MRR on PAN21.

Results on Amazon Reviews and PAN21 for Author-level Authorship Attribution.

On the highly challenging, cross-topic HRS corpus, EAVAE demonstrated its robust domain generalization by averaging 47.3% MRR, outperforming the previous state-of-the-art by a substantial +10.7 MRR absolute gain.

Results on the HRS corpus for Document-level Authorship Attribution.

AI-Generated Text Detection

Without any task-specific fine-tuning for machine-text detection, EAVAE achieved an impressive average performance of 65.7% pAUC@1 and 98.5% pAUC@10 in single-target detection on the M4 benchmark, proving that robust style representations transfer seamlessly to generative AI detection.

Results on the M4 dataset for Single-target and Multi-target AI-generated Text Detection.

Limitations and Future Work

  • LLM Dependency: The quality, accuracy, and alignment of the generated natural language explanations are inherently bound to the capabilities of the underlying generator model.
  • Pairwise Constraint: The current framework is optimized for binary authorship comparison (determining if two texts match) and requires adaptation to scale efficiently to massive multi-author classification pools or collaborative writing setups.
  • The Generative Moving Target: As large language models evolve to more accurately mimic human stylistic nuances, purely style-based detection frameworks will face an ongoing cat-and-mouse game to maintain robustness.

Summary updated

BibTeX
@inproceedings{man2026explainable,
  author = {Hieu Man and Van-Cuong Pham and Nghia Trung Ngo and Franck Dernoncourt and Thien Huu Nguyen},
  title = {{Explainable Disentangled Representation Learning for Generalizable Authorship Attribution in the Era of Generative AI}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.acl-long.2018},
}

Loading related content...

Figure