Source-linked AI summary

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

arXiv:2604.21300v1cs.CLcs.IRcs.LG

TL;DR

EAVAE addresses content-style entanglement, where authorship models spuriously associate author identity with topics and generalize poorly across domains. It separates style and content through staged contrastive and VAE training with an explainable discriminator, achieving strong authorship-attribution and AI-generated-text-detection results across diverse benchmarks.

  • Problem

    Authorship models can spuriously bind author identity to topic rather than style, limiting robust cross-domain authorship attribution and AI-generated text detection.

  • Method

    EAVAE combines supervised contrastive pretraining with VAE-based finetuning using separate style and content encoders and an explainable discriminator.

  • Results

    EAVAE achieves state-of-the-art or competitive performance across authorship-attribution benchmarks and strong performance on AI-generated text detection, with 97.0% MRR on Amazon Reviews.

  • Takeaways & Limitations

    Architectural separation of style and content supports more robust and generalizable authorship representations while providing natural-language explanations for learned decisions.

  • Takeaways & Limitations

    Explanation quality depends on the underlying language model, the framework primarily targets binary authorship attribution, and evolving language models may challenge style-based detection robustness.

Abstract

from arXiv · show

Learning robust representations of authorial style is crucial for authorship attribution and AI-generated text detection. However, existing methods often struggle with content-style entanglement, where models learn spurious correlations between authors' writing styles and topics, leading to poor generalization across domains. To address this challenge, we propose Explainable Authorship Variational Autoencoder (EAVAE), a novel framework that explicitly disentangles style from content through architectural separation-by-design. EAVAE first pretrains style encoders using supervised contrastive learning on diverse authorship data, then finetunes with a Variational Autoencoder (VEA) architecture using separate encoders for style and content representations. Disentanglement is enforced through a novel discriminator that not only distinguishes whether pairs of style/content representations belong to the same or different authors/content sources, but also generates natural language explanation for their decision, simultaneously mitigating confounding information and enhancing interpretability. Extensive experiments demonstrate the effectiveness of EAVAE. On authorship attribution, we achieve state-of-the-art performance on various datasets, including Amazon Reviews, PAN21, and HRS. For AI-generated text detection, EAVAE excels in few-shot learning over the M4 dataset. Code and data repositories are available online\footnote{https://github.com/hieum98/avae} \footnote{https://huggingface.co/collections/Hieuman/document-level-authorship-datasets}.

1 Introduction

Authorship attribution and AI-generated text detection require representations that capture authorial style rather than topic-specific correlations. EAVAE addresses this content-confounding problem by separating style and content architecturally and adding explanations to its discrimination objective.

  • Authorship attribution identifies a text’s author, supporting applications in intellectual property protection, academic integrity, and forensic investigation.
  • Content confounding occurs when models associate authors with frequently discussed topics instead of topic-agnostic writing style, reducing robustness across domains.
  • Existing disentanglement methods may conflate style and content in a single embedding, use limited-capacity encoders, and lack interpretability.
  • EAVAE uses architectural separation-by-design with separate style and content encoders to explicitly disentangle authorial style from content.
  • Its explainable discriminatory objective distinguishes matching and nonmatching author/content representations while generating natural-language explanations.
  • EAVAE reports substantial improvements on Amazon Reviews, PAN21, and HRS authorship attribution benchmarks, with strong M4 results for AI-generated text detection.

2 Methodology

EAVAE learns authorial representations through contrastive pretraining, then explicitly separates style and content with dual encoders, adversarial discrimination, and a unified generative architecture. Its discriminator jointly enforces disentanglement and produces explanations, while hybrid prompting supports reconstruction and discrimination.

  • 2.1 Problem Formulation: The authorship task is formulated as ranked retrieval, with cosine similarity favoring documents written by the same author while avoiding topic-author correlations.The learned function maps documents to representation vectors used for retrieval.
  • 2.2 Contrastive Pretraining: EAVAE first contrastively pretrains LLM-based author representations, clustering same-author documents and separating different-author documents.Hard negatives retrieved with BM25 are lexically similar but stylistically different, reducing reliance on surface-level features.
  • 2.3.1 Disentangled VAE Architecture: EAVAE finetunes a VAE with separate style and content encoders, mapping each document into distinct latent spaces under an independence assumption.A shared reconstructor reconstructs the original document from the style and content representations.
  • 2.3.2 Explainable Discriminator: An explainable discriminator classifies whether style pairs share an author and whether content pairs are similar, while generating natural-language explanations of distinguishing features.The generator-based discriminator is intended to enforce disentanglement and make learned representations interpretable.
  • 2.3.3 Generator with Hybrid Prompting: A unified generator uses hybrid prompts for both document reconstruction and discrimination with explanations, conditioning generation on task-specific representations.Fixed template prompts are combined with learnable soft prompts, whose placeholders are replaced by style and content representations.

3 Experiments

