Next Article in Journal
Graph-Calibrated Differential Privacy for Correlated IoT Sensing Streams
Previous Article in Journal
Parameter-Efficient Audio-Visual Dynamic Facial Expression Recognition with Mamba Fusion Adapters and Frame-Level Feature Arrangement
Previous Article in Special Issue
A YOLOv8-Based Real-Time Road Congestion Decision-Making Approach Fused with Channel–Spatial Attention and Dynamic Weighted Loss
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

GS-Chaff: Multi-Agent Prompt-Level Semantic Chaffing for Privacy-Preserving LLM Inference

1
School of Mathematical Sciences, Sichuan Normal University, Chengdu 610068, China
2
School of Computer Science and Engineering, University of Electronic Science and Technology of China, Chengdu 611731, China
3
Institute of Software, Chinese Academy of Sciences, Beijing 100190, China
4
School of Robotics and Advanced Manufacture, Harbin Institute of Technology, Shenzhen 518055, China
*
Author to whom correspondence should be addressed.
Sensors 2026, 26(17), 5385; https://doi.org/10.3390/s26175385
Submission received: 8 July 2026 / Revised: 13 August 2026 / Accepted: 23 August 2026 / Published: 26 August 2026

Abstract

Cloud-based large language model (LLM) services are increasingly used to process natural-language queries that may contain private or sensitive information. Conventional privacy-preserving approaches, such as cryptographic protection and text sanitization, often introduce substantial computational overhead or disrupt the semantic integrity of the original query, resulting in a trade-off between privacy protection and task utility. To address this limitation, we propose generative semantic chaffing (GS-Chaff), a training-free multi-agent framework for privacy-preserving LLM inference over natural-language text queries. Rather than explicitly masking sensitive content, GS-Chaff hides the user’s true intent among semantically plausible chaff queries. The framework is implemented through two small language model (SLM)-based agents: a privacy policy agent that adaptively determines the required semantic abstraction level and chaffing factor for each text query, and a generative semantic chaffing agent that produces semantically aligned dummy queries. After cloud-side inference, the response corresponding to the protected real query is recovered locally using a stateless index, without modifying the cloud-based LLM. Experimental results on text-based benchmarks demonstrate that GS-Chaff reduces the attacker’s real-query identification rate to 22.5%, close to random guessing, while maintaining inference utility on the evaluated benchmarks. In addition, GS-Chaff reduces local preprocessing time by 1.85 × compared with a fixed chaffing configuration using β = 5 .

1. Introduction

With the rapid advancements in scalable language modeling, cloud-based LLM services offer an increasing number of utilities for human assistance [1,2]. The interactivity offered by these models allows a high degree of freedom in human–AI interaction, permitting users to share diverse forms of information with the model, including private and sensitive data [3,4]. For high-stakes information, such as legal, healthcare, and financial content, this level of utility may pose serious risks to privacy and data protection [5]. Sensitive data transmitted as semantic queries during inference can potentially be extracted by adversaries through model inversion, query exploitation, or server-side data leakage, making it vulnerable to misuse [6]. Moreover, the obscure data handling practices of cloud-based services limit users’ ability to verify how their information is stored, processed, or retained over time [7,8]. Together, these concerns expose a fundamental trade-off between usability and privacy in cloud-assisted semantic inference systems.
Studies in privacy-preserving computation have developed over the last few decades. Conventional methods are dominated by cryptographic mechanisms, such as homomorphic encryption (HE) and secure multi-party computation (MPC) [9,10]. Despite being theoretically strong, these methods involve a high computation cost that makes them infeasible for scalable implementation on LLMs [11]. In resource-constrained edge environments, the substantial computational and communication overhead of heavyweight cryptographic protocols may limit their applicability to latency-sensitive LLM inference [12]. Besides the cryptographic method, text sanitization is often implemented in contemporary privacy-preserving attempts [13]. This method identifies sensitive entities from the user prompt and replaces those with a non-sensitive term with similar semantic meaning. Despite its simplicity and effectiveness, text sanitization causes the obfuscated prompt to lose its true contextual meaning. This harms the LLM’s understanding and thus forces the model to produce a generic answer instead of a tailored one for a user’s specific case. Moreover, this simple replacement strategy is highly vulnerable to re-identification attacks based on background knowledge [14].
Protecting user privacy at the semantic level therefore requires regulating how intent is represented and conveyed during interaction with cloud intelligence services [15,16]. LLM-based multi-agent systems enable the decomposition of complex reasoning into specialized components, allowing agents to collaborate and perform diverse tasks in parallel [17]. This modular structure supports flexible adaptation to different contexts and fine-grained control over processing steps, which reduces potential information leakage. Recent work applies this approach to privacy-sensitive tasks, including semantic-level query obfuscation [18] and encrypted inference configuration [19], showing that collaborative agents protect sensitive information without substantially degrading task performance.
Motivated by this observation, we propose a privacy protection method that shifts from content hiding to intent hiding. Inspired by Rivest’s classic “Chaffing and Winnowing” theory [20], we conjecture that in the absence of strong encryption, the best way to protect privacy is to obfuscate real sensitive query with the presence of noisy yet semantically plausible queries. However, migrating this bit-level theory to semantic-level applications involving communication-mediated query representations faces significant challenges. Particularly, attackers can easily eliminate generated forged queries through statistical analysis if these queries are not natural enough in terms of syntax, logic, or domain distribution.
Considering these challenges, we propose generative semantic chaffing (GS-Chaff), a training-free privacy-preserving inference framework implemented as a lightweight SLM-based multi-agent system inspired by chaffing and winnowing theory. Instead of performing black-box encryption on cloud LLMs, GS-Chaff deploys two cooperative SLM-based agents to construct a semantic-space defense layer over heterogeneous textual query realizations during transmission, leveraging their instruction-following capability and computational efficiency. The use of SLMs enables efficient client-side processing of abstraction-aware text queries prior to cloud inference while keeping the preprocessing pipeline lightweight. Specifically, GS-Chaff consists of a privacy policy agent and a generative semantic chaffing agent. The privacy policy agent dynamically determines an appropriate level of abstraction ( α ) and chaffing factor ( β ) according to query sensitivity and task requirements, seeking a balance among semantic abstraction, query obfuscation, and inference utility. The generative semantic chaffing agent produces semantically plausible chaff queries that align with the protected query in granularity and stylistic distribution. Through coordinated agent collaboration, GS-Chaff enables the cloud LLM to perform blind inference over mixed textual queries, making it difficult for adversaries to statistically identify the user’s true intent. Figure 1 illustrates the conceptual comparison between GS-Chaff and existing approaches to privacy-preserving LLM inference.
We summarize our contributions as follows:
  • We are among the first to formulate privacy-preserving LLM inference as an intent-hiding problem in text-query transmission and to implement this idea through an SLM-based multi-agent architecture rather than explicit content masking.
  • We propose GS-Chaff, an efficient and training-free privacy protection mechanism inspired by chaffing and winnowing theory, which balances privacy and utility by concealing user intent through the generation of semantically plausible textual chaff queries.
  • Through extensive experiments on text-based benchmarks, we demonstrate that GS-Chaff reduces the adversarial identification rate to 22.5%, close to the random-guessing level, while maintaining task utility on the benchmarks. In addition, GS-Chaff achieves a 1.85 × reduction in local preprocessing time compared to the fixed β = 5 chaffing configuration.

