Learning Text Styles: A Study on Transfer, Attribution, and Verification

Zhiqiang HuarXiv 2025 · DOI

Introduction

In the era of Large Language Models (LLMs), the ability to generate coherent text has reached unprecedented heights. However, the nuance of "style"—the distinctive linguistic fingerprint that separates one author from another or one tone from another—remains a challenging frontier. This research presents a unified framework for mastering text styles, addressing the critical pillars of style transfer, authorship attribution, and authorship verification. By integrating parameter-efficient fine-tuning (PEFT) and contrastive learning, this work provides solutions that are computationally efficient, robust to topical shifts, and human-interpretable.

Efficient Multi-Attribute Style Transfer: The Adapter-TST Framework

Traditional Text Style Transfer (TST) often focuses on isolated attributes, such as sentiment or formality. However, real-world writing involves complex, overlapping styles. Modifying multiple attributes simultaneously typically requires massive computational overhead or the training of separate models for every possible combination of styles.

To solve this, the Adapter-TST framework utilizes "neural adapters"—compact, trainable modules (approximately 3MB) integrated into frozen backbone models like BART or T5. This modular approach allows for:

  1. Parallel Generation: Running multiple adapters simultaneously to produce various stylistic versions of the same input.
  2. Compositional Editing: Stacking adapters to perform multi-attribute transformations (e.g., changing a sentence to be both "polite" and "past tense") without retraining the entire model.

This method reduces computational costs by 80% compared to full fine-tuning while maintaining state-of-the-art performance on benchmarks like StylePTB.

Overcoming Topic Bias in Attribution: ContrastDistAA

Authorship Attribution (AA) models frequently suffer from "topic conflation." A model trained on an author's technical writing may fail to identify the same author when they write about personal hobbies because the model has learned the topic rather than the style.

The ContrastDistAA framework addresses this through two primary mechanisms:

  • Contrastive Learning: The model is trained to pull stylistic representations of the same author closer together in the embedding space while pushing those of different authors apart.
  • Mutual Information (MI) Minimization: This step mathematically disentangles topical content from stylistic signatures. By "stripping away" the subject matter, the model focuses exclusively on linguistic fingerprints.

This approach yielded a 29% increase in F1 scores on the Twitter1000 dataset, demonstrating its efficacy even in short-text environments where topical noise is prevalent.

Interpretable Verification: The InstructAV Approach

In forensic and academic contexts, a binary "yes/no" for authorship verification is often insufficient. Stakeholders require a rationale for the model's decision. InstructAV leverages instruction-tuned LLMs (such as LLaMA-2-7B) to provide both a verification decision and a detailed linguistic analysis.

By using Low-Rank Adaptation (LoRA), the model is taught to compare sentence structures, idiomatic usage, and punctuation patterns. Interestingly, the research found that requiring the model to generate an explanation actually improved classification accuracy by 25.2% over BERT-based baselines on the IMDB dataset. The process of rationalization appears to guide the model toward more relevant stylistic features. Human evaluators further rated these explanations as highly persuasive, rivaling the quality of ChatGPT.

Expanding the Linguistic Horizon: Regional Datasets

A significant contribution of this research is the introduction of a new Regional Tweets dataset. Comprising 425,111 English tweets from major Southeast Asian hubs (Singapore, Kuala Lumpur, Manila, Jakarta, Hanoi, and Bangkok), this resource enables the study of regional dialects and linguistic variations in social media. This dataset serves as a bridge between standard academic benchmarks (like Yelp and CCAT50) and the messy, diverse reality of global digital communication.

Conclusion and Future Directions

This research demonstrates that text style is not a monolithic "black box" but a modular, disentangleable, and explainable component of language. By moving toward parameter-efficient and interpretable models, we can better detect plagiarism, identify malicious actors in cybersecurity (e.g., code authorship), and create more nuanced AI writing assistants. Future work will focus on automating the selection of adapter hyperparameters and refining metrics to better capture human stylistic preferences.

Summary updated

BibTeX
@misc{hu2025learning,
  author = {Zhiqiang Hu},
  title = {{Learning Text Styles: A Study on Transfer, Attribution, and Verification}},
  year = {2025},
  eprint = {2507.16530},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.16530},
}
Figure