Artificial intelligence can search vast collections of cases, extract legal knowledge and support Legal Judgment Prediction (LJP). Yet a prediction, by itself, does not constitute legal justification. When an AI system is used in legislation, law enforcement or adjudication, people must be able to understand whether its output aligns with legal reasoning and fundamental judicial values.
In a Perspective published in National Science Review, Fang Wang reviews the two paradigms of legal computability and discusses the future development of legal computing. The article argues that the field should move beyond the mere technological empowerment and further pursue a deeper integration of normative values with technological innovation.
Two paradigms of legal computability
The idea of making law computable can be traced to the 17th-century philosopher and mathematician Leibniz. He envisioned legal rules expressed in symbolic form, allowing conclusions to be derived through logical operations. The advent of computers in the mid-20th century revitalized this idea and gave rise to rule-based reasoning. However, unlike mathematics, legal systems do not rest on universally accepted axioms in the way mathematics does; many legal concepts are difficult to fully formalize, legal systems contain inherent inconsistencies and gaps. These limitations make it difficult to derive legal conclusions through purely formal logical deduction.
Another empirical paradigm emerged from real-world legal data. It has developed in two key directions: LJP maps case texts to likely judicial decisions, and Empirical Legal Studies (ELS) examines causal and evaluative questions. Put simply, while LJP asks what outcome is likely, ELS can help explain why particular outcomes occur and provide empirical evidence relevant to their evaluation. Natural language processing has also helped drive this transition. Advances ranging from Word2Vec-based representations and Transformer architectures to large language models have greatly improved the ability to process and analyze legal text, providing a technical foundation for downstream legal computing tasks such as LJP and empirical legal analysis.
The global transformation of the legal industry
Legal computing is already transforming the legal practice and justice systems around the world. In China, the national Smart Court has integrated over 320 million pieces of legal data records, while the Shenzhen Intermediate People’s Court launched China’s first trial-specific large language model in 2024. In the United States, tools such as Harvey AI and CoCounsel are increasingly used by lawyers, and some state courts have begun introducing approved AI products. In the United Kingdom, the Ministry of Justice launched an AI Action Plan for Justice in 2025.
An interpretable and reliable framework for legal computing
Most AI models may reveal statistical correlations but cannot, by themselves, provide legally sound reasons or meaningful legal justification. The Perspective explains that existing research generally follows two approaches: ex ante methods embedding legal logic in model design and post hoc explanations of trained models. Future systems could further incorporate the logical relations among legal norms, factual elements and practical reasoning in concrete legal scenarios and embed judicial values into model and algorithm design.
Wang proposes a value-guided framework within a “society–law–ethics–algorithms–data” system. In this framework, social values can guide model objectives and decision preferences, evolving legal norms can inform model knowledge and reasoning across temporal, spatial, and contextual conditions, and ethical norms can serve as executable constraints. Possible pathways include embedding these values and rules into loss functions, reward modeling, constrained optimization, and related algorithmic designs, while robust optimization and constraint design may further enhance model robustness. Additionally, high-quality and well-structured datasets should be constructed through bias mitigation mechanisms to ensure the quality of model training inputs.
The article additionally warns about the anchoring effect, whereby AI-generated recommendations may bias subsequent human judgment and lead to path dependence. Reducing this risk requires both algorithmic safeguards against undue reliance on AI recommendations and targeted training to strengthen judges' independent and critical evaluation of algorithmic outputs.
Three scenario-specific applications of value-guided legal computing
The Perspective identifies three areas for the practical application of value-guided legal computing:
For quantitative evaluation based in intelligent legislation, quantitative simulation and evaluation methods could assess the broader impacts and risks of legal rules and detect inconsistencies and gaps in the law. They may further support the recording-and-review mechanism for normative documents. Quantitative evaluation frameworks for the proportionality principle in legislation may also be further developed to evaluate whether legislative measures are suitable, necessary, and properly balanced against the rights or interests they restrict.
For scenario-oriented intelligent law enforcement with feedback validation, big-data supervision models have been used in China to identify excessive or inconsistent penalties, while satellite remote-sensing technologies have helped procuratorial authorities detect environmental violations. These methods could also be extended to emerging regulatory fields, such as data classification, tiered protection, and risk assessment under the Data Security Law, translating abstract legal requirements into more operational regulatory tools. Federated learning also provides a promising way to address “data silos”. By enabling collaborative model training without centralizing data, it can improve data availability while helping institutions meet privacy, confidentiality, and data-security requirements.
For trustworthy and interpretable intelligent adjudication with human–machine collaboration, judicial data may be used to construct adjudication systems, enhancing transparency and explainability, while future systems may move toward a paradigm of deep human–AI integration. A collaborative judicial framework can be established in which human judgment retains central authority, while algorithms and human expertise co-evolve. As algorithms process the “is” data they excel at, they can simultaneously optimize themselves by learning how humans handle “ought” information, thereby ensuring that computational results align with legal reasoning and fundamental judicial values.
Combining empirical learning with formal reasoning
The Perspective concludes with a caution: empirical findings are grounded in observed real-world data but should not be treated as universally valid truths. The Leibnizian pursuit does not imply permanent infeasibility. Recent studies have begun exploring mathematical proof assistants, including Lean, to formalize and verify legal rules and procedures. Combining empirical learning with formal reasoning might hold greater future promise.