2. Related Work

  • Privacy-Preserving Inference on LLMs.  Privacy-preserving inference aims to enable LLM services without revealing user inputs or intermediate reasoning traces to the service provider or external adversaries [21]. Early foundations in this area draw from secure multi-party computation (MPC), which enables joint computation over private inputs without disclosure [22], and fully homomorphic encryption (FHE), which allows arbitrary computation directly on encrypted data [23]. To address statistical leakage, differential privacy (DP) has been explored as a mechanism to limit information exposure during model interaction and training [24]. More recently, these cryptographic and statistical principles have been adapted to neural network inference and LLMs, enabling encrypted transformer execution and confidential prompting in cloud settings [25,26]. In sensor communication privacy, PrivacyOracle leverages large language models to configure privacy firewalls for pervasive sensing infrastructures, enabling automated reasoning over contextual norms and filtering sensitive information flows in smart built environments [27].
  • Cryptographic Protection.  Cryptographic approaches have recently been explored to enable privacy-preserving LLM inference in distributed or cloud-based deployment settings. FLUTE [26] proposes a secure two-party inference framework that partially encrypts transformer components to reduce communication and computation overhead. Socratic CoT [28] combines homomorphic encryption with encrypted retrieval to protect both user queries and intermediate reasoning traces. Power-Softmax [29] introduces a cryptographically friendly reformulation of the softmax operation to improve the efficiency of secure inference under encryption. TFHE-Coder [30] studies the feasibility of LLM agents to automatically generate FHE programs, highlighting the challenges of correctness and performance in encrypted computation. PipeLLM [31] proposes speculative encryption to overlap communication and computation, significantly improving throughput for confidential LLM services. FHE-Agent [19] leverages an LLM-guided agentic framework to automate CKKS parameter configuration, reducing the deployment complexity of encrypted inference pipelines. Despite their strong privacy guarantees, these cryptographic approaches generally incur substantial computational overhead, require specialized hardware or careful parameter tuning, and remain difficult to scale to interactive, low-latency, and reasoning-intensive LLM applications.
  • Text Sanitization.  Text sanitization has emerged as a lightweight alternative for privacy-preserving LLM inference by modifying user inputs to remove or obfuscate sensitive information before model execution. DYNTEXT [32] proposes a semantic-aware dynamic sanitization framework that adapts redaction strategies based on contextual sensitivity to balance privacy and utility. ZSTS [33] explores zero-shot redaction and substitution using LLMs, demonstrating improved generalization across domains without task-specific tuning. Self-Sanitize [34] shifts the sanitization focus from inputs to model outputs, mitigating privacy leakage during response generation. Another work [35] demonstrates the feasibility of applying LLM-driven sanitization in sensitive healthcare settings. While text sanitization methods are efficient and easy to deploy, they often disrupt semantic coherence, degrade task-specific reasoning, and remain vulnerable to re-identification and contextual reconstruction attacks, limiting their reliability for high-stakes LLM inference [36]. These limitations are also observed in other studies that explore the utility degradation introduced by sanitization under limited computational budgets [37], and how word-level differential privacy sanitization can introduce contextual vulnerabilities that enable partial reconstruction attacks [38].
  • Prompt Obfuscation.  Prompt obfuscation has been explored as a pragmatic privacy protection strategy that conceals sensitive user intent while preserving LLM usability. EmojiPrompt [39] introduces a generative prompt obfuscation framework that encodes sensitive content into emoji-based representations, enabling privacy-preserving communication with cloud-based LLMs. Petridish [40] proposes an obfuscation–de-obfuscation pipeline that transforms user prompts into semantically equivalent but unintelligible representations before cloud inference. Lock and Decode [41] frames prompt obfuscation as a cryptographic-like mechanism, demonstrating how obfuscated prompts can bypass or reshape LLM security controls. WordGame [42] studies simultaneous obfuscation of both queries and responses, revealing how such transformations can evade LLM safeguards while maintaining functional interaction. CodeCipher [43] learns task-aware code obfuscation strategies to prevent LLMs from extracting sensitive implementation details from source code. Despite their flexibility and low deployment cost, prompt obfuscation methods typically lack formal privacy guarantees, are vulnerable to semantic inversion and adaptive attacks, and often introduce instability or performance degradation in reasoning-intensive LLM tasks. Table 1 summarizes these representative prompt-obfuscation methods.
Unlike these approaches, which primarily transform, encode, or obfuscate an individual prompt, GS-Chaff preserves natural-language interaction and conceals the protected query within a dynamically generated batch of semantically plausible alternatives through query-adaptive semantic abstraction and chaff generation.
  • AI Agent-based Privacy Protection  Multi-agent systems powered by LLMs have recently been explored as a mechanism to actively preserve privacy during inference. The GAMA framework proposes a general anonymizing multi-agent architecture that separates private and public processing spaces, using domain rules and logic enhancement to protect sensitive information while maintaining task performance [44]. SecureGov-Agent introduces a governance-centric framework designed to mitigate privacy leakage and adversarial attacks through centralized monitoring, risk scoring, and content analysis, achieving reduced privacy exposure with moderate impact on task completion [45]. PrivAct internalizes contextual privacy preferences into individual agent policies, demonstrating improved privacy-utility trade-offs across diverse multi-agent topologies by embedding privacy constraints into agents’ generation behavior [18]. In addition, architectural frameworks such as Sentinel Agents incorporate distributed security layers that continually analyze semantic behavior and cross-agent communication to detect and contain privacy breaches and other threats [46]. These approaches highlight the potential of embedding privacy control within adaptive, communication-aware inference pipelines.

3. Method

3.1. Problem Definition

We consider confidential LLM inference as a safe interaction between a user and a cloud-based server. On the local side, sensitive queries are initiated through SLM-driven agents that mediate private interaction. This query is passed to the powerful LLM in the server side to obtain high-quality inference results while maximizing privacy protection at low computational cost. The LLM at the server side naturally will record all input information, which includes user’s true intent, identity, and sensitive attributes. This typical behavior makes the interaction prone to threat from attackers, which we assume to include the following:
  • re-identification attack based on semantic distribution, where the attacker attempts to identify a real user’s intent by analyzing semantic fine-grainedness, entity distribution, and contextual consistency of the queries;
  • discriminative attack based on the consistency of the language model, where the attacker evaluates the naturalness, realness, and rationality of the queries by leveraging language models;
  • multi-agent consensus attack, where the attacker deploys multiple LLM agents to perform parallel analysis on the same query batch and improve the discrimination confidence level through voting.

3.2. Threat Model

We consider an honest-but-curious cloud LLM service provider as the primary adversary. The provider follows the inference protocol and returns responses for all submitted queries. The provider observes the complete plaintext query batch, the shuffled order, and the corresponding responses. The provider knows the GS-Chaff procedure, the local SLM configuration, the prompt templates, and the ranges of α and β . Available attack tools include language models, semantic features, classifiers, and multiple cooperating agents. The provider has no access to the locally stored real-query index or other client-side state that is not transmitted to the cloud.
GS-Chaff does not conceal query plaintext from the cloud provider because the cloud LLM processes every query in the batch. The protected asset is the association between the user and the query representing the user’s actual intent. The privacy objective is therefore real-query identification resistance, intent hiding, and plausible deniability rather than complete query confidentiality or user anonymity.
The threat model distinguishes adversary identities, attack strategies, and attack scopes. An external observer observes communication metadata, while encrypted transport prevents access to plaintext queries. An adaptive semantic classifier trains a dedicated classifier or ranker using labeled GS-Chaff samples. A multi-agent attacker aggregates the predictions of multiple LLM agents analyzing the same shuffled query batch. A side-channel attacker uses non-semantic features to infer the real query position. A cross-session profiler correlates multiple query batches using identity, session, historical, entity, and temporal information. Our experiments focus on single-batch multi-agent identification and side-channel classification using token length and end-to-end request latency.
The experiments focus on single-batch real-query identification under the multi-agent and limited side-channel settings described above. Across these settings, the attack objective and success criterion are defined consistently. Given the i-th shuffled query batch containing β i queries, the attacker outputs a predicted real-query index k ^ i . An attack succeeds when k ^ i equals the locally stored real-query index k i * . We use Top-1 Real-Query Identification Accuracy as the primary attack-oriented privacy metric. A lower identification accuracy indicates stronger privacy protection. We additionally report the Privacy Protection Rate (PPR), defined as
PPR = 1 Acc ID ,
where Acc ID denotes the Top-1 Real-Query Identification Accuracy. Accordingly, a higher PPR indicates stronger privacy protection. When reported as percentages, the corresponding relation is PPR ( % ) = 100 Acc ID ( % ) .
GS-Chaff assigns a sample-specific chaffing factor β i . Therefore, the random-guessing baseline for Top-1 Real-Query Identification Accuracy over N samples is calculated as
Acc ID random = 1 N i = 1 N 1 β i .

3.3. Technical Framework

To address the above threat challenges, we propose GS-Chaff, a lightweight multi-agent framework that provides privacy protection for natural-language text queries transmitted to cloud-based LLMs. Inspired by Rivest’s “screening and chaffing” theory [20], GS-Chaff extends conventional bit-level chaffing to the semantic space. The framework is composed of three stages: adaptive privacy policy, generative semantic chaffing, and oblivious inference with winnowing. Figure 2 illustrates the overall design.

3.3.1. Privacy Policy Agent

