
Bias in Predictive Models in Criminal Investigation
Criminal defense against investigations based on biased predictive models: predictive policing, hotspots and algorithmic profiling.
Last updated:
Predictive models applied to criminal investigation —from territorial predictive policing to individual recidivism evaluation algorithms— promise efficiency but bring a structural risk: algorithmic bias. When a model is trained with historical police and judicial data, it inherits and amplifies the system's previous biases. Criminal defense against investigations whose initial basis is algorithmic requires questioning the very origin of suspicion.
Types of Predictive Models in Investigation
It is worth distinguishing the families of models, because their impact on guarantees differs. Territorial models (hotspots) predict where a crime is most likely to occur and guide patrolling, with a risk of discrimination by area. Individual models of profiling and recidivism score a specific person and have been proposed for decisions on pretrial detention or parole. Pattern detection models track operations (drug trafficking, money laundering) across large volumes of data. And investigative prioritization systems decide who to look at first. In all of them the problem is common: the prediction does not establish a fact, it orients the suspicion; and if that orientation is biased, it contaminates everything that follows.
Documented Biases and Their Origin
Numerous studies (including works on COMPAS in the US and European models) have documented: (1) reproduction of historical discriminatory patterns toward ethnic minorities and socioeconomically vulnerable areas; (2) feedback loop between algorithmic patrolling and complaint data (more police → more complaints → more prediction); (3) overfitting to complaint data and not real crime; and (4) explanatory opacity when models are proprietary black boxes. The origin of the bias is almost never a discriminatory intention: it is the statistical inheritance of a system that already treated certain groups unequally, now dressed in apparent technical objectivity.
Impact on Procedural Guarantees
When an investigation originates in a predictive output, defense can challenge: (a) the reasonable indication that justified opening proceedings, especially if the algorithm is biased against the accused's profile; (b) the proportionality of restrictive measures adopted; and (c) the presumption of innocence, which cannot operate asymmetrically according to the suspect's predictive profile. EU Regulation 2024/1689 reinforces this analysis by classifying several of these models as "high risk" and by prohibiting certain uses based exclusively on profiles.
Exclusion and Limitation Strategies
On the ordinary procedural plane, the aim is twofold: to exclude or to limit. If the reasonable indication that opened the investigation was the product of an established algorithmic bias, the nullity of proceedings may be sought and, by connection of unlawfulness, that of the derivative measures (searches, interceptions) under Article 11.1 LOPJ. When total exclusion does not succeed, the limitation of probative value is worked: a technical-statistical expert report documenting the error rate differentiated by profile lowers the weight of the evidence. To shield the defense against proprietary opacity, we ask the court to appoint an independent judicial expert to audit the model used by the prosecution.
Constitutional Action Before the TC
When the case allows, the procedural avenue is complemented by the constitutional one. The appeal for protection (amparo) is the channel to denounce the violation of fundamental rights —equality, presumption of innocence, effective judicial protection— when the algorithmic practice has compromised them, and it allows doctrine to be set on AI and criminal process. In parallel, when the abnormal functioning of the Administration (including the use of biased AI) has caused a provable harm, a claim for the State's patrimonial liability is available (Art. 121 CE and Law 40/2015). In relevant cases we reinforce the expert evidence and the argument with the collaboration of academic groups in artificial intelligence and law.
Penalty Chart
| Type / Scenario | Criminal Penalty |
|---|---|
| Nullity for biased suspicion | If the reasonable indication that opened the investigation was the product of established algorithmic bias: nullity of actions. |
| Mitigation for procedural discrimination | When it is established that the accused was investigated due to bias and not objective merit: analogous or highly qualified mitigation. |
| State patrimonial claim | For abnormal functioning of Administration (Art. 121 CE) when biased algorithmic action caused established unjustified harm. |
* Penalties shown are indicative. The actual penalty depends on case circumstances, applicable mitigating and aggravating factors.
Our Defense Strategy
Procedural + Constitutional Combo
Ordinary procedural route (nullity) + constitutional route (amparo) when case allows establishing doctrine on AI and fundamental rights.
External Audit Requested to Court
Request judicial independent expert evidence on the police model used, shielding defense against proprietary opacity.
Strategic Litigation with Academics
In relevant cases, collaboration with AI and law academic groups to reinforce expert evidence and doctrinal arguments.
Cybercrime in Spain: Hacking, Phishing & Digital Fraud — Defence Guide
Cybercrime encompasses illegal access to computer systems (Art. 197 bis CP), computer damage and ransomware (Art. 264 CP), phishing and digital fraud (Art. 249.1.a CP), and the production or distribution of hacking tools (Art. 197 ter). Spain's prosecution of cybercrime has intensified dramatically, with specialised units in the National Police (BIT) and Guardia Civil (GDT) leading investigations. Defence requires a unique combination of criminal law expertise and advanced technical knowledge.
Penalty Table: Cybercrime
| Offence | Article | Description | Penalty |
|---|---|---|---|
| Illegal access to systems | Art. 197 bis | Unauthorised access breaching security measures | 6 months – 2 years |
| Interception of data | Art. 197 bis.2 | Intercepting non-public data transmissions | 3 months – 2 years |
| Production/supply of hacking tools | Art. 197 ter | Creating or distributing tools designed for cybercrime | 6 months – 2 years |
| Computer damage (basic) | Art. 264.1 | Deleting, damaging or making data inaccessible | 6 months – 3 years |
| Aggravated damage (critical infrastructure) | Art. 264.2 | Affecting essential services or critical infrastructure | 2 – 5 years prison |
| Cyber fraud (phishing) | Art. 249.1.a | IT manipulation to obtain unlawful transfer of assets | 6 months – 3 years |
Key Defence Strategies
IP Attribution Challenge
An IP address does not identify a person. Shared Wi-Fi networks, VPNs, Tor exit nodes and NAT configurations mean multiple users may share one IP. The prosecution must prove the accused was the actual user at the relevant time.
Chain of Digital Custody
Digital evidence is extremely fragile. If the police failed to image the hard drive with a write-blocker, if hash values don't match, or if evidence was handled improperly, the defence can seek exclusion of the entire digital evidence chain.
Authorised Security Testing
Ethical hacking and penetration testing carried out with the system owner's authorisation is legal. If the defendant had a written engagement contract, bug bounty agreement or responsible disclosure policy, there is no criminal offence.
Lack of 'Breaching Security Measures'
Art. 197 bis requires that security measures were breached. If the system had no password, no firewall, or the access point was public, the element of 'breaching security' may be absent, negating the offence.
Key Case Law
The Supreme Court confirmed that 'access' requires effectively entering the system, not merely attempting it. The prosecution must prove: (1) access occurred, (2) it was unauthorised, and (3) security measures were breached. Port scanning alone does not constitute the offence.
The Court ruled that ransomware attacks may constitute a concurrent offence of computer damage (Art. 264) and extortion (Art. 243 CP). The encryption of data satisfies the 'damage' element even if data is technically recoverable upon payment.
In phishing operations, the Court distinguished between the organiser and the 'money mule' (account holder). The mule's liability depends on proof of knowledge that the funds were illicit. Wilful blindness may suffice, but mere negligence does not.
Why Choose Us?
Need a criminal defense lawyer for this type of offense? Here's how we work:
Do you need specialised legal assistance?
The judicial system is complex. We have the criminal-law specialisation and technical resources required to take on the defence.