AI 和机器学习道德与安全
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
机器学习有可能以许多有意义的方式(正面或负面)改变社会。请务必考虑模型及其所属系统的道德影响。
您的机器学习项目应造福于社会。
这些内容不应造成伤害或容易被滥用。
不得助长、强化或加剧偏见或成见。
不得无责任地收集或使用个人数据。
Google 的 AI 原则
Google 提倡开发遵循 Responsible AI 原则的机器学习和 AI 应用。
除了遵循 Responsible AI 原则之外,还应致力于开发包含以下各项的系统:
公平性
避免造成或加深不公平的偏见。如果模型的训练数据具有以下某些特征,则会出现偏差:
上述示例只是模型产生偏差的一些方式。彻底了解数据对于发现和解决其中的任何潜在偏差至关重要。开发公平模型的第一步是验证训练数据是否准确反映了用户的分布情况。以下是进一步的做法,有助于创建公平的模型:
找出评估数据集中代表性不足的群体,或与其他群体相比可能获得较差模型质量的群体。您可能需要对部分用户进行过采样,以增加他们在训练数据中的比例。
使用黄金数据集(也称为基准数据集)来验证模型是否存在公平性问题,并检测隐性偏差。
避免在数据集中包含敏感特征,例如性别或种族。
避免添加具有较低实证或解释力的特征,尤其是在敏感情境中,因为训练好的模型会用于在医疗保健、金融、教育、就业等领域执行影响深远的任务。例如,在用于批准住房贷款的模型中,请勿在训练数据中添加姓名。申请人的姓名不仅与预测任务无关,而且在数据集中保留此类无关特征也可能会造成隐性偏见或分配性伤害。例如,该模型可能会将男性姓名与更高的还款概率相关联,反之亦然。
衡量模型预测结果对特定群体可能产生的潜在负面影响,如果您发现在敏感情境中存在负面影响,请考虑使用有意偏差校正技术。
隐私权
从一开始就遵循隐私保护设计原则。
以下是需要了解并遵守的与隐私权相关的法律和政策:
此外,请务必从数据集中移除所有个人身份信息 (PII),并确认您的模型和数据仓库设置了正确的权限,例如不允许世界读取。
透明度
对用户负责。例如,让其他人能够轻松了解您的模型的用途、运作方式和运作原因。
模型卡片
提供了一个模板,用于记录模型并创建透明度工件。
安全
设计模型,使其能够在对抗性条件下安全运行。例如,使用潜在的恶意输入来测试模型,以确认模型是否安全。此外,请检查是否存在潜在的失败情况。团队通常使用专门设计的数据集,通过过去导致模型失败的输入或条件来测试模型。
检查您的理解情况
您正在开发一个模型,以便快速批准汽车贷款。您应考虑哪些伦理问题?
模型是否会助长现有的偏见或刻板印象?
正确。模型应使用经过检查以排除潜在隐性偏见或偏见的高质量数据集进行训练。
始终考虑模型所处的更广泛的社会背景。请努力确保您在处理敏感数据时不会侵犯隐私、助长偏见或侵犯他人的知识产权。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[[["\u003cp\u003eML models should benefit society and avoid causing harm, bias, or misuse of personal data.\u003c/p\u003e\n"],["\u003cp\u003eGoogle's AI principles emphasize fairness, privacy, transparency, and safety in ML development.\u003c/p\u003e\n"],["\u003cp\u003eFairness in models requires addressing potential biases in training data and ensuring equitable outcomes for all user groups.\u003c/p\u003e\n"],["\u003cp\u003ePrivacy considerations involve adhering to relevant regulations, protecting personal data, and ensuring secure data handling practices.\u003c/p\u003e\n"],["\u003cp\u003eTransparency and safety involve making model functionality understandable, documenting model details, and designing models to operate securely and reliably.\u003c/p\u003e\n"]]],[],null,["# AI and ML ethics and safety\n\nML has the potential to transform society in many meaningful ways,\neither positively or negatively. It's critical to consider the ethical\nimplications of your models and the systems they're a part of.\nYour ML projects should benefit society. They shouldn't cause harm or be susceptible to misuse. They shouldn't perpetuate, reinforce, or exacerbate biases or prejudices. They shouldn't collect or use personal data irresponsibly.\n\n\u003cbr /\u003e\n\nGoogle's AI principles\n----------------------\n\nGoogle advocates developing ML and AI applications that adhere to its\n[Responsible AI principles](https://ai.google/responsibility/principles/).\n\nBeyond adhering to responsible AI principles, aim to develop systems\nthat incorporate the following:\n\n- Fairness\n- Privacy\n- Transparency\n- Safety\n\n### Fairness\n\nAvoid creating or reinforcing unfair\n[bias](/machine-learning/glossary#bias-ethicsfairness).\nModels exhibit bias when their\ntraining data has some of the following characteristics:\n\n- Doesn't reflect the real-world population of\n their users.\n\n- Preserves biased decisions or outcomes, for example, criminal justice\n decisions like incarceration times.\n\n- Uses features with more predictive power for certain groups of users.\n\nThe previous examples are just some ways models become biased. Understanding\nyour data thoroughly is critical for uncovering and resolving any potential\nbiases it contains. The first step for developing fair models is verifying the\ntraining data accurately reflects the distribution of your users. The following\nare further practices to help create fair models:\n\n- Identify underrepresented groups in evaluation datasets or groups that might\n experience worse model quality compared to other groups. You might need to\n oversample a subgroup of your users to increase their presence in the\n training data.\n\n- Use\n [golden datasets](https://developers.google.com/machine-learning/glossary#golden-dataset)\n (also known as benchmark datasets) to validate the model against fairness\n issues and detect implicit bias.\n\n- Avoid including sensitive features in datasets, like gender or ethnicity.\n\n- Avoid including features with little empirical or explanatory power, but\n especially in sensitive contexts where the trained model is used to perform\n high-impact tasks in areas such as healthcare, finance, education,\n employment, and so forth. For example, in a model for approving home loans,\n don't include names in the training data. Not only is an applicant's name\n irrelevant to the prediction task, but leaving such an irrelevant feature\n in the dataset also has the potential to create implicit bias or\n allocative harms. For instance, the model might correlate male names with\n a higher probability for repayment, or vice versa.\n\n- Measure potential adverse impact a model's predictions might have on\n particular groups, and consider intentional bias correction techniques if\n you find adverse impact in a sensitive context.\n\n### Privacy\n\nIncorporate privacy design principles from the beginning.\n\nThe following are privacy related laws and policies to be aware of and\nadhere to:\n\n- [European Union's Digital Markets Act (DMA)](https://wikipedia.org/wiki/Digital_Markets_Act)\n for consent to share or use personal data.\n\n- [European Union GDPR](https://wikipedia.org/wiki/General_Data_Protection_Regulation) laws.\n\nMoreover, be sure to remove all personally identifiable information (PII) from\ndatasets and confirm your model and data repositories are set up with the right\npermissions, for example, not world-readable.\n\n\n### Transparency\n\nBe accountable to people. For example, make it easy for others to\nunderstand what your model does, how it does it, and why it does it.\n\n[Model cards](https://modelcards.withgoogle.com/face-detection)\n\nprovide a template to document your model and create transparency artifacts.\n\n### Safety\n\nDesign models to operate safely in adversarial conditions. For example, test\nyour model with potential hostile inputs to confirm your model is secure.\nFurthermore, check for potential failure conditions. Teams typically use\nspecially designed datasets to test their models with inputs or conditions that\ncaused the model to fail in the past.\n\n### Check Your Understanding\n\nYou're developing a model to quickly approve auto loans. What ethical implications should you consider? \nDoes the model perpetuate existing biases or stereotypes? \nCorrect. Models should be trained on high-quality datasets that have been inspected for potential implicit biases or prejudices. \nDoes the model serve predictions with low-enough latency? \nCan the model be deployed to devices, like phones? \n\nAlways consider the broader social contexts your models operate within. Work to\nbe sure your handling of sensitive data doesn't violate privacy issues,\nperpetuate bias, or infringe on someone else's intellectual property."]]