Conventional privacy protection methods generally adopt static protection strategies that may lead to a privacy–utility imbalance. In contrast, we apply a dynamic protection strategy by leveraging an SLM-based policy agent driven by specialized prompts to determine query-specific privacy parameters. The policy agent selects these parameters through instruction-guided inference.
Specifically, given an input query q, the SLM outputs a decision vector θ as follows:
θ = α , β ,
where α , β { 1 , , 10 } . The parameters α and β define the dynamic privacy policy as follows:
  • α refers to the abstraction level that must be covered by the descriptor. A larger α corresponds to a more generalized semantic description, thereby reducing reliance on fine-grained information.
  • β refers to the chaffing factor, representing the total number of queries sent to the server. These queries consist of one protected real query and β 1 chaff queries. Increasing β increases the uncertainty of the real query within the transmitted batch, while introducing additional computational and communication overhead.
We apply the following prompt to the SLM to obtain the decision vector.
The policy agent directly selects α and β through instruction-guided SLM inference according to query sensitivity, domain characteristics, and reasoning requirements. The parameters are not obtained through explicit numerical optimization, exhaustive search, or random sampling. The resulting query-adaptive policy provides an empirical trade-off among privacy protection, task utility, and inference overhead.
The policy output is parsed as a single parameter pair α , β . A valid output must contain two integers within the range [ 1 , 10 ] . Invalid, incomplete, or out-of-range outputs trigger a format-correction retry. If the regenerated output remains invalid, the predefined fallback policy 3 , 5 is used. This instruction-guided decision process is implemented using the prompt template shown in Listing 1, while the complete policy selection and validation procedure is summarized in Algorithm 1.
Algorithm 1 Privacy Policy Selection
Require: Query q
Ensure: Policy parameters α , β
  1:
y SLM ( q )
  2:
α , β Parse ( y )
  3:
if  α { 1 , , 10 } β { 1 , , 10 }  then
  4:
      Regenerate y using a format-correction instruction
  5:
       α , β Parse ( y )
  6:
end if
  7:
if  α { 1 , , 10 } β { 1 , , 10 }  then
  8:
       α , β 3 , 5
  9:
end if
10:
return  α , β
Listing 1. Prompt template used by the privacy policy agent
Sensors 26 05385 i001

3.3.2. Generative Semantic Chaffing Agent

We leverage another SLM as a generative semantic chaffing agent, driven by dedicated prompts, to translate the decision vector θ from the policy agent into semantic payloads. The agent produces semantically plausible noisy queries guided by the privacy policy agent’s α , β . Each textual query is represented as a high-dimensional semantic embedding, capturing its abstract semantic content. The generated noisy queries occupy the same semantic space and act as alternative textual realizations, making the real query difficult to distinguish from the other queries in the transmitted batch. Specifically, SLM performs semantic abstraction and chaff generation.
  • Semantic Abstraction. To prevent the server from inferring user identities through specific entities, the SLM performs semantic abstraction on sensitive entity e in the query q. Specifically, given the abstraction parameter α determined by the privacy policy agent, the SLM generates a descriptor D that generalizes the sensitive entity while preserving task-relevant semantic information. The parameter α serves as a prompt-level semantic abstraction target: a larger α instructs the SLM to generate a broader descriptor compatible with more semantically reasonable candidate entities, whereas a smaller α retains more fine-grained information about the original entity. The abstraction is performed through prompt-guided SLM generation rather than explicit enumeration over a knowledge base or formal entailment and semantic-distance verification.
  • Adversarial Generation. To further conceal underlying user intention, especially when α is small, SLM generates β 1 adversarial chaff queries. We are motivated by semantic granularity alignment, where, according to encryption theory, attackers can easily eliminate fake data if the distribution of fake data does not match that of real data. Thus, fake query q f must strictly adhere to the same semantic constraints as the abstracted real query q r . SLM generates a set of fake queries { q i f } i = 1 β 1 Q f , which must satisfy the following constraints:
    • plausibility, P L M ( q f ) P L M ( q r ) , where the probability distribution of the language model is similar for both real and fake queries,
    • fake entity e in the fake query q f must also be a descriptor that has undergone α -abstraction.
Therefore, we formalize the chaff generation as follows.
q f S L M · | T ( q r ) , S = Med , C = α
where T, S, and C refer to template, style, and constraint. This mechanism aims to reduce differences among the β transmitted queries in semantic granularity, terminology, and stylistic form, rather than providing a formal guarantee that all queries belong to an identical embedding cluster.

3.3.3. Oblivious Inference and Winnowing

This module performs parallel server-based inference and local extraction of the real result using a locally retained selection index. This mechanism is conducted through two stages: local selection index generation and shuffling, and server execution with local winnowing. Unlike Rivest’s original MAC-based chaffing-and-winnowing construction, GS-Chaff uses the locally retained real-query index only for response selection and does not provide MAC-based authentication or integrity guarantees.
  • Local Selection Index and Shuffling. Before transferring to the server, the local system performs an obfuscation operation. Specifically, we perform a random permutation on the query set consisting of the abstracted real query q r and the set of fake queries Q f :
    Q batch = Permute π { q r } Q f .
The local selection index is defined as the position of the protected real query in the shuffled batch:
K sel = Id π q r .
Only this small integer index needs to be retained locally for subsequent response selection, without maintaining additional cryptographic state.
  • Server Execution and Local Winnowing. The server-side model M server performs inference over all queries in the shuffled batch, producing
    A batch = M server ( q ) q Q batch .
After receiving A batch , the client uses the locally retained selection index K sel to extract the response corresponding to the protected real query:
a final = A batch K sel .

3.4. Theoretical Analysis

  • Plausible Deniability. Under an idealized setting in which the protected query and the β 1 chaff queries are indistinguishable to the attacker and have equal prior probability, the probability of identifying the protected query by random selection is
    P Real = q i Q batch = 1 β .
In practice, the protected and chaff queries are not guaranteed to be exchangeable or identically distributed, and lexical, semantic, or contextual differences may provide additional information to an attacker. Therefore, 1 / β is used as an idealized random-guessing reference rather than a formal posterior bound, and the actual identification risk is evaluated empirically.
  • Utility Considerations. Unlike conventional naïve replacement methods, GS-Chaff uses the abstraction parameter α to control the degree of semantic generalization. A smaller α preserves more query-specific information and is therefore expected to incur less utility degradation, whereas a larger α provides stronger abstraction at a potential utility cost. This relationship is treated as a design intuition rather than a formal utility guarantee and is evaluated empirically in our experiments.

4. Results

This section elaborates on the evaluation of our GS-Chaff method. To test the effectiveness of our method, we leverage Llama-3.2-1B as the SLM. We utilize a diverse set of LLMs to perform inference, ranging from open-sourced to proprietary models as follows:
  • Local inference: Llama2-7B, Vicuna-13B
  • Cloud inference: GPT-3.5-Turbo, GPT-4-Turbo, and GPT-4o
Note that we set the temperature of policy SLM to zero to ensure the stability of output results under the same input. For experiments reported over three independent runs, we use random seeds 2024, 2025, and 2026. For proprietary cloud APIs, decoding parameters not explicitly specified in the corresponding experiments are left at the provider-default settings. Baseline methods are implemented following the methodological descriptions in their corresponding references; when official implementations or complete configurations are unavailable, we follow the descriptions provided in the cited works and evaluate them under the same benchmark and cloud-model settings.

4.1. Main Results

We compare our method against several strong baselines, such as no privacy protection, local differential privacy (i.e., Text2Text [47] and Paraphraser [48]), and ConfusionPrompt [49]. We evaluate GS-Chaff on both general reasoning (i.e., StrategyQA [50] and MuSiQue [51]) and domain-specific benchmarks (i.e., MedQA [52] and LegalBench [53]). We utilize the following metrics for evaluation: accuracy for StrategyQA, MedQA, and LegalBench; F1, ROUGE-L, and exact match (EM) for MuSiQue; and AUC for StrategyQA. Table 2 demonstrates that GS-Chaff consistently outperforms other privacy-preserving methods across all cloud models, achieving utility scores nearly identical to the non-private baselines (e.g., 0.865 on MedQA with GPT-4o).
  • Adversarial Detection. We evaluate query identification under a multi-agent consensus attack. Two GPT-4-Turbo attacker agents receive the same shuffled query batch and independently predict the index of the query that represents the user’s actual intent. The attacker agents know that the batch contains one real query and multiple GS-Chaff-generated queries. Their predictions and explanations are submitted to an arbitration agent, which produces the final predicted index. When the attacker agents disagree, the arbitration agent determines the final prediction based on their analyses. An attack succeeds when the final predicted index equals the locally stored real-query index. We report the real-query identification rate over three independent runs on LegalBench. Table 3 shows that GS-Chaff achieves a real-query identification rate of 22.5 ± 1.8%, which is close to the empirical random guess baseline (21.2 ± 1.5%), indicating strong resistance under the evaluated multi-agent consensus attack setting across multiple trials.

