AI literacy basics
Bias, Privacy, Security, and Safety
Build a beginner framework for identifying harmful bias, privacy exposure, security threats, safety failures, and accountability gaps across an AI lifecycle.
By the end you can
- Distinguish fairness, privacy, security, safety, and accountability concerns
- Recognize systemic, statistical, and human sources of bias
- Trace risk across data, model, product controls, and context of use
- Prioritize mitigations according to affected people, severity, likelihood, and reversibility
Visual
Risk can enter before, inside, around, and after the model
A risk review should follow the system lifecycle. Focusing only on training data or model architecture misses many ways harm can arise.
Problem and institution
The chosen objective, existing policy, power relationships, and access conditions shape who benefits and who bears risk.
Data and measurement
Sampling, labels, proxies, sensors, missingness, consent, and historical records influence what the model can learn.
Model and evaluation
Optimization, representation, thresholds, robustness, and test coverage affect error patterns and uncertainty.
Product and operations
Permissions, interfaces, human review, logging, monitoring, and incident response shape exposure and recovery.
Deployment context
Scale, incentives, geography, culture, affected groups, and downstream uses determine real impact.
A technically improved model cannot repair an unjust objective or an inaccessible appeal process by itself.
Bias is broader than a skewed dataset
Systemic bias arises from institutions, policies, and historical patterns that shape opportunities and records. Statistical or computational bias arises from sampling, measurement, modeling, or evaluation choices. Human cognitive bias influences framing, annotation, interpretation, and use.
These sources interact. A dataset can accurately reflect an unfair process, and a model can reproduce that process without a coding bug.
A dated example makes the mechanism concrete. Ziad Obermeyer, Brian Powers, Christine Vogeli and Sendhil Mullainathan published in Science on 25 October 2019. They dissected a commercial risk-prediction algorithm of a kind applied, by industry estimates, to roughly 200 million people in the United States each year. It ranked patients for extra care by predicting future health care costs. That is a convenient stand-in for future health needs. It specifically excluded race as an input. Less is spent on Black patients at the same level of illness, so patients holding the same score were not equally sick. At the 97th percentile, where enrolment in the program is automatic, Black patients carried 26.3% more chronic illnesses than White patients. That is 4.8 against 3.8 distinct conditions. Changing that one label would have raised the share of Black patients auto-identified for additional help from 17.7% to 46.5%. The paper names the failure: “the choice of convenient, seemingly effective proxies for ground truth can be an important source of algorithmic bias in many contexts.”
Accuracy to historical data is not the same achievement as fairness to people.
Comparison
Five questions, five different lenses
The lenses overlap, but each directs attention to a different kind of failure and remedy.
Two of the sub-points below have published numbers behind them. On privacy: Latanya Sweeney estimated from 1990 census data that 87% of the United States population was uniquely identifiable. Those 216 million people out of 248 million carried a combination of {5-digit ZIP code, gender, date of birth} likely to be unique to them. Her estimate appeared in a Carnegie Mellon working paper released in 2000. Philippe Golle recomputed it on 2000 census data and reported a lower but still decisive 63%. He presented that on 30 October 2006. None of those three fields identifies anyone on its own; in combination they usually do. That is what “anonymization is not automatic” means in practice. It is why a privacy review has to ask what the retained columns imply together, not only which columns were deleted.
On security: the supply-chain point has a dated instance inside the machine-learning stack itself. On 31 December 2022 the PyTorch project disclosed a compromised package. Anyone who had installed PyTorch-nightly on Linux via pip between 25 and 30 December 2022 received a malicious package named torchtriton. It came from the public Python Package Index instead of the legitimate one on PyTorch’s own index, because “the PyPI index takes precedence”. The planted binary read /etc/passwd and /etc/hosts, the environment variables, every file in the user’s .ssh directory and the first 1,000 files in the user’s home directory. It sent them out through encrypted DNS queries. Stable-release users were unaffected, the dependency was renamed pytorch-triton, and a placeholder was registered on PyPI. No model was attacked, and no model-level test would have found it.
Fairness and harmful bias
Are benefits, errors, burdens, or access distributed in unjustified ways?
- Requires relevant groups and context
- May involve competing fairness goals
- Needs process and outcome review
- Not solved by removing sensitive fields alone
Privacy
Is personal or sensitive information collected, inferred, exposed, retained, or reused appropriately?
- Includes inputs, training data, logs, and outputs
- Purpose and consent matter
- Minimization reduces exposure
- Anonymization is not automatic
Security
Can an attacker manipulate inputs, steal assets, bypass controls, or misuse tools and permissions?
- Threats include poisoning and prompt injection
- Least privilege limits consequence
- Supply chains create dependencies
- Security requires ongoing testing
Safety
Can normal use, foreseeable misuse, or failure cause unacceptable physical, psychological, financial, or societal harm?
- Depends on severity and exposure
- Needs containment and recovery
- Includes non-malicious failures
- Higher stakes demand stronger evidence
Accountability
Are responsibilities, decisions, evidence, remedies, and change authority clear?
- Assigns owners and escalation paths
- Supports audit and appeal
- Requires records and governance
- Cannot be delegated to the model
Example
One product can fail through several lenses at once
Consider a voice assistant used to schedule public services. A single deployment can create several distinct problems.
- Fairness: speech recognition errors are higher for some accents, creating unequal access to appointments.
- Privacy: raw recordings are retained longer than users expect and are accessible to unnecessary staff.
- Security: an attacker uses crafted speech or account takeover to change another person’s booking.
- Safety: a misunderstood urgent request is routed to a slow administrative queue.
- Accountability: users cannot discover whether a person or model made the decision, and no appeal route is visible.
Key idea
Fairness requires a reasoned choice, not a magic metric
Different fairness measures conflict because they encode different ideas: equal treatment, equal error, equal opportunity, proportional outcomes. Choosing one is not a technical step. It requires understanding the decision, the population, the baseline, and the source of the disadvantage.
Aggregate parity can also hide intersectional or subgroup failures. Measurement is necessary, but it must support a broader analysis of process, remedy, and legitimacy.
Gender Shades is the standard demonstration of the second point. Joy Buolamwini and Timnit Gebru audited three commercial gender-classification services: Microsoft, IBM and Face++. On their Pilot Parliaments Benchmark the overall accuracies ran from 87.9% to 93.7%. Taken at face value, those figures “suggest that these classifiers can be used for all populations represented by the benchmark”. The intersectional breakdown said otherwise. Error rates ran from 20.8% to 34.7% for darker-skinned women, against a maximum of 0.8% for lighter-skinned men. Their phrase for the single headline number was “the obfuscating nature of single performance metrics”. They published it in 2018.
Fairness metrics make values explicit; they do not choose those values for us.
Case
COMPAS: two defensible measures, opposite directions
COMPAS is the case where two defensible measures of the same scores pointed in opposite directions. On 23 May 2016 ProPublica published an analysis of risk scores for more than 7,000 people arrested in Broward County, Florida in 2013 and 2014: among defendants who did not go on to reoffend, 44.9% of Black defendants had been labelled higher risk against 23.5% of White defendants, while among those who did reoffend, 47.7% of White defendants had been labelled lower risk against 28.0% of Black defendants. Defenders of the tool answered on a different measure, and were also right about their own numbers. Alexandra Chouldechova, writing in Big Data in 2017, found COMPAS approximately calibrated and satisfying predictive parity while failing error-rate balance, and showed why the two cannot be reconciled: where the base rate differs across groups, as it did there (51% for Black defendants against 39% for White defendants), an instrument with equal predictive value across groups “cannot achieve equal false positive and false negative rates across those groups”. Kleinberg, Mullainathan and Raghavan proved a matching impossibility at ITCS 2017 — except in highly constrained special cases, “there is no method that can satisfy these three conditions simultaneously”.
Figure
Steps
Triage risk before choosing a mitigation
The first mitigation should address the actual failure mechanism rather than the most fashionable concern.
- 1
Identify affected parties
Include users, non-users, workers, subjects of data, communities, and people downstream of the decision.
- 2
Describe the harm pathway
Trace how an input, error, policy, misuse, or missing safeguard creates the consequence.
- 3
Estimate exposure
Consider likelihood, scale, severity, duration, detectability, and reversibility.
- 4
Choose control layers
Use problem reformulation, data changes, model tests, permissions, interface design, review, or operational limits.
- 5
Assign evidence and ownership
Specify who validates the mitigation, monitors residual risk, responds to incidents, and can stop the system.
- 6
Provide remedy
Create accessible correction, appeal, compensation, service recovery, or human support where harm can occur.
Analogy
Building codes, inspections, and evacuation routes
A public building needs structural strength, and it also needs fire exits, accessibility, access control, inspections, maintenance, and responsibility when something fails.
Trustworthy AI requires a similar combination of technical quality and operational safeguards. Unlike a building, software can change quickly, scale globally, and produce intangible harms that are harder to observe than a cracked wall.
Safety is created by layers of prevention, detection, containment, response, and remedy.
Documentation turns hidden assumptions into reviewable evidence
Dataset documentation can record motivation, composition, collection, recommended uses, and limitations. Model documentation can state intended use, evaluation conditions, subgroup performance, and known failure modes.
Documents do not guarantee responsible behavior, and self-reporting can be incomplete. They are still valuable because they create a concrete object for review, comparison, incident analysis, and handoff between teams.
Accountability needs records that connect decisions to evidence, owners, and remedies.
Datasheets and model cards: who proposed them, and when
Both kinds of document have names and published proposals behind them. “Datasheets for Datasets” — Timnit Gebru, Jamie Morgenstern, Briana Vecchione, Jennifer Wortman Vaughan, Hanna Wallach, Hal Daumé III and Kate Crawford, drafted on arXiv on 23 March 2018 and published in Communications of the ACM 64(12) in December 2021 — borrows the idea from electronics, where “every component, no matter how simple or complex, is accompanied with a datasheet that describes its operating characteristics, test results, recommended uses, and other information”. Its questions are grouped into motivation, composition, collection process, preprocessing/cleaning/labeling, uses, distribution, and maintenance. “Model Cards for Model Reporting” — Margaret Mitchell and colleagues, at the Conference on Fairness, Accountability, and Transparency on 29–31 January 2019 — does the same for a trained model, and its central demand is disaggregated evaluation: performance reported “across different cultural, demographic, or phenotypic groups” and across intersectional groups rather than as a single number. Neither is a legal requirement, and neither is audited by default, which is exactly why who fills them in and who checks them is part of the accountability question.
Key takeaways
- AI risk can enter through the problem, institution, data, model, product controls, operations, or deployment context.
- Systemic, statistical, and human cognitive bias can interact even when no actor intends discrimination.
- Fairness, privacy, security, safety, and accountability are distinct lenses with overlapping controls.
- Fairness cannot be reduced honestly to one universal metric or to removing sensitive attributes.
- Risk triage should identify affected people, harm pathways, exposure, control layers, ownership, and remedy.
- Documentation supports review and accountability by preserving intended use, evidence, limitations, and decisions.