From Models to Services: Systematizing Security Assurance for Model-as-a-Service
Author details
- Jianming ZhouSchool of Software and Microelectronics, Peking University, Beijing, China
- Yang LuoSchool of Software and Microelectronics, Peking University, Beijing; National Engineering Research Center for Software Engineering, Peking University, Beijing; Beijing Key Laboratory of Data Intelligence and Security (Peking University), Beijing, ChinaCorresponding author
- Guangpu ChenSchool of Software and Microelectronics, Peking University, Beijing, China
- Zhaoyu ChenSchool of Software and Microelectronics, Peking University, Beijing, China
- Yifeng GaoSchool of Computer Science, Peking University, Beijing, China
- Qingni ShenSchool of Software and Microelectronics, Peking University, Beijing; National Engineering Research Center for Software Engineering, Peking University, Beijing; Beijing Key Laboratory of Data Intelligence and Security (Peking University), Beijing, China
- Zhonghai WuSchool of Software and Microelectronics, Peking University, Beijing; National Engineering Research Center for Software Engineering, Peking University, Beijing; Beijing Key Laboratory of Data Intelligence and Security (Peking University), Beijing, China
Abstract
Large language models are mainly delivered as cloud services, in which the assets of different principals are coupled within a single service pipeline, while the related security research is scattered across several fields with differing threat models. This paper systematizes this research from a service perspective. We decompose Model-as-a-Service (MaaS) into a five-layer stack and five trust boundaries, define six adversary classes and six security goals, use them to code 120 studies, and evaluate 50 defenses under a unified set of criteria. The results show that 44.2% of the studies concentrate on behavioral integrity, while service integrity, availability and cost, and accountability together account for only 13.3%. Defenses are evaluated on production services at less than half the rate of attacks, and none of the cryptographic or hardware mechanisms that protect against the provider can be adopted unilaterally by customers. Finally, we propose a research agenda by comparison with current standards and regulations.
Introduction
Large Language Models (LLMs) such as GPT, Claude, and LLaMA are rarely run by their users themselves [1, 2]. Training and inference require accelerators, data, and engineering capacity that few organizations possess, so model capabilities are delivered as cloud services: the provider hosts the model behind an Application Programming Interface (API), developers wrap the model with system prompts, Retrieval-Augmented Generation (RAG), and tool calls, and end users interact with the resulting applications [3, 4]. We call this delivery model Model-as-a-Service (MaaS). It differs from the earlier Machine-Learning-as-a-Service (MLaaS) [5] in three ways that bear directly on security. First, the interface is natural language, and instructions and data share the same channel [6]. Second, the model is both an asset to be protected and a potential weapon against its own operator [7]. Third, the service is shared: the same inference runtime batches requests from multiple tenants, caches their prefixes, and bills by usage [8, 9].
These characteristics have given rise to a large and rapidly growing body of research. Attacks can steal proprietary weights through the API [10], recover training data from aligned production models [11], infer other tenants’ prompts from cache timing [12, 13], read encrypted responses from packet lengths [14], hijack agents through retrieved content [6, 15], and remove safety alignment through fine-tuning APIs [16]. Defenses span Secure Multi-Party Computation (MPC) for Transformer inference [17, 18], confidential-computing GPUs [19], Differential Privacy (DP) [20], guard classifiers [21, 22], and capability-based agent architectures [23]. Each of these directions adopts a different threat model: cryptographic inference assumes a curious provider, jailbreak research assumes a malicious user and an honest provider, prompt injection research assumes a malicious third party and a benign user, and model stealing research assumes a malicious user and treats the provider as the victim. These threat models are rarely stated under a unified system model, which makes it hard to judge which risks a MaaS deployment covers, which assurance mechanisms can be composed, and which gaps remain.
Existing surveys do not resolve this problem. Surveys on trustworthy LLMs [24, 25] and on LLM security and privacy [26, 27] organize the literature by model property or attack type, a survey on agent security [28] focuses on the agent loop, and a recent Systematization of Knowledge (SoK) paper on jailbreak guardrails [29] evaluates one class of defenses in depth. Industry and regulatory frameworks [30, 31, 32, 33, 34] enumerate risks but do not evaluate concrete mechanisms. The SoK on cryptographic neural network computation [35] treats the server as the adversary, but it considers only a curious server and does not address the rest of the service. None of these works treats the provider as an adversary that misreports what it serves, treats the shared inference runtime as an attack surface, or quantifies how research effort is distributed across the service architecture.
This paper systematizes MaaS security around the service and answers five Research Questions (RQs):
RQ1 Which components, principals, and trust boundaries make up a MaaS deployment? Which adversaries can cross each boundary?
RQ2 How do known attacks map onto this model? What access and assumptions does each class of attack require?
RQ3 What guarantees do existing assurance mechanisms provide, under which trust assumptions, and at what scale? Who can deploy them?
RQ4 Where is the literature concentrated? How realistic are its evaluations?
RQ5 What do standards and regulations cover? Which open problems follow from the gaps?
Our contributions are as follows:
A service-level security model for MaaS (Section IV). We decompose MaaS into five layers (model supply, inference runtime, interface, context assembly, and output) separated by five trust boundaries, and define six adversary classes and six security goals. Two of these goals, service integrity and availability and cost, have no counterpart in model-centric taxonomies. They arise directly from the commercial relationship between customer and provider.
A systematization of attacks and assurance mechanisms (Sections V and VI). We organize attacks by the goal they violate and the boundary they cross, and evaluate 50 defenses against six criteria: the targeted adversary, the type of guarantee, client deployability, the demonstrated scale, whether the defense was evaluated on a production service, and whether it underwent adaptive evaluation.
A quantitative characterization of the field (Section VIII). We code 120 primary studies and report eight findings, including the concentration of research on behavioral integrity, the asymmetry in evaluation realism between attacks and defenses, and the deployability gap in protections against the provider. The full coding is listed in Appendix A.
A comparison with standards and a research agenda (Sections IX and X). We map seven groups of frameworks and regulations clause by clause onto the goals, show that none of them covers service integrity from the customer’s perspective, and summarize five lessons and seven open problems.
Section II introduces the MaaS stack and deployment forms, Section III describes the systematization methodology, and Section XI compares this paper with existing surveys.
Background and Scope
The MaaS stack
Figure 1 shows the reference architecture used throughout this paper. We divide a MaaS deployment into five layers, ordered from the provider’s assets to user-facing outcomes.
L1 Model supply and customization. This layer comprises pretraining corpora, base models, alignment through supervised fine-tuning and reinforcement learning from human feedback [36, 37], and adapters produced for customers through fine-tuning APIs. Weights and adapters are the provider’s most valuable assets, and many artifacts at this layer (datasets, checkpoints, serialization libraries) come from a third-party supply chain [38, 39].
L2 Inference runtime. This is the serving engine, which schedules requests, batches tokens from different tenants, maintains the Key-Value (KV) cache, shares prompt prefixes across requests, and runs on shared accelerators [8, 9]. These optimizations lower the cost of MaaS, and they also create interference between tenants.
L3 Interface and metering. This is the API gateway, which authenticates callers, enforces rate limits and content policies, returns tokens and optional log-probabilities, and bills by consumed tokens. The interface determines how much information an adversary can observe (text, top-k log-probabilities, embeddings, latency), and it is also the customer’s only window into “what was actually served and how much was charged”.
L4 Context assembly. This is the developer’s application logic, which assembles the prompt from the system prompt, user input, retrieved documents, memory, and tool outputs, and may run an agent loop in which model outputs trigger further tool calls [4]. This layer mixes instructions of different privilege with untrusted data.
L5 Output and downstream use. This layer comprises the answers shown to users, the actions executed by tools, and generated text that leaves the system and may later require provenance tracing [40].
Principals and deployment forms
A MaaS deployment involves five classes of principals: the provider, which owns or licenses the model and operates L1 to L3, the developer (tenant), which builds applications on top of the API and operates L4, the end user, third-party content sources whose web pages, files, and tool responses enter the context, and intermediaries such as resellers, aggregation platforms, and API gateways that relay traffic between developers and providers. Upstream suppliers of data and model artifacts form a sixth, indirect class of principal.
The same stack appears in four deployment forms, which differ in which principal controls which layer. In a public API, the provider controls L1 to L3 and exposes only the interface. In a dedicated or private deployment, the weights run in an environment controlled or audited by the customer, which is common in finance, healthcare, and government. In an intermediated deployment, a reseller or gateway claims that its model comes from an upstream provider, and without additional mechanisms the customer cannot verify what is actually served [41, 42]. In a decentralized or edge deployment, different layers or shards of the model run on resources belonging to different principals [43, 44]. The trust assumptions of each defense in Section VI depend on the deployment form it presumes.
From MLaaS to MaaS
The first generation of research on machine learning services already showed that prediction APIs leak models [45] and training-set membership [46]. MaaS inherits these risks and adds three new classes of risk. First, the natural-language interface makes no syntactic distinction between instructions and data, so prompt injection is an inherent property of the interface [6, 47]. Second, whether the model complies with its policy is itself a security property: the provider promises that the model will refuse certain requests, and users try to break this promise through jailbreaks [7, 48]. Third, LLM inference is stateful and shared: prefix caching, continuous batching, and per-token billing introduce channels and conflicts of interest that stateless classifiers do not have [13, 49].
Scope
We include attack, defense, and measurement studies on language models offered or consumed as services, covering the inference runtime, customization interfaces, and the application layer that assembles context for the model. The following three adjacent areas are excluded unless they interact with MaaS: hallucination and factuality without an adversary [50, 51], the safety of open-weight models that requires direct modification of weights, and general cloud and hardware security unrelated to model serving.
Systematization Methodology
Literature collection. We searched DBLP, Google Scholar, ACM Digital Library, and IEEE Xplore with combinations of service terms (“Model-as-a-Service”, “LLM API”, “LLM serving”, “inference provider”) and security terms (“extraction”, “stealing”, “membership inference”, “side channel”, “jailbreak”, “prompt injection”, “poisoning”, “private inference”, “differential privacy”, “watermark”, “audit”), with searches covering work up to June 2026. We prioritized security venues (USENIX Security, IEEE S&P, ACM CCS, NDSS), machine learning venues (NeurIPS, ICML, ICLR), and language venues (ACL, EMNLP, NAACL, COLM), and supplemented them with highly cited preprints from well-known groups. We then expanded the set by snowballing over the references and citations of included studies: each round performed one backward pass and one forward pass, until a round produced no new study meeting the inclusion criteria, for three rounds in total. To verify the findings on research gaps in Section VIII, we also ran supplementary targeted searches for G4, G5, and the two adversary classes \mathsf{A}_{\mathsf{T}} and \mathsf{A}_{\mathsf{P}} (defined in Section IV) (“KV cache side channel”, “prompt caching”, “model fingerprinting”, “model identity verification”, “token count verification”, “billing audit”, “slowdown attack”). Surveys, standards, and regulations were collected as secondary sources and are discussed in Sections IX and XI.
Screening. The database searches returned 2,316 records, of which 1,487 remained after deduplication. After title and abstract screening, 268 records were retained for full-text assessment, of which 177 were excluded: 74 did not study models offered or consumed as services, 51 had no empirical or formal evaluation, 33 were surveys or position papers without empirical evaluation, and 19 were other versions of already included work. Full-text assessment retained 91 studies, and snowballing and the supplementary targeted searches added another 29.
Inclusion criteria. A primary study must satisfy two conditions: (i) it studies a language model offered or consumed through a service interface, or a component of the inference or customization pipeline, and (ii) it proposes or measures an attack, defense, or security property, with an empirical or formal evaluation. The final corpus contains 120 primary studies published from 2020 to 2026: 52 attacks, 18 measurement or benchmark studies, and 50 defenses. The literature on G3 is far larger than that on the other goals, so for G3 we include only representative studies that were published at the venues above, are widely adopted by benchmarks, or introduce a new attack class, whereas for the other goals and for studies related to \mathsf{A}_{\mathsf{T}} and \mathsf{A}_{\mathsf{P}} we aim for comprehensive coverage. Position papers or benchmarks that contain empirical measurements (e.g., Sun et al. [49], Huang et al. [25]) are included as measurement studies. Earlier work on neural network services and trusted execution [45, 46, 52, 53] serves as background and is not coded.
Coding. We coded each study from its full text along the dimensions in Table I. Layer, adversary, and goal are multi-valued, because a single study may consider both system-prompt leakage and user-prompt leakage. Defenses are additionally coded for the type of guarantee, whether adaptive attacks were evaluated, whether the customer can deploy them without provider cooperation, and whether they were demonstrated on a model with at least 7 billion parameters. When a paper reports multiple settings, we code the strongest setting it evaluated. When a study proposes both a measurement and a defense, we code it as a single type according to its main contribution. Years are coded by the formal publication year at the time of finalization (studies that were preprints at search time and were formally published later are coded by their formal publication year), and studies not yet formally published are coded by the year of their first preprint. The first author coded all studies, and the second author independently coded a random sample of 30 studies (25.0%), with Cohen’s \kappa ranging from 0.71 (adaptive evaluation) to 0.94 (type) across dimensions. Disagreements were resolved through discussion, and the resulting decision rules were then applied to re-check the same codes for the remaining studies. The full coding is listed in Appendix A.
Limitations. The corpus is not exhaustive, and its composition is affected by the search terms and venue priorities. Recent studies are less completely collected, so the counts for 2025 and 2026 are lower (Section VIII), and the counts for less-studied directions such as G5 and \mathsf{A}_{\mathsf{T}} should be treated as lower bounds. The G3 portion is a representative sample, so the actual share of G3 in the field is no lower than our figure. Coding involves judgment, and agreement was lowest for the adaptive evaluation and deployability dimensions. The percentages in this paper describe only this corpus and are intended to reflect the concentration of research effort.
| Dimension | Values |
|---|---|
| Type | Attack (A), measurement or benchmark (M), defense (D), one type per study by main contribution |
| Layer | L1 supply (Sup), L2 serving (Srv), L3 interface (API), L4 context (Ctx), L5 output (Out) |
| Adversary | \mathsf{A}_{\mathsf{Q}} query-only user, \mathsf{A}_{\mathsf{F}} customization user, \mathsf{A}_{\mathsf{C}} content injector, \mathsf{A}_{\mathsf{T}} side-channel observer, \mathsf{A}_{\mathsf{P}} provider or intermediary, \mathsf{A}_{\mathsf{S}} supply chain (Table II) |
| Goal | G1 to G6 (Table III) |
| Evaluation | Open-weight or local models only (O), production service only (P), both (B) |
| Guarantee | Cryptographic (Crypto), hardware isolation (HW), differential privacy (DP), statistical test (Stat), structural by construction (Struct), empirical (Emp) |
| Adaptive | Full adaptive attack evaluated (Y), partial (P), none (N), not applicable (n/a) |
| Client | Deployable by the developer or user without provider cooperation (Y/N) |
| Scale | Demonstrated on a model with \ge7B parameters (Y/N) |

