Privacy-preserving text sanitization for distributed agent collaboration based on disentangled representationsPrivacy-Preserving Text Sanitization for Distributed Agents Collaboration via Disentangled Representations
The authors propose DiSan, which uses role-style disentangled representations for sanitization in cross-organizational multi-agent text sharing, and report that it reduces answer-level PII exposure on distributed RAG from 11.8% to 0.6%.
The main adversary in the application phase is the requester agent (honest-but-curious) that receives the sanitized text d̃, which may infer from the text information beyond the helper's public capability tag (explicit PII, stylistic fingerprints, organizational document conventions); the observer in the training phase is the federated coordinator, which can only see model updates and the uploaded role prototypes. Capability tags and participation relationships are public; it does not defend against malicious servers, poisoning, prompt injection or collusion, nor does it provide formal differential privacy guarantees.
- Cross-organizational multi-agent collaboration requires sharing textual evidence, but beyond explicit PII, distributional signatures such as formatting conventions, word choice, and syntax also leak information about the source party; the authors argue that identifier-level masking cannot solve this representation-level problem.
- DiSan uses a dual-stream encoder to decompose text into a role subspace that preserves task semantics and a style subspace kept local, jointly optimized through orthogonal constraints, federated prototype alignment and gradient-reversal adversarial training, so that only the sanitized text crosses the privacy boundary.
- On the 7-agent distributed RAG benchmark, DiSan reduces answer-level PII exposure from 11.8% to 0.6%, while Faithfulness remains at 83.17%; on Enron with 7 authors, TF-IDF attribution F1 drops by 73.2% and the BERT probe by 70.6%, which the authors state is better than masking and rewriting baselines.
- The authors note that the main experiments use a synthetic financial corpus (real PII data cannot be legally released), that no formal differential privacy guarantee is provided, and that future directions include stronger adaptive adversaries, repeated-query settings, and cross-domain deployment; the multi-turn setting is discussed only as a deployment extension, with no dedicated benchmark evaluation.
- Evaluated models
- DiSan
- Benchmarks
- synthetic_pii_finance_multilingualEnron email corpus
- Metrics
- Avg. PIIAns. RateF1Cosine similarityFaithfulnessChunkHit@37-way attribution Acc/F1
DiSan is a privacy-preserving text sanitization framework for distributed agent collaboration built into Intern-Shannon. Its dual-stream encoder decomposes text into a role subspace that preserves task semantics and a style subspace that stays local. Masking 19.2% of tokens reduces TF-IDF style attribution by only 18.6%; DiSan, in contrast, reduces answer-level PII exposure by 20× on a distributed multi-agent RAG benchmark while maintaining 83% answer faithfulness.
Paper analysis
What problem does this paper attempt to solve?
Text shared by cross-organizational agents leaks source information through distributional signatures, and the authors state that identifier-level masking is insufficient as a defense.
Core problem: when cross-organizational distributed agents exchange textual evidence, how can both explicit PII and distributional source signatures (formatting conventions, word choice, syntax) be blocked from leaking while preserving task semantics.
- Scenario and importance: text-intensive tasks in cross-organizational collaboration (RAG, distributed question answering, cross-institutional case retrieval) require parties to share text snippets without raw data leaving local premises; the authors state that this leakage spans all levels from unprotected internal transfer to cross-consortium sharing with only preliminary filtering (Figure 1).
- Shortcomings of existing methods: the authors argue that rule-based PII detection is ineffective against distributional signatures; LLM rewriting has no mechanism to guarantee that the output distribution is statistically source-invariant; federated learning produces a shared model rather than shareable data; DP text methods have 30–50% coherence loss at ϵ<10 (citing Meisenbacher and Matthes, 2024). Table 1 gives an example: after placeholder masking, naming conventions are still fully preserved.
- Core observation: the authors' core hypothesis is that private organizational information is a property of the text distribution rather than individual identifiers, so this is a representation-level problem requiring learned disentanglement rather than text-space operations.
- Proposed approach: DiSan (Disentangled Sanitization) decomposes text into a source-invariant role subspace (preserving task semantics, used to generate sanitized text) and a source-identifiable style subspace (used only locally), together with federated prototype alignment and adversarial regularization; it also serves as a built-in sanitization component of Intern-Shannon multi-agent collaboration.
- Threat model (Section 3.2 and Appendix A):
- Goal: prevent leakage of information beyond the helper's public capability tag while preserving downstream RAG utility; the tag and participation relationships themselves are not hidden.
- Main adversary (application phase): the requester agent that receives the sanitized text d̃, which may attempt to infer explicit PII, source writing style or organizational document fingerprints.
- Training-phase observer: the federated coordinator runs per protocol and sees only model updates and uploaded role prototypes, not raw text.
- Out of scope: no formal differential privacy, no defense against malicious servers, poisoning, prompt injection or multi-party collusion.
What related research exists?
Related work falls into four groups: privacy-preserving machine learning, text sanitization and de-identification, disentangled representation, and the comparison baselines of this paper.
Privacy-preserving machine learning
- Differential privacy (Dwork et al., 2006) and DP-SGD (Abadi et al., 2016; Ouadrhiri and Abdelhadi, 2022)—provide formal privacy guarantees for deep learning.
- Federated learning (McMahan et al., 2017) and its prototype methods (FedProto, Tan et al., 2021; FedTGP, Zhang et al., 2024), representation methods, and communication-efficiency techniques—collaboratively train models without sharing raw data.
- Recent federated RAG work (Qian et al., 2025; He et al., 2025; Mao et al., 2025; Chakraborty et al., 2025)—enable multi-party retrieval under privacy constraints. The paper notes that these methods focus on training shared models or retrievers, whereas this paper addresses a complementary problem: sanitizing the text data itself.
Text sanitization and de-identification
- Rule- or NER-based PII detection plus masking (Malik and Dustdar, 2011)—effective for explicit identifiers, but the paper notes it cannot capture implicit leakage such as writing style and document structure.
- Authorship attribution research (Stamatatos, 2009)—shows that stylistic features can identify the source even for short texts.
- LLM rewriting for privacy (Shi et al., 2025; Xiao et al., 2024) and DP text generation (Meisenbacher and Matthes, 2024; Xie et al., 2024)—the paper notes that the utility loss of DP text methods is too high for RAG applications that require semantic fidelity.
Disentangled representations
- Disentangled representation learning (Bengio et al., 2013) has been used in NLP for content-style separation for style transfer (John et al., 2019), separating speaker identity from linguistic content in speech (Qian et al., 2019), and controllable text generation (Liu et al., 2024; Han et al., 2024). The paper states that these works establish the value of separating semantic content from style/identity factors for controllable generation and privacy, and this paper applies the same principle to text sharing.
Comparison baselines and benchmarks
- Baselines: three placeholder masking methods (gliner-pii-large-v1.0, piiranha-v1-detect-personal-information, deberta-pii-finetuned), three LLM rewriting methods (llama-3.1-8b-instruct, Qwen2.5-7B-Instruct, GLM-4-9B-0414), Policy gating (adapted from the dynamic access-control memory sharing of Rezazadeh et al., 2025, using Qwen2.5-7B as the local policy model); on Enron, the authorship obfuscation methods JAMDEC (Fisher et al., 2024b) and StyleRemix (Fisher et al., 2024a) are additionally compared.
- Benchmarks: a 7-agent distributed RAG benchmark built from synthetic_pii_finance_multilingual (Watson et al., 2024), and the Enron email corpus (Klimt and Yang, 2004) for external stylistic measurement validation.
The authors position this paper as: complementary to federated methods that train shared models, directly performing representation-level sanitization of the text itself, covering both explicit PII and implicit stylistic fingerprints, without bearing the text utility cost of DP noise.
How does the paper address this problem?
DiSan uses a dual-stream encoder for role-style disentanglement, federated prototype alignment plus adversarial training, and only lets sanitized text cross the privacy boundary.
Overall approach: DiSan models sanitization as role-style factorization—the role stream carries shareable task semantics and is used to decode sanitized text, the style stream carries agent-specific variation, is used only locally to aid generation, and is then discarded, and only the sanitized text d̃ crosses the privacy boundary (Figure 2).
Problem setting and threat scope
- C distributed agents each hold a private document library; when the requester cannot answer locally, the query is routed by public capability tag (e.g., CorporateBank, AssetManager) to candidate helpers, and a helper retrieves local snippets d and returns sanitized snippets d̃ for RAG or distributed question answering.
- Privacy is defined as not leaking information beyond the public tag; validation metrics correspond to each leakage surface: PII metrics measure explicit identifiers, stylistic measurement measures source signatures in transmitted text, and embedding and prototype attribution diagnose the learned shared artifacts.
Role-style disentangled encoder
- After a pretrained encoder produces hidden states H, two linear projections yield the role stream Zr and the style stream Zs, each a 256-dimensional token stream, concatenated into a 512-dimensional bottleneck and projected back to denc for decoding; the backbone is LongT5-TGlobal-Base with a maximum input of 1,536 tokens.
- The two streams are fused via Hfused = g([Zr; Zs]), with an additional residual path with a learnable scalar gate α, Hout = α·Hfused + (1−α)·H, to stabilize early training; the LongT5 decoder autoregressively generates d̃.
- The disentanglement constraint is the orthogonality loss Lorth = cos2(z̄r, z̄s), i.e., the square of the cosine of the two mean-pooled vectors, encouraging separation of the role and style subspaces; Zs participates in decoding only locally and is never transmitted.
Prototype alignment on the role space
- For each role/placeholder type k, each agent maintains a local prototype via EMA of batch role centroids, and the server aggregates a global prototype µ*k weighted by samples.
- Spherical alignment: alignment on the unit hypersphere, Lproto = ∑k (1 − cos(z̄̂r,k, μ̂∗k)), avoiding magnitude-based leakage.
- Prototype-level adversarial training: a discriminator Dψ (MLP input→128→128→C, dropout 0.1) predicts prototype source, and a gradient reversal layer (GRL) makes prototypes unpredictable as to source; before upload, ℓ2 normalization is applied and Gaussian noise (σ=0.01) is added.
Federated optimization
- The local objective is Llocal = Lseq + λorth·Lorth + λp·Lproto + λadv·Ladv + Lprox, where Lseq is token-level cross-entropy on the sanitization target and Lprox = (ν/2)‖θ−θ*‖² is the FedProx term.
- Default hyperparameters: 12 rounds, 300 local steps per agent per round, batch size 4, learning rate 2×10⁻⁴, ν=0.1, λadv=1.0, GRL strength γ=0.5, λorth=0.2, λp=1.0 (Table 9).
- Communication efficiency: LoRA adapters are trained only on the encoder attention Q/V projections (rank 8, about 0.9M parameters), plus the role projection and fusion layer are uploaded; the style projection is strictly local; each round's prototype exchange is only |K|×256 floating-point numbers.
Deployment and evaluation method
- At deployment, each agent locally runs Sanitizeθ to produce d̃c = Sanitizeθ(dc, q), and the requester aggregates and generates the final answer; the protocol can be extended to multiple turns, with each turn sanitized independently.
- Privacy probes are in three layers (Appendix C.1): EXP-1 uses SVM-RBF for 7-way attribution of role/style embeddings; EXP-2 uses Sample-to-Proto and Bootstrap-Proto to probe uploaded prototypes; EXP-3 uses TF-IDF (5000-dimensional unigram+bigram) with classical classifiers and the all-MiniLM-L6-v2 neural probe for text stylistic measurement. Utility metrics are F1/Prec./Rec./Cos., Faithfulness, and ChunkHit@3.
What experiments did the paper conduct?
Main experiment on 7-agent distributed RAG plus external validation on Enron: DiSan answer-level PII 0.6%, Faithfulness 83.17%.
Experimental setup
- Methods tested: DiSan (backbone LongT5-TGlobal-Base) and 8 baselines—a no-processing RAG baseline, three placeholder masking methods (gliner-pii-large-v1.0, piiranha-v1-detect, deberta-pii-finetuned), three LLM rewriting methods (llama-3.1-8b-instruct, Qwen2.5-7B-Instruct, GLM-4-9B-0414), and Policy gating (Qwen2.5-7B local policy model).
- Data: the synthetic_pii_finance_multilingual synthetic financial corpus (with PII annotations), partitioned by document type into C=7 non-IID agents (CorporateBank, AssetManager, FinTechPay, CorpGroup, MarketForecaster, ComplianceConsult, SupplierCo); external validation uses the Enron email corpus, 500 emails each from 7 authors, 3,500 in total.
- RAG pipeline: documents are split into 256-token windows (overlap 50), routed by tag, with BGE-M3 three-stage hybrid retrieval plus bge-reranker-v2-m3 reranking; QA samples are synthesized from retrieval anchors via schema-guided LLM prompts, and are kept only if the evidence snippet is found in the source chunk.
- Metrics and evaluation: Avg. PII and Ans. Rate are counted on sanitized text with the external detector gliner-pii-large-v1.0 (confidence threshold 0.3); Faithfulness is the proportion of stopword-removed content words in the answer that appear in the retrieved evidence; ChunkHit@3 is the proportion of ground-truth chunks appearing in the top-3 retrieval results; attribution probes are 7-way Acc/F1 (random baseline 0.14).
- Training configuration: 12 rounds × 300 local steps, batch size 4, learning rate 2×10⁻⁴; the paper does not report the number of repetitions for the main results.
Main results
Single-turn shared main results (according to Table 2):
Swipe horizontally to read the table
Method F1 ↑ Cos. ↑ Faith. ↑ ChunkHit@3 ↑ Avg. PII ↓ Ans. Rate ↓ RAG Baseline (no processing) 0.6602 0.6421 86.10% 75.2% 6.4753 11.8% Placeholder (gliner-pii-large-v1.0) 0.5071 0.5923 74.60% 62.4% 0.4714 1.4% Placeholder (piiranha-v1-detect) 0.4894 0.5643 71.82% 58.6% 0.5126 1.6% Placeholder (deberta-pii-finetuned) 0.4768 0.5819 72.63% 60.2% 0.6287 2.0% LLM rewriting (llama-3.1-8b-instruct) 0.4991 0.5872 77.89% 66.4% 1.2479 3.6% LLM rewriting (Qwen2.5-7B-Instruct) 0.5407 0.6218 79.35% 67.0% 0.8412 2.6% LLM rewriting (GLM-4-9B-0414) 0.4732 0.6072 77.13% 64.6% 2.1091 3.8% Policy gating 0.5013 0.6322 78.49% 65.2% 0.9714 2.2% DiSan 0.5631 0.6558 83.17% 73.4% 0.1337 0.6% - The authors state that DiSan reduces answer-level PII exposure from 11.8% to 0.6%, while Faithfulness remains at 83.17%, close to the no-processing baseline's 86.10%.
- The authors state that DiSan is the only method that simultaneously achieves sub-1% answer-level PII leakage and near-baseline task performance (the privacy-utility trade-off plot in Figure 3).
- From the table, DiSan's F1 (0.5631) is still lower than the no-processing baseline (0.6602); a utility loss exists but is smaller than for all privacy baselines.
Enron stylistic measurement external validation (EXP-3b/3c)
- What was measured: 500 emails each from 7 Enron authors, with TF-IDF and all-MiniLM-L6-v2 (BERT probe) for 7-way author attribution, comparing masking baselines and authorship obfuscation methods.
- Results (according to Table 4, Table 6): original text TF-IDF F1 0.825; after GLiNER masks 19.2% of tokens it drops only to 0.672 (down 18.6%); DiSan drops it to 0.221 (down 73.2%), and the BERT probe drops from 0.691 to 0.203 (down 70.6%), with a random baseline of 0.143. JAMDEC drops only 1.2% (TF-IDF), StyleRemix Fixed drops 11.5%, and StyleRemix Adaptive instead rises to 0.970 (the authors state that it introduces a new per-author signature by steering different style targets per author).
- Authors' interpretation: distributional signatures persist after aggressive masking, so representation-level methods are necessary; the authors state that DiSan's reduction is about 60× that of JAMDEC and 6× that of the best StyleRemix variant.
Embedding and prototype attribution probes (EXP-1/EXP-2)
- What was measured: SVM-RBF for 7-way source attribution of role/style embeddings; Sample-to-Proto and Bootstrap-Proto to probe whether uploaded prototypes carry a stable source fingerprint.
- Results (according to Table 7): role embeddings Acc=0.18, F1=0.05 (close to random 0.14); style embeddings Acc=0.89, F1=0.84 (as a disentanglement sanity check, the style stream is never transmitted); prototype attribution Acc=0.14–0.16, F1≈0.09, with 95% confidence intervals containing zero; cross-round linking attack (trained on round 1, tested on round 12) F1=0.10.
- Authors' interpretation: Lorth concentrates source-related variation into the local style subspace, and the prototype defenses (normalization, noise, adversarial training) suppress persistent prototype signatures.
Other ablations and analyses
- Style isolation ablation (Table 3): after A1 removes Lorth, Avg. PII rises from 0.1337 to 0.9706 (the authors state 7.3×), Ans. Rate 1.4%; A2 high-α fusion (α=0.9) gives Avg. PII 1.2419, Ans. Rate 2.2%, with utility slightly higher for both, which the authors state is obtained by relaxing the privacy constraint.
- Prototype alignment ablation (Table 3, B: No-ProtoAlign): after removing the prototype component, Cos. drops 6%, ChunkHit@3 drops 3.6 percentage points, and PII exposure increases 2.7×.
- Attribution probes under ablation (Table 10): A1/A2 raise Role Acc from 0.2765 to 0.3381/0.4012.
- Disentanglement visualization (Figure 5): role-style embedding cosine similarities for each agent cluster near zero; in the t-SNE projection, role and style embeddings form two clusters.
- Stylistic measurement on synthetic data (EXP-3a, Table 8): 7-way F1 is about 0.90 for both original and sanitized text, which the authors state reflects document-type confounding rather than style signal; in a controlled binary test, attribution F1 is 0.51–0.56 (sanitized) versus 0.54–0.57 (original), close to the 0.50 random baseline, and the authors consider that the synthetic data itself has limited style variation.
- Multi-turn RAG is discussed only as a deployment extension, and the authors explicitly leave a dedicated multi-turn benchmark for future work; the cross-organizational IPO analysis case (Figure 6) is an illustrative case study with no quantitative results.
What are some points that can be further explored?
The authors note two limitations, synthetic data and no formal DP guarantee, and list adaptive adversaries, multi-turn, and cross-domain as future directions.
Limitations and future directions noted by the authors
- Synthetic data constraint (Limitations): the main experiments use a synthetic financial corpus with PII annotations; the authors state that datasets containing real PII cannot be legally or ethically used for research publication, that this is a necessary constraint rather than a methodological choice, and that the Enron external validation only partially covers domain generalization.
- No formal privacy guarantee (Limitations): DiSan does not provide a formal differential privacy guarantee; the authors state that applying DP to sequence-to-sequence generation requires per-token noise calibration incompatible with coherent text generation, and that formal privacy analysis of generative sanitizers is a future direction.
- Stronger adaptive adversaries (Conclusion, Appendix C.1): future work should study stronger adaptive adversaries; the appendix notes that LLM attribution and adaptive adversaries with repeated queries are beyond the honest-but-curious evaluation scope of this paper.
- Repeated queries and multi-turn settings (Conclusion, Section 5.6): the repeated-query setting and a dedicated multi-turn benchmark are left for future work.
- Broader cross-domain deployment (Conclusion): future work should study broader cross-domain deployment.
- Out-of-scope adversaries (Appendix A.1): no defense against active adversaries (malicious servers, poisoning, prompt injection) or multi-party collusion; the authors state these are future directions.
Experimental coverage
- Methods tested are DiSan plus 8 shared baselines (3 placeholder masking, 3 LLM rewriting, Policy gating, no-processing baseline), with LongT5-TGlobal-Base as the backbone; on Enron, two additional variants, JAMDEC and StyleRemix, are compared.
- Data are 1 synthetic financial corpus (partitioned into 7 agents) and the Enron email corpus (500 emails each from 7 authors, 3,500 in total).
- Privacy evaluation covers three surfaces: output text (PII detector gliner-pii-large-v1.0, TF-IDF and all-MiniLM-L6-v2 stylistic probes), role/style embeddings (SVM-RBF), and uploaded prototypes (Sample-to-Proto, Bootstrap-Proto, cross-round linking).
- Main results are for the single-turn shared setting; multi-turn is discussed only as a deployment extension, with no quantitative results reported.
- The paper does not report the number of repetitions or statistical significance tests for the main experiments; synthetic QA samples are generated by an LLM, and the paper does not report the name of the generation model used.
Summarize the main content of the paper
DiSan performs cross-agent text sanitization via role-style disentanglement, and the authors state it balances privacy and RAG utility.
A privacy defense paper for cross-organizational multi-agent collaboration, proposing the text sanitization framework DiSan, also a built-in component of Intern-Shannon.
- Problem: when agents share textual evidence, beyond explicit PII, distributional signatures such as formatting conventions, word choice, and syntax also leak information about the source party; the authors argue that identifier-level masking treats symptoms, not the cause, and that this is a representation-level problem.
- Method: a dual-stream encoder decomposes text into a source-invariant role subspace (used to decode sanitized text) and a source-identifiable style subspace (local only, discarded after use); an orthogonality loss encourages separation, federated prototype alignment (spherical EMA) stabilizes non-IID training, and gradient-reversal adversarial training plus Gaussian noise (σ=0.01) suppresses source signatures in prototypes; only sanitized text crosses the privacy boundary.
- Main results: on the 7-agent distributed RAG benchmark (synthetic financial corpus), DiSan reduces answer-level PII exposure from 11.8% (no-processing baseline) to 0.6%, with Faithfulness 83.17% versus 86.10% for the baseline, and F1 0.5631 higher than all privacy baselines (Table 2).
- External validation: in Enron 7-author stylistic measurement, TF-IDF attribution F1 drops by 73.2% and the BERT probe by 70.6%, close to the random baseline; GLiNER masking of 19.2% of tokens reduces it by only 18.6%, and JAMDEC by only 1.2% (Table 4, 6).
- Ablation: removing the orthogonality loss or amplifying style fusion raises Avg. PII to 0.9706/1.2419 (the authors state 7.3×/9.3×), with utility slightly higher; removing prototype alignment lowers both utility and privacy (Table 3).
- Authors' conclusion: the authors state that representation-level disentanglement provides a practical path for secure text sharing across distributed agents; limitations are that the main experiments use synthetic data and there is no formal DP guarantee, and future directions include stronger adaptive adversaries, repeated-query and multi-turn benchmarks, and cross-domain deployment.