AI Security in the Foundation Model Era: A Comprehensive Survey from a Unified Perspective
Organizations: Department of Computer Science, Institute of Artificial Intelligence, University of Central Florida · University of Copenhagen
Abstract
As machine learning (ML) systems expand in both scale and functionality, the security landscape has become increasingly complex, with a proliferation of attacks and defenses. However, existing studies largely treat these threats in isolation, lacking a coherent framework to expose their shared principles and interdependencies. This fragmented view hinders systematic understanding and limits the design of comprehensive defenses. Crucially, the two foundational assets of ML -- data and models -- are no longer independent; vulnerabilities in one directly compromise the other. The absence of a holistic framework leaves open questions about how these bidirectional risks propagate across the ML pipeline. To address this critical gap, we propose a unified closed-loop threat taxonomy that explicitly frames model-data interactions along four directional axes. Our framework offers a principled lens for analyzing and defending foundation models. The resulting four classes of security threats represent distinct but interrelated categories of attacks: (1) DataData (DD): including data decryption attacks and watermark removal attacks; (2) DataModel (DM): including poisoning, harmful fine-tuning attacks, and jailbreak attacks; (3) ModelData (MD): including model inversion, membership inference attacks, and training data extraction attacks; (4) ModelModel (MM): including model extraction attacks. Our unified framework elucidates the underlying connections among these security threats and establishes a foundation for developing scalable, transferable, and cross-modal security strategies, particularly within the landscape of foundation models.
Figures & tables
| Survey | Loop | FM | Scope and limitations | ||||
|---|---|---|---|---|---|---|---|
| Training data poisoning survey ( Tian et al., 2022 ) | data poisoning attack | ||||||
| Model inversion attack survey ( Fang et al., 2024 ) | model inversion attack | ||||||
| Membership inference attack survey ( Hu et al., 2022a ) | membership inference attack | ||||||
| Harmful fine-tuning attack ( Huang et al., 2024a ) | large language model harmful fine-tuning attack | ||||||
| Jailbreak attack ( Yi et al., 2024b ) | large language model jailbreak attack | ||||||
| Model extraction (stealing) survey ( Oliynyk et al., 2023 ) | Deep coverage of model extraction and Intellectual Property (IP) theft |
| Attack class | Threat-model assumptions | Attacker capabilities required | Typical success metrics | Computational cost |
|---|---|---|---|---|
| D D | Access to protected data or prompts; goal is to bypass ownership or safety constraints while preserving content or utility. | Ability to apply transformations to inputs (regeneration, rewriting, adversarial prompting, etc); usually no need for victim model weights. | Bypass success rate (e.g., decrypt success; watermark detection failure; jailbreak success), plus fidelity or utility preservation and downstream task performance. | Low to moderate computation cost: input transformation or rewriting; jailbreak often needs iterative prompt search; watermark removal may involve generative regeneration. |
| D M | Adversary can influence training or fine-tuning data to implant targeted misbehavior or erode alignment. | Inject or modify a subset of training samples to create malicious training data. | Attack success (attack success rate, targeted misclassification, backdoor trigger success); clean utility (clean accuracy, helpfulness); safety metrics (refusal rate drop, unsafe prompt completion rate). | Moderate to high computation cost: requires training or fine-tuning data modification by optimization. |
| M D | Adversary queries a trained model to recover memorized training information (samples, attributes or membership). | Black-box (query outputs) or white-box (gradients or representations) access; optimization over inputs or prompts. | Data reconstruction quality; membership information accuracy/AUC. | Often high computation cost: many queries and/or iterative optimization; generative extraction can require generative model training. |
| M M | Adversary aims to replicate a deployed proprietary model via queries (data-free/data-based/architecture cloning). | Query access to victim; ability to train surrogate; optionally synthesize queries through optimization or generative models; sometimes partial architecture knowledge. | Fidelity and utility of stolen model (accuracy, KL divergence of logit matching); query efficiency (e.g., number of queries). | High computation cost: dominated by query budget and surrogate training compute; adaptive query synthesis can reduce queries but adds generation cost. |
| Defense Method | Attack(s) Addressed | Effectiveness | Limitations |
|---|---|---|---|
| Data Sanitization | data poisoning attack, backdoor attack, harmful fine-tuning attack | Partially effective | Ineffective once a model is trained; vulnerable to adaptive or clean-label poisoning; may remove useful data and hurt utility |
| Defensive training | Adversarial attack, data poisoning attack, model inversion attack, model extraction attack and membership inference attack | Partially effective | High computational cost; limited scalability; may reduce accuracy on clean data |
| Watermarking | model extraction attack (ownership verification) | Detection-only (passive) | passive and cannot prevent model extraction from happening |
| Output perturbation | model extraction attack, membership inference attack | Partially effective | Degrades utility; vulnerable to adaptive attacks; costly at inference |
| Alignment fine-tuning | harmful fine-tuning attack, jailbreak attack | Partially effective | Vulnerable to prompt-based bypasses and adversarial fine-tuning; expensive and not robust under distribution shift |
| Detection | Adversarial attack, harmful fine-tuning attack, jailbreak attack, model extraction attack | not preventive | Reactive only; requires reliable detection signals |
| Attack | Privacy | Integrity | Availability |
|---|---|---|---|
| Adversarial examples | |||
| Data decryption attack | |||
| Watermark removal attack | |||
| Data poisoning | |||
| Harmful fine-tuning | |||
| Jailbreak |
| Attack Category | Training-time | Inference-time | Deployment-time |
| Adversarial examples | ✓ | ||
| Data decryption | ✓ | ||
| Watermark Removal | ✓ | ✓ | |
| Data poisoning | ✓ | ||
| Jailbreak | ✓ | ✓ | |
| Harmful fine-tuning | ✓ |
| Dataset | Methods | PSNR | SSIM | RMSE | RMSE w |
|---|---|---|---|---|---|
| LVW | U-Net ( Ronneberger et al., 2015 ) | 30.33 | 0.9517 | 7.11 | 42.18 |
| Attentive recurrent network ( Qian et al., 2018 ) | 39.92 | 0.9902 | 3.31 | 21.40 | |
| DHAN ( Cun et al., 2020 ) | 40.68 | 0.9949 | 2.62 | 17.29 | |
| cGAN-based ( Li et al., 2019 ) | 33.57 | 0.9690 | 5.84 | 34.71 | |
| VWGAN ( Cao et al., 2019 ) | 34.16 | 0.9714 | 5.51 | 33.42 | |
| WDNet ( Liu et al., 2021 ) | 42.45 | 0.9954 | 2.39 | 12.75 |
| Methods | Harmful Score | Fine-tune Accuracy | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| (n=1000) | clean | p=0.01 | p=0.05 | p=0.1 | p=0.2 | Avg. | clean | p=0.01 | p=0.05 | p=0.1 | p=0.2 | Avg. |
| Non-Aligned | 34.20 | 65.60 | 81.00 | 77.60 | 79.20 | 67.52 | 95.60 | 94.60 | 94.00 | 94.60 | 94.40 | 94.64 |
| SFT ( Li et al., 2023 ) | 48.60 | 49.80 | 52.60 | 55.20 | 60.00 | 53.24 | 94.20 | 94.40 | 94.80 | 94.40 | 94.20 | 94.40 |
| EWC ( Kirkpatrick et al., 2017 ) | 50.60 | 50.60 | 50.60 | 50.60 | 50.60 | 50.60 | 88.60 | 88.20 | 87.40 | 86.80 | 80.60 | 86.32 |
| VIguard ( Zong et al., ) | 49.40 | 50.00 | 54.00 | 54.40 | 53.60 | 60.20 | 94.80 | 94.80 | 94.60 | 94.60 | 94.60 | 94.68 |
| KL ( Huang et al., 2024c ) | 54.40 | 53.60 | 55.20 | 54.00 | 56.60 | 54.76 | 85.80 | 85.80 | 85.00 | 85.40 | 84.60 | 59.08 |
| LoRA Fine-tuning | RoleBench | Safety | Jailbreak | |||||
| RAW | SPE | AVG. | AdvBench | BeaverTails | HEx-PHI | AVG. | AVG. | |
| LLaMA-3-8B-Instruct | ||||||||
| LLaMA-3-8B-Instruct baseline | 23.86 | 19.14 | 21.50 | 98.46 | 91.40 | 95.33 | 95.06 | 78.80 |
| SFT ( Ouyang et al., 2022 ) | 30.42 | 24.82 | 27.62 | 87.75 | 78.77 | 83.43 | 83.32 | 73.26 |
| SPPFT ( Li et al., 2025b ) | 29.48 | 24.49 | 26.99 | 86.23 | 78.95 | 81.47 | 82.22 | 58.18 |
| SafeLoRA ( Hsu et al., 2024 ) | 29.64 | 23.84 | 26.74 | 88.75 | 80.88 | 85.17 | 84.93 | 72.28 |
| Method | Pythia | Falcon | LLaMA-2 |
|---|---|---|---|
| PPL ( Yeom et al., 2018 ) | 0.69 | 0.62 | 0.61 |
| Min-K% ( Shi et al., ) | 0.74 | 0.64 | 0.64 |
| Min-K%++ ( Zhang et al., 2025b ) | 0.66 | 0.74 | 0.57 |
| Zlib ( Carlini et al., 2021 ) | 0.72 | 0.64 | 0.63 |
| Lowercase ( Carlini et al., 2021 ) | 0.69 | 0.63 | 0.61 |
| Neighbor ( Mattern et al., 2023 ) | 0.66 | 0.59 | 0.61 |
| Query Method | Attack Method | None | RevSig | MAD | AM | Top-1 | Rounding | MGW | MGS | QUEEN |
|---|---|---|---|---|---|---|---|---|---|---|
| KnockoffNet | Naive Attack ( Truong et al., 2021 ) | 87.32% | 84.86% | 83.61% | 82.84% | 83.51% | 86.91% | 75.06% | 84.11% | 10.00% |
| Top-1 Attack ( Sanyal et al., 2022 ) | 83.51% | 83.51% | 83.51% | 80.30% | 83.51% | 83.51% | 83.51% | 83.51% | 81.17% | |
| S4L Attack ( Jagielski et al., 2020 ) | 85.99% | 82.04% | 80.72% | 81.86% | 83.72% | 85.49% | 71.23% | 82.80% | 10.00% | |
| Smoothing Attack ( Lukas et al., 2022 ) | 87.86% | 85.27% | 84.07% | 84.81% | 86.16% | 87.37% | 76.26% | 85.36% | 10.00% | |
| D-DAE ( Chen et al., 2023b ) | 87.32% | 85.62% | 84.82% | 77.30% | 84.81% | 86.96% | 63.79% | 84.97% | 78.21% | |
| D-DAE+ ( Chen et al., 2023b ) | 87.32% | 86.58% | 86.84% | 84.17% | 84.26% | 86.93% | 58.23% | 84.27% | 50.24% |
| Watermark | PSNR | SSIM | MS-SSIM | WM Succ. |
|---|---|---|---|---|
| DwtDct | 39.51 | 0.972 | 0.993 | 0.7815 |
| DwtDctSvd | 39.44 | 0.974 | 0.993 | 1.0 |
| RivaGAN | 41.22 | 0.963 | 0.992 | 0.6675 |
| Method | Attack | Bit Acc. | WM Succ. |
|---|---|---|---|
| DwtDct | cheng2020 | 0.4825 | 0.0000 |
| bmshj2018 | 0.4820 | 0.0000 | |
| jpeg | 0.5222 | 0.006 | |
| DwtDctSvd | cheng2020 | 0.4871 | 0.0005 |
| bmshj2018 | 0.4924 | 0.0000 | |
| jpeg | 0.6803 | 0.2475 |
| Test accuracy (Original training data) | Test accuracy (Poisoned training data) |
|---|---|
| 93.64% | 85.72% |
| Category | Victim model test accuracy (Teacher) | Clone model test accuracy (Student) |
|---|---|---|
| Soft label | 85.72% | 34.69% |
| Hard label | 85.72% | 36.32% |
| Teacher model test accuracy | Student model test accuracy |
|---|---|
| 36.32% | 20.18% |