4.2. Ablation Studies

  • Component Contribution. We conduct ablation to measure the effectiveness of components in our framework. For this experiment, we evaluate the following conditions, static protection with α = 3 and β = 5 (static), static α , static β , replacing α -guided semantic abstraction with random token masking (w/o α ), and removing chaff queries (w/o β ).
We measure answer accuracy (Acc.) and Privacy Protection Rate (PPR), where a higher PPR indicates stronger privacy protection. Table 4 shows that setting the value dynamically for both α and β is essential for our framework to yield the best performance on privacy protection. Further, we also demonstrate that GS-Chaff maintains consistent performance across the two SLM backbones included in this ablation, Qwen2.5-1.5B and Llama-3.2-1B.
  • Dynamics of Policy. To evaluate the behavior of dynamic privacy policy, we calculate the empirical joint distribution of α , β output by the policy SLM for samples on the LegalBench dataset. Figure 3 presents the joint distribution of privacy policy p α , β , normalized, with the sum of all cells equal to 1. We observe that the probability mass of α is mainly concentrated in the range of 3–4, while β appears most frequently around 5. This indicates that the policy agent tends to select moderate semantic abstraction levels to balance privacy protection and reasoning utility. Meanwhile, a relatively higher β is chosen to introduce sufficient chaff queries, increasing uncertainty about the real user intent without imposing excessive computational overhead. Furthermore, the combination of high α and β hardly ever occurs. The results illustrate the empirical trade-off between abstraction strength and obfuscation strength, supporting the use of a dynamic policy rather than a fixed parameter configuration. This self-adaptive behavior is consistent with the adversarial results approaching random guessing in Table 3.
  • Side-Channel Attack. We evaluate a limited side-channel attacker that uses only per-query token length, end-to-end request latency, or their combination to predict the real-query position. To verify the effectiveness of our intent-hiding objective for privacy-preserving inference, we perform experiment on side-channel attack. We measure the success rate of real query identification in query batch through side-channel signals. Specifically, the attacker observes per-query token length and end-to-end request latency to predict the index of real query. We perform the experiment on LegalBench with 500 samples. For each query, GS-Chaff generates queries with a batch size of β = 5 . We train a lightweight classifier to predict the index of real query in the batch. We report Top-1 identification accuracy (Top-1 acc.) and mean reciprocal rank (MRR). Table 5 shows that combined side-channel attack, with both token length and latency signals, achieve identification accuracy only marginally better (3.5-point) than random guess. The result indicates that GS-Chaff does not rely on hiding superficial properties such as query length and execution time. Its effectiveness stems from semantic-level intent obfuscation.

4.3. Additional Evaluation

  • Human Evaluation. We perform a manual evaluation on 100 samples from the LegalBench benchmark with the assistance of two PhD candidates with legal training as domain experts. We measure privacy risk using the average reconstruction score of the adversary model (GPT-4o) when inferring specific legal entities from obfuscated queries. The score ranges from 0 to 2, where 0 indicates no identifiable privacy leakage and 2 indicates substantial privacy leakage. Further, we measure utility validity as the percentage of obfuscated queries judged by the experts to remain legally sound and applicable after semantic abstraction, with particular attention to whether sufficient task-relevant legal information is retained for the intended legal reasoning. GS-Chaff achieves an average reconstruction risk of 0.56 out of 2 and a utility validity of 96.0%, indicating that, in most evaluated cases, semantic abstraction reduces entity-level exposure without removing sufficient legal context to make the resulting queries unsound or inapplicable. A detailed case study illustrating the semantic stealthiness of GS-Chaff and the behavior of the α -guided abstraction mechanism is provided in Appendix A.

4.4. Agent Architecture Comparison

We compare GS-Chaff with four alternative implementations: a single-agent two-stage implementation, a single joint-prompt implementation, a deterministic heuristic policy, and a non-LLM entity abstraction method. The single-agent variant uses the same number of SLM calls as GS-Chaff, while the joint-prompt variant predicts α , β , and the generated queries in a single prompt. Table 6 reports task accuracy, Privacy Protection Rate (PPR), token overhead, and latency.
Compared with the single-agent implementation using the same number of SLM calls, GS-Chaff improves MedQA and LegalBench accuracy by 1.22 and 1.24 percentage points, respectively, and improves PPR by 4.45 and 4.82 percentage points, with only 14 additional tokens and 0.08 s of latency per sample. GS-Chaff also achieves higher accuracy and PPR than the joint-prompt, deterministic heuristic, and non-LLM abstraction variants, while the joint-prompt and non-LLM variants have lower computational overhead. These results support the separation of privacy policy selection and semantic query generation with moderate additional cost.
  • Computational Cost. To verify the applicability of our framework, we measure the computational cost needed for implementation. We calculate average token consumption (Avg. Token) and average Time consumption (Avg. Time) per sample to compare computational overhead against fixed baselines. The reported time measures the local processing overhead associated with GS-Chaff rather than complete end-to-end cloud inference latency. We evaluate against a fixed baseline (the standard method without additional sampling) and a fixed β = 5 cases. Table 7 demonstrates that GS-Chaff achieves competitive efficiency compared to the fixed prior.
    Table 7. Average local computational overhead per sample.
    Table 7. Average local computational overhead per sample.
    MethodAvg. TokenAvg. Time (s)
    GS-Chaff (Ours)3242.6
    Fixed (no sampling)1420
    Fixed ( β = 5 )7854.8
  • SLM Backbone Comparison. To evaluate the influence of the local SLM backbone, we further compare Llama-3.2-1B, Qwen2.5-1.5B, Gemma-2-2B [54], and Phi-3-mini [55] under the same experimental configuration. We report task utility across four benchmarks, together with Top-1 real-query identification accuracy and local deployment overhead. The attack advantage (Adv.) is calculated relative to the random-guessing reference of 21.2%, with lower Top-1 identification accuracy and attack advantage indicating stronger privacy protection.
As shown in Table 8, GS-Chaff maintains consistent utility and privacy performance across the four evaluated SLM backbones. The differences on StrategyQA and MuSiQue are relatively small, while MedQA accuracy increases from 84.51% with Llama-3.2-1B to 86.50% with Phi-3-mini, and LegalBench accuracy increases from 81.25% to 84.45%. Meanwhile, the Top-1 real-query identification accuracy decreases from 23.85% to 21.28%, approaching the 21.2% random-guessing reference. The improved performance of larger SLMs is accompanied by higher local deployment overhead. Peak memory increases from 2.43 GB for Llama-3.2-1B to 7.81 GB for Phi-3-mini, while local inference time increases from 1.24 s to 3.76 s. Qwen2.5-1.5B and Gemma-2-2B provide intermediate trade-offs between model capability and local resource consumption, indicating that the SLM backbone can be selected according to the resource constraints of the client device.

5. Discussion

Although GS-Chaff demonstrates effectiveness under the single-session attack settings evaluated in this study, several stronger threat settings remain to be addressed. These include the following scenarios:
  • Cross-session or long-term user profiling, where an attacker links queries from multiple sessions to construct a long-term user behavior profile;
  • Broader side-channel analysis, where an attacker infers the user’s real intent from request frequency, network traffic patterns, server logs, or other metadata beyond the token-length and end-to-end latency features evaluated in this study;
  • Local client compromise or real-query index leakage, where an attacker obtains the locally stored index used to retrieve the response corresponding to the real query;
  • Broader adaptive semantic attacks, where attackers exploit learned semantic or representation-level cues to distinguish the real query under different domains and policy configurations.
In GS-Chaff, privacy protection is provided through the coordinated actions of two SLM-driven agents: the privacy policy agent adaptively determines the abstraction and chaffing parameters, while the generative semantic chaffing agent produces semantically consistent chaff queries to conceal the real query. This design supports privacy-preserving inference over natural-language text queries from different application domains, without requiring modification of the cloud-based LLM. In the current study, GS-Chaff is evaluated in the context of privacy-preserving inference over natural-language text queries. Extending the framework to sensor-derived inputs and multimodal settings will require additional mechanisms for semantic conversion, cross-modal alignment, and deployment on resource-constrained edge platforms, which we leave for future work.

