Building NLP applications for education is constrained by data scarcity due to student privacy concerns and data regulations. To address this, we propose a style-aware approach to rewriting student forum posts that retains analytical value while reducing identifiability. Our method isolates content, structure, and style as separate conditioning channels and aggregates over student-disjoint exemplar partitions within style clusters, extending Differentially Private In-context Learning (DP-ICL) with cluster-restricted retrieval. Across three educational NLP datasets, our approach achieves high style fidelity, preserves downstream task performance, and reduces authorship attribution risk relative to the original student-written texts, including against a dedicated authorship-attribution model.
Figures & tables
Figure 1: SEAMS pipeline. Three conditioning channels (bullet summary, template, cluster exemplars) condition M parallel LLM generations. Candidates are embedded, ℓ2 -clipped, and averaged with Gaussian noise; the released rewrite is the candidate closest to the mean.
Dataset
Posts
Task
Proprietary
10,074
Cognitive Engagement
Stanford MOOC
29,604
Confusion
Stack Exchange
10,000
Subject
Table 1: Dataset statistics and downstream task types.
Figure 2: Reconstruction quality of our methods on three datasets, measured as semantic similarities and stylistic similarities in the embedding space of wegmann2022same . The best-performing approaches are marked with *.
Figure 3: Example generations from DP-Prompt, Cluster-Summary-Centric, and SEAMS given the same input. Note that DP-Prompt capitalizes and formalizes the post, CS creates an email-like structure, while SEAMS achieves a register similar to typical student discussion posts.
Method
Proprietary
Stanford
Stack Exch.
SEAMS
−1.8±0.5
−0.3±2.0
−0.1±0.6
SEAMS-1
−2.5±3.4
−1.0±1.9
+0.0±1.0
ESA
−3.5±1.1
−2.1±4.3
+0.3±0.9
CS
−4.8±1.0
−9.3±3.0
+0.2±1.2
DP-Prompt
−0.4±1.0
−1.1±1.2
+0.1±0.6
ZS-CS
−3.1±0.8
−3.0±2.4
+0.0±0.8
Table 2: Downstream utility of fine-tuned DistilBERT classifiers. Δ = score when training on rewrites − score when training on the same original posts. Closer to zero is better, and the best methods are bolded.
SEAMS vs.
Win rate
No boilerplate
ZS-CS
71.3±6.2
65.7±8.2
CS
66.5±6.6
61.7±7.6
DP-Prompt
67.1±5.7
67.7±5.6
Table 3: Percentage of human judgments in which the SEAMS rewrite was rated closer to the original style than the baseline rewrite, with item-bootstrap CI.
Figure 4: (a) Attribution risk under LUAR when the attacker ranks all students: MRR ratio (MRR / chance-level MRR; 1.0 = random attribution, lower is better), mean ± std over 5 seeds. Results for all attackers, including a within-cluster analysis, are in Appendix J . (b) Style fidelity vs. LUAR attribution risk on the proprietary dataset.
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
Method
Best dim
t -stat
within / between
Coh-Metrix
OG (104)
25.52
- 0.146 / -0.005
StyleDistance
d=128
34.71
- 0.250 / -0.007
AnnaWegmann
d=128
26.01
- 0.243 / -0.002
all-MiniLM-L6-v2
d=256
30.33
- 0.107 / -0.006
Appendix
Table 4: Embedding model comparison on 319 posts from 30 students. “Best dim” is the configuration giving the largest t -statistic per method. For Coh-Metrix this is the original dimensionality. For the neural embeddings it is the best d∈{32,64,128,256} PCA variant.
Method
Semantic
Style
ROUGE-1
SEAMS seed
0.874 ± .004
0.923 ± .006
0.648 ± .006
SEAMS
0.874 ± .004
0.923 ± .004
0.648 ± .005
CS seed
0.864 ± .004
0.608 ± .005
0.577 ± .010
CS
0.854 ± .004
0.688 ± .016
0.549 ± .012
Appendix
Table 5: Ablation of per-seed vs. meta-aggregation ( n=1000 , averaged over 5 seeds). Values are mean ± std over seeds.
Cluster
Summarization
1
Dialogic peer responses that combine salutations, personalized feedback, reflective interpretation, and multiple probing follow-up questions. These posts often link course texts to broader implications.
2
Strongly interpersonal peer replies that begin with greetings and praise, directly address classmates, and ask several conversational questions for clarification, reflection, or opinion.
3
Elaborative peer-feedback posts that combine praise, constructive critique, personal reflection, and open-ended questions. They foreground relational engagement and continued dialogue.
4
Relational and affective replies that acknowledge peers, connect to readings or personal experiences, and close with targeted reflective questions.
5
Highly dialogic and informal exchanges that combine empathy, tentative suggestions, personal reactions, and exploratory clarification questions directed to peers or instructors.
6
Mini-essay style posts that summarize and analyze readings or films, often using quotations, citations, and comparative or theoretical arguments to provoke discussion.
Appendix
Table 6: Cluster Summary: Key Distinguishing Features
Dataset
Method
Sem ↑
Sty ↑
Weg ↑
R-1 ↑
MATTR
Self-BLEU ↓
Proprietary
SEAMS
87.4 ± 0.4
92.3 ± 0.4
85.3 ± 1.2
64.8 ± 0.5
85.2
19.8
SEAMS-1
87.1 ± 0.4
91.4 ± 0.5
83.3 ± 1.4
63.8 ± 0.5
84.7
19.5
ESA
87.0 ± 0.3
67.4 ± 0.2
17.7 ± 0.5
59.8 ± 0.3
85.3
23.0
CS
85.4 ± 0.4
68.8 ± 1.6
25.7 ± 4.9
54.9 ± 1.2
86.0
27.7
DP-Prompt (t=1.0)
91.8 ± 0.1
55.4 ± 0.1
−7.3±0.5
61.4 ± 0.2
86.7
15.6
ZS-CS
86.6 ± 0.4
62.7 ± 0.3
7.9 ± 0.6
58.3 ± 0.3
85.1
23.5
Appendix
Table 7: Generation quality across all three datasets. All values multiplied by 100; best per dataset-column in bold for Sem/Sty/Weg/R-1. Sem and Sty are cosine similarities to the original post in all-mpnet-base-v2 and StyleDistance/styledistance ; Weg is style similarity under wegmann2022same , an embedder not used for retrieval. R-1 is ROUGE-1 F1 (stemmed). MATTR (window 50) and Self-BLEU measure lexical and generation diversity.
Method
Within ↑
Δ sep
StyleDistance
Original posts
90.8±0.4
6.5±0.3
SEAMS
79.1±1.5
8.3±0.6
SEAMS-1
76.5±1.4
8.5±0.9
CS
63.0±4.8
33.9±5.4
Wegmann
Appendix
Table 8: Within-cluster embedding similarities and the difference between within- and between-cluster similarities, computed in both StyleDistance and AnnaWegmann style embedding space, across methods.
Method
Weg-ret
Stylo-clf
LUAR
Proprietary (6,231 candidates)
Real (unmodified)
10.18 ± 3.28
6.21 ± 0.61
70.28 ± 4.09
SEAMS
7.88 ± 2.76
5.86 ± 0.79
35.47 ± 4.12
SEAMS-1
6.31 ± 2.38
6.48 ± 1.08
34.53 ± 5.21
ESA
5.26 ± 1.13
4.31 ± 0.50
27.33 ± 5.25
ZS-CS
4.04 ± 1.73
4.10 ± 0.87
22.15 ± 5.93
Appendix
Table 9: Global authorship attack: the attacker ranks all students with training posts (MRR ratio, mean ± std over 5 seeds; 1.0 = random chance, higher = easier to attribute). This is the setting reported in Section 5.6 .
Method
Weg-ret
Stylo-clf
LUAR
Weg-clf
MPNet-ret
Proprietary
Real (unmodified)
2.30 ± 0.27
2.69 ± 0.39
8.80 ± 0.74
1.76 ± 0.19
6.53 ± 0.64
SEAMS
1.89 ± 0.31
2.38 ± 0.31
5.56 ± 0.73
1.35 ± 0.20
5.86 ± 0.72
SEAMS-1
2.13 ± 0.28
2.37 ± 0.28
5.61 ± 0.83
1.49 ± 0.32
6.18 ± 0.72
ESA
1.47 ± 0.37
1.91 ± 0.23
4.62 ± 0.92
1.09 ± 0.32
5.80 ± 0.70
ZS-CS
1.46 ± 0.44
1.98 ± 0.11
3.94 ± 0.92
0.98 ± 0.26
5.79 ± 0.76
Appendix
Table 10: Within-cluster authorship attack: candidates are the students in the true author’s home cluster (MRR ratio, mean ± std over 5 seeds; 1.0 = random chance, higher = easier to attribute; protocol in Section 5.6 ).
Method
Sem
Sty
Weg
R-1
SEAMS ( M=5 )
87.4 ± 0.4
92.3 ± 0.4
85.3 ± 1.2
64.8 ± 0.5
Unconstrained
87.6 ± 0.3
92.5 ± 0.4
85.4 ± 1.1
65.1 ± 0.4
Deterministic
87.5 ± 0.3
92.4 ± 0.4
85.3 ± 1.1
64.9 ± 0.5
Random
87.2 ± 0.3
91.2 ± 0.6
83.1 ± 1.5
64.2 ± 0.5
Appendix
Table 11: Generation quality of SEAMS ablation variants on the proprietary dataset, averaged over 5 seeds. All values multiplied by 100.
Method
Weg-ret
Stylo-clf
LUAR
Weg-clf
MPNet-ret
SEAMS ( M=5 )
1.89 ± 0.31
2.38 ± 0.31
5.56 ± 0.73
1.35 ± 0.20
5.86 ± 0.72
Unconstrained
1.94 ± 0.26
2.49 ± 0.21
5.61 ± 0.77
1.32 ± 0.25
6.05 ± 0.75
Deterministic
1.85 ± 0.31
2.37 ± 0.42
5.44 ± 0.66
1.36 ± 0.24
5.87 ± 0.76
Random
1.94 ± 0.26
2.32 ± 0.41
5.65 ± 0.69
1.39 ± 0.36
6.02 ± 0.77
Appendix
Table 12: Within-cluster authorship attack results for SEAMS ablation variants on the proprietary dataset (MRR ratio, mean ± std over 5 seeds; lower is harder to attribute; protocol in Section 5.6 ).
Proprietary
Stanford MOOC
Stack Exchange
(Bloom’s level, macro-F1)
(confusion, R2 )
(subject, macro-F1)
Method
Semantic Δ
Style Δ
Semantic Δ
Style Δ
Semantic Δ
Style Δ
SEAMS
−0.6±2.7
−0.1±1.0
+0.5±2.0
−6.7±3.7
−1.1±0.8
−3.6±2.7
SEAMS-1
−0.4±2.0
+0.0±1.0
+0.6±1.9
−6.5±2.0
−1.2±0.7
−3.5±1.9
ESA
+1.4±2.6
−4.0±2.6
+0.9±1.6
−10.4±4.7
−1.0±0.6
−3.6±2.8
CS
+1.3±1.2
−2.8±2.8
+1.0±1.7
−24.6±4.9
−1.0±1.0
−6.5±2.5
Appendix
Table 13: Downstream utility with embedding probes (logistic or ridge regression on frozen semantic and style embeddings). Δ = metric when training on rewrites − metric when training on original posts, both tested on original posts; values closer to zero indicate less utility loss. Metric is macro-F1 for classification and R2 for regression, × 100; mean ± std over 5 seeds. Training on original posts scores 34.7/29.8 (Proprietary), 20.8/17.3 (Stanford MOOC), and 80.5/35.9 (Stack Exchange) with semantic/style embeddings. Semantic Δ s are within noise for every method, so bold marks the smallest style loss per dataset only.
Method
Calls
Prompt tok.
Compl. tok.
/post
/call
/call
SEAMS ( M=5 )
5
∼ 1,023
∼ 105
SEAMS-1
1
∼ 4,545
∼ 259
Appendix
Table 14: Token usage per post on the proprietary dataset. Values are approximate, computed from the LLM cache produced during our experiments.
Figure 5: Interface of the style-match evaluation (post text replaced with placeholders).
Authorship attribution models can re-identify users from seemingly anonymized text by exploiting stable stylistic fingerprints, even after explicit identifiers are removed, posing a growing privacy risk for text publishing and analytics. This risk extends to speech-derived text such as ASR transcripts of meetings and call-center conversations, where stylometric leakage can persist even after acoustic anonymization. Differential privacy-based anonymization often severely degrades text quality and utility. We propose a style-aware, prompt-driven anonymization approach that uses pretrained large language models to construct compact stylistic profiles from minimal samples and rewrite text to suppress identifiable style markers while preserving meaning. Across blog and review datasets, our approach reduces authorship attribution F1 by 60-70% while maintaining content quality and readability, substantially outperforming DP-based and non-DP baselines.
Disentangling writing style from semantic content is a fundamental challenge in literary text modeling. Style-content entanglement causes models to rely on semantic content for authorship attribution (AA) tasks and memorize author-specific content for style imitation (SI) tasks. We propose EDITORS (EditingLoRA Subspaces), a diagnose-then-deflate framework that adapts pretrained large language models and prioritizes stylistic features, making it effective for both AA and SI tasks. EDITORS first trains a diagnostic LoRA adapter using style-neutral statements derived from the training corpus to identify a content-oriented subspace. It then trains the final style adapter under activation-space deflation that projects input activations away from the identified content-oriented directions. We empirically demonstrate that EDITORS is effective. On three AA benchmarks spanning literature, social media, and news, EDITORS achieves state-of-the-art accuracy, outperforming the strongest existing baseline by up to 29%. On SI, EDITORS generates stylistically faithful and diverse passages, outperforming baselines in achieving style similarity while adhering to content specifications.
Zixuan Wang, Gregory Kang Ruey Lau, Xiao Tian +3
School of Computing, National University of Singapore, Singapore · Agency for Science, Technology and Research (A*STAR), Singapore · Aix Marseille Univ, CNRS, I2M, Marseille, France
Approaches to authorship verification or attribution typically model the style of a document, asking whether two documents were likely written by the same author. While recent approaches have been performant, such approaches largely ignore modeling the authors themselves and how varied their style is. Here, we introduce multiple alternatives for modeling the author and demonstrate that allowing an author's representation to capture multiple consistent but distinct writing styles yields significant performance improvements. Using our new authorship model, we then examine when an author writes in a way that is most idiomatic of their style across four scenarios: (i) variation in the size of their writing audiences, (ii) temporal distance from when the model was trained, (iii) the effect of preceding context, and (iv) the effect of genre norms on style. Across all four experiments, we demonstrate that authors vary substantially in how idiolectic their writing is. Our results have clear implications for both the modeling and data used for authorship verification and attribution, showing that authors need to be represented with their multiple styles and that some settings produce text that is much more informative about who wrote that text.
Omkar Yadav, Michael Jiang, Kenan Alkiek +2
University of Michigan · University of British Columbia