Evaluating Artificial Intelligence Tools for Forensic-Linguistic Analysis of Arabic Judicial Texts: A Layer-Based Comparative Case Study of Saudi Judgments
This study evaluates GPT-4o's performance in analyzing Arabic Saudi judicial texts against expert forensic-linguistic benchmarks, finding that while the AI excels at identifying formulaic legal structures, it struggles significantly with pragmatic-doctrinal interpretation, thereby supporting a human-in-the-loop verification protocol over autonomous AI analysis.
Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
In the world of law, the written word is the final authority. When a judge writes a decision, every phrase, every pause, and every reference to a medical report carries the weight of the state. For centuries, understanding these texts has been the exclusive domain of human experts who can read between the lines, spotting not just what was said, but why it was said and what it legally means. This field, known as forensic linguistics, treats language as evidence. It looks at how people use words to build arguments, assign blame, or describe their mental state. In recent years, as courts have accumulated vast digital archives of these judgments, researchers have asked a pressing question: can computers learn to read these texts as well as human experts? This is not just about speed; it is about accuracy. If a machine misreads a subtle hint of hesitation or a specific legal phrase, it could misunderstand the entire story of a crime and the responsibility of the accused.
A team of researchers from Saudi Arabia and Egypt set out to test this idea using the latest artificial intelligence tools on Arabic court rulings. They focused on a particularly difficult type of case: those involving mental health and criminal responsibility. In these cases, the court must decide if a person was mentally capable of understanding their actions at the time of a crime. This requires the judge to weave together medical reports, witness testimony, and complex legal principles into a coherent story. The researchers wanted to see if an advanced AI system could do the same work as a human expert when analyzing these specific texts. They did not ask the AI to write a new judgment or to decide who was guilty. Instead, they asked the AI to act as a careful reader, identifying specific parts of the text and labeling them according to a strict set of rules designed to measure how well the machine understood the legal logic.
The researchers chose ten criminal judgments from Saudi Arabia, published by the Ministry of Justice, which dealt with issues of mental capacity and criminal responsibility. From these ten documents, they carefully selected twenty-four short passages that contained the most critical information, such as references to psychiatric reports or descriptions of the defendant's behavior. They then broke each passage down into five different layers of meaning. The first layer looked at who provided the evidence, such as a medical committee or a single doctor. The second layer examined the timing of events, asking when a mental illness occurred in relation to the crime. The third layer focused on standard legal phrases that define a person's legal capacity. The fourth layer was the most difficult: it asked the AI to identify the purpose of the text, such as whether a sentence was meant to soften a punishment, reject an argument, or justify a decision based on public safety. The final layer looked at how certain the judge sounded, tracking words that expressed doubt or confidence.
To see how the AI performed, the researchers used a powerful language model, a type of computer program trained on vast amounts of text, to analyze these twenty-four passages. They gave the machine a clear set of instructions and examples of how to label each part of the text, ensuring it followed the same rules as the human experts. Two human experts, who are trained in forensic linguistics, also analyzed the same passages independently. Their combined work created a "gold standard" answer key. The researchers then compared the AI's labels against the human experts' labels to see how often they agreed.
The results showed a clear split in the machine's abilities. When the task involved finding fixed, predictable elements, the AI was remarkably accurate. It excelled at spotting the standard legal phrases that define a person's capacity and at identifying the source of a medical report. In these areas, the machine's performance was nearly perfect, matching the human experts almost every time. It could also do a good job of finding words that showed how certain the judge was. However, the machine struggled significantly when the task required understanding the deeper purpose of the text. When asked to identify the argumentative function of a passage—such as whether a specific sentence was meant to mitigate a crime or justify a legal decision based on religious principles—the AI often failed. It frequently missed the subtle, context-dependent meaning that human experts grasped immediately.
The researchers found that the AI's biggest weakness was in interpreting the "pragmatic" layer, where the text performs a specific legal action. For example, in Saudi law, a defendant's silence can sometimes be interpreted as a form of agreement or a sign of guilt, depending on the specific legal rules and the context of the conversation. The AI often saw the word "silence" and simply labeled it as missing information or a gap in the record. It failed to understand that in this specific legal context, silence was actually a meaningful statement with legal consequences. Similarly, the AI had trouble with the mix of formal Arabic and local dialects that often appear in court records. When a witness spoke in a local dialect, the AI sometimes smoothed it out into standard language, losing the hesitation or uncertainty that the original speaker intended to convey.
The study concluded that while artificial intelligence is a powerful tool for finding and organizing basic facts within legal texts, it cannot yet replace human experts in understanding the deeper logic of a judgment. The machine is excellent at spotting the "what" and the "where," but it often misses the "why." The researchers determined that for forensic analysis to be reliable, especially in high-stakes cases involving mental health and criminal responsibility, a human must always be in the loop. The AI can act as a fast assistant, highlighting potential areas of interest and pulling out standard phrases, but a human expert must verify the final interpretation to ensure the legal meaning is correct. The study does not suggest that the AI is useless; rather, it shows that the technology is ready for a specific role as a helper, but it is not ready to make the final call on complex legal reasoning.
This work highlights a fundamental limit in current technology. The AI can recognize patterns in words, but it does not understand the cultural and religious rules that give those words their power in a Saudi court. It sees the text as a collection of sentences, while a human judge sees it as a structured argument built on centuries of legal tradition. The researchers emphasize that until machines can truly grasp these underlying rules and the subtle ways people use language to navigate them, human judgment remains essential. The path forward is not to let the computer decide, but to use the computer to make the human expert's job more efficient, allowing them to focus their energy on the most difficult and important parts of the case.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.