Implementing Long Text Style Transfer with LLMs through Dual-Layered Sentence and Paragraph Structure Extraction and Mapping
Yusen Wu, Xiaotie Deng
TL;DR
The paper tackles long-text style transfer by introducing ZeroStylus, a zero-shot framework that couples sentence-level style adaptation with paragraph-level structural coherence through two phases: hierarchical template acquisition and template-guided generation. It builds dynamic sentence and paragraph template repositories $\Gamma_s$ and $\Gamma_p$, enabling context-aware rewriting that preserves inter-sentence relations. The method uses multi-granular template matching and length-constrained iterative rewriting to mitigate style drift in long documents, and ablation/adversarial tests show the necessity of both template hierarchies. Experimental results on long-form academic text demonstrate improved style preservation and coherence over baseline zero-shot prompts and sentence-only approaches, without requiring parallel corpora or fine-tuning. These findings suggest a practical path toward coherent long-text style transfer in resource-constrained settings and across diverse stylistic domains.
Abstract
This paper addresses the challenge in long-text style transfer using zero-shot learning of large language models (LLMs), proposing a hierarchical framework that combines sentence-level stylistic adaptation with paragraph-level structural coherence. We argue that in the process of effective paragraph-style transfer, to preserve the consistency of original syntactic and semantic information, it is essential to perform style transfer not only at the sentence level but also to incorporate paragraph-level semantic considerations, while ensuring structural coherence across inter-sentential relationships. Our proposed framework, ZeroStylus, operates through two systematic phases: hierarchical template acquisition from reference texts and template-guided generation with multi-granular matching. The framework dynamically constructs sentence and paragraph template repositories, enabling context-aware transformations while preserving inter-sentence logical relationships. Experimental evaluations demonstrate significant improvements over baseline methods, with structured rewriting achieving 6.90 average score compared to 6.70 for direct prompting approaches in tri-axial metrics assessing style consistency, content preservation, and expression quality. Ablation studies validate the necessity of both template hierarchies during style transfer, showing higher content preservation win rate against sentence-only approaches through paragraph-level structural encoding, as well as direct prompting method through sentence-level pattern extraction and matching. The results establish new capabilities for coherent long-text style transfer without requiring parallel corpora or LLM fine-tuning.