6. Conclusions

This work presents GS-Chaff, a multi-agent framework for privacy-preserving LLM inference over natural-language text queries through user-intent hiding. GS-Chaff employs a privacy policy agent to adaptively determine semantic abstraction and chaffing parameters, together with a generative semantic chaffing agent that produces semantically consistent chaff queries. Experimental results on the evaluated text-based benchmarks demonstrate that the coordinated agent design reduces real-query identification risk under the evaluated attack settings while maintaining task utility on these benchmarks. By leveraging lightweight SLMs for policy control and semantic query generation, GS-Chaff provides a client-side privacy protection mechanism without requiring modifications to the cloud-based LLM. Future work will investigate system-level protections and long-term or cross-session attacks. Extending GS-Chaff to sensor-derived inputs and multimodal settings will require further exploration of semantic conversion, cross-modal alignment, and deployment on resource-constrained edge platforms.

Author Contributions

Conceptualization, Q.Z., Z.W., Z.Y., L.C. and C.Q.; data curation, Q.Z. and Z.Y.; methodology, Q.Z., Z.W., Z.Y. and L.C.; software, Z.W., Q.Z. and L.C.; validation, Z.Y.; visualization, Q.Z.; writing-original draft, Q.Z., Z.W. and L.C.; writing-review and editing, Q.Z., L.C., K.L. and C.Q. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by Guangdong Natural Science Foundation under Grant 2024B1515250004 and Shenzhen Municipal Science and Technology Innovation Bureau under Grant JCYJ20250604145646062.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The StrategyQA dataset utilized in this study is openly accessible at https://github.com/eladsegal/strategyqa, accessed on 1 May 2026; The MuSiQue dataset can be found at https://github.com/stonybrooknlp/musique, accessed on 23 April 2026; The MedQA dataset is available for free at https://github.com/jind11/MedQA, accessed on 11 May 2026; The LegalBench dataset is available at https://github.com/HazyResearch/legalbench, accessed on 9 May 2026.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
LLMLarge language model
GS-ChaffGenerative Semantic Chaffing
LDPLocal differential privacy
DPDifferential privacy
QAQuestion answering
NLPNatural language processing
AUCArea under the receiver operating characteristic curve
ROCReceiver operating characteristic
F1F1 score
ROUGE-LRecall-Oriented Understudy for Gisting Evaluation–Longest Common Subsequence
EMExact match
GPTGenerative Pre-trained Transformer
GPT-4oGenerative Pre-trained Transformer 4 Omni

Appendix A. Case Study on Semantic Stealthiness

In this appendix, we illustrate how GS-Chaff achieves intent obfuscation at the instance level through a legal-domain query inspired by the LegalBench style. The focus is on mechanism interpretability: showing the privacy parameters α , β output by the policy agent and how the generated chaff queries satisfy the semantic abstraction coverage required by α . This case study is intended only to illustrate the behavior of the α -guided abstraction mechanism and does not constitute a formal verification of candidate-set coverage.

Appendix A.1. Real Query and Policy Output

The real user query (Real Query) is:
“What personal legal liabilities may corporate executives face in securities fraud cases in the US?”
The policy agent outputs: α = 4 , β = 5
  • Explanation: This query belongs to the legal domain and involves potentially high-sensitivity decision consequences (liability types, risk assessment). Therefore, the policy favors a moderate obfuscation strength ( β relatively high to increase uncertainty) while maintaining medium-level abstraction ( α avoids excessive generalization that may distort reasoning). Configurations around α 3–4 and β 5 align with the empirical distributions reported in Figure 3.

Appendix A.2. Meaning of α = 4

Here, α represents the minimum number of distinct but semantically reasonable candidate entities that the abstracted description should cover. For this case, we abstract the real query into a description without specific case details but retaining core legal semantics:
“Individual legal liability/consequences of corporate executives in securities-related illegal situations”
Within this abstraction, at least the following 4 semantic scenarios satisfy α = 4 :
  • Securities fraud
  • Insider trading
  • Market manipulation
  • Disclosure violations
Additional possibilities include accounting fraud, breach of fiduciary duty, or regulatory enforcement consequences. Thus, α = 4 ensures that subsequent chaff queries fall within the common semantic shell of securities law liability/corporate executive liability, maintaining compatibility with at least 4 specific scenarios without revealing the unique real intent.

Appendix A.3. Generated Query Set (β = 5)

With β = 5 , GS-Chaff generates 5 queries: 1 real query + 4 chaff queries. Example (randomly permuted):
  • Q1: In securities-related litigation, what personal liabilities do corporate directors and executives typically need to assume?
  • Q2 (Real): What personal legal liabilities may corporate executives face in securities fraud cases in the US?
  • Q3: What legal consequences may company management face when violating securities regulatory regulations?
  • Q4: Under the US legal system, what obligations and responsibilities might managers have towards investors?
  • Q5: What types of liability investigations are generally triggered by fraudulent or misleading conduct in the securities market?

Appendix A.4. Why the Chaff Queries Satisfy α = 4

Each chaff query maintains the same abstract semantic shell and does not narrow the candidate entity set below 4:
  • Q1: Directors/executives in securities litigation–compatible with fraud, insider trading, disclosure violations, market manipulation → α = 4
  • Q3: Violations of securities regulations–broad enough to cover multiple legal scenarios → α = 4
  • Q4: Managerial obligations towards investors–spans multiple investor-related scenarios → α = 4
  • Q5: Fraud/misleading conduct–general category covering multiple cases → α = 4
All chaff queries share the same high-level semantic theme (securities law/corporate executive liability) and role (executives/managers) while avoiding unique details that would reduce coverage.

Appendix A.5. Implications for Semantic Stealthiness

In this example, an attacker observes a set of semantically consistent queries rather than a single standout real query plus unrelated noise. The real query is naturally embedded, increasing uncertainty in identifying the true intent. This aligns with the real-query identification rate reduction observed in Table 3 of the main text at the mechanism level.