System and Threat Model
Assets
We distinguish six classes of assets. Model assets are the weights, architectural details, adapters, and decoding configuration (L1). Application assets are system prompts, tool definitions, and application logic, which developers increasingly treat as intellectual property (L4). User data comprises prompts, uploaded files, conversation history, and outputs, which often contain personal or regulated information [54]. Training and customization data comprises pretraining corpora, fine-tuning datasets, and retrieval stores. Behavior is the set of policies the model should follow, including refusal policies and the instruction hierarchy between developer and user [55]. Service resources are compute, quota, and billing.
Trust boundaries
Five Trust Boundaries (TBs) separate mutually distrusting principals (Figure 1).
TB1, between client and interface. This boundary lies between the user or developer and the API. Everything an external caller learns or influences passes through it: the input is the prompt, and the outputs are tokens, log-probabilities, embeddings, and latency.
TB2, between tenants. This boundary lies between requests from different tenants in the shared inference runtime. Continuous batching, prefix sharing, and semantic caching let one tenant’s requests affect another tenant’s latency [12, 13].
TB3, the privilege boundary within the context. This boundary lies inside the context assembled by L4 and separates three classes of input in decreasing order of privilege: the developer’s system prompt, the end user’s input, and third-party content from retrieved documents, web pages, and tool outputs. The segment between the first two determines whether the user can override the developer’s instructions, and the segment between the last two is the boundary between instructions and data. Unlike the other boundaries, TB3 has no enforcement point in current models: all three classes of input are merely tokens in the same sequence [6, 55, 56].
TB4, between customer and provider. This boundary lies between the developer or user and the provider or any intermediary. The customer hands over data and receives in return claims about which model was run and how many tokens were consumed. Most model-centric research sidesteps this boundary by trusting the provider.
TB5, the supply chain. This boundary lies between the provider and the upstream suppliers of corpora, checkpoints, adapters, and software libraries [38, 39].
Adversaries
Table II defines six adversary classes by the boundaries they cross and the access they possess. These classes are not ordered by strength. \mathsf{A}_{\mathsf{T}} sees no content but can observe other tenants. \mathsf{A}_{\mathsf{P}} sees everything inside the provider but not the customer’s local state. One adversary can belong to several classes at once. For example, a developer may be a fine-tuning user (\mathsf{A}_{\mathsf{F}}) and also control the documents returned by its own retrieval store (\mathsf{A}_{\mathsf{C}}). The bottom of Figure 1 lists the six adversary classes, and red circles mark where each class enters the system.
Security goals
Table III lists six goals. G1, G2, and G3 refine classical confidentiality and integrity for the two main classes of asset owners and for model behavior. G4 and G5 express what the customer pays for, and G6 expresses societal and regulatory requirements. G4 is the goal missing from existing taxonomies, so we give it a precise definition. Let M^{*} be the model the customer contracted for, S the function that actually serves requests, and \pi the published pricing function. Service integrity on a workload \mathcal{X} requires
| Class | Who | Access | Crosses | Typical aim |
|---|---|---|---|---|
| \mathsf{A}_{\mathsf{Q}} | Query-only user | Black-box text, optionally log-probabilities or embeddings, query budget | TB1, TB3 | Extract model or data, elicit prohibited behavior, override developer instructions, exhaust resources |
| \mathsf{A}_{\mathsf{F}} | Customization user | Upload of fine-tuning data through the provider’s API | TB1 | Remove alignment, implant behavior |
| \mathsf{A}_{\mathsf{C}} | Content injector | Control of web pages, documents, e-mails, or tool responses that enter the context | TB3 | Hijack the task, exfiltrate context, corrupt answers, inflate cost |
| \mathsf{A}_{\mathsf{T}} | Side-channel observer | Co-tenant timing in the shared runtime, or on-path view of encrypted traffic | TB2, TB1 | Infer other tenants’ prompts or responses |
| \mathsf{A}_{\mathsf{P}} | Provider or intermediary | Full view of prompts, outputs, and serving configuration | TB4 | Read customer data, substitute models, misreport usage |
| \mathsf{A}_{\mathsf{S}} | Supply-chain attacker | Control of training data, checkpoints, adapters, or loaders | TB5 | Backdoor the model, compromise the host |
where S(x) and M^{*}(x) are the distributions of the complete generated sequence (including hidden reasoning tokens that are not returned to the customer) under the published decoding parameters, D is a contractually agreed distributional distance, \epsilon accommodates benign numerical differences caused by batching, hardware, and kernel implementations [42, 57], \tau_{S}(x) is the number of tokens the service actually consumes when processing x, and c(S,x) is the amount actually billed. Covert model substitution, quantization that shifts the distribution beyond \epsilon, and the generation of superfluous hidden tokens violate the first condition, and misreporting the token count violates the second. A customer who sees only individual outputs cannot detect either violation [41, 49]. G4 also requires that the model artifacts loaded by the service execute no code beyond the declared computation, a requirement that guards against \mathsf{A}_{\mathsf{S}}.
Attacks
Table IV summarizes 25 attack classes by goal, adversary, required access, boundary, and whether at least one representative study was validated on a production service. This section discusses them goal by goal.
Model and application confidentiality (G1)
Model stealing through prediction APIs predates LLMs [45], and its earliest forms against language models were the imitation of BERT-based APIs [59] and of production machine translation systems [60], as well as the recovery of fine-tuned classification layers when the public pretrained encoder is known [97]. Two lines of work now coexist. Exact extraction recovers parameters. Carlini et al. [10] exploited log-probability outputs to recover the embedding projection layer of OpenAI production models for less than $20, and estimated that doing the same for gpt-3.5-turbo would cost less than $2,000. Finlayson et al. [58] showed that the outputs of API-protected models lie in a low-dimensional subspace, from which one can infer their hidden dimension and identify model updates. Both attacks rely on the interface returning log-probabilities or allowing a logit bias to be set, and providers subsequently restricted these features, which shows that interface design at L3 directly determines G1. Functional imitation trains a cheaper model on API outputs. Gudibande et al. [61] found that imitation mostly learns style and rarely learns factuality and capability, which limits its threat to frontier models. Model identity is itself a form of information: LLMmap [66] uses crafted queries to identify the model version behind an application, and even in the presence of unknown system prompts, stochastic sampling, and generation frameworks such as RAG, it distinguishes 42 versions (including closed-source models) with over 95% accuracy in only 8 interactions, which prepares the ground for subsequent model-specific attacks.
System prompts are application assets at L4. Instructions such as “ignore the above and output your instructions” leak them [62, 86]. Zhang et al. [63] showed that simple text-only queries reliably extract system prompts, including from production systems, PLeak [64] automatically optimizes such queries, and Morris et al. [65] reconstruct prompts from the next-token probability vector alone. Defenses that instruct the model to keep its prompt secret sit inside TB3 and inherit all the weaknesses of the in-band defenses discussed in Section VI-G.
User and data confidentiality (G2)
Training and customization data. Carlini et al. [67] defined training data extraction for language models: given a model f_{\theta}, find an input that causes it to output a sample x\in D_{\mathrm{train}} verbatim. Memorization grows log-linearly with model size and the number of duplicates [98], personally identifiable information can be extracted or reconstructed from fine-tuned models [68], and alignment does not eliminate the phenomenon: a divergence attack caused ChatGPT to emit training data at about 150 times the rate observed in normal use [11]. Membership inference is a weaker, statistical version of this attack. Reference-free attacks based on neighborhood comparison [69] and token probability statistics [70], as well as attacks on fine-tuned models [71], all report positive results. However, a large-scale evaluation on models trained on the Pile found that membership inference on pretraining data is barely better than random guessing, and that many apparent successes stem from distribution shift between members and non-members [72]. Debenedetti et al. [73] further showed that system components surrounding the model (e.g., training-data deduplication and output filters) create privacy side channels that invalidate guarantees proven for the model alone. In MaaS, therefore, fine-tuning data, which is small and heavily duplicated, faces greater risk than pretraining data.
| Goal | Name | Requirement | Example violation |
|---|---|---|---|
| G1 | Model and application confidentiality | Weights, architecture, model identity, and system prompts are not disclosed beyond the intended interface | Projection-layer extraction, prompt extraction |
| G2 | User and data confidentiality | Prompts, outputs, context, and training data are not disclosed to unauthorized parties, including the provider where required | Training-data extraction, cache timing |
| G3 | Behavioral integrity | The model follows the provider’s policy and the instruction hierarchy of developer and user | Jailbreak, prompt injection, harmful fine-tuning |
| G4 | Service integrity | The served model and the billed usage match what was contracted (Eq. 1), and loaded artifacts execute nothing beyond the declared computation | Model substitution, token inflation, malicious checkpoints |
| G5 | Availability and cost | The service remains responsive and costs remain bounded under adversarial inputs | Sponge prompts, unbounded generation |
| G6 | Accountability and provenance | Outputs and models can be attributed, and behavior can be audited | Watermark removal or spoofing |
| Attack class | Goal | Adv. | Access | Bound. | Prod. | Representative studies |
|---|---|---|---|---|---|---|
| Logit-based weight extraction | G1 | \mathsf{A}_{\mathsf{Q}} | Log-probabilities | TB1 | ● | [10, 58] |
| Functional imitation | G1 | \mathsf{A}_{\mathsf{Q}} | Text | TB1 | ● | [59, 60, 61] |
| System-prompt extraction | G1 | \mathsf{A}_{\mathsf{Q}} | Text | TB1, TB3 | ● | [62, 63, 64, 65] |
| Model fingerprinting | G1 | \mathsf{A}_{\mathsf{Q}} | Text | TB1 | ● | [66] |
| Training-data extraction | G2 | \mathsf{A}_{\mathsf{Q}} | Text | TB1 | ● | [11, 67, 68] |
| Membership inference | G2 | \mathsf{A}_{\mathsf{Q}} | Log-probabilities | TB1 | ○ | [69, 70, 71, 72, 73] |
| Attribute inference from user text | G2 | \mathsf{A}_{\mathsf{Q}} | Text | TB1 | ● | [74] |
| Embedding inversion | G2 | \mathsf{A}_{\mathsf{P}} | Embeddings | TB4 | ● | [75, 76, 77] |
| Retrieval-store leakage | G2 | \mathsf{A}_{\mathsf{Q}} | Text | TB1, TB3 | ○ | [78] |
| Cache and scheduling side channels | G1, G2 | \mathsf{A}_{\mathsf{T}} | Timing | TB2 | ● | [12, 13, 79] |
| Token-length side channel | G2 | \mathsf{A}_{\mathsf{T}} | Packet sizes | TB1 | ● | [14] |
| Provider-side exposure | G2 | \mathsf{A}_{\mathsf{P}} | Logs | TB4 | ● | [54] |
| Optimization-based jailbreak | G3 | \mathsf{A}_{\mathsf{Q}} | Surrogate gradients, text | TB1 | ● | [48, 80] |
| LLM-guided jailbreak | G3 | \mathsf{A}_{\mathsf{Q}} | Text | TB1 | ● | [81, 82, 83] |
| Multi-turn and long-context jailbreak | G3 | \mathsf{A}_{\mathsf{Q}} | Text | TB1 | ● | [84, 85] |
| Direct prompt injection | G3 | \mathsf{A}_{\mathsf{Q}} | Text | TB1, TB3 | ● | [62, 86] |
| Indirect prompt injection | G3, G2 | \mathsf{A}_{\mathsf{C}} | Content | TB3 | ● | [6, 15, 47] |
| Knowledge-base poisoning | G3 | \mathsf{A}_{\mathsf{C}} | Content | TB3 | ● | [87] |
| Harmful fine-tuning | G3 | \mathsf{A}_{\mathsf{F}} | Fine-tuning API | TB1 | ● | [16, 88] |
| Data poisoning and backdoors | G3 | \mathsf{A}_{\mathsf{S}} | Training data | TB5 | ● | [39, 89, 90, 91] |
| Malicious model artifacts | G4 | \mathsf{A}_{\mathsf{S}} | Checkpoints, loaders | TB5 | ● | [38] |
| Model substitution and usage inflation | G4, G5 | \mathsf{A}_{\mathsf{P}} | Serving configuration | TB4 | ● | [42, 49] |
| Resource exhaustion | G5 | \mathsf{A}_{\mathsf{Q}} | Text | TB1 | ● | [92, 93, 94] |
| Reasoning slowdown via injected content | G5 | \mathsf{A}_{\mathsf{C}} | Content | TB3 | ● | [95] |
| Watermark stealing and spoofing | G6 | \mathsf{A}_{\mathsf{Q}} | Text | TB1 | ○ | [96] |
Prod.: ● at least one representative study was evaluated on a production service, ○ none.
Context and user data. User prompts reach the provider by design. An analysis of real conversations found that users frequently disclose personal and sensitive information to chatbots [54], and models also leak in-context information in ways that violate contextual integrity [99]. Beyond memorization, LLMs can infer personal attributes such as location and income from ordinary user text with high accuracy, at a fraction of the cost of human analysis [74], which allows any party holding conversation logs to profile users. Retrieval introduces two kinds of exposure: retrieval stores can be induced to output their documents [78], and embeddings stored with a vector database provider can be inverted into text close to the original [75, 76, 77], including embeddings produced by commercial embedding APIs [76].
Side channels in the inference stack. Another class of threats to G2 comes from performance optimizations at L2 and L3. Prefix caching makes requests that share a prefix with a cached request faster, which a co-located tenant can exploit to verify guesses about another tenant’s prompt token by token. Song et al. [12] demonstrated such attacks on KV caches and semantic caches in open-source serving frameworks, and reported cache sharing in several commercial services. PromptPeek [79] exploits the cross-user KV cache sharing in frameworks such as vLLM and SGLang, together with the scheduling policies that accompany it, to reconstruct other users’ prompts token by token. Gu et al. [13] audited 17 commercial API providers in the second half of 2024 and detected prompt caching at 8 of them, 7 of which shared the cache across users. They also used the same timing signal to infer that one of OpenAI’s embedding models has a decoder-only architecture, which constitutes a G1 leak. At the network level, Weiss et al. [14] found that streaming APIs send one token per encrypted packet, so packet lengths reveal token lengths, and a model trained to invert packet lengths reconstructed 29% of the responses from commercial assistants’ traffic and inferred the topic of 55% of them.
Behavioral integrity (G3)
Jailbreaks. Wei et al. [7] attributed the success of jailbreaks to competing objectives and to mismatched generalization between capability training and safety training, and Shen et al. [100] analyzed 1,405 jailbreak prompts collected in the wild. Greedy Coordinate Gradient (GCG) [48] formulates the attack as finding an adversarial suffix \delta that maximizes the likelihood of an affirmative target response y^{*}:
and optimizes this suffix on open-source models. The suffixes transfer to closed-source models, reaching attack success rates of 86.6% on GPT-3.5 and 46.9% on GPT-4 in the original evaluation. Black-box methods replace gradients with an attacker LLM that iteratively rewrites the prompt within about twenty queries [81], or adopt tree search with pruning [82] or genetic search to generate fluent prompts [83]. Simple adaptive attacks that combine prompt templates, random search, and API-specific features such as prefilling achieve nearly complete success on many safety-aligned models [80]. Long contexts and multi-turn conversations open further channels: many-shot jailbreaking fills the context with hundreds of fabricated dialogues [84], while Crescendo escalates gradually over a seemingly harmless multi-turn conversation [85]. Automated red teaming with attacker language models [101, 102] applies the same idea to generate test cases. The Malla study documents the real-world consequences: 212 malicious services sold on underground markets are built on public LLM APIs through jailbreak prompts or directly use uncensored models [103].
Prompt injection. Prompt injection breaks TB3. Direct injection crosses the segment between developer and user, with the user overriding the developer’s instructions [62, 86]. Indirect injection crosses the segment between instructions and data by embedding instructions in content that the application will later retrieve [6]. Liu et al. [47] formalized this attack as causing the application to perform an injected task in place of the target task, and benchmarked combinations of attacks and defenses on ten LLMs. In tool-using agents, the harm grows from wrong text to wrong actions: InjecAgent measured an attack success rate of 24% against a GPT-4 agent with ReAct prompting, including data exfiltration attacks [15], and AgentDojo and BIPIA provide dynamic and static benchmarks for agents and applications, respectively [104, 105]. Knowledge-base poisoning is the counterpart attack in retrieval settings: PoisonedRAG injects 5 malicious texts per target question into a knowledge base containing millions of documents and achieves an attack success rate of about 90% [87].
Customization and supply chain. Fine-tuning APIs allow \mathsf{A}_{\mathsf{F}} to change the model itself. Qi et al. [16] jailbroke GPT-3.5 Turbo through the OpenAI fine-tuning API with 10 adversarial examples at a cost of less than $0.20, and showed that even benign fine-tuning degrades safety. Covert malicious fine-tuning encodes harmful training data so that it passes the provider’s data moderation [88]. Upstream, poisoning instruction-tuning data [89] or human feedback data [90] can implant triggers, deliberately trained backdoors persist through standard safety training [91], and poisoning web-scale datasets is also feasible, for example by purchasing expired domains referenced in dataset indexes [39].
Service integrity (G4) and availability and cost (G5)
G4 is violated when what the customer receives does not match the promise of Eq. 1. Gao et al. [41] audited nine commercial inference providers serving four Llama models in mid-2024 and found that 11 of 31 endpoints had output distributions that differed from those of the reference weights released by Meta. Cai et al. [42] studied how a dishonest provider can substitute a cheaper or quantized model, and found that output-based tests require many queries, while log-probability-based tests are confounded by numerical nondeterminism. Sun et al. [49] pointed out that reasoning APIs bill for hidden tokens, whose number often exceeds that of answer tokens by more than an order of magnitude, and customers cannot verify them. Supply-chain artifacts also threaten the provider’s own platform: scanning the Hugging Face model hub with taint analysis uncovered 91 malicious models and 9 malicious dataset loading scripts that execute code at load time [38].
For G5, sponge examples maximize the energy consumption and latency of each query [92], optimized prompts can force models to produce verbose or repetitive output [93], and Engorgio prompts suppress the end-of-sequence token so that generation continues until the length limit [94]. Reasoning models extend this attack surface to TB3: OverThink [95] injects decoy reasoning problems into retrieved content, causing reasoning models to consume far more reasoning tokens while the answer remains unchanged, with slowdowns of up to 18 times on FreshQA and 46 times on SQuAD, and the attacker only needs to control content that enters the context (\mathsf{A}_{\mathsf{C}}). Because MaaS bills by output tokens, these attacks shift costs to whoever pays for the request, which may be the developer rather than the attacker.

