Explainable Disentangled Representation Learning for Generalizable Authorship Attribution in the Era of Generative AI
| Authors | Hieu Man et al. |
| Year | 2026 |
| HF Upvotes | 2 |
| arXiv | 2604.21300 |
| Download | |
| HF Page | View on Hugging Face |
Abstract
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 onlinehttps://github.com/hieum98/avae https://huggingface.co/collections/Hieuman/document-level-authorship-datasets.
Engineering Breakdown
Plain English
This paper addresses a fundamental problem in authorship attribution and AI-generated text detection: existing models entangle writing style with topic content, causing poor performance when tested on new domains. The authors propose EAVAE (Explainable Authorship Variational Autoencoder), a framework that explicitly separates style from content through architectural design—it pretrains style encoders using supervised contrastive learning on diverse authorship data, then finetunes with a VAE that maintains separate encoders for style and content. The core innovation is enforcing disentanglement through architectural separation rather than relying on loss functions alone, which enables the model to learn robust stylistic patterns that generalize across different topics and domains.
Core Technical Contribution
The key novelty is a two-stage training approach that decouples style representation from content representation through explicit architectural separation. Rather than using a single encoder and relying on regularization losses to disentangle factors (the standard VAE approach), EAVAE maintains dedicated style and content encoders from the ground up, preventing spurious correlations from forming during training. The use of supervised contrastive learning for pretraining the style encoder ensures that stylistic features are discriminative and author-specific before the VAE finetuning stage. This architectural separation-by-design is fundamentally different from prior work that attempts to disentangle after-the-fact using β-VAE or information bottleneck losses.
How It Works
The system operates in two distinct phases. First, a style encoder is pretrained using supervised contrastive learning: given diverse text samples from multiple authors, the encoder learns to pull representations from the same author closer together while pushing different authors apart in the embedding space. This ensures the style encoder captures discriminative authorial patterns before contamination from content information. During the second phase, the full EAVAE model uses this pretrained style encoder alongside a separate content encoder; text is encoded into both style and content latent representations simultaneously. The VAE reconstruction objective reconstructs the original text from both representations, but crucially, the style and content encoders are architecturally isolated—they receive different inductive biases and optimization signals. An additional disentanglement loss (the abstract mentions enforcement of disentanglement but doesn't specify the exact mechanism) prevents the encoders from redundantly encoding the same information, forcing genuine separation of concerns.
Production Impact
Implementing EAVAE would significantly improve robustness in two high-value applications: academic integrity systems (detecting plagiarism and bought essays) and generative AI detection (distinguishing AI-written content from human writing). In current production systems, authorship models often fail catastrophically when a known author writes about an unfamiliar topic or when a student suddenly writes about a domain-specific subject—EAVAE mitigates this by learning style independent of content, making attribution more reliable across diverse subject matter. The two-stage training requirement adds complexity to the ML pipeline: teams must first assemble large, diverse authorship corpora, pretrain the style encoder, then finetune the full VAE—this increases training time and compute cost compared to end-to-end baselines. However, the payoff is substantial: better cross-domain generalization reduces false positives in plagiarism detection (fewer innocent flagged users) and improves robustness of AI-detection in essay mills and online content platforms where topic variation is high.
Limitations and When Not to Use This
The paper does not address computational inference latency or memory requirements—dual encoders and VAE sampling add overhead compared to single-encoder baselines, potentially problematic for real-time systems processing millions of documents. The approach assumes that supervised authorship data exists during pretraining, which limits applicability to new/emerging authors or low-resource languages where labeled training data is scarce. The disentanglement enforcement mechanism is only partially described in the abstract, leaving unclear how strongly style and content are actually separated—if the enforcement is weak, the model may still suffer from content leakage into style representations. Additionally, the paper likely does not address adversarial robustness: an author could intentionally adopt a different style to evade detection, and it's unclear whether EAVAE would remain robust to such deliberate style-switching attacks.
Research Context
This work builds on a long line of disentangled representation learning research, extending beyond the typical application domains (faces, objects, variations) into the underexplored area of authorship. Prior work in authorship attribution relied heavily on bag-of-words or statistical stylometry (syntax, rare words), while recent deep learning approaches use end-to-end transformers—but few explicitly address the content-style entanglement problem. The paper likely compares against β-VAE and other unsupervised disentanglement baselines, as well as standard authorship attribution benchmarks. The architectural innovation of separation-by-design with supervised pretraining opens a promising direction for other disentanglement tasks where one factor (like style or speaker identity) has natural labels in pretraining data but other factors (like content) do not.
:::tip Subscribe Get weekly breakdowns of papers like this in AI Letters - the newsletter for engineers building production AI systems. :::