References

  1. Brown, T.; Mann, B.; Ryder, N.; Subbiah, M.; Kaplan, J.D.; Dhariwal, P.; Neelakantan, A.; Shyam, P.; Sastry, G.; Askell, A.; et al. Language models are few-shot learners. arXiv 2005, arXiv:2005.14165v4. [Google Scholar]
  2. Bommasani, R. On the opportunities and risks of foundation models. arXiv 2021, arXiv:2108.07258. [Google Scholar]
  3. Weidinger, L.; Mellor, J.; Rauh, M.; Griffin, C.; Uesato, J.; Huang, P.S.; Cheng, M.; Glaese, M.; Balle, B.; Kasirzadeh, A.; et al. Ethical and social risks of harm from language models. arXiv 2021, arXiv:2112.04359. [Google Scholar]
  4. Wan, Z.; Guo, C.; Hu, B.; Du, J.; Mou, X.; Zhang, J. LLM-Based V2X Multi-Model Sensor Data Fusion for Improved Road Safety and Data Privacy. In Proceedings of the 2025 34th International Conference on Computer Communications and Networks (ICCCN); IEEE: Piscataway, NJ, USA, 2025; pp. 1–6. [Google Scholar]
  5. Bender, E.M.; Gebru, T.; McMillan-Major, A.; Shmitchell, S. On the dangers of stochastic parrots: Can language models be too big? In Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency, Virtual, 3–10 March 2021; pp. 610–623. [Google Scholar]
  6. Carlini, N.; Tramer, F.; Wallace, E.; Jagielski, M.; Herbert-Voss, A.; Lee, K.; Roberts, A.; Brown, T.; Song, D.; Erlingsson, U.; et al. Extracting training data from large language models. In Proceedings of the 30th USENIX security symposium (USENIX Security 21), Virtual, 11–13 August 2021; pp. 2633–2650. [Google Scholar]
  7. Li, H.; Chen, Y.; Luo, J.; Wang, J.; Peng, H.; Kang, Y.; Zhang, X.; Hu, Q.; Chan, C.; Xu, Z.; et al. Privacy in large language models: Attacks, defenses and future directions. arXiv 2023, arXiv:2310.10383. [Google Scholar]
  8. Alsboui, T.A.; Al-Aqrabi, H.; Hill, R.; Iram, S. An Approach to Privacy-Preserving Distributed Intelligence for the Internet of Things. In Proceedings of the IoTBDS, Virtual, 22–24 April 2022; pp. 174–182. [Google Scholar]
  9. de Castro, L.; Polychroniadou, A.; Escudero, D. Privacy-preserving large language model inference via GPU-accelerated fully homomorphic encryption. In Proceedings of the Neurips Safe Generative AI Workshop 2024, Vancouver, BC, Canada, 15 December 2024. [Google Scholar]
  10. Jesutosin, A.O.; Akpan, I.E. Encrypted Prompting and Secure Inference in LLM-as-a-Service Models: A Differential Privacy and Trusted Execution Environment Framework. 2025. Available online: https://www.researchgate.net/publication/399040924_Encrypted_Prompting_and_Secure_Inference_in_LLM-as-a-Service_Models_A_Differential_Privacy_and_Trusted_Execution_Environment_Framework (accessed on 2 July 2026).
  11. Kalodanis, K.; Papadopoulos, S.; Feretzakis, G.; Rizomiliotis, P.; Anagnostopoulos, D. SecureLLM: A Unified Framework for Privacy-Focused Large Language Models. Appl. Sci. 2025, 15, 4180. [Google Scholar] [CrossRef] [Scilit]
  12. Cui, Y.; Cao, X.; Zhu, G.; Nie, J.; Xu, J. Edge perception: Intelligent wireless sensing at network edge. IEEE Commun. Mag. 2025, 63, 166–173. [Google Scholar] [CrossRef] [Scilit]
  13. Li, X.; Yin, Z.; Gu, X.; Shen, B. Anti-adversarial Learning: Desensitizing Prompts for Large Language Models. arXiv 2025, arXiv:2505.01273. [Google Scholar]
  14. Yang, T.; Zhu, X.; Gurevych, I. Robust utility-preserving text anonymization based on large language models. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers); Association for Computational Linguistics: Stroudsburg, PA, USA, 2025; pp. 28922–28941. [Google Scholar]
  15. Jia, F.; Fonsati, A.; Gudmundsson, K. Natural language communication with sensor data through a LLM-integrated protocol: A case study. In Proceedings of the International Conference on Computing in Civil and Building Engineering; Springer: Cham, Switzerland, 2024; pp. 64–75. [Google Scholar]
  16. Osamy, W.; Khedr, A.M.; Salim, A.; Al Ali, A.I.; El-Sawy, A.A. Coverage, deployment and localization challenges in wireless sensor networks based on artificial intelligence techniques: A review. IEEE Access 2022, 10, 30232–30257. [Google Scholar] [CrossRef] [Scilit]
  17. Abou Ali, M.; Dornaika, F.; Charafeddine, J. Agentic AI: A comprehensive survey of architectures, applications, and future directions. Artif. Intell. Rev. 2025, 59, 11. [Google Scholar] [CrossRef] [Scilit]
  18. Cheng, Y.; Ye, H.; Li, H.H.; Sun, J.; Chen, Y. PrivAct: Internalizing Contextual Privacy Preservation via Multi-Agent Preference Training. arXiv 2026, arXiv:2602.13840. [Google Scholar]
  19. Xu, N.; Gong, Z.; Ran, R.; Tang, J.; Wen, W.; Ding, C. FHE-Agent: Automating CKKS Configuration for Practical Encrypted Inference via an LLM-Guided Agentic Framework. arXiv 2025, arXiv:2511.18653. [Google Scholar]
  20. Rivest, R.L. Chaffing and winnowing: Confidentiality without encryption. CryptoBytes (RSA Lab.) 1998, 4, 12–17. [Google Scholar]
  21. Cheng, Q.; Shi, Z.; Yuan, W.; Ma, Y.; Wang, J.; Sun, G. LLM-Enabled LAWNs: Toward Integrated Sensing, Communication, and Control. IEEE Netw. 2026, 40, 211–218. [Google Scholar] [CrossRef] [Scilit]
  22. Yao, A.C.C. How to generate and exchange secrets. In Proceedings of the 27th Annual Symposium on Foundations of Computer Science (Sfcs 1986); IEEE: Piscataway, NJ, USA, 1986; pp. 162–167. [Google Scholar]
  23. Gentry, C. Fully homomorphic encryption using ideal lattices. In Proceedings of the Forty-First Annual ACM Symposium on Theory of Computing, Bethesda, MD, USA, 31 May–2 June 2009; pp. 169–178. [Google Scholar]
  24. Dwork, C.; McSherry, F.; Nissim, K.; Smith, A. Calibrating noise to sensitivity in private data analysis. In Proceedings of the Theory of Cryptography Conference; Springer: Cham, Switzerland, 2006; pp. 265–284. [Google Scholar]
  25. Yuan, J.; Xu, L.; Jiang, H.; Rahmani, H.; Soh, D.W.; Liu, J. PrivateChat: A Secure Encrypted Communication Framework with Black-Box LLMs. 2022. Available online: https://openreview.net/forum?id=SX2Z5tgiUu (accessed on 1 July 2026).
  26. Xue, Y.; Liu, L.; Luo, Y.; Sun, B.; Fu, S. FLUTE: FSS-Based Secure Two-Party LLM Inference Using Partial Transformer Encryption. IEEE Trans. Dependable Secur. Comput. 2025, 23, 685–702. [Google Scholar] [CrossRef] [Scilit]
  27. Wang, B.; Garcia, L.A.; Srivastava, M. PrivacyOracle: Configuring sensor privacy firewalls with large language models in smart built environments. In Proceedings of the 2024 IEEE Security and Privacy Workshops (SPW); IEEE: Piscataway, NJ, USA, 2024; pp. 239–245. [Google Scholar]
  28. Bae, Y.; Kim, M.; Lee, J.; Kim, S.; Kim, J.; Choi, Y.; Mireshghallah, N. Privacy-Preserving LLM Interaction with Socratic Chain-of-Thought Reasoning and Homomorphically Encrypted Vector Databases. arXiv 2025, arXiv:2506.17336. [Google Scholar]
  29. Zimerman, I.; Adir, A.; Aharoni, E.; Avitan, M.; Baruch, M.; Drucker, N.; Lerner, J.; Masalha, R.; Meiri, R.; Soceanu, O. Power-softmax: Towards secure llm inference over encrypted data. arXiv 2024, arXiv:2410.09457. [Google Scholar]
  30. Kumar, M.; Xue, J.; Zheng, M.; Lou, Q. Tfhe-coder: Evaluating llm-agentic fully homomorphic encryption code generation. arXiv 2025, arXiv:2503.12217. [Google Scholar]
  31. Tan, Y.; Tan, C.; Mi, Z.; Chen, H. Pipellm: Fast and confidential large language model services with speculative pipelined encryption. In Proceedings of the 30th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Rotterdam, The Netherlands, 30 March–3 April 2025; Volume 1, pp. 843–857. [Google Scholar]
  32. Zhang, J.; Tian, Z.; Zhu, M.; Song, Y.; Sheng, T.; Yang, S.; Du, Q.; Liu, X.; Huang, M.; Li, D. DYNTEXT: Semantic-aware dynamic text sanitization for privacy-preserving LLM inference. In Proceedings of the Findings of the Association for Computational Linguistics: ACL 2025, Vienna, Austria, 27 July–1 August 2025; pp. 20243–20255. [Google Scholar]
  33. Albanese, F.; Ciolek, D.; D’Ippolito, N. Text sanitization beyond specific domains: Zero-shot redaction & substitution with large language models. arXiv 2023, arXiv:2311.10785. [Google Scholar]
  34. Fu, W.; Wang, H.; Gao, J.; Wan, G.; Jiang, T. Sanitize Your Responses: Mitigating Privacy Leakage in Large Language Models. arXiv 2025, arXiv:2509.24488. [Google Scholar]
  35. Thareja, R.; Gupta, G.; Nakov, P.; Vepakomma, P.; Lukas, N. Sanitizing Medical Documents with Differential Privacy using Large Language Models. In Proceedings of the Second Workshop on GenAI for Health: Potential, Trust, and Policy Compliance, San Diego, CA, USA, 6–7 December 2025. [Google Scholar]
  36. Tong, M.; Chen, K.; Yuan, X.; Liu, J.; Zhang, W.; Yu, N.; Zhang, J. On the vulnerability of text sanitization. In Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers); Association for Computational Linguistics: Stroudsburg, PA, USA, 2025; pp. 5150–5164. [Google Scholar]
  37. Carpentier, R.; Zhao, B.Z.H.; Asghar, H.J.; Kaafar, D. Preempting Text Sanitization Utility in Resource-Constrained Privacy-Preserving LLM Interactions. arXiv 2024, arXiv:2411.11521. [Google Scholar]
  38. Meisenbacher, S.; Klymenko, A.; Bodea, A.E.; Matthes, F. The Double-edged Sword of LLM-based Data Reconstruction: Understanding and Mitigating Contextual Vulnerability in Word-level Differential Privacy Text Sanitization. In Proceedings of the 24th Workshop on Privacy in the Electronic Society—WPES ’25, New York, NY, USA, 13–17 October 2025; pp. 162–176. [Google Scholar] [CrossRef] [Scilit]
  39. Lin, S.; Hua, W.; Wang, Z.; Jin, M.; Fan, L.; Zhang, Y. Emojiprompt: Generative prompt obfuscation for privacy-preserving communication with cloud-based llms. In Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers); Association for Computational Linguistics: Stroudsburg, PA, USA, 2025; pp. 12342–12361. [Google Scholar]
  40. Gim, I.; Li, C.; Zhong, L. Confidential prompting: Protecting user prompts from cloud llm providers. arXiv 2024, arXiv:2409.19134. [Google Scholar]
  41. Yadavalli, S.; Shivaswaroopa, A.; Raval, M.; Bhowmik, A.; Shaikh, A.; Arakeri, M. Lock and Decode: Obfuscated Prompt Cryptography as a Mechanism for Circumventing Large Language Model Security Paradigms. Available online: https://ssrn.com/abstract=5128143 (accessed on 2 July 2026).
  42. Zhang, T.; Cao, B.; Cao, Y.; Lin, L.; Mitra, P.; Chen, J. Wordgame: Efficient & effective llm jailbreak via simultaneous obfuscation in query and response. In Proceedings of the Findings of the Association for Computational Linguistics: NAACL 2025; Association for Computational Linguistics: Stroudsburg, PA, USA, 2025; pp. 4779–4807. [Google Scholar]
  43. Lin, Y.; Wan, C.; Fang, Y.; Gu, X. CodeCipher: Learning to Obfuscate Source Code Against LLMs. arXiv 2024, arXiv:2410.05797. [Google Scholar]
  44. Yang, H.; Zhao, R.; Wang, G.; Deng, Z. GAMA: A General Anonymizing Multi-Agent System for Privacy Preservation Enhanced by Domain Rules and Disproof Mechanism. arXiv 2025, arXiv:2509.10018. [Google Scholar]
  45. Chen, J.; Yang, J.; Zeng, Z.; Huang, Z.; Li, J.; Wang, Y. SecureGov-Agent: A Governance-Centric Multi-Agent Framework for Privacy-Preserving and Attack-Resilient LLM Agents. In Proceedings of the ICCSMT ’25: Proceedings of the 2025 6th International Conference on Computer Science and Management Technology, Xiamen, China, 26–28 December 2025. [Google Scholar]
  46. Gosmar, D.; Dahl, D.A. Sentinel agents for secure and trustworthy agentic ai in multi-agent systems. arXiv 2025, arXiv:2509.14956. [Google Scholar]
  47. Li, J.; Tang, T.; Zhao, W.X.; Nie, J.Y.; Wen, J.R. Pre-trained language models for text generation: A survey. ACM Comput. Surv. 2024, 56, 1–39. [Google Scholar] [CrossRef] [Scilit]
  48. Androutsopoulos, I.; Malakasiotis, P. A survey of paraphrasing and textual entailment methods. J. Artif. Intell. Res. 2010, 38, 135–187. [Google Scholar] [CrossRef] [Scilit]
  49. Mai, P.; Yang, Y.; Yan, R.; Ye, R.; Pang, Y. ConfusionPrompt: Practical private inference for online large language models. arXiv 2023, arXiv:2401.00870. [Google Scholar]
  50. Geva, M.; Khashabi, D.; Segal, E.; Khot, T.; Roth, D.; Berant, J. Did aristotle use a laptop? A question answering benchmark with implicit reasoning strategies. Trans. Assoc. Comput. Linguist. 2021, 9, 346–361. [Google Scholar] [CrossRef] [Scilit]
  51. Trivedi, H.; Balasubramanian, N.; Khot, T.; Sabharwal, A. MuSiQue: Multihop Questions via Single-hop Question Composition. Trans. Assoc. Comput. Linguist. 2022, 10, 539–554. [Google Scholar] [CrossRef] [Scilit]
  52. Jin, D.; Pan, E.; Oufattole, N.; Weng, W.H.; Fang, H.; Szolovits, P. What disease does this patient have? a large-scale open domain question answering dataset from medical exams. Appl. Sci. 2021, 11, 6421. [Google Scholar] [CrossRef] [Scilit]
  53. Guha, N.; Nyarko, J.; Ho, D.; Ré, C.; Chilton, A.; Chohlas-Wood, A.; Peters, A.; Waldon, B.; Rockmore, D.; Zambrano, D.; et al. Legalbench: A collaboratively built benchmark for measuring legal reasoning in large language models. Adv. Neural Inf. Process. Syst. 2023, 36, 44123–44279. [Google Scholar] [CrossRef] [Scilit]
  54. Team, G.; Riviere, M.; Pathak, S.; Sessa, P.G.; Hardin, C.; Bhupatiraju, S.; Hussenot, L.; Mesnard, T.; Shahriari, B.; Ramé, A.; et al. Gemma 2: Improving open language models at a practical size. arXiv 2024, arXiv:2408.00118. [Google Scholar]
  55. Abdin, M.; Aneja, J.; Awadalla, H.; Awadallah, A.; Awan, A.A.; Bach, N.; Bahree, A.; Bakhtiari, A.; Bao, J.; Behl, H.; et al. Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phone. arXiv 2024, arXiv:2404.14219. [Google Scholar] [CrossRef] [Scilit]
