Facts2Law: Bridging the Gap Between Legal Facts and Judicial Authority
813_Facts2Law using deep learning to provide a legal qualification to a set of facts.
Facts2Law is a legal recommendation system developed by Lexum that utilizes Deep Learning to predict relevant legal citations and statutes based on factual descriptions. By leveraging the massive CanLII database of Canadian case law, it transforms plain-language legal queries into authoritative judicial references using document embeddings and citation graph analysis.
TL;DR
Facts2Law is a deep learning-powered system designed to provide "legal qualifications" to natural language facts. By training on millions of Canadian court decisions from the CanLII database, it predicts which statutes and cases are most relevant to a specific legal problem described in plain English, moving beyond simple keyword search to a structural understanding of law.
Contextualizing the Research
In the legal domain, the distance between a client's story (Facts) and the applicable law (Statutes/Precedents) is often bridged only by a lawyer’s experience. Lexum, in collaboration with the Montreal Institute for Learning Algorithms (MILA), seeks to automate this mapping. Facts2Law is positioned not just as a search tool, but as an inference engine that treats the existing citation network of Canadian law as a roadmap for relevance.
The Problem: The Limits of Full-Text Search
Traditional legal research tools suffer from two main flaws:
- Semantic Gap: Users describing a "visa rejection" might not know to search for "Section 72 of the Immigration and Refugee Protection Act."
- Ignorance of Authority: Standard "more like this" algorithms treat documents as bags of words, ignoring the "social network" of law—where one case citing another is a powerful signal of authority and relevance.
Methodology: Citation Graphs and Document Embeddings
The core innovation of Facts2Law lies in how it frames the recommendation problem. Since court decisions are essentially professional legal opinions that cite relevant laws, the authors use these citations as "labels" for relevance.
The Architecture
The production model uses a multi-branch Neural Network:
- Input: The system takes a "brief" (the query) and a "target document" (a candidate law/case).
- Embeddings: It generates high-dimensional vectors (embeddings) for both documents.
- Graph Context: Unlike standard NLP, it incorporates a "weighted summary" of neighboring nodes from the citation graph, ensuring that the model understands the legal context surrounding a document.
- Fusion: These branches are fed into fully connected layers, merged, and modulated by temporal metadata (the age of the brief) to ensure the law suggested is still current and relevant.
Figure 1: The system leverages the massive CanLII database, encompassing 14 jurisdictions and millions of citations.
Experimental Proof: From Plain Language to Section 72
The paper demonstrates the model’s efficacy through a real-world scenario. A user describes a vague visa rejection from India on a public forum. Despite the informal language ("rejection letter," "flight bookings," "cousin"), Facts2Law successfully predicts Section 72 of the Immigration and Refugee Protection Act as the primary legal source.
Figure 2: Facts2Law interface showing the prediction of specific legislative sections based on a natural language query.
Deep Insight & Conclusion
The genius of Facts2Law is its use of the Reflex citator. By resolving parallel citations (where different judges cite the same case using different reporter names), Lexum created a clean, dense graph of Canadian law. This dataset allows the deep learning model to understand that "relevance" is not just about shared words, but about the established connections within the judicial system.
Limitations & Future Work
While powerful, the system is currently a "recommender." It identifies what to read, but it doesn't yet explain why or synthesize a legal argument. The future of this technology likely lies in combining these graph-based embeddings with Large Language Models (LLMs) to provide both the citation and a generated summary of its applicability.
Takeaway: Facts2Law proves that the structural metadata of law (citations) is just as important as the text itself when training AI for legal professionals.
