From Models to Services: Systematizing Security Assurance for Model-as-a-Service
Organizations: School of Software and Microelectronics, Peking University, Beijing, China · National Engineering Research Center for Software Engineering, Peking University, Beijing, China · Beijing Key Laboratory of Data Intelligence and Security (Peking University), Beijing, China · School of Computer Science, 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.
Figures & tables
| 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 | query-only user, customization user, content injector, side-channel observer, provider or intermediary, 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) |
| Class | Who | Access | Crosses | Typical aim |
|---|---|---|---|---|
| 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 | |
| Customization user | Upload of fine-tuning data through the provider’s API | TB1 | Remove alignment, implant behavior | |
| 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 | |
| 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 | |
| Provider or intermediary | Full view of prompts, outputs, and serving configuration | TB4 | Read customer data, substitute models, misreport usage | |
| Supply-chain attacker | Control of training data, checkpoints, adapters, or loaders | TB5 | Backdoor the model, compromise the host |
| 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 | Log-probabilities | TB1 | ● | [ 10 , 58 ] | |
| Functional imitation | G1 | Text | TB1 | ● | [ 59 , 60 , 61 ] | |
| System-prompt extraction | G1 | Text | TB1, TB3 | ● | [ 62 , 63 , 64 , 65 ] | |
| Model fingerprinting | G1 | Text | TB1 | ● | [ 66 ] | |
| Training-data extraction | G2 | Text | TB1 | ● | [ 67 , 68 , 11 ] | |
| Membership inference | G2 | Log-probabilities | TB1 | ○ | [ 69 , 70 , 71 , 72 , 73 ] |
| Mechanism | Adv. | Guar. | Client | 7B | Prod. | Adapt. |
|---|---|---|---|---|---|---|
| Hardware isolation | ||||||
| H100 confidential computing [ 19 ] | HW | ○ | ● | ○ | n/a | |
| TransLinkGuard [ 106 ] | HW | ○ | ○ | ○ | n/a | |
| Cryptographic inference | ||||||
| Iron [ 17 ] | Crypto | ○ | ○ | ○ | n/a | |
| MPCFormer [ 107 ] | Crypto | ○ | ○ | ○ | n/a | |
| 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 [ 159 , 31 ] | ◐ | ● | ● | ◐ | ○ | ● |
| ISO/IEC 42001 [ 160 ] | ◐ | ◐ | ◐ | ◐ | ◐ | ● |
| EU AI Act [ 34 ] | ◐ | ◐ | ◐ | ◐ | ○ | ● |
| 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] | ○ | ◐ | ○ | ◐ | ◐ | ○ |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| 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 |
LLM Security
Large language model (LLM) security studies attacks, privacy risks, and defenses across model training, inference, and deployment.
See all 352 papers