# Engineering the Law-Machine Learning Translation Problem: Developing Legally Aligned Models

arXiv: https://arxiv.org/abs/2504.16969 · HTML: https://mlsanity.com/paper/2504.16969/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Builds on 34 of its 123 references that are in the map.
- First posted on arXiv 23 Apr 2025.

## Builds on (most cited first, 30 of 34)

- [Membership Inference Attacks against Machine Learning Models](https://mlsanity.com/paper/1610.05820/) (2016)
- [Equality of Opportunity in Supervised Learning](https://mlsanity.com/paper/1610.02413/) (2016)
- [Label-Only Membership Inference Attacks](https://mlsanity.com/paper/2007.14321/) (2020)
- [European Union regulations on algorithmic decision-making and a "right to explanation"](https://mlsanity.com/paper/1606.08813/) (2016)
- [Why Fairness Cannot Be Automated: Bridging the Gap Between EU Non-Discrimination Law and AI](https://mlsanity.com/paper/2005.05906/) (2020)
- [Software Engineering for AI-Based Systems: A Survey](https://mlsanity.com/paper/2105.01984/) (2021)
- [Algorithms that Remember: Model Inversion Attacks and Data Protection Law](https://mlsanity.com/paper/1807.04644/) (2018)
- [Empirical observation of negligible fairness-accuracy trade-offs in machine learning for public policy](https://mlsanity.com/paper/2012.02972/) (2020)
- [Survey: Leakage and Privacy at Inference Time](https://mlsanity.com/paper/2107.01614/) (2021)
- [Requirements Engineering Challenges in Building AI-Based Complex Systems](https://mlsanity.com/paper/1908.11791/) (2019)
- [Data Minimization for GDPR Compliance in Machine Learning Models](https://mlsanity.com/paper/2008.04113/) (2020)
- [Stop ordering machine learning algorithms by their explainability! A user-centered investigation of performance and explainability](https://mlsanity.com/paper/2206.10610/) (2022)
- [On the Trade-Off between Actionable Explanations and the Right to be Forgotten](https://mlsanity.com/paper/2208.14137/) (2022)
- [Explainable, Interpretable & Trustworthy AI for Intelligent Digital Twin: Case Study on Remaining Useful Life](https://mlsanity.com/paper/2301.06676/) (2023)
- [Investigating Trade-offs in Utility, Fairness and Differential Privacy in Neural Networks](https://mlsanity.com/paper/2102.05975/) (2021)
- [Learning Optimal Fair Classification Trees: Trade-offs Between Interpretability, Fairness, and Accuracy](https://mlsanity.com/paper/2201.09932/) (2022)
- [Requirements Engineering for Artificial Intelligence Systems: A Systematic Mapping Study](https://mlsanity.com/paper/2212.10693/) (2022)
- [Algorithmic Unfairness through the Lens of EU Non-Discrimination Law: Or Why the Law is not a Decision Tree](https://mlsanity.com/paper/2305.13938/) (2023)
- [Reviving Purpose Limitation and Data Minimisation in Data-Driven Systems](https://mlsanity.com/paper/2101.06203/) (2021)
- [How should AI decisions be explained? Requirements for Explanations from the Perspective of European Law](https://mlsanity.com/paper/2404.12762/) (2024)
- [Learning to Limit Data Collection via Scaling Laws: A Computational Interpretation for the Legal Principle of Data Minimization](https://mlsanity.com/paper/2107.08096/) (2021)
- [Requirements Engineering Framework for Human-centered Artificial Intelligence Software Systems](https://mlsanity.com/paper/2303.02920/) (2023)
- [AI for All: Operationalising Diversity and Inclusion Requirements for AI Systems](https://mlsanity.com/paper/2311.14695/) (2023)
- [Rethinking Legal Compliance Automation: Opportunities with Large Language Models](https://mlsanity.com/paper/2404.14356/) (2024)
- [Fighting Money Laundering with Statistics and Machine Learning](https://mlsanity.com/paper/2201.04207/) (2022)
- [Compatibility of Fairness Metrics with EU Non-Discrimination Laws: Demographic Parity & Conditional Demographic Disparity](https://mlsanity.com/paper/2306.08394/) (2023)
- [Unlawful Proxy Discrimination: A Framework for Challenging Inherently Discriminatory Algorithms](https://mlsanity.com/paper/2404.14050/) (2024)
- [Toward the Tradeoffs between Privacy, Fairness and Utility in Federated Learning](https://mlsanity.com/paper/2311.18190/) (2023)
- [You Don't Need Robust Machine Learning to Manage Adversarial Attack Risks](https://mlsanity.com/paper/2306.09951/) (2023)
- [Requirements Elicitation and Modelling of Artificial Intelligence Systems: An Empirical Study](https://mlsanity.com/paper/2302.06034/) (2023)

## Built on by (most cited first, 3 of 3)

- [Decision-centric fairness: Evaluation and optimization for resource allocation problems](https://mlsanity.com/paper/2504.20642/) (2025)
- [How Supply Chain Dependencies Complicate Bias Measurement and Accountability Attribution in AI Hiring Applications](https://mlsanity.com/paper/2604.22679/) (2026)
- [Becoming Suspicious Across Borders: Algorithmic Extraterritoriality and AI-Driven Financial Surveillance](https://mlsanity.com/paper/2610.03425/) (2026)

## Abstract (arXiv)

Organizations developing machine learning-based (ML) technologies face the complex challenge of achieving high predictive performance while respecting the law. This intersection between ML and the law creates new complexities. As ML model behavior is inferred from training data, legal obligations cannot be operationalized in source code directly. Rather, legal obligations require "indirect" operationalization. However, choosing context-appropriate operationalizations presents two compounding challenges: (1) laws often permit multiple valid operationalizations for a given legal obligation-each with varying degrees of legal adequacy; and, (2) each operationalization creates unpredictable trade-offs among the different legal obligations and with predictive performance. Evaluating these trade-offs requires metrics (or heuristics), which are in turn difficult to validate against legal obligations. Current methodologies fail to fully address these interwoven challenges as they either focus on legal compliance for traditional software or on ML model development without adequately considering legal complexities. In response, we introduce a five-stage interdisciplinary framework that integrates legal and ML-technical analysis during ML model development. This framework facilitates designing ML models in a legally aligned way and identifying high-performing models that are legally justifiable. Legal reasoning guides choices for operationalizations and evaluation metrics, while ML experts ensure technical feasibility, performance optimization and an accurate interpretation of metric values. This framework bridges the gap between more conceptual analysis of law and ML models' need for deterministic specifications. We illustrate its application using a case study in the context of anti-money laundering.
