En este modulo
From principles to processes
AI ethics has an operationalisation problem. All organizations subscribe to principles such as "fairness", "transparency", "non-discrimination" and "respect for human autonomy". Few have concrete processes to verify that their AI systems comply with those principles in practice.
Ethical principles without processes are statements of intent. Ethical processes without metrics are bureaucracy. This module focuses on the hard part: turning abstract principles into operational procedures, with measurable indicators and assigned responsibilities.
The problem of "ethics washing"
Publishing a document of "AI ethical principles" without implementation and verification mechanisms is ethics washing. It is the equivalent of having a privacy policy that nobody reads or follows. Regulators, sophisticated customers and the media have learned to distinguish between declared principles and actual practices.
The question is not "do we have ethical principles?". The question is: "what happens when an AI system violates one of our ethical principles? Who detects it? How is it escalated? What are the consequences?"
Ethics as a business requirement
AI ethics is not a regulatory cost. It is a market requirement. CISOs and DPOs of regulated enterprises (banking, insurance, healthcare) demand evidence of ethical AI practices from their vendors as part of the due diligence process. Having an operational AI ethics programme is a competitive advantage in B2B sales.
Reference ethical frameworks
You do not need to invent an ethical framework from scratch. Established references exist that you can adopt and adapt:
Ethics Guidelines for Trustworthy AI (HLEG, 2019)
The EU High-Level Expert Group established 7 key requirements:
- Human agency and oversight: AI systems should support human autonomy and decision-making.
- Technical robustness and safety: systems must be resilient, secure and accurate.
- Privacy and data governance: protection of personal data and data quality.
- Transparency: traceability, explainability and open communication.
- Diversity, non-discrimination and fairness: avoiding unfair bias, accessibility, stakeholder participation.
- Societal and environmental well-being: sustainability, positive social impact.
- Accountability: auditability, minimisation of negative impacts, redress mechanisms.
ALTAI (Assessment List for Trustworthy AI)
The HLEG's practical tool. A self-assessment questionnaire with over 130 questions organized according to the 7 requirements. Not legally binding but the most concrete reference for a systematic ethical self-assessment.
OECD AI Principles
Five complementary principles adopted by more than 40 countries: inclusive growth and well-being, human-centred values and fairness, transparency and explainability, robustness and safety, accountability.
UNESCO Recommendation on AI Ethics (2021)
The first global normative instrument on AI ethics. Adopted by 193 countries. Emphasis on proportionality, safety, fairness, sustainability, right to privacy, human oversight and decision-making, transparency and explainability, responsibility and accountability, awareness and literacy, and multi-stakeholder and adaptive governance.
Ethical impact assessment (EIA)
The ethical impact assessment is the systematic process for identifying, analysing and mitigating the ethical risks of an AI system before deployment. It is not the same as the GDPR DPIA or the AI Act FRIA, although it shares elements with both.
When to conduct an EIA
- Before acquiring or developing a new AI system.
- Before a substantial modification to an existing system.
- When an unintended use of an existing system is identified.
- After an ethical incident (detected bias, discrimination complaint, negative public reaction).
- Periodically (at least annually) for high-risk or high-impact systems.
EIA structure
Phase 1: Context and scope
Define the system being assessed, its purpose, affected groups, usage context and relevant ethical principles. Identify internal and external stakeholders who should participate in the assessment.
Phase 2: Ethical risk identification
Systematically, for each relevant ethical principle, identify potential negative impacts. Use techniques such as structured brainstorming, scenario analysis, literature reviews and consultations with affected stakeholders.
Phase 3: Analysis and prioritisation
For each identified risk, assess likelihood and impact. Ethical impact has dimensions beyond economic harm: human dignity, autonomy, equity, public trust. Prioritise risks using a severity/likelihood matrix adapted to the ethical context.
Phase 4: Mitigation measures
For each prioritised risk, define concrete measures. Measures must be specific (what), assigned (who), planned (when), measurable (how it is verified) and reviewable (when it is reassessed).
Phase 5: Monitoring and accountability
Establish continuous monitoring mechanisms: indicators, periodic audits, reporting channels, ethics committee review. The EIA is not a static document: it is a living process that is updated with operational experience.
Algorithmic bias: types, detection and mitigation
Algorithmic bias is arguably the most concrete and measurable ethical risk. Understanding its types and knowing how to detect it is a core competency for any AI governance professional.
Types of bias
- Historical bias: training data reflects existing social inequalities. Example: if historically more men were hired for tech roles, a model trained on that data will reproduce the preference.
- Representation bias: certain groups are under or over-represented in the training data. Example: a facial recognition model trained predominantly on Caucasian faces has higher error rates for other ethnicities.
- Measurement bias: variables used as proxies measure different things for different groups. Example: postal code as a proxy for "credit risk" may encode racial or socioeconomic discrimination.
- Aggregation bias: a single model for heterogeneous populations ignores relevant differences between subgroups. Example: a medical model that works well on average but fails for women or for persons over 65.
- Deployment bias: the model is used in a different context than intended, where biases have different consequences. Example: a risk model designed for one country is applied in another with different social dynamics.
Detection techniques
- Disparate impact analysis: compare positive/negative outcome rates between protected groups. The EEOC four-fifths (80%) rule is a reference: if a group has a selection rate below 80% of the majority group, there is prima facie evidence of disparity.
- Equalized odds: verify that true positive and false positive rates are similar across groups.
- Demographic parity: verify that the probability of a positive outcome is independent of the protected group.
- Individual fairness: similar persons should receive similar outcomes (requires defining "similarity" in a non-trivial way).
- Counterfactual fairness: would the decision be the same if the individual belonged to a different group?
Mitigation strategies
- Pre-processing: rebalance training data, remove proxies for protected attributes, apply resampling techniques.
- In-processing: incorporate fairness constraints in the model's objective function during training.
- Post-processing: adjust decision thresholds per group to equalise outcomes. Easier to implement but may reduce overall accuracy.
- Continuous monitoring: mitigating bias during development is not enough. It must be monitored in production, because data distribution can change (data drift) and new biases can emerge.
There is no universal "fairness"
The different fairness metrics are mathematically incompatible with each other (Chouldechova/Kleinberg impossibility theorem). You cannot have demographic parity, equalized odds and individual fairness simultaneously except in trivial cases. The choice of which metric to prioritise is an ethical and business decision that must be documented and explicitly justified.
Fairness audits
A fairness audit is a systematic assessment of an AI system to verify that it does not produce discriminatory outcomes. Unlike bias detection (which is technical), the fairness audit includes an organisational and governance dimension.
Fairness audit protocol
Step 1: Define scope and criteria
Which system is audited. Which protected groups are evaluated (gender, age, ethnic origin, disability, etc.). Which fairness metrics are applied and why. Which thresholds are considered acceptable.
Step 2: Collect data
Obtain training data, test data and, if possible, production data. Obtain the system's predictions/decisions broken down by protected groups. Verify the quality and completeness of demographic data.
Step 3: Quantitative analysis
Calculate the fairness metrics defined in step 1. Compare results across groups. Identify significant disparities. Analyse whether disparities are justifiable by legitimate factors.
Step 4: Qualitative analysis
Review individual cases where the system produced questionable outcomes. Assess whether the system's explanations are comprehensible and reasonable. Consult with representatives of affected groups about their perception of the system's fairness.
Step 5: Report and recommendations
Document findings, include quantitative and qualitative data, prioritise risks, propose corrective actions with deadlines and responsible parties. The report must be comprehensible to management (not only to technical staff).
Step 6: Follow-up
Verify implementation of corrective actions. Schedule the next audit. Establish continuous monitoring mechanisms between audits.
Explainability and interpretability
Explainability is the ability to make AI system decisions understandable to the persons affected. It is both an ethical and a legal requirement (Art. 13 AI Act, Arts. 13-14 and 22(3) GDPR).
Levels of explainability
- Global explainability: understanding how the model works in general. What factors it considers, what weight it assigns them, what patterns it detects.
- Local explainability: understanding why the model made a specific decision for a specific individual. "Your credit was denied because your debt-to-income ratio exceeds threshold X and your payment history shows 3 incidents in the last 12 months."
Explainability techniques
- SHAP (SHapley Additive exPlanations): calculates the contribution of each variable to the individual prediction. Based on cooperative game theory.
- LIME (Local Interpretable Model-agnostic Explanations): creates a simple local model that approximates the complex model's behavior around a specific prediction.
- Counterfactual explanations: "the decision would have been different if [variable X] had been [value Y]". Intuitive for the data subject but computationally expensive.
- Feature importance: ranking of the most influential variables in the decision. Simpler, less precise.
Proportional explainability
Not all systems need the same level of explainability. A spam filter needs less explainability than a credit scoring system. Proportionality depends on the impact of the decision on the affected person, the existence of alternatives (can the data subject appeal?), the regulatory context and the reasonable expectations of stakeholders.
Stakeholder engagement
AI ethics cannot be decided exclusively by technicians or lawyers. Affected stakeholders must participate in defining what is "fair" and "acceptable" in their context.
Stakeholder identification
- Directly affected: persons whose decisions are influenced by the system (candidates, customers, patients, students).
- Indirectly affected: family members, communities, competitors.
- Operators: persons who oversee and use the system.
- Regulators: supervisory authorities.
- Civil society: rights organisations, consumers, academics.
Participation mechanisms
- Public consultations before the deployment of high-impact systems.
- User panels that evaluate the experience with the system.
- Accessible and non-dissuasive feedback channels.
- Inclusion of representatives from vulnerable groups in ethics committees.
- Publication of transparency reports with disaggregated performance data.
Ethics by design: methodology
Ethics by design integrates ethical reflection into every phase of the AI system lifecycle, instead of treating it as a post-development final review.
Conception phase
Before starting development: preliminary ethical impact assessment, definition of applicable ethical principles, stakeholder identification, establishment of fairness criteria, definition of explainability requirements.
Design phase
During design: data selection with representativeness criteria, choice of algorithms with adequate interpretability properties, definition of human oversight mechanisms, user interface design with transparency information.
Development phase
During construction: fairness testing with predefined metrics, documentation of design decisions with ethical justification, code reviews focused on bias, testing with adversarial data and edge cases.
Deployment phase
Before and during launch: pre-deployment fairness audit, training of operators on ethical aspects, configuration of continuous fairness metric monitoring, activation of feedback channels.
Operation phase
During production use: continuous bias and fairness monitoring, complaints and grievance management, periodic audits, EIA updates, transparent communication of results.
Ejercicio practico
- Select an AI system from your organization (or use this example: AI system that prioritises patients in the emergency department based on automated triage).
- Identify the relevant ethical principles from the HLEG's 7 requirements that apply to this system.
- Identify at least 3 types of potential bias in the system and explain how they could manifest.
- Select 2 appropriate fairness metrics for this system. Justify why those and not others.
- Design a 5-step fairness audit protocol adapted to this system, including the protected groups to evaluate.
- Identify the 5 most relevant stakeholders and propose a participation mechanism for each one.
Output: a complete fairness audit protocol and a stakeholder engagement plan for a critical AI system.
Puntos clave
Puntos clave from TG04
- Ethical principles without operational processes are ethics washing. You need ethical impact assessments, fairness audits and concrete accountability mechanisms.
- Algorithmic bias has at least 5 types (historical, representation, measurement, aggregation, deployment). Each type requires different detection and mitigation strategies.
- Fairness metrics are mathematically incompatible with each other. The choice of metric is an ethical and business decision that must be explicitly documented.
- Explainability must be proportional to impact. A credit score needs more explainability than a spam filter. Techniques like SHAP, LIME and counterfactuals are concrete tools.
- Ethics by design integrates ethical reflection into every lifecycle phase, not only at the end. It is more effective and cheaper than remediating ethical problems post-deployment.
Guia de estudio — Conceptos clave de TG04
De principios a procesos
- Etica como requisito de negocio: La etica de la IA no es un coste regulatorio. Es un requisito de mercado. Los CISOs y DPOs de empresas reguladas (banca, seguros, sanidad) exigen a sus proveedores evidencia de practicas eticas de IA como parte del proceso de due diligence. Tener un programa de etica de IA operativo es una ventaja competitiva en ventas B2B.
Marcos eticos de referencia
- Agencia y supervision humanas:los sistemas de IA deben apoyar la autonomia y la toma de decisiones humanas.
- Solidez tecnica y seguridad:los sistemas deben ser resilientes, seguros y precisos.
- Privacidad y gobernanza de datos:proteccion de datos personales y calidad de los datos.
- Transparencia:trazabilidad, explicabilidad y comunicacion abierta.
- Diversidad, no discriminacion y equidad:evitar sesgos injustos, accesibilidad, participacion de stakeholders.
- Bienestar social y medioambiental:sostenibilidad, impacto social positivo.
Evaluacion de impacto etico (EIA)
- Antes de adquirir o desarrollar un nuevo sistema de IA.
- Antes de una modificacion sustancial de un sistema existente.
- Cuando se identifica un uso no previsto de un sistema existente.
- Despues de un incidente etico (sesgo detectado, queja de discriminacion, reaccion publica negativa).
- Periodicamente (al menos anualmente) para sistemas de alto riesgo o alto impacto.
Sesgo algoritmico: tipos, deteccion y mitigacion
- Sesgo historico:los datos de entrenamiento reflejan desigualdades sociales existentes. Ejemplo: si historicamente se contrataron mas hombres para roles tecnicos, un modelo entrenado con esos datos reproducira la preferencia.
- Sesgo de representacion:ciertos grupos estan infra o sobre representados en los datos de entrenamiento. Ejemplo: un modelo de reconocimiento facial entrenado predominantemente con rostros caucasicos tiene mayor tasa de error con otras etnias.
- Sesgo de medicion:las variables usadas como proxies miden cosas diferentes para diferentes grupos. Ejemplo: el codigo postal como proxy de "riesgo crediticio" puede codificar discriminacion racial o socioeconomica.
- Sesgo de agregacion:un modelo unico para poblaciones heterogeneas ignora diferencias relevantes entre subgrupos. Ejemplo: un modelo medico que funciona bien en promedio pero falla para mujeres o para personas mayores de 65 anos.
- Sesgo de despliegue:el modelo se usa en un contexto diferente al previsto, donde los sesgos tienen consecuencias distintas. Ejemplo: un modelo de riesgo disenado para un pais se aplica en otro con dinamicas sociales diferentes.
- Analisis de disparidad de impacto:comparar las tasas de resultados positivos/negativos entre grupos protegidos. La regla de los 4/5 (80%) del EEOC es una referencia: si un grupo tiene una tasa de seleccion inferior al 80% de la del grupo mayoritario, hay evidencia prima facie de disparidad.
Explicabilidad e interpretabilidad
- Explicabilidad global:comprender como funciona el modelo en general. Que factores considera, que peso les da, que patrones detecta.
- Explicabilidad local:comprender por que el modelo tomo una decision concreta para un individuo especifico. "Se te denego el credito porque tu ratio deuda/ingresos excede el umbral X y tu historial de pagos presenta 3 incidencias en los ultimos 12 meses."
- SHAP (SHapley Additive exPlanations):calcula la contribucion de cada variable a la prediccion individual. Basada en la teoria de juegos cooperativos.
- LIME (Local Interpretable Model-agnostic Explanations):crea un modelo simple local que aproxima el comportamiento del modelo complejo alrededor de una prediccion concreta.
- Counterfactual explanations:"la decision habria sido diferente si [variable X] hubiera sido [valor Y]". Intuitivas para el interesado pero computacionalmente costosas.
- Feature importance:ranking de las variables mas influyentes en la decision. Mas sencillo, menos preciso.
Engagement de stakeholders
- Directamente afectados:personas cuyas decisiones son influidas por el sistema (candidatos, clientes, pacientes, estudiantes).
- Indirectamente afectados:familiares, comunidades, competidores.
- Operadores:personas que supervisan y utilizan el sistema.
- Reguladores:autoridades de supervision.
- Sociedad civil:organizaciones de derechos, consumidores, academicos.
- Consultas publicas antes del despliegue de sistemas de alto impacto.
Siguiente: TG05 - Organisational AI Governance
With the ethical and legal foundations in place, the next step is to build the governance structure: AI committee, policies, roles, approval processes and maturity models.
Ir al modulo TG05