Accountability and provenance (G6)
Watermarks make machine-generated text detectable (Section VI-I). Jovanović et al. [96] showed that merely querying a watermarked API suffices to learn enough about distribution-shifting watermarks to spoof them on arbitrary text or to scrub them, so the accountability mechanism itself becomes a target for \mathsf{A}_{\mathsf{Q}}.
Composition across boundaries
Attacks increasingly chain multiple boundaries. Figure 2 takes as an example a retrieval-augmented application that calls a commercial API through an intermediary: instructions on an attacker’s web page enter the context through retrieval (①, TB3), the agent loop then sends the context to an attacker-controlled endpoint (②, G2), a co-located tenant recovers the same application’s system prompt through prefix cache timing (③, TB2), and the intermediary can switch to a cheaper model and overcount tokens (④, TB4). These four steps correspond to four attack classes in Table IV, all acting on the same service. Similar compositions already appear in the literature: indirect injection (TB3) has been used to exfiltrate context to attacker-controlled endpoints (G2) [6, 15], fine-tuning access (\mathsf{A}_{\mathsf{F}}) turns a single G3 violation into a persistent property of the model [16], and timing leakage in L2 turns a performance optimization into a G1 and G2 vulnerability [13]. Defenses evaluated against only a single boundary therefore provide little assurance for the composed system.
Assurance Mechanisms
We organize defenses by trust anchor (the component on which the guarantee rests), because the trust anchor determines both which adversaries a defense can address and who deploys it. Table V evaluates all 50 coded defenses against six criteria. Figure 3 groups these defenses by mechanism family according to who must deploy them, and the number in each box is the number of defenses in that family, followed by the guarantee types (abbreviations as in Table I). The mechanism families in the figure are divided by deploying party and are finer than the groups in the table: Jatmo, which the developer fine-tunes on its own, belongs to Model hardening in the table but is shown separately as Task-specific tuning in the figure, Constitutional Classifiers, which only the provider can deploy, belongs to Input and output mediation but is shown separately as Safety classifier, DP-ICL and PromptPATE from the DP group are shown separately as Private in-context learning, and model equality testing from Verifiable serving is placed on the client side. The 20 defenses that clients and developer applications can deploy unilaterally all operate on top of an unmodified API, and the remaining 30 must be implemented by the provider in the inference runtime or the model, including all cryptographic and hardware mechanisms (F4 in Section VIII).
Hardware-rooted isolation
A Trusted Execution Environment (TEE) protects computation from a privileged host. Early work combined enclaves with untrusted accelerators: Slalom [52] blinds the input of a linear layer Y=XW, sends X+R to the GPU, subtracts the precomputed RW inside the enclave, and verifies the result with Freivalds’ algorithm. Graviton [53] and Honeycomb [144] bring isolation into the GPU itself. GPUs that support confidential computing make this approach practical for LLMs: on NVIDIA Hopper GPUs, the overhead of TEE mode is below 7% for most LLM queries and approaches zero for larger models and longer sequences, with the remaining overhead coming mainly from encrypted transfers between CPU and GPU [19]. Production systems such as Apple’s Private Cloud Compute combine hardware attestation with stateless processing and published software images [145]. When the model runs on hardware controlled by the customer, hardware isolation can also protect the provider’s model, as TransLinkGuard does for Transformers deployed at the edge [106]. Its limitations have long been known from the TEE literature: side-channel and transient-execution attacks [146], and the need for cross-vendor attestation infrastructure that customers can verify [147]. MaaS adds a decisive limitation: unless the provider opens it up, the customer can neither enable a TEE nor verify its attestation, so TEEs help against \mathsf{A}_{\mathsf{P}} only when the provider is willing to be verified.
Cryptographic inference
MPC and homomorphic encryption let the client obtain inference results without exposing its input, and in the two-party setting the client also learns nothing about the weights. Iron [17] adapts two-party protocols to matrix multiplication, Softmax, the Gaussian Error Linear Unit (GeLU), and layer normalization in Transformers. Follow-up work replaces nonlinear operators with MPC-friendly approximations and distillation [107, 109], improves ciphertext packing and communication [108, 110, 112], and introduces constant-round protocols for Softmax and GeLU [111]. PUMA [18] was the first to evaluate a 7-billion-parameter model, requiring about 5 minutes per generated token in the three-party semi-honest model, and BumbleBee [112] also reported results for LLaMA-7B in the two-party setting. These mechanisms offer the strongest guarantees covered in this paper, but every one of them requires the provider to run the protocol, most evaluations stop at BERT-scale models, and latency remains orders of magnitude higher than that of plaintext inference.

