The Mathematics of Justice: Defining 'Fairness' in the Age of AI
"Fairness" is a concept as old as humanity, debated by philosophers from Aristotle to Rawls. But for a computer scientist building a loan-approval model or a facial recognition system, philosophical debates are insufficient. Computers deal in binaries and probabilities; they need a mathematical definition of fairness.
This creates a profound tension: Justice is qualitative, but algorithms are quantitative. As India moves towards adopting AI in critical sectors like banking, healthcare, and law enforcement, we face an uncomfortable truth: blindly optimizing for accuracy often increases inequality.
The Impossibility of Perfection
In 2016, a seminal paper by Kleinberg, Mullainathan, and Raghavan proved a mathematical "Impossibility Theorem" for fairness. They demonstrated that three common, intuitive definitions of fairness—Calibration, Balance for the Positive Class, and Balance for the Negative Class—cannot all be satisfied simultaneously unless the base rates of the populations are identical (which they rarely are in the real world).
This means that when designing an AI system, you must choose which type of fairness you want. Do you want Individual Fairness (similar people are treated similarly) or Group Fairness (groups have equal outcomes)? A hiring algorithm might be perfectly "fair" individually but result in zero women being hired because the historical data favors men. Conversely, enforcing a quota (Statistical Parity) might require treating dissimilar individuals similarly, violating the principle of individual merit.
Fairness Definitions in the Indian Context
How do these technical definitions map onto Indian Law?
1. Disparate Treatment (Intentional Discrimination)
Under Article 15 of the Constitution, the state cannot discriminate on grounds of religion, race, caste, sex, or place of birth. In algorithmic terms, this often leads to a strategy called "Fairness Through Unawareness"—simply removing protected attributes (like gender or caste) from the dataset.
However, this is legally insufficient. AI is excellent at finding proxies. Even if you remove "Caste" from a dataset, the AI might use "Surname" or "Location of Residence" as a perfect proxy for caste. Thus, a "caste-blind" algorithm can still be casteist in effect.
2. Disparate Impact (Indirect Discrimination)
The US Supreme Court recognized "Disparate Impact" in Griggs v. Duke Power Co. (1971). In India, the Supreme Court in Lt. Col. Nitisha v. Union of India (2021) formally recognized indirect discrimination, ruling that a neutral criteria that has a disproportionate negative impact on a protected group is unconstitutional.
This is a game-changer for AI regulation. It means that if a facial recognition system used by the Delhi Police has a higher error rate for darker-skinned faces (a common flaw in such systems), it could be challenged as unconstitutional even if there was no intent to discriminate. The outcome matters, not just the intent.
The Facial Recognition Failure
Consider the deployment of Automated Facial Recognition Systems (AFRS) in India. Studies, such as those by the Internet Freedom Foundation (IFF), highlight significant accuracy disparities. An algorithm trained predominantly on Caucasian faces (common in datasets scraped from the western internet) will struggle to distinguish between Indian faces, leading to false positives.
When such a system is used for criminal identification, a "false positive" is not just a glitch—it is a wrongful arrest. If the error rate is higher for certain ethnic groups, the state is effectively subjecting that group to a lower standard of due process. This creates a "tiered citizenship" mediated by technology.
The Road to Regulation: Audits and Standards
So, how do we fix this? The answer lies in Algorithmic Auditing. Just as financial audits verify fiscal health, algorithmic audits verify fairness.
- BIS Standards: The Bureau of Indian Standards (BIS) is working on IS 17800 series for Artificial Intelligence, which includes standards for bias detection. These need to be made mandatory for high-risk public sector AI.
- Bias Impact Statements: Before deploying an AI system, agencies should publish a statement detailing the potential disparate impacts and the mitigation strategies employed.
- Continuous Monitoring: Fairness is not a "set it and forget it" property. An algorithm that is fair today may become unfair tomorrow as data distributions shift (Data Drift).
Conclusion: From Awareness to Action
We must move beyond "Fairness through Unawareness." Pretending that ignoring sensitive data makes a system fair is a dangerous fallacy. True fairness requires "Fairness through Awareness"—explicitly measuring and correcting for bias.
For legal practitioners, this means we must stop treating AI output as "scientific evidence" and start treating it as "hearsay from a biased witness." We must demand to see the training data, the error rates by demographic, and the "confidence scores" of predictions.
Math can be a tool for justice, but only if we define the equations. If we leave it to the machines, they will simply replicate the inequality of the world they observe.
About the Author
Advocate Ritik Khurana is an expert in the legal implications of Artificial Intelligence. He advises technology companies on ethical AI deployment and represents civil society organizations in challenges against algorithmic state surveillance.
Schedule a ConsultationAlgorithmic Bias in Justice Systems: The Constitutional Challenge: Comparative Statutory Framework & Precedents
The following integrated sections consolidate comprehensive statutory insights, regulatory precedents, and compliance mandates from our specialized analysis.
The image of justice is blindfolded, symbolizing impartiality—justice that does not see race, wealth, or status. However, as judiciary systems globally and in India move towards integrating Artificial Intelligence (AI) to handle massive case backlogs, we risk replacing this metaphorical blindfold with a digital one: the opaque "black box" of algorithmic decision-making.
With initiatives like the Supreme Court of India’s SUPACE (Supreme Court Portal for Assistance in Court's Efficiency) and SUVAS (Supreme Court Vidhik Anuvaad Software), the Indian judiciary is embracing technology to enhance efficiency. While currently limited to administrative assistance and translation, the global trend points inevitably towards AI assistance in substantive decision-making, such as bail prediction, sentencing, and parole. This transition raises a fundamental constitutional question: Can an algorithm be unfair? And if it is, how do we hold a mathematically complex, non-human entity accountable under the Constitution of India?
The Mechanism of Bias: How Algorithms Learn Prejudice
To understand the legal threat, one must first demystify the technology. Modern AI, specifically Machine Learning (ML) and Deep Learning (DL), operates on a simple premise: prediction based on historical patterns. An AI model trained to predict "recidivism risk" (the likelihood of a criminal re-offending) does not understand morality or law. It simply identifies correlations in vast datasets of past case records.
Herein lies the danger. Data is not neutral; it is a mirror of history. If the historical data reflects decades of systemic bias—for instance, if certain communities have been historically over-policed, arrested at higher rates for minor offenses, or given harsher sentences—the AI will learn these patterns as "objective truths."
This is not theoretical. In the United States, the COMPAS (Correctional Offender Management Profiling for Alternative Sanctions) algorithm was found to falsely flag African American defendants as "high risk" at nearly twice the rate of white defendants. If such a system were deployed in India without rigorous localization and auditing, it could entrench caste-based or religious prejudices deeply into the judicial process, laundered under the guise of "scientific objectivity."
Constitutional Implications: Article 14 and Article 21
The use of biased algorithms in criminal justice touches the very core of the Indian Constitution.
1. Article 14: The Right to Equality
Article 14 guarantees equality before the law. An algorithm that disproportionately assigns higher risk scores to individuals based on their PIN code, surname, or socio-economic indicators (proxies for caste and religion) violates this fundamental right. Unlike human bias, which can be identified and challenged in an appeal, algorithmic bias is often invisible. It is buried in millions of parameters, making it nearly impossible for a defendant to prove that they were discriminated against by the software.
2. Article 21: Due Process and the "reasoned Order"
Article 21 states that no person shall be deprived of their life or personal liberty except according to a "procedure established by law." The Supreme Court, in Maneka Gandhi v. Union of India, established that this procedure must be "fair, just, and reasonable," not arbitrary or fanciful.
A cardinal principle of natural justice is the Right to a Reasoned Order. A judge must explain why they reached a decision. Deep Learning algorithms, however, often suffer from the "Black Box" problem—they output a decision (e.g., "High Risk") without offering an explainable chain of reasoning. If a judge denies bail based on an algorithmic score that cannot be explained, the judicial order is effectively un-reasoned. It becomes an arbitrary deprivation of liberty, violating Article 21. How can a defendant appeal a decision when even the decision-maker (the software) cannot explain its logic?
The "Loomis" Precedent and Indian Law
The legal world is still grappling with the precedent set by State v. Loomis (Supreme Court of Wisconsin, 2016). In this case, the court upheld the use of the COMPAS algorithm in sentencing but attached significant caveats: the judge must be aware of the algorithm's limitations, and the score cannot be the determinative factor.
India must tread carefully before adopting similar tools. In the Indian context, where judicial dockets are overwhelmed, there is a high risk of "Automation Bias"—the psychological tendency of humans to trust automated systems over their own judgment. If an AI tool flags a defendant as "High Risk," an overworked magistrate may be subconsciously pressured to deny bail to avoid the perceived risk of releasing a dangerous criminal, effectively delegating their judicial discretion to a vendor-supplied software.
The Way Forward: Algorithmic Accountability
We cannot simply reject technology; the efficiency gains are too valuable for a judiciary with 40 million pending cases. Instead, we need a robust legal framework for Algorithmic Accountability:
- Mandatory Algorithmic Audits: Before any AI tool is deployed in the judiciary, it must undergo rigorous testing for bias against varied demographic groups in India by independent auditors.
- Explainable AI (XAI): Procurement of judicial AI should be restricted to "White Box" models that can provide interpretable reasons for their outputs, rather than high-performance but opaque "Black Box" neural networks.
- Human-in-the-Loop (HITL): Legislation must mandate that AI can only serve as a supportive tool, not a decision-maker. The final discretion must explicitly remain with the human judge, who must document their independent reasoning.
- Open Source Requirement: Judicial algorithms should be open-source. Justice must not only be done but seen to be done. Proprietary algorithms protected by trade secrets have no place in determining the liberty of citizens.
Conclusion
The digitization of the Indian judiciary is a welcome modernization, but we must ensure that we do not upload our society's oldest prejudices into our newest technologies. Algorithmic bias is not just a technical glitch; it is a civil rights issue. As we build the future of Indian law, we must remember that an efficient judiciary that is unfair is not an upgrade—it is a failure of the constitutional promise.
The challenge for lawyers and judges in the 21st century is to develop the technical literacy required to question the computer, to cross-examine the code, and to ensure that the "rule of law" does not become the "rule of algorithm."
Statutory Legal Representation Across India
Advocate Ritik Khurana provides courtroom litigation counsel and strategic advisory in AI Governance (ISO 42001), DPDP Act 2023 compliance, Cyber Crime Bank Account Unfreezing (Section 503 BNSS), and High Court Criminal Writ Petitions.