EAVAE is evaluated on authorship attribution and AI-generated text detection using diverse benchmarks, retrieval-based metrics, and ablation studies. Results show strong benchmark performance and benefits from explicit disentanglement and explainable discrimination.

  • Experimental Setup: 27.4 million documents from 1.3 million authors form the diverse pretraining corpus, after length filtering, author-count constraints, and deduplication.The corpus spans news, blogs, social media, and reviews.
  • Experimental Setup: The experiments evaluate authorship attribution and AI-generated text detection using benchmark datasets, retrieval-based metrics, and comparisons with recent baselines.Authorship attribution uses MRR and Recall@8 at author and document levels, while detection uses pAUC@k under single-target and multi-target settings.
  • Authorship Attribution: 97.0% MRR and 99.0% Recall@8 on Amazon Reviews exceed LUAR by +3.6 and +3.3 points, while PAN21 reaches 61.0% MRR and 66.2% Recall@8.The VAE fine-tuning stage adds +3.1 MRR over contrastive pretraining alone.
  • Authorship Attribution: 47.3% MRR and 72.2% Recall@8 on HRS improve over Man and Nguyen 2024 by +10.7 MRR and +27.4 Recall@8.HRS is a five-domain cross-topic benchmark, and the VAE stage adds +6.1 average MRR on document-level tasks.
  • AI-generated Text Detection: 65.7% pAUC@1, 93.5% pAUC@5, and 98.5% pAUC@10 are achieved for single-target M4 detection, while multi-target detection reaches 62.0%, 87.4%, and 97.7%.The results are reported across diverse domains without task-specific detection fine-tuning.
  • Ablation Studies: Removing architectural disentanglement reduces HRS performance from 47.3% to 44.5% MRR and from 72.2% to 58.3% Recall@8.Removing the explainable discriminator causes additional drops of 1.9 MRR and 6.2 Recall@8 points.

4 Related Work

Related work has progressed from interpretable stylometry to neural contrastive representations, but content confounds remain a central challenge. EAVAE extends LLM-based style encoding with architectural separation and adversarial explainable training.

  • Evolution of Authorship Attribution: Authorship attribution evolved from hand-crafted stylometry and classical classifiers toward neural representation learning with contrastive objectives.These newer methods achieve strong results but remain vulnerable to topic-related confounds.
  • Content Confounds: Topic confusion occurs when models spuriously bind author identity to topic rather than writing style.This content-confound problem limits the reliability of authorship representations across topics.
  • Disentanglement Methods: Implicit disentanglement methods use supervised contrastive learning and content-matched pairs to cluster documents by author while separating stylistically distinct negatives.Examples include LUAR, Contra-X, and related authorship representation methods.
  • EAVAE Positioning: EAVAE retains LLM-based style encoding while explicitly separating style and content through architectural separation and adversarial explainable training.This distinguishes EAVAE from approaches relying on implicit disentanglement alone.

5 Conclusion

EAVAE combines supervised contrastive pre-training, disentangled VAE architecture, and an explainable discriminator to separate stylistic and topical information while explaining decisions. Experiments support robust, generalizable representations across authorship attribution and AI-generated text detection.

  • EAVAE combines supervised contrastive pre-training, a disentangled VAE architecture, and an explainable discriminator.The framework targets explainable separation of authorial style and content in text.
  • The explainable discriminator provides natural language explanations while helping separate stylistic and topical information.
  • EAVAE significantly outperforms strong baselines across diverse authorship attribution and AI-generated text detection settings.
  • Ablation studies confirm the importance of architectural disentanglement and the explainable discriminator.
  • The results support the hypothesis that principled style-content separation enables more robust and generalizable authorship representations.

Limitations

EAVAE has limitations involving explanation quality, attribution scope, and the evolving ability of language models to imitate human style. These limitations define important boundaries for interpretation and deployment.

  • Explanation quality and interpretability depend on the underlying language model and may not align with human intuition.The paper calls for research improving the fidelity and usefulness of generated explanations.
  • The current framework focuses primarily on binary authorship attribution and may require adaptation for multi-author or collaborative writing.
  • Evolving language models may increasingly mimic human style, potentially challenging style-based AI-generated text detection.

A Pre-training Dataset Details

The pre-training dataset statistics are summarized in Table 5.

  • Table 5 summarizes the statistics of the pretraining dataset.
  • The pretraining dataset is characterized through statistics reported in Table 5.
  • The dataset-statistics summary appears in Table 5.

B Implementation Details

EAVAE uses Qwen2-1.5B with supervised contrastive learning during pre-training, followed by a VAE stage that explicitly separates style and content. The reported setup uses large-batch training, AdamW, LoRA, and two epochs.

  • Qwen2-1.5B initializes the supervised contrastive pre-training framework.The implementation uses HuggingFace Transformers and PyTorch.
  • A batch size of 512, AdamW, and learning rate 2e−4 are used during contrastive pre-training.
  • Contrastive pre-training runs for 2 epochs with LoRA rank r = 16 to reduce memory footprint.

C Explainable Analysis

EAVAE’s explainable discriminator produces natural-language, text-linked explanations for authorship comparisons. The case study shows it identifying stylistic evidence beyond shared topic while separating style from sentiment and content overlap.

  • The discriminator generates natural-language explanations that cite specific stylistic evidence for authorship comparisons.The case study evaluates EAVAE’s explainable disentangled representations qualitatively.
  • The case study compares two texts about food reviews, including chicken and cupcakes, with an authorship label indicating same author.
  • It highlights parallel structure and recurring phrases, including “make this again,” as evidence for same-author inference.
  • The analysis separates stylistic cues from sentiment or overlapping content when supporting authorship comparisons.

D Prompting Details

The prompting details specify templates for content discrimination, reconstruction, and style discrimination within EAVAE. These prompts require structured outputs and direct the analysis toward content similarity or stylistic markers.

  • EAVAE includes prompt templates for reconstruction, style discrimination, and content discrimination tasks.The supplied passages introduce the reconstruction and discrimination prompts and identify the three template types.
  • Reconstruction Prompt Template: The reconstruction prompt combines style and content representations to reconstruct the original text.
  • Table 5 reports statistics for the supervised-contrastive pretraining dataset, with average length measured in tokens.
  • Style Discrimination Prompt Template: The style-discrimination prompt asks whether two style representations come from the same author and requests stylistic markers supporting the attribution.Its required JSON fields are determination and explanation.
  • Content Discrimination Prompt Template: The content-discrimination prompt asks whether two content representations express the same core content regardless of stylistic differences.It requests a concise explanation and a determination of either same content or different content in JSON format.
Loading 2604.21300v1…