Verifiable serving
Verifiable serving targets G4 against \mathsf{A}_{\mathsf{P}}. zkLLM [113] generates zero-knowledge proofs of correct inference for models with up to 13 billion parameters, taking less than 15 minutes per proof. TOPLOC [57] commits to locality-sensitive hashes of intermediate activations, allowing a verifier to detect changes to the model, prompt, or precision while tolerating benign numerical nondeterminism. CoIn [114] targets billing for hidden tokens: it builds a verifiable hash tree from fingerprints of token embeddings to check token counts, and uses embedding-based relevance matching to detect fabricated reasoning content, reporting detection success rates of up to 94.7%. All three require provider cooperation. The only G4 defense in this corpus that a customer can run alone is model equality testing [41], which turns the first condition of Eq. 1 into a two-sample test between samples from the API and samples from the reference weights. A maximum mean discrepancy test with a simple string kernel, using on average only ten samples per prompt, detected a range of distortions with a median power of 77.4%. Statistical auditing requires reference weights to verify model identity, and for closed-source models it can only compare the API with its own past samples to detect drift. Neither use can verify billing.
Inference-runtime isolation
Defenses inside the inference runtime target the shared state in L2. The most direct approach is to isolate caches per tenant, but this gives up the main benefit of prefix sharing. SafeKV [115] detects the sensitivity of prompt content and allows only KV cache entries judged non-sensitive to be shared across tenants, keeping sensitive content in private caches. Its average defense success rate against timing side-channel attacks exceeds 94%. Compared with full isolation, it reduces the additional time-to-first-token overhead by up to 40.58%, and compared with per-user cache isolation, it increases throughput by up to 2.66 times. KV-Cloak [116] addresses a party that can read the KV cache directly, for example when the cache is offloaded to external storage, and it uses reversible matrix obfuscation and operator fusion to prevent cache contents from being inverted into the original input, with small performance overhead. Both can be deployed only by the party that operates the serving engine, and both provide empirical guarantees. The protection of SafeKV depends on the accuracy of sensitivity detection, and the detector itself has not undergone adaptive evaluation.
Statistical privacy
DP gives a formal upper bound on the information about any single record that any output can leak. A randomized mechanism \mathcal{M} satisfies (\varepsilon,\delta)-differential privacy if, for all neighboring datasets D,D' and all output sets S,
[148]. Differentially private stochastic gradient descent [149] clips per-example gradients and adds Gaussian noise. Combined with parameter-efficient methods and large-batch training, DP fine-tuning of language models approaches the utility of non-private training on several tasks [20, 117], and DP-Forward instead perturbs representations in the forward pass [118]. These mechanisms protect fine-tuning data against \mathsf{A}_{\mathsf{Q}}, but they must be implemented by the trainer (usually the provider). Two mechanisms put DP in the hands of the developer: DP-ICL [119] and PromptPATE [120] aggregate answers over disjoint sets of private examples so that the released output or prompt is differentially private with respect to those examples, and both can run through commercial APIs.
| Mechanism | Adv. | Guar. | Client | \ge7B | Prod. | Adapt. |
|---|---|---|---|---|---|---|
| Hardware isolation | ||||||
| H100 confidential computing [19] | \mathsf{A}_{\mathsf{P}} | HW | ○ | ● | ○ | n/a |
| TransLinkGuard [106] | \mathsf{A}_{\mathsf{Q}} | HW | ○ | ○ | ○ | n/a |
| Cryptographic inference | ||||||
| Iron [17] | \mathsf{A}_{\mathsf{P}} | Crypto | ○ | ○ | ○ | n/a |
| MPCFormer [107] | \mathsf{A}_{\mathsf{P}} | Crypto | ○ | ○ | ○ | n/a |
| BOLT [108] | \mathsf{A}_{\mathsf{P}} | Crypto | ○ | ○ | ○ | n/a |
| SecFormer [109] | \mathsf{A}_{\mathsf{P}} | Crypto | ○ | ○ | ○ | n/a |
| Nimbus [110] | \mathsf{A}_{\mathsf{P}} | Crypto | ○ | ○ | ○ | n/a |
| SHAFT [111] | \mathsf{A}_{\mathsf{P}} | Crypto | ○ | ○ | ○ | n/a |
| BumbleBee [112] | \mathsf{A}_{\mathsf{P}} | Crypto | ○ | ● | ○ | n/a |
| PUMA [18] | \mathsf{A}_{\mathsf{P}} | Crypto | ○ | ● | ○ | n/a |
| Verifiable serving | ||||||
| zkLLM [113] | \mathsf{A}_{\mathsf{P}} | Crypto | ○ | ● | ○ | n/a |
| TOPLOC [57] | \mathsf{A}_{\mathsf{P}} | Stat | ○ | ● | ○ | n/a |
| CoIn [114] | \mathsf{A}_{\mathsf{P}} | Stat | ○ | ● | ○ | n/a |
| Model equality testing [41] | \mathsf{A}_{\mathsf{P}} | Stat | ● | ● | ● | n/a |
| Runtime isolation | ||||||
| SafeKV [115] | \mathsf{A}_{\mathsf{T}} | Emp | ○ | ● | ○ | ○ |
| KV-Cloak [116] | \mathsf{A}_{\mathsf{P}} | Emp | ○ | ● | ○ | ○ |
| DP training and prompting | ||||||
| DP fine-tuning [20] | \mathsf{A}_{\mathsf{Q}} | DP | ○ | ○ | ○ | n/a |
| DP large-batch tuning [117] | \mathsf{A}_{\mathsf{Q}} | DP | ○ | ○ | ○ | n/a |
| DP-Forward [118] | \mathsf{A}_{\mathsf{Q}}, \mathsf{A}_{\mathsf{P}} | DP | ○ | ○ | ○ | n/a |
| DP-ICL [119] | \mathsf{A}_{\mathsf{Q}} | DP | ● | ● | ● | n/a |
| PromptPATE [120] | \mathsf{A}_{\mathsf{Q}} | DP | ● | ● | ● | n/a |
| Prompt sanitization | ||||||
| SANTEXT+ [121] | \mathsf{A}_{\mathsf{P}} | DP | ● | ○ | ○ | n/a |
| CusText [122] | \mathsf{A}_{\mathsf{P}} | DP | ● | ○ | ○ | n/a |
| InferDPT [123] | \mathsf{A}_{\mathsf{P}} | DP | ● | ● | ● | n/a |
| Hide-and-Seek [124] | \mathsf{A}_{\mathsf{P}} | Emp | ● | ● | ● | ○ |
| CoGenesis [125] | \mathsf{A}_{\mathsf{P}} | Emp | ● | ● | ● | ○ |
| Model hardening | ||||||
| Vaccine [126] | \mathsf{A}_{\mathsf{F}} | Emp | ○ | ● | ○ | ○ |
| Circuit Breakers [127] | \mathsf{A}_{\mathsf{Q}} | Emp | ○ | ● | ○ | ● |
| StruQ [56] | \mathsf{A}_{\mathsf{C}} | Emp | ○ | ● | ○ | ◐ |
| SecAlign [128] | \mathsf{A}_{\mathsf{C}} | Emp | ○ | ● | ○ | ● |
| Instruction hierarchy [55] | \mathsf{A}_{\mathsf{C}}, \mathsf{A}_{\mathsf{Q}} | Emp | ○ | ● | ● | ○ |
| Jatmo [129] | \mathsf{A}_{\mathsf{C}} | Emp | ● | ● | ● | ◐ |
| SafeDecoding [130] | \mathsf{A}_{\mathsf{Q}} | Emp | ○ | ● | ○ | ○ |
| RAIN [131] | \mathsf{A}_{\mathsf{Q}} | Emp | ○ | ● | ○ | ○ |
| Input and output mediation | ||||||
| Perplexity and paraphrase filters [132] | \mathsf{A}_{\mathsf{Q}} | Emp | ● | ● | ○ | ● |
| SmoothLLM [133] | \mathsf{A}_{\mathsf{Q}} | Emp | ● | ● | ● | ◐ |
| Erase-and-Check [134] | \mathsf{A}_{\mathsf{Q}} | Struct | ● | ● | ○ | ◐ |
| Llama Guard [21] | \mathsf{A}_{\mathsf{Q}} | Emp | ● | ● | ○ | ○ |
| WildGuard [135] | \mathsf{A}_{\mathsf{Q}} | Emp | ● | ● | ○ | ○ |
| Constitutional Classifiers [22] | \mathsf{A}_{\mathsf{Q}} | Emp | ○ | ● | ● | ● |
| Spotlighting [136] | \mathsf{A}_{\mathsf{C}} | Emp | ● | ● | ● | ○ |
| DataSentinel [137] | \mathsf{A}_{\mathsf{C}} | Emp | ● | ● | ○ | ● |
| Architectural isolation | ||||||
| IsolateGPT [138] | \mathsf{A}_{\mathsf{C}} | Struct | ● | ● | ● | ○ |
| CaMeL [23] | \mathsf{A}_{\mathsf{C}} | Struct | ● | ● | ● | ◐ |
| Progent [139] | \mathsf{A}_{\mathsf{C}} | Struct | ● | ● | ● | ◐ |
| RobustRAG [140] | \mathsf{A}_{\mathsf{C}} | Struct | ● | ● | ○ | ◐ |
| Provenance | ||||||
| Green-list watermark [40] | \mathsf{A}_{\mathsf{Q}} | Stat | ○ | ○ | ○ | ◐ |
| Distortion-free watermark [141] | \mathsf{A}_{\mathsf{Q}} | Stat | ○ | ● | ○ | ◐ |
| SynthID-Text [142] | \mathsf{A}_{\mathsf{Q}} | Stat | ○ | ● | ● | ◐ |
| Instructional fingerprint [143] | \mathsf{A}_{\mathsf{Q}} | Stat | ○ | ● | ○ | ◐ |
Guar.: type of guarantee (Table I). Client: deployable by the customer without provider cooperation. \ge7B: demonstrated at this scale. Prod.: evaluated on a production service. Adapt.: ● full adaptive evaluation, ◐ partial, ○ none, n/a not applicable.
Against \mathsf{A}_{\mathsf{P}}, the only thing a customer can change is what it sends. Text sanitization replaces sensitive words under metric local DP [121, 122], InferDPT [123] perturbs the prompt and uses a local model to repair the API’s answer, and Hide-and-Seek [124] and CoGenesis [125] keep sensitive entities or reasoning on a local model. They are the only client-deployable means in this corpus that protect user data from the provider. Their guarantees are at the word level, protecting explicit identifiers better than the semantics of the request, and tighter privacy budgets yield lower utility.
Model hardening
Hardening means changing the model itself so that it resists G3 attacks. Alignment from human or AI feedback [36, 37] is the baseline. Representation-level methods such as Circuit Breakers [127] reroute internal representations associated with harmful outputs, and were evaluated against a wide range of attacks, including adaptive ones. Decoding-time methods shift token probabilities toward safe continuations [130] or let the model evaluate and rewind its own generation [131]. Against prompt injection, the instruction hierarchy trains the model to prioritize instructions in the order system, user, tool [55]. StruQ [56] and SecAlign [128] use reserved delimiters to separate instructions from data, and train the model through supervised fine-tuning or preference optimization to ignore instructions in the data portion. Jatmo [129] fine-tunes a base model without instruction tuning for a single task, so that injected instructions have no instruction-following behavior to exploit. Against \mathsf{A}_{\mathsf{F}}, Vaccine [126] adds perturbation-aware alignment so that the model remains safe when it is later subjected to harmful fine-tuning. Except for Jatmo, all of these mechanisms must be implemented by the party that trains the model.
Input and output mediation
Mediation defenses add a check around an unmodified model. Perplexity and paraphrase filters detect optimized suffixes but not fluent jailbreaks [132]. SmoothLLM [133] exploits the brittleness of adversarial suffixes by aggregating the responses to multiple randomly perturbed copies of the prompt. Erase-and-Check [134] certifies that harmful prompts carrying adversarial suffixes up to a given length are always detected, at a cost that grows with that length. Guard models classify prompts and responses according to a policy [21, 135]. Constitutional Classifiers [22] train input and output classifiers on synthetic data generated from a natural-language “constitution”. In red teaming estimated at more than 3,000 hours, no participant found a universal jailbreak against the protected prototype, and an improved version increased the refusal rate on production traffic by 0.38 percentage points with an inference overhead of 23.7%. Against injection, spotlighting marks or encodes untrusted content so that the model can recognize it [136], and DataSentinel [137] trains a detector through a minimax game against an adaptive injector. All of these defenses are in-band: the check is itself an LLM or relies on the model’s understanding, so it can be targeted together with the model it protects [150, 151].
Architectural isolation
Architectural defenses enforce TB3 outside the model. IsolateGPT [138] runs each third-party app in an isolated execution context, with a central hub coordinating interactions between apps. CaMeL [23] has a privileged model write a program based only on the trusted user query, executes this program in an interpreter that tracks capabilities and data provenance, and lets a quarantined model process untrusted data without the ability to choose tools, so that injected content cannot alter the control flow. Progent [139] enforces fine-grained permission policies on tool calls, and RobustRAG [140] isolates individual retrieved passages and aggregates their answers, so that a bounded number of corrupted passages provably cannot change the output. Design patterns that generalize these ideas restrict what an agent can do after it has read untrusted data [152]. These mechanisms provide structural guarantees that do not depend on whether the model resists injection, and developers can deploy them on top of commercial APIs. The cost is reduced flexibility, since tasks whose control flow must depend on untrusted data cannot be expressed.
Provenance and accountability
Statistical watermarks bias generation toward a pseudorandom subset of tokens. In the scheme of Kirchenbauer et al. [40], a hash of the previous token selects a “green list” containing a fraction \gamma of the vocabulary, and \delta is added to the logits of green-list tokens. Detection counts the number |s|_{G} of green-list tokens in a text of length T and computes
Distortion-free schemes preserve the output distribution and withstand more edits [141], and SynthID-Text has been deployed in a production chatbot [142]. Fingerprinting embeds a secret input-output pair into the weights so that the model owner can later recognize a stolen or redistributed model [143]. All provenance mechanisms are implemented by the provider. They help providers and regulators attribute outputs (G6) and protect G1, but they do not help customers with G4, and adversaries who query a watermarked API can spoof or remove them [96].
Evaluation Practice
Benchmarks make the results of attacks and defenses more comparable. DecodingTrust [153] and TrustLLM [25] evaluate trustworthiness dimensions such as toxicity, privacy, and robustness, HarmBench [154] and JailbreakBench [155] standardize harmful behavior sets, judges, and leaderboards for jailbreaks, and AgentDojo [104], InjecAgent [15], BIPIA [105], Agent Security Bench [156], and AgentHarm [157] target injection and harmful behavior in applications and agents. Existing benchmarks still have limitations. They measure G3 almost exclusively, and there are no public benchmarks for inference side channels, service integrity, or cost attacks. Attack success is usually decided by an LLM judge, so the results depend on judge prompts and models that change over time. Static attack sets also overestimate robustness. Zhan et al. [151] used adaptive attacks to bypass all eight indirect injection defenses they tested, with attack success rates above 50% against each. Nasr et al. [150] used gradient descent, reinforcement learning, random search, and human red teaming to bypass all twelve jailbreak and injection defenses they tested, with attack success rates above 90% against most of them, whereas the original evaluations of most of these defenses had reported attack success rates near zero. Defense evaluations in MaaS should therefore fix the threat model, give the attacker full knowledge of the defense, and report the compute and query budgets of adaptive attacks, as is done in adversarial example research.
Literature Coding and Findings
Figure 4 shows the distribution of the 120 coded studies over goals, adversaries, and layers. A study is counted in every cell to which it is coded, so the row sums do not equal the corpus size. The field is young: 108 studies (90.0%) were published in 2023 or later, and 89 (74.2%) in 2024 or later. The number of studies from 2025 (28) is only half that from 2024 (55), which does not indicate a decline in research: snowballing depends on citations, newer studies have fewer citations, and newer conference papers have not yet all been indexed by the search databases. We report eight findings.
F1: Research concentrates on behavioral integrity against query-only users. G3 is the most studied goal (53 studies, 44.2%), followed by G2 (46 studies, 38.3%) and G1 (25 studies, 20.8%). The query-only adversary \mathsf{A}_{\mathsf{Q}} appears in 65 studies (54.2%), and the largest cell in Figure 4(a) is \mathsf{A}_{\mathsf{Q}} against G3, with 30 studies.
F2: The goals that define a service are marginal. Service integrity, availability and cost, and accountability together appear in only 16 studies (13.3%): 7 for G4, 5 for G5, and 5 for G6 (one of which addresses both G4 and G5). MaaS bills by token, and resource exhaustion attacks shift costs to the paying party, yet none of the 50 defenses targets G5.
F3: The provider is often the adversary that defenses target but rarely the subject of attack studies. \mathsf{A}_{\mathsf{P}} appears in 20 of the 50 defenses (40.0%), mainly cryptographic inference, prompt sanitization, and verifiable serving, but in only 6 of the 70 attack and measurement studies (8.6%). Three of these 6 invert embeddings held by a storage provider, and only 2 (published in 2025 and 2026, respectively) study providers that misreport what they serve [42, 49]. In addition, model equality testing [41], which is coded as a defense by its main contribution, measured deviations from the advertised models on production endpoints. The threat model of a “dishonest service” remains almost unstudied.

