[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-10-11。"],[[["\u003cp\u003eThis document outlines principles and recommendations for securing AI and ML deployments, aligning with the Google Cloud Well-Architected Framework's security pillar.\u003c/p\u003e\n"],["\u003cp\u003eAdopting a holistic security approach for AI and ML workloads is critical, encompassing design, development, deployment, and ongoing operations.\u003c/p\u003e\n"],["\u003cp\u003eProtecting data is paramount, requiring strict controls over data collection, storage, access, and movement to maintain security and compliance.\u003c/p\u003e\n"],["\u003cp\u003eSecuring AI pipelines and code is crucial to ensure the integrity of models and outputs, which includes secure coding practices and protecting model artifacts.\u003c/p\u003e\n"],["\u003cp\u003eMonitoring AI system inputs and outputs is vital for detecting malicious activities and maintaining the trustworthiness of AI applications, and requires implementing appropriate incident response procedures.\u003c/p\u003e\n"]]],[],null,["# AI and ML perspective: Security\n\nThis document in the\n[Well-Architected Framework: AI and ML perspective](/architecture/framework/perspectives/ai-ml)\nprovides an overview of principles and recommendations to ensure that your AI\nand ML deployments meet the security and compliance requirements of your\norganization. The recommendations in this document align with the\n[security pillar](/architecture/framework/security)\nof the Google Cloud Well-Architected Framework.\n\nSecure deployment of AI and ML workloads is a critical requirement,\nparticularly in enterprise environments. To meet this requirement, you need to\nadopt a holistic security approach that starts from the initial\nconceptualization of your AI and ML solutions and extends to development,\ndeployment, and ongoing operations. Google Cloud offers robust tools and\nservices that are designed to help secure your AI and ML workloads.\n\nDefine clear goals and requirements\n-----------------------------------\n\nIt's easier to integrate the required security and compliance controls early in\nyour design and development process, than to add the controls\nafter development. From the start of your design and development process, make\ndecisions that are appropriate for your specific risk environment and\nyour specific business priorities.\n\nConsider the following recommendations:\n\n- Identify potential attack vectors and adopt a security and compliance perspective from the start. As you design and evolve your AI systems, keep track of the [attack surface](https://en.wikipedia.org/wiki/Attack_surface), potential risks, and obligations that you might face.\n- Align your AI and ML security efforts with your business goals and ensure that security is an integral part of your overall strategy. Understand the effects of your security choices on your main business goals.\n\nKeep data secure and prevent loss or mishandling\n------------------------------------------------\n\nData is a valuable and sensitive asset that must be kept secure. Data security\nhelps you to maintain user trust, support your business objectives, and meet\nyour compliance requirements.\n\nConsider the following recommendations:\n\n- Don't collect, keep, or use data that's not strictly necessary for your business goals. If possible, use synthetic or fully anonymized data.\n- Monitor data collection, storage, and transformation. Maintain logs for all data access and manipulation activities. The logs help you to audit data access, detect unauthorized access attempts, and prevent unwanted access.\n- Implement different levels of access (for example, no-access, read-only, or write) based on user roles. Ensure that permissions are assigned based on the [principle of least privilege](/iam/docs/using-iam-securely#least_privilege). Users must have only the minimum permissions that are necessary to let them perform their role activities.\n- Implement measures like encryption, secure perimeters, and restrictions on data movement. These measures help you to prevent data exfiltration and data loss.\n- Guard against data poisoning for your ML training systems.\n\nKeep AI pipelines secure and robust against tampering\n-----------------------------------------------------\n\nYour AI and ML code and the code-defined pipelines are critical assets. Code\nthat isn't secured can be tampered with, which can lead to data leaks,\ncompliance failure, and disruption of critical business activities. Keeping your\nAI and ML code secure helps to ensure the integrity and value of your models and\nmodel outputs.\n\nConsider the following recommendations:\n\n- Use secure coding practices, such as dependency management or input validation and sanitization, during model development to prevent vulnerabilities.\n- Protect your pipeline code and your model artifacts, like files, model weights, and deployment specifications, from unauthorized access. Implement different access levels for each artifact based on user roles and needs.\n- Enforce lineage and tracking of your assets and pipeline runs. This enforcement helps you to meet compliance requirements and to avoid compromising production systems.\n\nDeploy on secure systems with secure tools and artifacts\n--------------------------------------------------------\n\nEnsure that your code and models run in a secure environment that has a robust\naccess control system with security assurances for the tools and artifacts that\nare deployed in the environment.\n\nConsider the following recommendations:\n\n- Train and deploy your models in a secure environment that has appropriate access controls and protection against unauthorized use or manipulation.\n- Follow standard [Supply-chain Levels for Software Artifacts (SLSA)](https://slsa.dev) guidelines for your AI-specific artifacts, like models and software packages.\n- Prefer using validated prebuilt container images that are specifically designed for AI workloads.\n\nProtect and monitor inputs\n--------------------------\n\nAI systems need inputs to make predictions, generate content, or automate\nactions. Some inputs might pose risks or be used as attack vectors that must be\ndetected and sanitized. Detecting potential malicious inputs early helps you to\nkeep your AI systems secure and operating as intended.\n\nConsider the following recommendations:\n\n- Implement secure practices to develop and manage prompts for generative AI systems, and ensure that the prompts are screened for harmful intent.\n- Monitor inputs to predictive or generative systems to prevent issues like overloaded endpoints or prompts that the systems aren't designed to handle.\n- Ensure that only the intended users of a deployed system can use it.\n\nMonitor, evaluate, and prepare to respond to outputs\n----------------------------------------------------\n\nAI systems deliver value because they produce outputs that augment, optimize,\nor automate human decision-making. To maintain the integrity and trustworthiness\nof your AI systems and applications, you need to make sure that the outputs are\nsecure and within expected parameters. You also need a plan to respond to\nincidents.\n\nConsider the following recommendations:\n\n- Monitor the outputs of your AI and ML models in production, and identify any performance, security, and compliance issues.\n- Evaluate model performance by implementing robust metrics and security measures, like identifying out-of-scope generative responses or extreme outputs in predictive models. Collect user feedback on model performance.\n- Implement robust alerting and incident response procedures to address any potential issues.\n\nContributors\n------------\n\nAuthors:\n\n- [Kamilla Kurta](https://www.linkedin.com/in/kamillakurta) \\| GenAI/ML Specialist Customer Engineer\n- [Filipe Gracio, PhD](https://www.linkedin.com/in/filipegracio) \\| Customer Engineer, AI/ML Specialist\n- [Mohamed Fawzi](https://www.linkedin.com/in/fawzii) \\| Benelux Security and Compliance Lead\n\n\u003cbr /\u003e\n\nOther contributors:\n\n- [Daniel Lees](https://www.linkedin.com/in/daniellees) \\| Cloud Security Architect\n- [Kumar Dhanagopal](https://www.linkedin.com/in/kumardhanagopal) \\| Cross-Product Solution Developer\n- [Marwan Al Shawi](https://www.linkedin.com/in/marwanalshawi) \\| Partner Customer Engineer\n- [Wade Holmes](https://www.linkedin.com/in/wholmes) \\| Global Solutions Director\n\n\u003cbr /\u003e"]]