Figure 1. Comparison between our work and previous studies in privacy-preserving LLM inference. GS-Chaff addresses the challenges of computation complexity in secure computation method and broken semantic context in differential privacy method. Specifically, we protect the users’ confidentiality in the prompt by hiding their true intents among the forged queries.
Figure 1. Comparison between our work and previous studies in privacy-preserving LLM inference. GS-Chaff addresses the challenges of computation complexity in secure computation method and broken semantic context in differential privacy method. Specifically, we protect the users’ confidentiality in the prompt by hiding their true intents among the forged queries.
Sensors 26 05385 g001
Figure 2. Framework of GS-Chaff that leverages hiding user intent as its main objective. GS-Chaff obfuscates real query with two modules, privacy policy controller that determines the level of privacy, and generative forger that generates noisy queries. We leverage SLM to achieve optimal privacy protection at minimum inference cost.
Figure 2. Framework of GS-Chaff that leverages hiding user intent as its main objective. GS-Chaff obfuscates real query with two modules, privacy policy controller that determines the level of privacy, and generative forger that generates noisy queries. We leverage SLM to achieve optimal privacy protection at minimum inference cost.
Sensors 26 05385 g002
Figure 3. Joint distribution of privacy policy output.
Figure 3. Joint distribution of privacy policy output.
Sensors 26 05385 g003
Table 1. Qualitative comparison of representative prompt-obfuscation methods.
Table 1. Qualitative comparison of representative prompt-obfuscation methods.
MethodPrivacy MechanismComputational CostSemantic PreservationAdversarial ResistanceDeployment Feasibility
EmojiPromptSymbol-based prompt obfuscationLowModerateInference attacks evaluatedHigh
PetridishPrompt obfuscation with confidential executionModerate–HighHighPrompt reconstruction protectionModerate
Lock and DecodeObfuscated prompt encodingLow–ModerateModerateSecurity-bypass settingHigh
WordGameQuery–response obfuscationLowModerateJailbreak attack settingHigh
CodeCipherLearned code obfuscationModerate–HighHigh for code tasksSource-code protectionLimited
Table 2. Utility evaluation of privacy-preserving inference strategies across multiple benchmarks under local and cloud-based LLM settings.
Table 2. Utility evaluation of privacy-preserving inference strategies across multiple benchmarks under local and cloud-based LLM settings.
MethodModelStrategyQAMuSiQueMedQALegalBench
Acc.AUCF1ROUGE-LEMAcc.Acc.
Local Inference
-Llama2-7B0.6020.5810.4840.4850.3210.3040.320
-Vicuna-13B0.6460.6280.4170.4160.2250.3150.340
Cloud Inference
No Privacy ProtectionGPT-3.5-Turbo0.7510.7370.6040.6050.4390.6020.650
No Privacy ProtectionGPT-4-Turbo0.8030.7980.6630.6640.5030.8660.840
No Privacy ProtectionGPT-4o0.7910.7840.7210.7210.5570.8700.850
Text2TextGPT-3.5-Turbo0.5280.4960.0190.0190.0100.2600.280
Text2TextGPT-4-Turbo0.5370.5060.0280.0270.0140.2700.290
Text2TextGPT-4o0.5330.5000.0210.0200.0120.2750.295
ParaphraserGPT-3.5-Turbo0.4890.4780.0760.0760.0280.2800.300
ParaphraserGPT-4-Turbo0.5460.5230.0600.0610.0260.2900.310
ParaphraserGPT-4o0.5370.5150.0720.0720.0380.2950.315
Confusion PromptGPT-3.5-Turbo0.7230.7260.6060.6050.4450.5800.620
Confusion PromptGPT-4-Turbo0.7410.7430.6330.6340.4950.8100.780
Confusion PromptGPT-4o0.7330.7390.6850.6840.5350.8150.790
GS-Chaff (Ours)GPT-3.5-Turbo0.7450.7300.5980.6000.4350.5950.640
GS-Chaff (Ours)GPT-4-Turbo0.7950.7900.6580.6600.5000.8600.835
GS-Chaff (Ours)GPT-4o0.7880.7810.7180.7180.5520.8650.845
Table 3. Adversarial real-query identification rate under the evaluated multi-agent consensus attack setting. ↓ indicates that lower values are better.
Table 3. Adversarial real-query identification rate under the evaluated multi-agent consensus attack setting. ↓ indicates that lower values are better.
MethodMechanismReal-Query Identification Rate (%) ↓
Random GuessSampling-based Estimation21.2 ± 1.5
DP PerturbationDifferential Privacy Noise92.5 ± 2.1
Entity ReplacementRule-based Substitution65.0 ± 4.2
GS-Chaff (Ours)Generative Semantic Obfuscation22.5 ± 1.8
Table 4. Ablation study on the privacy policy components. Dynamic parameterization in GS-Chaff improves the trade-off between task accuracy (Acc.) and Privacy Protection Rate (PPR) across domain-specific benchmarks. ↑ indicates that higher values are better.
Table 4. Ablation study on the privacy policy components. Dynamic parameterization in GS-Chaff improves the trade-off between task accuracy (Acc.) and Privacy Protection Rate (PPR) across domain-specific benchmarks. ↑ indicates that higher values are better.
ConfigurationMetricMedQALegalBench
Full GS-Chaff (Qwen2.5-1.5B, dynamic α , β )Acc.86.32 ± 1.0583.74 ± 1.33
PPR ↑92.85 ± 0.7291.02 ± 0.95
Full GS-Chaff (Llama-3.2-1B, dynamic α , β )Acc.84.51 ± 1.2481.25 ± 1.56
PPR ↑91.20 ± 0.8889.53 ± 1.04
Static β = 5 Acc.82.15 ± 1.5279.48 ± 1.82
PPR ↑88.47 ± 1.1586.41 ± 1.28
Static α = 3 Acc.81.38 ± 1.4578.12 ± 1.67
PPR ↑87.92 ± 1.3085.25 ± 1.42
Static α = 3 , β = 5 Acc.76.85 ± 2.1072.50 ± 2.55
PPR ↑80.54 ± 1.9578.10 ± 2.21
w/o α Acc.73.10 ± 1.8569.80 ± 2.10
PPR ↑79.25 ± 1.7576.50 ± 2.00
w/o β Acc.84.10 ± 1.0580.95 ± 1.35
PPR ↑61.50 ± 2.4059.80 ± 2.55
Table 5. Robustness to a limited side-channel attack based on token length and end-to-end request latency. ↓ indicates that lower values are better.
Table 5. Robustness to a limited side-channel attack based on token length and end-to-end request latency. ↓ indicates that lower values are better.
SignalTop-1 acc (%) ↓ MRR ↓
Random guess ( 1 β )21.2 ± 1.50.372 ± 0.014
Per-query token length23.1 ± 1.60.386 ± 0.015
End-to-end latency23.8 ± 1.70.392 ± 0.016
Token length + latency24.6 ± 1.80.401 ± 0.017
Table 6. Comparison of agent architectures and alternative implementations. ↓ indicates that lower values are better and ↑ indicates that higher values are better.
Table 6. Comparison of agent architectures and alternative implementations. ↓ indicates that lower values are better and ↑ indicates that higher values are better.
MethodSLM CallsMedQA Acc. ↑LegalBench Acc. ↑MedQA PPR ↑LegalBench PPR ↑Avg. Tokens ↓Avg. Time (s) ↓
GS-Chaff286.32 ± 1.0583.74 ± 1.3392.85 ± 0.7291.02 ± 0.953242.60
Single-Agent Implementation285.10 ± 1.1882.50 ± 1.4088.40 ± 1.1086.20 ± 1.253102.52
Single Joint-Prompt182.40 ± 1.4579.80 ± 1.6283.10 ± 1.3581.50 ± 1.502151.65
Deterministic Heuristic Policy181.20 ± 1.5078.50 ± 1.6880.50 ± 1.6078.10 ± 1.752602.10
Non-LLM Entity Abstraction076.50 ± 1.9073.20 ± 2.1071.20 ± 2.1568.40 ± 2.301801.35
Table 8. Comparison of SLM backbones in GS-Chaff. ↓ indicates that lower values are better and ↑ indicates that higher values are better.
Table 8. Comparison of SLM backbones in GS-Chaff. ↓ indicates that lower values are better and ↑ indicates that higher values are better.
SLM BackboneStrategyQAMuSiQueMedQALegalBenchPrivacyLocal Overhead
Acc. ↑AUC ↑F1 ↑ROUGE-L ↑EM ↑Acc. ↑Acc. ↑Top-1 ID (%) ↓Adv. (pp) ↓Memory ↓Time ↓
Llama-3.2-1B78.82 ± 1.1578.14 ± 1.1071.23 ± 1.2571.21 ± 1.2054.62 ± 1.3584.51 ± 1.2481.25 ± 1.5623.85 ± 1.182.65 ± 0.322.43 GB1.24 s
Qwen2.5-1.5B79.15 ± 1.0278.43 ± 0.9871.58 ± 1.1271.56 ± 1.0855.01 ± 1.2186.32 ± 1.0583.74 ± 1.3322.54 ± 1.051.34 ± 0.223.18 GB1.58 s
Gemma-2-2B79.31 ± 0.9178.62 ± 0.8671.72 ± 0.9571.70 ± 0.9155.15 ± 1.0486.45 ± 0.9884.12 ± 1.2221.62 ± 0.920.42 ± 0.154.26 GB2.12 s
Phi-3-mini79.40 ± 0.8378.71 ± 0.7971.80 ± 0.8871.78 ± 0.8455.20 ± 0.9686.50 ± 0.8584.45 ± 1.0521.28 ± 0.810.08 ± 0.087.81 GB3.76 s
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhou, Q.; Wang, Z.; Yue, Z.; Cai, L.; Liu, K.; Qin, C. GS-Chaff: Multi-Agent Prompt-Level Semantic Chaffing for Privacy-Preserving LLM Inference. Sensors 2026, 26, 5385. https://doi.org/10.3390/s26175385

AMA Style

Zhou Q, Wang Z, Yue Z, Cai L, Liu K, Qin C. GS-Chaff: Multi-Agent Prompt-Level Semantic Chaffing for Privacy-Preserving LLM Inference. Sensors. 2026; 26(17):5385. https://doi.org/10.3390/s26175385

Chicago/Turabian Style

Zhou, Quan, Zhicheng Wang, Zhe Yue, Libin Cai, Kuien Liu, and Caiyan Qin. 2026. "GS-Chaff: Multi-Agent Prompt-Level Semantic Chaffing for Privacy-Preserving LLM Inference" Sensors 26, no. 17: 5385. https://doi.org/10.3390/s26175385

APA Style

Zhou, Q., Wang, Z., Yue, Z., Cai, L., Liu, K., & Qin, C. (2026). GS-Chaff: Multi-Agent Prompt-Level Semantic Chaffing for Privacy-Preserving LLM Inference. Sensors, 26(17), 5385. https://doi.org/10.3390/s26175385

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop