"The model does not see race" is not a defence
A platform that selects tenants, estimates risks or decides on a mortgage works on people, and decisions about housing are among the most regulated. The most frequent flaw of those who build these systems is a line of reasoning that sounds prudent: "we do not use ethnicity, sex or age as variables, so we do not discriminate". It does not hold, because other variables (the postcode, the street name, the history of refusals in the area) can carry the same information indirectly. This article shows it with a reproducible experiment, then moves on to what the rules really ask and to how to keep a record of decisions that cannot be rewritten.
A caution before starting: I am not a lawyer and this is not an opinion. The rules are quoted with the text I read on the date indicated, and some (the US ones) apply only to those operating in that market. For product decisions you need a professional who knows your jurisdiction.
What the rules say, without over-interpreting them
In the United States the Fair Housing Act (42 U.S.C. 3604) makes it unlawful to refuse to sell or rent, or otherwise to make unavailable a dwelling, because of race, colour, religion, sex, familial status or national origin, and in subsection (c) it prohibits publishing notices that indicate a preference or limitation based on those characteristics. For credit, the Equal Credit Opportunity Act (15 U.S.C. 1691) prohibits a creditor from discriminating in any aspect of a credit transaction on the basis of race, colour, religion, national origin, sex, marital status or age, or because income derives from public assistance. The HUD regulation (24 CFR 100.500) specifies that a practice has a discriminatory effect when it actually or predictably results in a disparate impact on a protected group, even without intent.
The last point is the one that concerns software: you do not need to prove that the algorithm meant to discriminate, a disparate effect that cannot be justified is enough. The same regulation allocates the burden of proof: the accuser must prove the effect, then it is up to whoever adopted the practice to prove that it was necessary to a legitimate, non-discriminatory interest. The text I consulted is the one published by the eCFR via Cornell LII on 12 November 2026; this regulation may have been amended since, so check the version in force.
In Europe the sources are different. Regulation (EU) 2016/679 (GDPR), in Article 22, recognises the right not to be subject to a decision based solely on automated processing which produces legal effects or similarly significantly affects the person, with safeguards that include human intervention. Regulation (EU) 2024/1689 (AI Act) classifies as high-risk, in Annex III, point 5, systems intended to evaluate the creditworthiness of natural persons or establish their credit score, with the exception of those used for detecting financial fraud. Whether a tenant-screening system falls into that list depends on its function and must be verified case by case; Article 113 fixes general application at 2 August 2026, but Annex III high-risk (creditworthiness included) applies from 2 December 2027.
The application calendar of Regulation (EU) 2024/1689 (AI Act) was amended by Regulation (EU) 2026/1744 (OJ L, 24.7.2026, in force from 27.7.2026). As of today: prohibitions and Article 4 from 2 February 2025; general-purpose AI models, governance and penalties from 2 August 2025; general application and Article 50 from 2 August 2026; Annex III high-risk from 2 December 2027; Annex I high-risk from 2 August 2028. Dates read on EUR-Lex on 2026-11-13; check the consolidated version before setting a deadline.
The experiment: removing the variable does not remove the problem
The listing generates 20,000 synthetic applications. In the invented world income has the same distribution in the two groups, A and B, but the groups live in different zones and the history rewards one of the zones. The group does not enter the score; income and zone do. Half of the applications, those with the highest score, are approved. Then we measure the ratio between approval rates, minimum over maximum, with the four-fifths rule.
import numpy as np
rng = np.random.default_rng(3)
n = 20000
# SYNTHETIC data. The group (A or B) does NOT enter the model, but the postcode does: in the invented world
# the two groups live in different zones, and the history of refusals depends on the zone.
gruppo = rng.choice(["A", "B"], n, p=[0.6, 0.4])
zona_alta = np.where(gruppo == "A", rng.random(n) < 0.7, rng.random(n) < 0.25) # 1 = postcode "historically approved"
reddito = rng.normal(30000, 6000, n) # same distribution in the two groups
punteggio = (reddito - 30000) / 6000 + 0.9 * zona_alta + rng.normal(0, 0.5, n)
soglia = np.quantile(punteggio, 0.5) # approve half of the applications
approvato = punteggio > soglia
def rapporti(approvato, gruppo):
tassi = {g: approvato[gruppo == g].mean() for g in ("A", "B")}
return tassi, min(tassi.values()) / max(tassi.values())
tassi, air = rapporti(approvato, gruppo)
print("tassi di approvazione:", {g: round(float(t), 3) for g, t in tassi.items()})
print("rapporto tra i tassi (minimo/massimo):", round(float(air), 3), "-> sotto 0,80?", bool(air < 0.8))
# "Removing the variable": recompute WITHOUT zone. Income is the same in the two groups.
senza_zona = (reddito - 30000) / 6000 + rng.normal(0, 0.5, n)
t2, air2 = rapporti(senza_zona > np.quantile(senza_zona, 0.5), gruppo)
print("senza la zona:", {g: round(float(t), 3) for g, t in t2.items()}, "rapporto", round(float(air2), 3))
print("correlazione zona-gruppo:", round(float(np.corrcoef(zona_alta, gruppo == "A")[0, 1]), 3))
# Output:
# tassi di approvazione: {'A': 0.558, 'B': 0.413}
# rapporto tra i tassi (minimo/massimo): 0.741 -> sotto 0,80? True
# senza la zona: {'A': 0.501, 'B': 0.498} rapporto 0.995
# correlazione zona-gruppo: 0.431
Group A is approved in 55.8% of cases and B in 41.3%: the ratio is 0.741, below 0.80. The four-fifths rule comes from the federal guidelines on personnel selection (29 CFR 1607.4D): a selection rate lower than four-fifths of the rate of the most favoured group is in general regarded by the agencies as evidence of adverse impact. It is a rule from employment, not from housing or credit, and I use it as an alarm heuristic: it does not say there is a violation, it says you must look. Smaller differences can still matter if they are significant in the statistical and practical sense, as the same text reminds us.
The second result is the one that interests the designer. Recomputing the score without the zone, the rates become 50.1% and 49.8% (ratio 0.995): the inequality came entirely from the variable acting as a proxy, correlated with the group with a coefficient of 0.431. In a real system you do not know in advance which variable acts as a proxy, so the measurement must be made on outcomes, by group, at every new version of the model. To do so you need data on the groups that normally you must not use in the decision: collecting them for monitoring alone, with a legal basis and safeguards, is a data protection issue to be solved upstream, not a technical detail.
Removing the zone is not always the right answer: the zone can have a legitimate justification (for example the value of the property used as collateral) and removing relevant information makes the model worse. The compromise is between fairness and accuracy, and the choice belongs to whoever is responsible for the product with legal advice: the code can only make it visible. Here, in an invented world where income is identical in the two groups, removing the proxy costs nothing; in a real world it almost always costs something.
A record of decisions that cannot be rewritten
If an authority or a customer asks you why case 17 was rejected, you must be able to answer with the model version, the reason and who intervened afterwards. The decision log must therefore be tamper-evident, not because someone wants to falsify it but because a record that can be silently modified proves nothing. The simple method is a chain of fingerprints: each row contains the SHA-256 fingerprint of the previous row, so changing an old row breaks all the following ones.
import hashlib
import json
def sigilla(registro, evento):
"""Adds an event: the fingerprint depends on the event AND on the fingerprint of the previous row."""
prec = registro[-1]["hash"] if registro else "0" * 64
corpo = json.dumps(evento, sort_keys=True, ensure_ascii=False)
h = hashlib.sha256((prec + corpo).encode()).hexdigest()
registro.append({"evento": evento, "prec": prec, "hash": h})
def verifica(registro):
"""Returns the index of the first altered row, or None."""
prec = "0" * 64
for i, r in enumerate(registro):
corpo = json.dumps(r["evento"], sort_keys=True, ensure_ascii=False)
if r["prec"] != prec or r["hash"] != hashlib.sha256((prec + corpo).encode()).hexdigest():
return i
prec = r["hash"]
return None
reg = []
sigilla(reg, {"pratica": 17, "esito": "rifiutata", "modello": "v3", "motivo": "punteggio sotto soglia"})
sigilla(reg, {"pratica": 17, "esito": "riesame umano", "operatore": "rossi"})
sigilla(reg, {"pratica": 17, "esito": "approvata", "operatore": "rossi"})
print("registro integro:", verifica(reg))
reg[0]["evento"]["esito"] = "approvata" # someone rewrites history
print("dopo la modifica della riga 0, prima riga alterata:", verifica(reg))
# Warning: whoever can rewrite ALL the rows, recomputing the fingerprints, is not caught by this check.
ricostruito = []
for r in reg:
sigilla(ricostruito, r["evento"])
print("registro ricostruito da zero risulta integro:", verifica(ricostruito) is None)
# Output:
# registro integro: None
# dopo la modifica della riga 0, prima riga alterata: 0
# registro ricostruito da zero risulta integro: True
The sigilla function computes the fingerprint on the sum of the previous fingerprint and the
event serialised deterministically (sort_keys=True), and verifica recomputes the
whole chain and returns the index of the first altered row. The run shows the useful case: after changing the
rejection in row 0 to "approvata", the verification points to row 0. It also shows the limit, in the last
line: whoever can rewrite the entire log and recompute the fingerprints produces a valid chain. The chain
detects a partial modification, not a total attack.
To close the gap you need an anchor outside the system: periodically publish the fingerprint of the last row in a place that whoever manages the log does not control (a timestamping service, a register held by a third party, an e-mail to the auditor). Another clarification: the record contains personal data, so the right to erasure under Article 17 of the GDPR has exceptions to be assessed, and it is advisable to record references (the case identifier) rather than personal details in the body of each row, so the content can be reduced without breaking the chain.
Communicating a rejection
For US credit, the ECOA (15 U.S.C. 1691(d)) provides that the creditor must notify its decision on an application within thirty days of receiving a completed application, and that each applicant against whom adverse action is taken is entitled to a statement of reasons. For software this means the model must return readable reasons and not just a score, and that the reasons must be true: an explanation built after the fact that does not reflect what weighed in the score exposes you to a different and worse risk than silence. In the EU the GDPR, as seen, in any case guarantees the data subject a review of the decision by a person. How this fits into the flow of a case is shown in the article on the mortgage platform.
Where the rest of the series connects
The model that estimates the value of a property, and the way to measure its fairness, are in the article on automated valuation. An agent that answers tenants and decides when to pass to a person is in property management with agents. And the precise position of a home, when it is personal data, is met in geospatial search. The three entities the recorded decisions rest on, namely property, listing and source, are described in the article on the platform architecture. The limits to put on a pricing rule, and what the texts say about competition, are in the article on dynamic rental pricing.
Next in the series: 11. Real Estate Listing Search: Full-Text with PostgreSQL.
What you can do now
You can explain why excluding a protected variable is not enough, and you can measure the ratio between outcome rates by group with an alarm threshold declared as a heuristic. You can keep a decision log that detects partial modifications and you know its limit and how to compensate for it. You know where to look for the rules (Fair Housing Act, ECOA, GDPR Article 22, AI Act Annex III) and that their application to your product is a question for a lawyer, not for this code. I have not verified how these rules apply in Italy to a specific function of a platform: it is the next step to take with a professional.
In this series, the previous article is Virtual Property Tours: WebGL & 3D Web Technology.
Sources
- 42 U.S.C. 3604, Discrimination in the sale or rental of housing - subsections (a) and (c) of the Fair Housing Act, accessed on 2026-11-12
- 24 CFR 100.500, Discriminatory effect prohibited - the definition of discriminatory effect and the allocation of the burden of proof, accessed on 2026-11-12
- 15 U.S.C. 1691, Equal Credit Opportunity Act - the prohibitions of discrimination in credit and the obligation to notify and state reasons, accessed on 2026-11-12
- 29 CFR 1607.4, Information on impact (four-fifths rule) - the origin of the 0.80 threshold, written for personnel selection, accessed on 2026-11-12
- Regulation (EU) 2016/679, Articles 17 and 22 - erasure and automated decisions with safeguards, accessed on 2026-11-12
- Regulation (EU) 2024/1689, Annex III point 5 and Article 113 - creditworthiness assessment systems as high-risk and the date of application of the original text, accessed on 2026-11-12
- Regulation (EU) 2026/1744 (Digital Omnibus on AI), OJ L of 24.7.2026 - new Article 113 dates (2 December 2027 for Annex III, 2 August 2028 for Annex I), accessed on 2026-11-13
The two listings were run with Python 3.14 on 2026-11-12. The data of the experiment is synthetic and invented to build an example: no rate describes a real market. The rules are reported as read on the date indicated and may have been amended.

Commenti
Caricamento commenti...
Sign in to comment