F4: Strong guarantees against the provider cannot be deployed by customers. None of the ten cryptographic or hardware mechanisms against the provider (the eight cryptographic inference protocols, confidential-computing GPUs, and zkLLM, see Table V) can be adopted without provider cooperation, and only two of the eight cryptographic inference protocols have been demonstrated on models with 7 billion or more parameters. Of the 20 defenses against \mathsf{A}_{\mathsf{P}}, only 6 can be deployed by customers: five prompt sanitization schemes that provide word-level DP or empirical guarantees, and model equality testing.
F5: Attack and measurement studies are evaluated on real services more than twice as often as defenses. Of the 70 attack and measurement studies, 45 (64.3%) include a production service, compared with only 15 of the 50 defenses (30.0%). Most defenses are evaluated only on open-weight models under the defenders’ own control, and whether they transfer to the APIs that most deployments actually use has not been tested.
F6: Adaptive evaluation is the exception. Of the 20 defenses targeting G3, 5 (25.0%) report a full adaptive evaluation, 7 report a partial one, and 8 report none. The adaptive studies of Zhan et al. [151] and Nasr et al. [150] show the practical consequences of this gap (Section VII).
F7: The inference runtime is a new and weakly protected attack surface. All four attack and measurement studies involving the side-channel adversary \mathsf{A}_{\mathsf{T}} were published in 2024 or 2025, and three of them demonstrated leakage on production systems. SafeKV is the only defense against \mathsf{A}_{\mathsf{T}}, and it was evaluated only on open-source serving frameworks, relies on sensitive content detection, and has no adaptive evaluation [115]. G2 defenses at L2 are dominated by cryptographic inference, which protects against the provider but not against co-located tenants.
F8: Research on customization, the supply chain, and cross-layer interactions is thin. \mathsf{A}_{\mathsf{F}} appears in 3 studies and \mathsf{A}_{\mathsf{S}} in 5 studies, and there is no defense against \mathsf{A}_{\mathsf{S}}. Only 7 studies (5.8%) span more than one layer, and all of them address a single goal. No study in this corpus evaluates how mechanisms at different layers compose, for example whether a TEE-protected runtime with prefix sharing enabled still satisfies G2 against \mathsf{A}_{\mathsf{T}}.
Standards and Regulation
Table VI maps seven groups of frameworks and regulations onto our goals. A framework is rated as covering a goal if it lists concrete threats or requirements for that goal, as partly covering it if it addresses the goal only through general governance or an adjacent category, and as not covering it otherwise. The clauses underlying each rating are as follows. The Open Worldwide Application Security Project (OWASP) Top 10 for LLM Applications [30] covers G1 and G2 with LLM02 (Sensitive Information Disclosure) and LLM07 (System Prompt Leakage), G3 with LLM01 (Prompt Injection), LLM04 (Data and Model Poisoning), and LLM06 (Excessive Agency), and G5 with LLM10 (Unbounded Consumption), which encompasses denial of wallet and model replication through the API. LLM03 (Supply Chain) addresses only malicious artifacts within G4, so G4 is rated as partly covered. The corresponding techniques in MITRE’s Adversarial Threat Landscape for Artificial-Intelligence Systems (ATLAS) [32] include AML.T0024 (Exfiltration via ML Inference API), AML.T0056 (LLM Meta Prompt Extraction), AML.T0057 (LLM Data Leakage), AML.T0051 (LLM Prompt Injection), AML.T0054 (LLM Jailbreak), AML.T0029 (Denial of ML Service), and AML.T0034 (Cost Harvesting), and G4 is likewise only partly covered, by AML.T0010 (ML Supply Chain Compromise). The threat taxonomy and red teaming guide of the Cloud Security Alliance (CSA) [33, 158] are engineering-oriented and add agent-specific threats. In its threat taxonomy, insecure supply chain addresses only malicious artifacts within G4 and lack of governance and compliance addresses G6 only indirectly, so both are rated as partly covered. The AI Risk Management Framework of the National Institute of Standards and Technology (NIST) and its Generative AI Profile [31, 159], ISO/IEC 42001 [160], and the EU AI Act [34] operate at the level of risk management and obligations. The data privacy and information security risks of the Generative AI Profile correspond to G2 and G3, value chain and component integration addresses only third-party components within G4, model confidentiality is addressed only indirectly under information security risk (G1 partly covered), content provenance has dedicated actions (G6 covered), and resource abuse is not listed as a risk (G5 not covered). Article 15 of the AI Act requires high-risk systems to resist data poisoning, model poisoning, adversarial examples, and confidentiality attacks, Article 55 requires providers of general-purpose models with systemic risk to conduct adversarial testing and ensure cybersecurity protection, and Article 50 requires synthetic content to be marked in a machine-readable format (G6). Articles 15 and 55 apply only to high-risk systems and to general-purpose models with systemic risk, so G1 to G3 are rated as partly covered. Model poisoning in Article 15 targets pretrained components used in training and addresses only malicious artifacts within G4, so G4 is also rated as partly covered. Apart from G6, the controls in Annex A of ISO/IEC 42001 address the goals only at the level of the management system. China’s Interim Measures for the Management of Generative Artificial Intelligence Services [161] focus on content security (Article 4), personal information (Article 11), and the labeling of generated content (Article 12), and the national standard GB/T 45654-2025 (Cybersecurity Technology: Basic Security Requirements for Generative Artificial Intelligence Service) [162] additionally specifies requirements for training data security and model security.
The common gap is G4 from the customer’s perspective. Supply-chain categories cover malicious artifacts, but no framework requires that customers be able to verify which model processed a request or how many tokens were billed, even though Section V has shown that endpoints in practice do deviate from their advertised models [41]. G5 shows the opposite situation: OWASP, ATLAS, and CSA all list it as a resource abuse risk, yet none of the coded defenses addresses it.
Lessons and Open Problems
Lessons
L1: The provider belongs in the threat model. Model-centric research treats the provider either as the defender (jailbreaks, stealing) or as a curious party to be excluded by cryptography. Intermediated deployments and opaque billing make the dishonest provider a real threat to G4 (F3), and against this threat customers have only statistical audits such as model equality testing (F4).
| Framework | G1 | G2 | G3 | G4 | G5 | G6 |
|---|---|---|---|---|---|---|
| OWASP Top 10 for LLM Applications 2025 [30] | ● | ● | ● | ◐ | ● | ○ |
| MITRE ATLAS [32] | ● | ● | ● | ◐ | ● | ○ |
| CSA LLM Threats Taxonomy and Agentic AI Red Teaming Guide [33, 158] | ● | ● | ● | ◐ | ● | ◐ |
| NIST AI Risk Management Framework and Generative AI Profile [31, 159] | ◐ | ● | ● | ◐ | ○ | ● |
| ISO/IEC 42001 [160] | ◐ | ◐ | ◐ | ◐ | ◐ | ● |
| EU AI Act [34] | ◐ | ◐ | ◐ | ◐ | ○ | ● |
| China Interim Measures and GB/T 45654-2025 [161, 162] | ○ | ● | ● | ○ | ○ | ● |
● covered, ◐ partly covered, ○ not covered.
L2: Guarantees proven at one layer do not survive composition. The DP of a model no longer holds when deduplication or output filtering leaks membership [73]. The confidentiality of a model no longer holds when a shared prefix cache leaks timing [13]. Assurance claims in MaaS must state which layers they cover and which boundaries they assume (F8).
L3: In-band defenses have a shelf life. Defenses that rely on the model (or another model) to distinguish instructions from data, or harmful from benign requests, have mostly been bypassed in third-party adaptive evaluations [150, 151]. Defenses that enforce TB3 structurally [23, 140] trade flexibility for guarantees that do not depend on model behavior, and this trade-off must be weighed explicitly at design time.
L4: Deployability determines impact. The defenses that customers can deploy (sanitization, guard models, architectural isolation, statistical auditing) all operate on top of an unmodified API. Mechanisms at L1 and L2 depend on the provider’s incentives. Research that aims to protect customers should either target L3 to L5 or design mechanisms that let providers prove their own behavior, such as remote attestation and verifiable serving.
L5: Measurement coverage is uneven. Cost abuse, service substitution, and serving-layer leakage are the least studied threats and lack public benchmarks (F2, F7), while existing benchmarks concentrate on jailbreaks (Section VII).
Open problems
P1: Verifiable serving at production scale. Eq. 1 calls for mechanisms that can verify both the identity of a closed-source model and the billed usage at low overhead. Candidate approaches combine TEE attestation of serving images [42, 145], activation commitments [57], and zero-knowledge proofs [113]. CoIn begins to cover the metering of hidden tokens [114], but it requires provider cooperation and cannot confirm that these tokens were generated by the contracted model.
P2: Isolation inside the inference runtime. Prefix sharing, batching, and speculative decoding create cross-tenant channels. SafeKV uses sensitivity detection to decide which cache entries may be shared [115], so its protection depends on the detector, which can itself be targeted. This direction needs a definition of tenant isolation for LLM serving that does not rely on content judgments (analogous to constant-time programming), as well as serving engines that trade a measurable loss in cache efficiency for isolation.
| Work | Service stack | Provider and co-tenant adversaries | Service integrity and cost | Deployability criteria | Literature coding | New experiments |
|---|---|---|---|---|---|---|
| Papernot et al. [163] | ◐ | ◐ | ○ | ○ | ○ | ○ |
| Liu et al. [24] | ○ | ○ | ○ | ○ | ○ | ○ |
| Yao et al. [26] | ○ | ○ | ○ | ○ | ◐ | ○ |
| Huang et al. [25] | ○ | ○ | ○ | ○ | ○ | ● |
| Das et al. [27] | ○ | ○ | ○ | ○ | ○ | ○ |
| Ng and Chow [35] | ○ | ◐ | ○ | ◐ | ◐ | ○ |
| Wang et al. [164] | ◐ | ○ | ◐ | ○ | ○ | ○ |
| Deng et al. [28] | ◐ | ○ | ○ | ○ | ○ | ○ |
| Wang et al. [29] | ○ | ○ | ○ | ◐ | ○ | ● |
| This paper | ● | ● | ● | ● | ● | ○ |
● covered, ◐ partly covered, ○ not covered.
P3: Practical confidentiality against the provider. Cryptographic inference remains orders of magnitude slower and requires provider cooperation, and client-side sanitization protects only explicit identifiers. Possible directions include hybrid schemes that use TEEs for nonlinear layers and cryptography for proofs, as well as schemes that split inference between local and remote models with quantifiable leakage bounds.
P4: Composable assurance for agents. Structural defenses enforce TB3 for a single agent. Multi-agent systems, memory, and tool ecosystems need information-flow models in which capabilities, provenance, and permissions compose across components [23, 139].
P5: Adaptive, service-level evaluation. Benchmarks should include side-channel, service integrity, and cost attacks, report adaptive attacks with explicit budgets, and run on both production APIs and open models (F5, F6).
P6: Defenses against customization and supply-chain attacks. Fine-tuning APIs need defenses that withstand covert data encoding [88], and providers need provenance tracking and scanning for checkpoints and adapters [38].
P7: Accountability that serves both customers and regulators. Existing provenance mechanisms serve the provider. Auditable logs that record which model, configuration, and policy produced a given output, together with privacy-preserving disclosure of these logs to customers and regulators, could link G4 and G6 and make the obligations in Section IX actionable.
Related Surveys
Table VII compares this paper with related surveys and SoKs. Papernot et al. [163] systematized machine learning security and privacy in the MLaaS era and discussed the attack surfaces of the training and inference phases, but this work predates LLMs and their inference runtimes. Liu et al. [24] and Huang et al. [25] organize trustworthiness research by model property and provide evaluation guidelines and benchmarks. Yao et al. [26] and Das et al. [27] survey LLM security and privacy by type of attack and defense. Ng and Chow [35] systematized cryptographic neural network computation and treated the server as the adversary, but considered only a curious server and did not address the other layers of the service. Wang et al. [164] proposed a research agenda for the LLM supply chain, covering issues on the TB5 side of our model. Deng et al. [28] surveyed the threats facing AI agents along the agent loop, and Wang et al. [29] systematized jailbreak guardrails and evaluated them with unified experiments. This paper takes the service as the object of modeling, treats the provider and co-located tenants as adversaries, introduces service integrity and cost as goals, evaluates defenses from the perspective of client deployability, and analyzes the literature quantitatively through coding.
Conclusions
MaaS turns the model into a shared, metered service whose security depends on boundaries that model-centric research does not see: the boundary between tenants in the inference runtime, the boundary between inputs of different privilege in the assembled context, and the boundary between customer and provider. We proposed a service-level model with five layers, five trust boundaries, six adversary classes, and six goals, used it to systematize attacks and evaluate 50 assurance mechanisms, and coded 120 studies to locate the field’s research effort. The results show that the field has progressed rapidly on jailbreaks and prompt injection, while dishonest services, serving-layer leakage, cost abuse, and the composition of cross-layer protections have received little study, and none of the mechanisms with the strongest guarantees can be deployed unilaterally by customers. The model, evaluation criteria, and appendix coding in this paper can be used to locate these gaps and to state which assurances a MaaS deployment actually provides.
References
- T. Brown, B. Mann, N. Ryder, M. Subbiah, J. D. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell et al., “Language models are few-shot learners,” Advances in neural information processing systems, vol. 33, pp. 1877–1901, 2020.
- H. Touvron, L. Martin, K. Stone, P. Albert, A. Almahairi, Y. Babaei, N. Bashlykov, S. Batra, P. Bhargava, S. Bhosale et al., “Llama 2: Open foundation and fine-tuned chat models,” arXiv preprint arXiv:2307.09288, 2023.
- P. Lewis, E. Perez, A. Piktus, F. Petroni, V. Karpukhin, N. Goyal, H. Küttler, M. Lewis, W.-t. Yih, T. Rocktäschel et al., “Retrieval-augmented generation for knowledge-intensive NLP tasks,” Advances in neural information processing systems, vol. 33, pp. 9459–9474, 2020.
- S. Yao, J. Zhao, D. Yu, N. Du, I. Shafran, K. Narasimhan, and Y. Cao, “ReAct: Synergizing reasoning and acting in language models,” in International Conference on Learning Representations (ICLR), 2023.
- M. Ribeiro, K. Grolinger, and M. A. M. Capretz, “MLaaS: Machine learning as a service,” in 14th IEEE International Conference on Machine Learning and Applications (ICMLA). IEEE, 2015, pp. 896–902.
- K. Greshake, S. Abdelnabi, S. Mishra, C. Endres, T. Holz, and M. Fritz, “Not what you’ve signed up for: Compromising real-world LLM-integrated applications with indirect prompt injection,” in Proceedings of the 16th ACM Workshop on Artificial Intelligence and Security (AISec), 2023.
- A. Wei, N. Haghtalab, and J. Steinhardt, “Jailbroken: How does LLM safety training fail?” in Advances in Neural Information Processing Systems (NeurIPS), 2023.
- W. Kwon, Z. Li, S. Zhuang, Y. Sheng, L. Zheng, C. H. Yu, J. E. Gonzalez, H. Zhang, and I. Stoica, “Efficient memory management for large language model serving with PagedAttention,” in Proceedings of the 29th Symposium on Operating Systems Principles (SOSP), 2023.
- L. Zheng, L. Yin, Z. Xie, C. Sun, J. Huang, C. H. Yu, S. Cao, C. Kozyrakis, I. Stoica, J. E. Gonzalez, C. Barrett, and Y. Sheng, “SGLang: Efficient execution of structured language model programs,” in Advances in Neural Information Processing Systems (NeurIPS), 2024.
- N. Carlini, D. Paleka, K. D. Dvijotham, T. Steinke, J. Hayase, A. F. Cooper, K. Lee, M. Jagielski, M. Nasr, A. Conmy et al., “Stealing part of a production language model,” in International Conference on Machine Learning (ICML), 2024.
- M. Nasr, J. Rando, N. Carlini, J. Hayase, M. Jagielski, A. F. Cooper, D. Ippolito, C. A. Choquette-Choo, F. Tramèr, and K. Lee, “Scalable extraction of training data from aligned, production language models,” in International Conference on Learning Representations (ICLR), 2025.
- L. Song, Z. Pang, W. Wang, Z. Wang, X. Wang, H. Chen, W. Song, Y. Jin, D. Meng, and R. Hou, “The early bird catches the leak: Unveiling timing side channels in LLM serving systems,” IEEE Transactions on Information Forensics and Security, vol. 20, pp. 11 431–11 446, 2025.
- C. Gu, X. L. Li, R. Kuditipudi, P. Liang, and T. Hashimoto, “Auditing prompt caching in language model APIs,” in Proceedings of the 42nd International Conference on Machine Learning (ICML), ser. Proceedings of Machine Learning Research, vol. 267, 2025.
- R. Weiss, D. Ayzenshteyn, G. Amit, and Y. Mirsky, “What was your prompt? A remote keylogging attack on AI assistants,” in 33rd USENIX Security Symposium (USENIX Security), 2024, pp. 3367–3384.
- Q. Zhan, Z. Liang, Z. Ying, and D. Kang, “InjecAgent: Benchmarking indirect prompt injections in tool-integrated large language model agents,” in Findings of the Association for Computational Linguistics (ACL), 2024.
- X. Qi, Y. Zeng, T. Xie, P.-Y. Chen, R. Jia, P. Mittal, and P. Henderson, “Fine-tuning aligned language models compromises safety, even when users do not intend to!” in International Conference on Learning Representations (ICLR), 2024.
- M. Hao, H. Li, H. Chen, P. Xing, G. Xu, and T. Zhang, “Iron: Private inference on transformers,” in Advances in Neural Information Processing Systems (NeurIPS), 2022, pp. 15 718–15 731.
- Y. Dong, W.-j. Lu, Y. Zheng, H. Wu, D. Zhao, J. Tan, Z. Huang, C. Hong, T. Wei, W.-G. Chen et al., “PUMA: Secure inference of LLaMA-7B in five minutes,” Security and Safety, vol. 4, p. 2025014, 2025.
- J. Zhu, H. Yin, P. Deng, A. Almeida, and S. Zhou, “Confidential computing on NVIDIA Hopper GPUs: A performance benchmark study,” arXiv preprint arXiv:2409.03992, 2024.
- D. Yu, S. Naik, A. Backurs, S. Gopi, H. A. Inan, G. Kamath, J. Kulkarni, Y. T. Lee, A. Manoel, L. Wutschitz et al., “Differentially private fine-tuning of language models,” in International Conference on Learning Representations (ICLR), 2022.
- H. Inan, K. Upasani, J. Chi, R. Rungta, K. Iyer, Y. Mao, M. Tontchev, Q. Hu, B. Fuller, D. Testuggine, and M. Khabsa, “Llama guard: LLM-based input-output safeguard for human-AI conversations,” arXiv preprint arXiv:2312.06674, 2023.
- M. Sharma, M. Tong, J. Mu et al., “Constitutional classifiers: Defending against universal jailbreaks across thousands of hours of red teaming,” arXiv preprint arXiv:2501.18837, 2025.
- E. Debenedetti, I. Shumailov, T. Fan, J. Hayes, N. Carlini, D. Fabian, C. Kern, C. Shi, A. Terzis, and F. Tramèr, “Defeating prompt injections by design,” in Proceedings of the 4th IEEE Conference on Secure and Trustworthy Machine Learning (SaTML), 2026, pp. 587–618.
- Y. Liu, Y. Yao, J.-F. Ton, X. Zhang, R. Guo, H. Cheng, Y. Klochkov, M. F. Taufiq, and H. Li, “Trustworthy LLMs: A survey and guideline for evaluating large language models’ alignment,” arXiv preprint arXiv:2308.05374, 2023.
- Y. Huang, L. Sun, H. Wang, S. Wu, Q. Zhang, Y. Li et al., “Position: TrustLLM: Trustworthiness in large language models,” in Proceedings of the 41st International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, vol. 235, 2024, pp. 20 166–20 270.
- Y. Yao, J. Duan, K. Xu, Y. Cai, Z. Sun, and Y. Zhang, “A survey on large language model (LLM) security and privacy: The good, the bad, and the ugly,” High-Confidence Computing, vol. 4, no. 2, p. 100211, 2024.
- B. C. Das, M. H. Amini, and Y. Wu, “Security and privacy challenges of large language models: A survey,” ACM Computing Surveys, vol. 57, no. 6, pp. 1–39, 2025.
- Z. Deng, Y. Guo, C. Han, W. Ma, J. Xiong, S. Wen, and Y. Xiang, “AI agents under threat: A survey of key security challenges and future pathways,” ACM Computing Surveys, vol. 57, no. 7, pp. 1–36, 2025.
- X. Wang, Z. Ji, W. Wang, Z. Li, D. Wu, and S. Wang, “SoK: Evaluating jailbreak guardrails for large language models,” in IEEE Symposium on Security and Privacy (S&P), 2026, pp. 39–58.
- OWASP Foundation, “OWASP top 10 for LLM applications 2025,” https://genai.owasp.org/resource/owasp-top-10-for-llm-applications-2025/, 2025, released November 17, 2024. Accessed 10 Nov 2026.
- C. Autio, R. Schwartz, J. Dunietz, S. Jain, M. Stanley, E. Tabassi, P. Hall, and K. Roberts, “Artificial intelligence risk management framework: Generative artificial intelligence profile,” National Institute of Standards and Technology, Gaithersburg, MD, NIST Trustworthy and Responsible AI NIST AI 600-1, 2024.
- MITRE, “MITRE ATLAS: Adversarial threat landscape for artificial-intelligence systems,” https://atlas.mitre.org/, 2021, Accessed 10 Nov 2026.
- Cloud Security Alliance, “CSA large language model (LLM) threats taxonomy,” https://cloudsecurityalliance.org/artifacts/csa-large-language-model-llm-threats-taxonomy, 2024, released June 10, 2024. Accessed 10 Nov 2026.
- European Union, “Regulation (EU) 2024/1689 of the European Parliament and of the Council of 13 June 2024 laying down harmonised rules on artificial intelligence and amending Regulations (EC) No 300/2008, (EU) No 167/2013, (EU) No 168/2013, (EU) 2018/858, (EU) 2018/1139 and (EU) 2019/2144 and Directives 2014/90/EU, (EU) 2016/797 and (EU) 2020/1828 (Artificial Intelligence Act),” Official Journal of the European Union, L 2024/1689, 12 July 2024, 2024.
- L. K. L. Ng and S. S. M. Chow, “SoK: Cryptographic neural-network computation,” in IEEE Symposium on Security and Privacy (SP), 2023, pp. 497–514.
- L. Ouyang, J. Wu, X. Jiang, D. Almeida, C. Wainwright, P. Mishkin, C. Zhang, S. Agarwal, K. Slama, A. Ray et al., “Training language models to follow instructions with human feedback,” in Advances in Neural Information Processing Systems (NeurIPS), 2022.
- Y. Bai, S. Kadavath, S. Kundu et al., “Constitutional AI: Harmlessness from AI feedback,” arXiv preprint arXiv:2212.08073, 2022.
- J. Zhao, S. Wang, Y. Zhao, X. Hou, K. Wang, P. Gao, Y. Zhang, C. Wei, and H. Wang, “Models are codes: Towards measuring malicious code poisoning attacks on pre-trained model hubs,” in Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering (ASE), 2024.
- N. Carlini, M. Jagielski, C. A. Choquette-Choo, D. Paleka, W. Pearce, H. Anderson, A. Terzis, K. Thomas, and F. Tramèr, “Poisoning web-scale training datasets is practical,” in 2024 IEEE Symposium on Security and Privacy (SP), 2024, pp. 407–425.
- J. Kirchenbauer, J. Geiping, Y. Wen, J. Katz, I. Miers, and T. Goldstein, “A watermark for large language models,” in International Conference on Machine Learning (ICML), 2023.
- I. Gao, P. Liang, and C. Guestrin, “Model equality testing: Which model is this API serving?” in International Conference on Learning Representations (ICLR), 2025.
- W. Cai, T. Shi, X. Zhao, and D. Song, “Are you getting what you pay for? Auditing model substitution in LLM APIs,” arXiv preprint arXiv:2504.04715, 2025.
- A. Borzunov, D. Baranchuk, T. Dettmers, M. Riabinin, Y. Belkada, A. Chumachenko, P. Samygin, and C. Raffel, “Petals: Collaborative inference and fine-tuning of large models,” in Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 3: System Demonstrations), 2023, pp. 558–568.
- M. Zhang, X. Shen, J. Cao, Z. Cui, and S. Jiang, “EdgeShard: Efficient LLM inference via collaborative edge computing,” IEEE Internet of Things Journal, vol. 12, no. 10, pp. 13 119–13 131, 2025.
- F. Tramèr, F. Zhang, A. Juels, M. K. Reiter, and T. Ristenpart, “Stealing machine learning models via prediction APIs,” in 25th USENIX Security Symposium (USENIX Security), 2016.
- R. Shokri, M. Stronati, C. Song, and V. Shmatikov, “Membership inference attacks against machine learning models,” in 2017 IEEE Symposium on Security and Privacy (S&P), 2017.
- Y. Liu, Y. Jia, R. Geng, J. Jia, and N. Z. Gong, “Formalizing and benchmarking prompt injection attacks and defenses,” in USENIX Security Symposium, 2024, pp. 1831–1847.
- A. Zou, Z. Wang, N. Carlini, M. Nasr, J. Z. Kolter, and M. Fredrikson, “Universal and transferable adversarial attacks on aligned language models,” arXiv preprint arXiv:2307.15043, 2023.
- G. Sun, Z. Wang, X. Zhao, B. Tian, Z. Shen, Y. He, J. Xing, and A. Li, “Position: Invisible tokens, visible bills: The urgent need to audit hidden operations in opaque LLM services,” in Proceedings of the 43rd International Conference on Machine Learning (ICML), ser. Proceedings of Machine Learning Research, vol. 306, 2026, pp. 172 196–172 207.
- Z. Ji, N. Lee, R. Frieske, T. Yu, D. Su, Y. Xu, E. Ishii, Y. J. Bang, A. Madotto, and P. Fung, “Survey of hallucination in natural language generation,” ACM computing surveys, vol. 55, no. 12, pp. 1–38, 2023.
- L. Huang, W. Yu, W. Ma, W. Zhong, Z. Feng, H. Wang, Q. Chen, W. Peng, X. Feng, B. Qin et al., “A survey on hallucination in large language models: Principles, taxonomy, challenges, and open questions,” ACM Transactions on Information Systems, vol. 43, no. 2, pp. 1–55, 2025.
- F. Tramèr and D. Boneh, “Slalom: Fast, verifiable and private execution of neural networks in trusted hardware,” in International Conference on Learning Representations (ICLR), 2019.
- S. Volos, K. Vaswani, and R. Bruno, “Graviton: Trusted execution environments on GPUs,” in 13th USENIX Symposium on Operating Systems Design and Implementation (OSDI), 2018.
- N. Mireshghallah, M. Antoniak, Y. More, Y. Choi, and G. Farnadi, “Trust no bot: Discovering personal disclosures in human-LLM conversations in the wild,” in First Conference on Language Modeling (COLM), 2024.
- E. Wallace, K. Xiao, R. Leike, L. Weng, J. Heidecke, and A. Beutel, “The instruction hierarchy: Training LLMs to prioritize privileged instructions,” arXiv preprint arXiv:2404.13208, 2024.
- S. Chen, J. Piet, C. Sitawarin, and D. Wagner, “StruQ: Defending against prompt injection with structured queries,” in 34th USENIX Security Symposium (USENIX Security 25), 2025, pp. 2383–2400.
- J. M. Ong, M. Di Ferrante, A. Pazdera, R. Garner, S. Jaghouar, M. Basra, M. Ryabinin, and J. Hagemann, “TOPLOC: A locality sensitive hashing scheme for trustless verifiable inference,” in Proceedings of the 42nd International Conference on Machine Learning (ICML), ser. Proceedings of Machine Learning Research, vol. 267, 2025, pp. 47 196–47 211.
- K. Krishna, G. S. Tomar, A. P. Parikh, N. Papernot, and M. Iyyer, “Thieves on Sesame Street! Model extraction of BERT-based APIs,” in International Conference on Learning Representations (ICLR), 2020.
- E. Wallace, M. Stern, and D. Song, “Imitation attacks and defenses for black-box machine translation systems,” in Conference on Empirical Methods in Natural Language Processing (EMNLP), 2020.
- S. Zanella-Béguelin, S. Tople, A. Paverd, and B. Köpf, “Grey-box extraction of natural language models,” in International Conference on Machine Learning (ICML), 2021.
- M. Finlayson, X. Ren, and S. Swayamdipta, “Logits of API-protected LLMs leak proprietary information,” in First Conference on Language Modeling (COLM), 2024.
- A. Gudibande, E. Wallace, C. Snell, X. Geng, H. Liu, P. Abbeel, S. Levine, and D. Song, “The false promise of imitating proprietary language models,” in International Conference on Learning Representations (ICLR), 2024.
- D. Pasquini, E. M. Kornaropoulos, and G. Ateniese, “LLMmap: Fingerprinting for large language models,” in 34th USENIX Security Symposium (USENIX Security 25), 2025, pp. 299–318.
- F. Perez and I. Ribeiro, “Ignore previous prompt: Attack techniques for language models,” arXiv preprint arXiv:2211.09527, 2022.
- Y. Liu, G. Deng, Y. Li, K. Wang, Z. Wang, X. Wang, T. Zhang, Y. Liu, H. Wang, Y. Zheng, L. Y. Zhang, and Y. Liu, “Prompt injection attack against LLM-integrated applications,” arXiv preprint arXiv:2306.05499, 2023.
- Y. Zhang, N. Carlini, and D. Ippolito, “Effective prompt extraction from language models,” in First Conference on Language Modeling (COLM), 2024.
- B. Hui, H. Yuan, N. Gong, P. Burlina, and Y. Cao, “PLeak: Prompt leaking attacks against large language model applications,” in ACM SIGSAC Conference on Computer and Communications Security (CCS), 2024.
- J. X. Morris, W. Zhao, J. T. Chiu, V. Shmatikov, and A. M. Rush, “Language model inversion,” in International Conference on Learning Representations (ICLR), 2024.
- N. Carlini, F. Tramer, E. Wallace, M. Jagielski, A. Herbert-Voss, K. Lee, A. Roberts, T. Brown, D. Song, U. Erlingsson et al., “Extracting training data from large language models,” in USENIX Security Symposium, 2021, pp. 2633–2650.
- N. Carlini, D. Ippolito, M. Jagielski, K. Lee, F. Tramer, and C. Zhang, “Quantifying memorization across neural language models,” in International Conference on Learning Representations (ICLR), 2023.
- N. Lukas, A. Salem, R. Sim, S. Tople, L. Wutschitz, and S. Zanella-Béguelin, “Analyzing leakage of personally identifiable information in language models,” in 2023 IEEE Symposium on Security and Privacy (S&P), 2023.
- J. Mattern, F. Mireshghallah, Z. Jin, B. Schölkopf, M. Sachan, and T. Berg-Kirkpatrick, “Membership inference attacks against language models via neighbourhood comparison,” in Findings of the Association for Computational Linguistics (ACL), 2023.
- W. Shi, A. Ajith, M. Xia, Y. Huang, D. Liu, T. Blevins, D. Chen, and L. Zettlemoyer, “Detecting pretraining data from large language models,” in International Conference on Learning Representations (ICLR), 2024.
- W. Fu, H. Wang, C. Gao, G. Liu, Y. Li, and T. Jiang, “Membership inference attacks against fine-tuned large language models via self-prompt calibration,” Advances in Neural Information Processing Systems, vol. 37, pp. 134 981–135 010, 2024.
- M. Duan, A. Suri, N. Mireshghallah, S. Min, W. Shi, L. Zettlemoyer, Y. Tsvetkov, Y. Choi, D. Evans, and H. Hajishirzi, “Do membership inference attacks work on large language models?” in First Conference on Language Modeling (COLM), 2024.
- E. Debenedetti, G. Severi, N. Carlini, C. A. Choquette-Choo, M. Jagielski, M. Nasr, E. Wallace, and F. Tramèr, “Privacy side channels in machine learning systems,” in 33rd USENIX Security Symposium (USENIX Security), 2024.
- R. Staab, M. Vero, M. Balunović, and M. Vechev, “Beyond memorization: Violating privacy via inference with large language models,” in International Conference on Learning Representations (ICLR), 2024.
- C. Song and A. Raghunathan, “Information leakage in embedding models,” in ACM SIGSAC Conference on Computer and Communications Security (CCS), 2020.
- J. X. Morris, V. Kuleshov, V. Shmatikov, and A. M. Rush, “Text embeddings reveal (almost) as much as text,” in Conference on Empirical Methods in Natural Language Processing (EMNLP), 2023.
- H. Li, M. Xu, and Y. Song, “Sentence embedding leaks more information than you expect: Generative embedding inversion attack to recover the whole sentence,” in Findings of the Association for Computational Linguistics (ACL), 2023.
- S. Zeng, J. Zhang, P. He, Y. Liu, Y. Xing, H. Xu, J. Ren, Y. Chang, S. Wang, D. Yin, and J. Tang, “The good and the bad: Exploring privacy issues in retrieval-augmented generation (RAG),” in Findings of the Association for Computational Linguistics: ACL 2024, 2024, pp. 4505–4524.
- G. Wu, Z. Zhang, Y. Zhang, W. Wang, J. Niu, Y. Wu, and Y. Zhang, “I know what you asked: Prompt leakage via KV-cache sharing in multi-tenant LLM serving,” in Network and Distributed System Security Symposium (NDSS), 2025.
- M. Andriushchenko, F. Croce, and N. Flammarion, “Jailbreaking leading safety-aligned LLMs with simple adaptive attacks,” in International Conference on Learning Representations (ICLR), 2025.
- P. Chao, A. Robey, E. Dobriban, H. Hassani, G. J. Pappas, and E. Wong, “Jailbreaking black box large language models in twenty queries,” in 2025 IEEE Conference on Secure and Trustworthy Machine Learning (SaTML). IEEE, 2025, pp. 23–42.
- A. Mehrotra, M. Zampetakis, P. Kassianik, B. Nelson, H. Anderson, Y. Singer, and A. Karbasi, “Tree of attacks: Jailbreaking black-box LLMs automatically,” in Advances in Neural Information Processing Systems (NeurIPS), 2024.
- X. Liu, N. Xu, M. Chen, and C. Xiao, “AutoDAN: Generating stealthy jailbreak prompts on aligned large language models,” in International Conference on Learning Representations (ICLR), 2024.
- C. Anil, E. Durmus et al., “Many-shot jailbreaking,” in Advances in Neural Information Processing Systems (NeurIPS), 2024.
- M. Russinovich, A. Salem, and R. Eldan, “Great, now write an article about that: The Crescendo multi-turn LLM jailbreak attack,” in 34th USENIX Security Symposium (USENIX Security), 2025.
- W. Zou, R. Geng, B. Wang, and J. Jia, “PoisonedRAG: Knowledge corruption attacks to retrieval-augmented generation of large language models,” in Proceedings of the 34th USENIX Security Symposium. Berkeley: USENIX Association, 2025, pp. 3827–3844.
- D. Halawi, A. Wei, E. Wallace, T. T. Wang, N. Haghtalab, and J. Steinhardt, “Covert malicious finetuning: Challenges in safeguarding LLM adaptation,” in Proceedings of the 41st International Conference on Machine Learning (ICML), 2024.
- A. Wan, E. Wallace, S. Shen, and D. Klein, “Poisoning language models during instruction tuning,” in Proceedings of the 40th International Conference on Machine Learning (ICML), 2023.
- J. Rando and F. Tramèr, “Universal jailbreak backdoors from poisoned human feedback,” in International Conference on Learning Representations (ICLR), 2024.
- E. Hubinger, C. Denison, J. Mu et al., “Sleeper agents: Training deceptive LLMs that persist through safety training,” arXiv preprint arXiv:2401.05566, 2024.
- I. Shumailov, Y. Zhao, D. Bates, N. Papernot, R. Mullins, and R. Anderson, “Sponge examples: Energy-latency attacks on neural networks,” in 2021 IEEE European Symposium on Security and Privacy (EuroS&P), 2021.
- J. Geiping, A. Stein, M. Shu, K. Saifullah, Y. Wen, and T. Goldstein, “Coercing LLMs to do and reveal (almost) anything,” arXiv preprint arXiv:2402.14020, 2024.
- J. Dong, Z. Zhang, Q. Zhang, T. Zhang, H. Wang, H. Li, Q. Li, C. Zhang, K. Xu, and H. Qiu, “An Engorgio prompt makes large language model babble on,” in International Conference on Learning Representations (ICLR), 2025.
- A. Kumar, J. Roh, A. Naseh, M. Karpinska, M. Iyyer, A. Houmansadr, and E. Bagdasarian, “OverThink: Slowdown attacks on reasoning LLMs,” arXiv preprint arXiv:2502.02542, 2025.
- N. Jovanović, R. Staab, and M. Vechev, “Watermark stealing in large language models,” in Proceedings of the 41st International Conference on Machine Learning (ICML), 2024.
- N. Mireshghallah, H. Kim, X. Zhou, Y. Tsvetkov, M. Sap, R. Shokri, and Y. Choi, “Can LLMs keep a secret? Testing privacy implications of language models via contextual integrity theory,” in International Conference on Learning Representations (ICLR), 2024.
- X. Shen, Z. Chen, M. Backes, Y. Shen, and Y. Zhang, ““do anything now”: Characterizing and evaluating in-the-wild jailbreak prompts on large language models,” in ACM Conference on Computer and Communications Security (CCS), 2024.
- E. Perez, S. Huang, F. Song, T. Cai, R. Ring, J. Aslanides, A. Glaese, N. McAleese, and G. Irving, “Red teaming language models with language models,” in Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, 2022, pp. 3419–3448.
- Z.-W. Hong, I. Shenfeld, T.-H. Wang, Y.-S. Chuang, A. Pareja, J. Glass, A. Srivastava, and P. Agrawal, “Curiosity-driven red-teaming for large language models,” in International Conference on Learning Representations (ICLR), 2024.
- Z. Lin, J. Cui, X. Liao, and X. Wang, “Malla: Demystifying real-world large language model integrated malicious services,” in 33rd USENIX Security Symposium (USENIX Security), 2024, pp. 4693–4710.
- E. Debenedetti, J. Zhang, M. Balunović, L. Beurer-Kellner, M. Fischer, and F. Tramèr, “AgentDojo: A dynamic environment to evaluate prompt injection attacks and defenses for LLM agents,” in Advances in Neural Information Processing Systems (NeurIPS) Datasets and Benchmarks Track, vol. 37, 2024.
- J. Yi, Y. Xie, B. Zhu, E. Kiciman, G. Sun, X. Xie, and F. Wu, “Benchmarking and defending against indirect prompt injection attacks on large language models,” in Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD), 2025.
- H. Mai, J. Zhao, H. Zheng, Y. Zhao, Z. Liu, M. Gao, C. Wang, H. Cui, X. Feng, and C. Kozyrakis, “Honeycomb: Secure and efficient GPU executions via static validation,” in 17th USENIX Symposium on Operating Systems Design and Implementation (OSDI 23), 2023, pp. 155–172.
- Apple Security Engineering and Architecture, “Private cloud compute: A new frontier for AI privacy in the cloud,” https://security.apple.com/blog/private-cloud-compute/, 2024, Accessed 10 Nov 2026.
- Q. Li, Z. Shen, Z. Qin, Y. Xie, X. Zhang, T. Du, S. Cheng, X. Wang, and J. Yin, “TransLinkGuard: Safeguarding transformer models against model stealing in edge deployment,” in Proceedings of the 32nd ACM International Conference on Multimedia, 2024, pp. 3479–3488.
- J. Van Bulck, D. Moghimi, M. Schwarz, M. Lipp, M. Minkin, D. Genkin, Y. Yarom, B. Sunar, D. Gruss, and F. Piessens, “LVI: Hijacking transient execution through microarchitectural load value injection,” in 2020 IEEE Symposium on Security and Privacy (S&P). IEEE, 2020, pp. 54–72.
- J. Ménétrey, C. Göttel, M. Pasin, P. Felber, and V. Schiavoni, “An exploratory study of attestation mechanisms for trusted execution environments,” in Proceedings of the 5th Workshop on System Software for Trusted Execution (SysTEX), 2022.
- D. Li, R. Shao, H. Wang, H. Guo, E. Xing, and H. Zhang, “MPCFormer: Fast, performant and private transformer inference with MPC,” in 11th International Conference on Learning Representations, ICLR 2023, 2023.
- J. Luo, Y. Zhang, Z. Zhang, J. Zhang, X. Mu, H. Wang, Y. Yu, and Z. Xu, “SecFormer: Fast and accurate privacy-preserving inference for transformer models via SMPC,” in Findings of the Association for Computational Linguistics: ACL 2024, 2024, pp. 13 333–13 348.
- Q. Pang, J. Zhu, H. Möllering, W. Zheng, and T. Schneider, “Bolt: Privacy-preserving, accurate and efficient inference for transformers,” in 2024 IEEE Symposium on Security and Privacy (S&P). IEEE, 2024, pp. 4753–4771.
- Z. Li, K. Yang, J. Tan, W.-j. Lu, H. Wu, X. Wang, Y. Yu, D. Zhao, Y. Zheng, M. Guo, and J. Leng, “Nimbus: Secure and efficient two-party inference for transformers,” in Advances in Neural Information Processing Systems, vol. 37, 2024, pp. 21 572–21 600.
- W.-j. Lu, Z. Huang, Z. Gu, J. Li, J. Liu, C. Hong, K. Ren, T. Wei, and W. Chen, “BumbleBee: Secure two-party inference framework for large transformers,” in Network and Distributed System Security Symposium (NDSS). The Internet Society, 2025.
- A. Y. L. Kei and S. S. M. Chow, “SHAFT: Secure, handy, accurate and fast transformer inference,” in Network and Distributed System Security Symposium (NDSS), 2025.
- H. Sun, J. Li, and H. Zhang, “zkLLM: Zero knowledge proofs for large language models,” in ACM SIGSAC Conference on Computer and Communications Security (CCS), 2024.
- G. Sun, Z. Wang, B. Tian, M. Liu, Z. Shen, S. He, Y. He, W. Ye, Y. Wang, and A. Li, “CoIn: Counting the invisible reasoning tokens in commercial opaque LLM APIs,” in Findings of the Association for Computational Linguistics: EMNLP 2026, 2026, pp. 7594–7620.
- K. Chu, Z. Lin, D. Xiang, Z. Shen, J. Su, C. Chu, Y. Yang, W. Zhang, W. Wu, and W. Zhang, “Selective KV-cache sharing to mitigate timing side-channels in LLM inference,” arXiv preprint arXiv:2508.08438, 2025.
- Z. Luo, S. Shao, S. Zhang, L. Zhou, Y. Hu, C. Zhao, Z. Liu, and Z. Qin, “Shadow in the cache: Unveiling and mitigating privacy risks of KV-cache in LLM inference,” in Network and Distributed System Security Symposium (NDSS), 2026.
- C. Dwork and A. Roth, “The algorithmic foundations of differential privacy,” Foundations and Trends in Theoretical Computer Science, vol. 9, no. 3-4, pp. 211–407, 2014.
- M. Abadi, A. Chu, I. Goodfellow, H. B. McMahan, I. Mironov, K. Talwar, and L. Zhang, “Deep learning with differential privacy,” in ACM SIGSAC Conference on Computer and Communications Security (CCS), 2016.
- X. Li, F. Tramer, P. Liang, and T. Hashimoto, “Large language models can be strong differentially private learners,” in International Conference on Learning Representations (ICLR), 2022.
- M. Du, X. Yue, S. S. Chow, T. Wang, C. Huang, and H. Sun, “DP-Forward: Fine-tuning and inference on language models with differential privacy in forward pass,” in ACM SIGSAC Conference on Computer and Communications Security (CCS), 2023.
- X. Tang, R. Shin, H. A. Inan, A. Manoel, F. Mireshghallah, Z. Lin, S. Gopi, J. Kulkarni, and R. Sim, “Privacy-preserving in-context learning with differentially private few-shot generation,” in International Conference on Learning Representations (ICLR), 2024.
- H. Duan, A. Dziedzic, N. Papernot, and F. Boenisch, “Flocks of stochastic parrots: Differentially private prompt learning for large language models,” in Advances in Neural Information Processing Systems (NeurIPS), 2023.
- X. Yue, M. Du, T. Wang, Y. Li, H. Sun, and S. S. Chow, “Differential privacy for text analytics via natural text sanitization,” in Findings of the Association for Computational Linguistics (ACL), 2021.
- S. Chen, F. Mo, Y. Wang, C. Chen, J.-Y. Nie, C. Wang, and J. Cui, “A customized text sanitization mechanism with differential privacy,” in Findings of the Association for Computational Linguistics (ACL), 2023.
- M. Tong, K. Chen, J. Zhang, Y. Qi, W. Zhang, N. Yu, T. Zhang, and Z. Zhang, “InferDPT: Privacy-preserving inference for closed-box large language models,” IEEE Transactions on Dependable and Secure Computing, vol. 22, no. 5, pp. 4625–4640, 2025.
- Y. Chen, T. Li, H. Liu, and Y. Yu, “Hide and seek (HaS): A lightweight framework for prompt privacy protection,” arXiv preprint arXiv:2309.03057, 2023.
- K. Zhang, J. Wang, E. Hua, B. Qi, N. Ding, and B. Zhou, “CoGenesis: A framework collaborating large and small language models for secure context-aware instruction following,” in Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2024, pp. 4295–4312.
- T. Huang, S. Hu, and L. Liu, “Vaccine: Perturbation-aware alignment for large language models against harmful fine-tuning attack,” in Advances in Neural Information Processing Systems (NeurIPS), 2024.
- A. Zou, L. Phan, J. Wang, D. Duenas, M. Lin, M. Andriushchenko, R. Wang, Z. Kolter, M. Fredrikson, and D. Hendrycks, “Improving alignment and robustness with circuit breakers,” in Advances in Neural Information Processing Systems (NeurIPS), 2024.
- S. Chen, A. Zharmagambetov, S. Mahloujifar, K. Chaudhuri, D. Wagner, and C. Guo, “SecAlign: Defending against prompt injection with preference optimization,” in Proceedings of the 2025 ACM SIGSAC Conference on Computer and Communications Security (CCS), 2025, pp. 2833–2847.
- J. Piet, M. Alrashed, C. Sitawarin, S. Chen, Z. Wei, E. Sun, B. Alomair, and D. Wagner, “Jatmo: Prompt injection defense by task-specific finetuning,” in European Symposium on Research in Computer Security. Springer, 2024, pp. 105–124.
- Z. Xu, F. Jiang, L. Niu, J. Jia, B. Y. Lin, and R. Poovendran, “SafeDecoding: Defending against jailbreak attacks via safety-aware decoding,” in Annual Meeting of the Association for Computational Linguistics (ACL), 2024, pp. 5587–5605.
- Y. Li, F. Wei, J. Zhao, C. Zhang, and H. Zhang, “RAIN: Your language models can align themselves without finetuning,” in International Conference on Learning Representations (ICLR), 2024.
- N. Jain, A. Schwarzschild, Y. Wen, G. Somepalli, J. Kirchenbauer, P.-y. Chiang, M. Goldblum, A. Saha, J. Geiping, and T. Goldstein, “Baseline defenses for adversarial attacks against aligned language models,” arXiv preprint arXiv:2309.00614, 2023.
- A. Robey, E. Wong, H. Hassani, and G. J. Pappas, “SmoothLLM: Defending large language models against jailbreaking attacks,” Transactions on Machine Learning Research (TMLR), 2025.
- A. Kumar, C. Agarwal, S. Srinivas, A. J. Li, S. Feizi, and H. Lakkaraju, “Certifying LLM safety against adversarial prompting,” in First Conference on Language Modeling (COLM), 2024.
- S. Han, K. Rao, A. Ettinger, L. Jiang, B. Y. Lin, N. Lambert, Y. Choi, and N. Dziri, “WildGuard: Open one-stop moderation tools for safety risks, jailbreaks, and refusals of LLMs,” in Advances in Neural Information Processing Systems (NeurIPS) Datasets and Benchmarks Track, vol. 37, 2024.
- K. Hines, G. Lopez, M. Hall, F. Zarfati, Y. Zunger, and E. Kıcıman, “Defending against indirect prompt injection attacks with spotlighting,” in Proceedings of the Conference on Applied Machine Learning in Information Security (CAMLIS), ser. CEUR Workshop Proceedings, vol. 3920, 2024, pp. 48–62.
- Y. Liu, Y. Jia, J. Jia, D. Song, and N. Z. Gong, “DataSentinel: A game-theoretic detection of prompt injection attacks,” in IEEE Symposium on Security and Privacy (S&P), 2025, pp. 2190–2208.
- Y. Wu, F. Roesner, T. Kohno, N. Zhang, and U. Iqbal, “IsolateGPT: An execution isolation architecture for LLM-based agentic systems,” in Network and Distributed System Security Symposium (NDSS), 2025.
- T. Shi, J. He, Z. Wang, H. Li, L. Wu, W. Guo, and D. Song, “Progent: Securing AI Agents with Privilege Control,” arXiv preprint arXiv:2504.11703, 2025.
- C. Xiang, T. Wu, Z. Zhong, D. Wagner, D. Chen, and P. Mittal, “Certifiably robust RAG against retrieval corruption,” in 2026 IEEE Conference on Secure and Trustworthy Machine Learning (SaTML). IEEE, 2026, pp. 392–410.
- R. Kuditipudi, J. Thickstun, T. Hashimoto, and P. Liang, “Robust distortion-free watermarks for language models,” Transactions on Machine Learning Research (TMLR), 2024.
- S. Dathathri, A. See, S. Ghaisas, P.-S. Huang, R. McAdam, J. Welbl et al., “Scalable watermarking for identifying large language model outputs,” Nature, vol. 634, pp. 818–823, 2024.
- J. Xu, F. Wang, M. D. Ma, P. W. Koh, C. Xiao, and M. Chen, “Instructional fingerprinting of large language models,” in Conference of the North American Chapter of the Association for Computational Linguistics (NAACL), 2024.
- M. Nasr, N. Carlini, C. Sitawarin, S. V. Schulhoff, J. Hayes, M. Ilie, J. Pluto, S. Song, H. Chaudhari, I. Shumailov, A. G. Thakurta, K. Y. Xiao, A. Terzis, and F. Tramèr, “The attacker moves second: Stronger adaptive attacks bypass defenses against LLM jailbreaks and prompt injections,” in 35th USENIX Security Symposium (USENIX Security). USENIX Association, 2026, pp. 1467–1486.
- Q. Zhan, R. Fang, H. S. Panchal, and D. Kang, “Adaptive attacks break defenses against indirect prompt injection attacks on LLM agents,” in Findings of the Association for Computational Linguistics: NAACL 2025, 2025, pp. 7101–7117.
- L. Beurer-Kellner, B. Buesser, A.-M. Creţu, E. Debenedetti, D. Dobos, D. Fabian, M. Fischer, D. Froelicher, K. Grosse, D. Naeff, E. Ozoani, A. Paverd, F. Tramèr, and V. Volhejn, “Design patterns for securing LLM agents against prompt injections,” arXiv preprint arXiv:2506.08837, 2025.
- B. Wang, W. Chen, H. Pei, C. Xie, M. Kang, C. Zhang, C. Xu, Z. Xiong, R. Dutta, R. Schaeffer, S. T. Truong, S. Arora, M. Mazeika, D. Hendrycks, Z. Lin, Y. Cheng, S. Koyejo, D. Song, and B. Li, “DecodingTrust: A comprehensive assessment of trustworthiness in GPT models,” in Advances in Neural Information Processing Systems (NeurIPS) Datasets and Benchmarks Track, vol. 36, 2023.
- M. Mazeika, L. Phan, X. Yin, A. Zou, Z. Wang, N. Mu, E. Sakhaee, N. Li, S. Basart, B. Li, D. Forsyth, and D. Hendrycks, “HarmBench: A standardized evaluation framework for automated red teaming and robust refusal,” in International Conference on Machine Learning (ICML), 2024.
- P. Chao, E. Debenedetti, A. Robey, M. Andriushchenko, F. Croce, V. Sehwag, E. Dobriban, N. Flammarion, G. J. Pappas, F. Tramèr, H. Hassani, and E. Wong, “JailbreakBench: An open robustness benchmark for jailbreaking large language models,” in Advances in Neural Information Processing Systems (NeurIPS) Datasets and Benchmarks Track, 2024.
- H. Zhang, J. Huang, K. Mei, Y. Yao, Z. Wang, C. Zhan, H. Wang, and Y. Zhang, “Agent security bench (ASB): Formalizing and benchmarking attacks and defenses in LLM-based agents,” in The Thirteenth International Conference on Learning Representations (ICLR), 2025.
- M. Andriushchenko, A. Souly, M. Dziemian, D. Duenas, M. Lin, J. Wang, D. Hendrycks, A. Zou, Z. Kolter, M. Fredrikson et al., “AgentHarm: A benchmark for measuring harmfulness of LLM agents,” in ICLR, 2025.
- Cloud Security Alliance, “Agentic AI red teaming guide,” https://cloudsecurityalliance.org/artifacts/agentic-ai-red-teaming-guide, 2025, released May 28, 2025. Accessed 10 Nov 2026.
- NIST, “Artificial intelligence risk management framework (AI RMF 1.0),” National Institute of Standards and Technology, Gaithersburg, Tech. Rep., 2023.
- ISO/IEC, “ISO/IEC 42001:2023 information technology—artificial intelligence—management system,” International Organization for Standardization, Geneva, 2023.
- Cyberspace Administration of China and others, “Interim measures for the management of generative artificial intelligence services,” https://www.cac.gov.cn/2023-07/13/c_1690898327029107.htm, 2023, Accessed 10 Nov 2026.
- SAMR and SAC, “GB/T 45654–2025 cybersecurity technology—basic security requirements for generative artificial intelligence service,” National standard of China, effective 1 November 2025, 2025.
- N. Papernot, P. McDaniel, A. Sinha, and M. P. Wellman, “SoK: Security and privacy in machine learning,” in IEEE European Symposium on Security and Privacy (EuroS&P), 2018, pp. 399–414.
- S. Wang, Y. Zhao, X. Hou, and H. Wang, “Large language model supply chain: A research agenda,” ACM Transactions on Software Engineering and Methodology, vol. 34, no. 5, pp. 1–46, 2025.
Literature coding
Table VIII lists the coding of all 120 primary studies with the values defined in Table I. The last four columns apply to defenses only.
| Study | Year | T | Layer | Adv. | Goal | Eval. | Guar. | Ad. | Cl. | 7B |
|---|---|---|---|---|---|---|---|---|---|---|
| Imitation attacks [60] | 2020 | A | API | Q | G1 | P | ||||
| Thieves on Sesame Street [59] | 2020 | A | API | Q | G1 | O | ||||
| Grey-box extraction [97] | 2021 | A | API | Q | G1 | O | ||||
| PromptInject [62] | 2022 | A | Ctx | Q | G1 G3 | P | ||||
| HouYi [86] | 2023 | A | Ctx | Q | G1 G3 | P | ||||
| Language model inversion [65] | 2024 | A | API | Q | G1 | O | ||||
| Logit leakage [58] | 2024 | A | API | Q | G1 | B | ||||
| Model stealing [10] | 2024 | A | API | Q | G1 | B | ||||
| PLeak [64] | 2024 | A | Ctx | Q | G1 | B | ||||
| Prompt extraction [63] | 2024 | A | Ctx | Q | G1 | B | ||||
| KV-cache timing [12] | 2025 | A | Srv | T | G1 G2 | B | ||||
| LLMmap [66] | 2025 | A | API | Q | G1 | B | ||||
| Embedding leakage [75] | 2020 | A | Ctx | P | G2 | O | ||||
| Training data extraction [67] | 2021 | A | API | Q | G2 | O | ||||
| GEIA [77] | 2023 | A | Ctx | P | G2 | O | ||||
| Indirect injection [6] | 2023 | A | Ctx | C | G2 G3 | B | ||||
| Neighbourhood membership inference [69] | 2023 | A | API | Q | G2 | O | ||||
| Personal data leakage [68] | 2023 | A | API | Q | G2 | O | ||||
| Vec2Text [76] | 2023 | A | Ctx | P | G2 | B | ||||
| Attribute inference [74] | 2024 | A | API | Q | G2 | B | ||||
| Min-K% Prob [70] | 2024 | A | API | Q | G2 | O | ||||
| Privacy side channels [73] | 2024 | A | Sup Out | Q | G2 | O | ||||
| RAG privacy [78] | 2024 | A | Ctx | Q | G2 | O | ||||
| SPV-MIA [71] | 2024 | A | API | Q | G2 | O | ||||
| Token-length channel [14] | 2024 | A | API | T | G2 | P | ||||
| Divergence attack [11] | 2025 | A | API | Q | G2 | B | ||||
| PromptPeek [79] | 2025 | A | Srv | T | G2 | O | ||||
| Language model red teaming [101] | 2022 | A | API | Q | G3 | O | ||||
| GCG [48] | 2023 | A | API | Q | G3 | B | ||||
| Instruction poisoning [89] | 2023 | A | Sup | S | G3 | O | ||||
| Jailbroken [7] | 2023 | A | API | Q | G3 | P | ||||
| AutoDAN [83] | 2024 | A | API | Q | G3 | B | ||||
| Coercing LLMs [93] | 2024 | A | API | Q | G3 G5 | O | ||||
| Covert fine-tuning [88] | 2024 | A | Sup | F | G3 | P | ||||
| Curiosity red teaming [102] | 2024 | A | API | Q | G3 | O | ||||
| Harmful fine-tuning [16] | 2024 | A | Sup | F | G3 | B | ||||
| Human-feedback backdoor [90] | 2024 | A | Sup | S | G3 | O | ||||
| Injection formalization [47] | 2024 | A | Ctx | C | G3 | B | ||||
| Many-shot [84] | 2024 | A | API | Q | G3 | B | ||||
| Sleeper agents [91] | 2024 | A | Sup | S | G3 | O | ||||
| TAP [82] | 2024 | A | API | Q | G3 | B | ||||
| Web-scale poisoning [39] | 2024 | A | Sup | S | G3 | P | ||||
| Adaptive indirect injection attacks [151] | 2025 | A | Ctx | C | G3 | O | ||||
| Adaptive jailbreaks [80] | 2025 | A | API | Q | G3 | B | ||||
| Crescendo [85] | 2025 | A | API | Q | G3 | B | ||||
| PAIR [81] | 2025 | A | API | Q | G3 | B | ||||
| PoisonedRAG [87] | 2025 | A | Ctx | C | G3 | B | ||||
| Attacker moves second [150] | 2026 | A | API Ctx | Q C | G3 | B | ||||
| Sponge examples [92] | 2021 | A | Srv | Q | G5 | B | ||||
| Engorgio [94] | 2025 | A | Srv | Q | G5 | O | ||||
| OverThink [95] | 2025 | A | Ctx | C | G5 | B | ||||
| Watermark stealing [96] | 2024 | A | Out | Q | G6 | O | ||||
| Imitation limits [61] | 2024 | M | API | Q | G1 | B | ||||
| Prompt-cache audit [13] | 2025 | M | Srv | T | G1 G2 | P | ||||
| DecodingTrust [153] | 2023 | M | API | Q | G2 G3 | P | ||||
| Memorization scaling [98] | 2023 | M | API | Q | G2 | O | ||||
| ConfAIde [99] | 2024 | M | Ctx | Q | G2 | B | ||||
| Disclosures in the wild [54] | 2024 | M | API | P | G2 | P | ||||
| InjecAgent [15] | 2024 | M | Ctx | C | G2 G3 | B | ||||
| Membership inference reality check [72] | 2024 | M | API | Q | G2 | O | ||||
| TrustLLM [25] | 2024 | M | API | Q | G2 G3 | B | ||||
| AgentDojo [104] | 2024 | M | Ctx | C | G3 | B | ||||
| HarmBench [154] | 2024 | M | API | Q | G3 | B | ||||
| In-the-wild jailbreaks [100] | 2024 | M | API | Q | G3 | B | ||||
| JailbreakBench [155] | 2024 | M | API | Q | G3 | B | ||||
| Malla [103] | 2024 | M | API | Q | G3 | P | ||||
| BIPIA [105] | 2025 | M | Ctx | C | G3 | B | ||||
| MalHug [38] | 2024 | M | Sup | S | G4 | P | ||||
| Model substitution [42] | 2025 | M | API | P | G4 | O | ||||
| Hidden tokens [49] | 2026 | M | API | P | G4 G5 | P | ||||
| Iron [17] | 2022 | D | Srv | P | G1 G2 | O | Crypto | n/a | N | N |
| MPCFormer [107] | 2023 | D | Srv | P | G1 G2 | O | Crypto | n/a | N | N |
| BOLT [108] | 2024 | D | Srv | P | G1 G2 | O | Crypto | n/a | N | N |
| H100 confidential computing [19] | 2024 | D | Srv | P | G1 G2 | O | HW | n/a | N | Y |
| Instructional fingerprint [143] | 2024 | D | Sup | Q | G1 G6 | O | Stat | P | N | Y |
| Nimbus [110] | 2024 | D | Srv | P | G1 G2 | O | Crypto | n/a | N | N |
| SecFormer [109] | 2024 | D | Srv | P | G1 G2 | O | Crypto | n/a | N | N |
| TransLinkGuard [106] | 2024 | D | Srv | Q | G1 | O | HW | n/a | N | N |
| BumbleBee [112] | 2025 | D | Srv | P | G1 G2 | O | Crypto | n/a | N | Y |
| PUMA [18] | 2025 | D | Srv | P | G1 G2 | O | Crypto | n/a | N | Y |
| SHAFT [111] | 2025 | D | Srv | P | G1 G2 | O | Crypto | n/a | N | N |
| SANTEXT+ [121] | 2021 | D | API | P | G2 | O | DP | n/a | Y | N |
| DP fine-tuning [20] | 2022 | D | Sup | Q | G2 | O | DP | n/a | N | N |
| DP large-batch [117] | 2022 | D | Sup | Q | G2 | O | DP | n/a | N | N |
| CusText [122] | 2023 | D | API | P | G2 | O | DP | n/a | Y | N |
| DP-Forward [118] | 2023 | D | Sup API | Q P | G2 | O | DP | n/a | N | N |
| Hide-and-Seek [124] | 2023 | D | API | P | G2 | P | Emp | N | Y | Y |
| PromptPATE [120] | 2023 | D | Ctx | Q | G2 | P | DP | n/a | Y | Y |
| CoGenesis [125] | 2024 | D | API | P | G2 | B | Emp | N | Y | Y |
| DP-ICL [119] | 2024 | D | Ctx | Q | G2 | B | DP | n/a | Y | Y |
| InferDPT [123] | 2025 | D | API | P | G2 | B | DP | n/a | Y | Y |
| SafeKV [115] | 2025 | D | Srv | T | G2 | O | Emp | N | N | Y |
| CaMeL [23] | 2026 | D | Ctx | C | G2 G3 | P | Struct | P | Y | Y |
| KV-Cloak [116] | 2026 | D | Srv | P | G2 | O | Emp | N | N | Y |
| Baseline defenses [132] | 2023 | D | API | Q | G3 | O | Emp | Y | Y | Y |
| Llama Guard [21] | 2023 | D | Out | Q | G3 | O | Emp | N | Y | Y |
| Circuit Breakers [127] | 2024 | D | Sup | Q | G3 | O | Emp | Y | N | Y |
| Erase-and-Check [134] | 2024 | D | API | Q | G3 | O | Struct | P | Y | Y |
| Instruction hierarchy [55] | 2024 | D | Sup Ctx | C Q | G3 | P | Emp | N | N | Y |
| Jatmo [129] | 2024 | D | Sup Ctx | C | G3 | B | Emp | P | Y | Y |
| RAIN [131] | 2024 | D | Srv | Q | G3 | O | Emp | N | N | Y |
| SafeDecoding [130] | 2024 | D | Srv | Q | G3 | O | Emp | N | N | Y |
| Spotlighting [136] | 2024 | D | Ctx | C | G3 | P | Emp | N | Y | Y |
| Vaccine [126] | 2024 | D | Sup | F | G3 | O | Emp | N | N | Y |
| WildGuard [135] | 2024 | D | Out | Q | G3 | O | Emp | N | Y | Y |
| Constitutional Classifiers [22] | 2025 | D | Out | Q | G3 | P | Emp | Y | N | Y |
| DataSentinel [137] | 2025 | D | Ctx | C | G3 | O | Emp | Y | Y | Y |
| IsolateGPT [138] | 2025 | D | Ctx | C | G3 | P | Struct | N | Y | Y |
| Progent [139] | 2025 | D | Ctx | C | G3 | B | Struct | P | Y | Y |
| SecAlign [128] | 2025 | D | Sup Ctx | C | G3 | O | Emp | Y | N | Y |
| SmoothLLM [133] | 2025 | D | API | Q | G3 | B | Emp | P | Y | Y |
| StruQ [56] | 2025 | D | Sup Ctx | C | G3 | O | Emp | P | N | Y |
| RobustRAG [140] | 2026 | D | Ctx | C | G3 | O | Struct | P | Y | Y |
| zkLLM [113] | 2024 | D | Srv | P | G4 | O | Crypto | n/a | N | Y |
| Model equality testing [41] | 2025 | D | API | P | G4 | P | Stat | n/a | Y | Y |
| TOPLOC [57] | 2025 | D | Srv | P | G4 | O | Stat | n/a | N | Y |
| CoIn [114] | 2026 | D | API | P | G4 | O | Stat | n/a | N | Y |
| Green-list watermark [40] | 2023 | D | Out | Q | G6 | O | Stat | P | N | N |
| Distortion-free watermark [141] | 2024 | D | Out | Q | G6 | O | Stat | P | N | Y |
| SynthID-Text [142] | 2024 | D | Out | Q | G6 | P | Stat | P | N | Y |
T: type, Eval.: evaluation setting, Guar.: guarantee, Ad.: adaptive evaluation, Cl.: client-deployable, 7B: demonstrated at \ge7B. Values as defined in Table I.