Re23:读论文 How Does NLP Benefit Legal System: A Summary of Legal Artificial Intelligence

简介: Re23:读论文 How Does NLP Benefit Legal System: A Summary of Legal Artificial Intelligence

1. Background


legalAI可以将法律从业者从海量的文书工作中解放出来,传统legalAI方法是基于规则(结构化预测方法)或者符号(手工抽取可解释的符号,应用可解释的法律知识在事件、关系等法律文书的符号间推理)的。

legalAI所采用的文本材料有判决文书、合同、法律意见书(legal opinion)等。legalAI对可解释性天然有高要求。

image.png


当前基于表征和基于符号的方法有三大共同挑战:

  1. 知识建模
  2. 法律推理:结合预定义的规则和人工智能技术。复杂的案例场景和法律规定
  3. 可解释性:为了公平性


2. 基于表征的方法


2.1 字、词、概念嵌入

很难直接从法律事实描述中学习专业术语,当前工作1 2主要关注法律专业领域应用现存嵌入方法(如word2vec)。

知识图谱方法有两大挑战:第一,构建法律领域知识图谱很复杂,很多场景下没有可用的知识图谱,所以要从0开始构建。而且不同法律概念可能在不同国家的法律体系下有不同的表示和意义,因此很难构建通用的法律知识图谱。有些工作尝试嵌入法律词典3。第二,通用法律知识图谱可能会和NLP中通用的形式不同,因为通用知识图谱关注实体和概念之间的关系,但legalAI更关注对法律概念的解释。


2.2 预训练语言模型

由于法律文本中存在特有的术语和知识,因此不宜直接使用通用预训练模型。4提出了中文民法和刑法文档上训练得到的预训练模型。

未来研究者可以考虑在PLMs中加入知识,这有助于法律概念之间的推理能力。


3. 基于符号的方法


利用法律领域符号和知识(事件和关系,能提供可解释性)解决legalAI任务。可以使用深度学习方法来提高表现效果


3.1 信息抽取

命名实体识别

关系抽取

事件抽取


在legalAI领域:


  1. 使用本体论的:Named entity recognition in the legal domain for ontology population  Legal NERC with ontologies, Wikipedia and curriculum learning  Ontology learning from Italian legal texts  An ontological chinese legal consultation system
  2. 使用global consistency的
  3. 抽取法律文档中的关系和事件
  • 使用手工设计的规则:Semantic mark-up of Italian legal texts through NLP-based techniques  Legal aspects of text mining
  • 使用CRF:A sequence approach to case outcome detection
  • 使用SVM、CNN、GRU等joint model5:Litigation Analytics: Case Outcomes Extracted from US Federal Court Dockets
  • 使用scale-free identifier network:Event Identification as a Decision Process with Non-linear Representation of Text


抽取出来的符号具有legal basis,可以为司法应用提供可解释性,因此我们不能只关注方法的表现效果。


应用举例:

  1. 关系抽取和遗产纠纷
  2. 事件时间线抽取和刑事案件判决预测


3.2 法律要素抽取

除了上述在通用NLP中也存在的符号外,legalAI还有其独有的符号:法律要素。如是否某人被杀或某物被盗,这些要素被称为犯罪构成要素constitutive elements of crime。

这些要素可以提供法律判决预测的中间监督信息和预测结果的可解释性。

image.png

图中提及的论文:6


中文数据集:CAIL2019-fe(多标签分类任务)

image.png

(图中BERT-MS是把BERT换成了4,体现了domain-specific预训练模型的优势)


4. legalAI应用


4.1 legal judgment prediction (LJP)

在民法法系中,使用案例事实描述信息和法条文本来预测结果。


早期方法在特定条件下用数学或统计学方法分析现存的法律案例,数学方法和法律规则的结合提供了可解释性:Predicting supreme court decisions mathematically: A quantitative analysis of the “right to counsel” cases.  Quantitative analysis of judicial processes: Some practical and theoretical applications  Applying correlation analysis to case prediction  Mathematical models for legal prediction  Predicting supreme court cases probabilistically: The search and seizure cases  The Supreme Court’s many median justices


使用深度学习方法:


  1. 使用新模型来提升表现能力
  • Charge-Based Prison Term Prediction with Deep Gating Network:用门机制提升刑期预测的效果
  • Charge Prediction for Multi-defendant Cases with Multi-scale Attention:提出multi-scale attention解决多被告场景


  1. 探索如何利用法律知识或LJP任务特性
  • Re7:读论文 FLA/MLAC/FactLaw Learning to Predict Charges for Criminal Cases with Legal Basis:用事实和法条之间的attention机制来帮助预测合适的罪名
  • 提出topological graph来利用LJP子任务之间的关系
  • 引入10个有识别力的legal attributes来帮助预测低频罪名。

image.png

(图中论文为)


中文数据集:CAIL(本文中叫C-LJP,将刑期预测建模为回归任务)

英文数据集:Neural Legal Judgment Prediction in English


在CAIL上的实验结果:

image.png

micro-F1和macro-F1之间的差距证明模型在低频标签上表现不好。探索了LJP的few-shot learning,但是需要额外手工标注attribute信息,耗时太久,且难以泛化到其他数据集上。

BERT表现不好的主要原因在法律文本偏长,但BERT的最长输入长度仅为512。话说现在可以用lawformer这个长文本预训练模型了,不知道效果会不会有提升。

TopJudge模型可证明结合基于符号的方法有效果提升。


LJP任务的挑战:

  1. 文档理解和推理:长文本获取全局信息
  2. few-shot learning
  3. 可解释性


4.2 相似案例匹配Similar Case Matching (SCM)

在普通法系中很重要。

从事实、时间和要素级别以不同粒度建模案例关系,属于语义匹配任务。


传统IR方法使用统计学方法,关注术语级别的相似性:TF-IDF和BM25

结合元信息捕获语义相似性

使用机器学习方法,如SVD或因式分解

使用神经网络模型,如多层感知机、CNN、RNN


  1. 构建易用法律搜索引擎:Better Search Engines for Law  Text retrieval in the legal world
  2. 利用更多信息
  • 引用信息:Link analysis for representing and retrieving legal information  Using citation analysis techniques for computer-assisted legal research in continental jurisdictions  Analyzing the Extraction of Relevant Legal Judgments using Paragraph-level and Citation Information
  • 法律概念:Concept and context in legal information retrieval  On the Concept of Relevance in Legal Information Retrieval
  1. 使用深度学习方法:Building legal case retrieval systems with lexical matching and summarization using a pre-trained phrase scoring model提出基于文档和句子级别池化的CNN模型,在COLIEE上达到了SOTA结果。Extending Full Text Search for Legal Document Collections Using Word Embeddings和Legal document retrieval using document vector embeddings and deep learning使用更好的嵌入方法来做legalIR任务。


legalIR数据集:

COLIEE

CaseLaw

CM


本文在CM上用如下baseline做实验:

  1. 术语匹配方法TF-IDF
  2. 有2个共享参数encoder的孪生网络:TextCNN、BiDAF、BERT和distance function
  3. 句子级别的语义匹配模型:ABCNN

文档级别:SMASH-RNN

image.png


声称,法律专家认为数据集中的要素定义了案例相似性,仅考虑术语和语义相似性是不够的。


可研究的方向:

  • Elemental-based representation
  • Knowledge incorporation


4.3 legalQA (LQA)

有的问题关注法律概念的解释,有的关注特定案例的分析。可能由专业人员或非专业人员提出(尤其在描述领域术语上会有差异)。


数据集:

CJRC:与SQUAD 2.0形式相同,包含span extraction、判断题和没有回答的问题。

COLIEE:包含500道判断题。

美国法考:Passing a USA National Bar Exam: a First Corpus for Experimentation

中国法考:JEC-QA,多选题,包含knowledge-driven questions (KD-Questions) and case-analysis questions (CA-Questions)两种问题

image.png

(图中论文:)


  • 基于规则的方法:Answering questions with an n-gram based passage retrieval engine  Answering yes/no questions in legal bar exams  Two-step cascaded textual entailment for legal bar exam question answering
  • 利用其他信息
  1. 概念解释:Legal Yes/No Question Answering System Using Case-Role Analysis和Using Legal Ontologies with Rules for Legal Textual Entailment
  2. 构建相关文档为图,辅助推理:NLP for Shallow Question Answering of Legal Documents Using Graphs和Answering Legal Questions by Mining Reference Information
  • 机器学习方法

1.CRF:Question analysis for Vietnamese legal question answering

2.SVM:Legal Question Answering using Ranking SVM and Deep Convolutional Neural Network

3.CNN:A convolutional neural network in legal question answering

image.png


LegalQA任务的挑战:

  1. Legal multi-hop reasoning
  2. Legal concepts understanding


5. 其他


  1. 各种任务都可以结合两种方法来解决。
  2. 对于没有数据集或数据集较小的任务,可以通过构建大且高质量的数据集,或使用few-shot/zero-shot方法来解决。
  3. 需要考虑legalAI中的道德问题。legalAI不可能代替专家工作,只能作为辅助。


6. 代码复现


先放个坑在这里,等我服务器好了再说。


相关文章
|
4月前
|
机器学习/深度学习 编解码 自然语言处理
【虚拟人综述论文】Human-Computer Interaction System: A Survey of Talking-Head Generation
【虚拟人综述论文】Human-Computer Interaction System: A Survey of Talking-Head Generation
|
6月前
|
机器学习/深度学习 算法 数据处理
Stanford 机器学习练习 Part 3 Neural Networks: Representation
从神经网络开始,感觉自己慢慢跟不上课程的节奏了,一些代码好多参考了别人的代码,而且,让我现在单独写也不一定写的出来了。学习就是一件慢慢积累的过程,两年前我学算法的时候,好多算法都完全看不懂,但后来,看的多了,做的多了,有一天就茅塞顿开。所有的困难都是一时的,只要坚持下去,一切问题都会解决的。没忍住发了点鸡汤文。
19 0
|
11月前
|
自然语言处理 数据挖掘
【论文解读】Do Prompts Solve NLP Tasks Using Natural Language?
提示学习实现文本分类的各类方法对比的论文
74 0
|
11月前
|
机器学习/深度学习 自然语言处理
【论文解读】Self-Explaining Structures Improve NLP Models
浙大联合北大出了篇比较有意思的文章,从模型解释的角度设计了一个称为Self-Explaining的网络模型,该网络模型可以直接加在任何预训练模型之上,来提高模型的性能和准确率。现在让我们来看看这篇文章吧。
156 0
|
12月前
|
机器学习/深度学习 传感器 数据挖掘
Review on the Recent Welding Research with Application of CNN-Based Deep Learning
Guo等人16)将CNN应用于线管制造过程中的电阻焊,提出了一种正常焊缝与缺陷焊缝的分类模型,准确率达到99.01%。
68 0
《Understanding,generalisation,and transfer learning in deep neural networks》电子版地址
Understanding,generalisation,and transfer learning in deep neural networks
61 0
《Understanding,generalisation,and transfer learning in deep neural networks》电子版地址
《Multi-Task Multi-Network Joint-Learning of Deep Residual Networks and Cycle-Consistency Generative Adversarial Networks for Robust Speech Recognition》电子版地址
Multi-Task Multi-Network Joint-Learning of Deep Residual Networks and Cycle-Consistency Generative Adversarial Networks for Robust Speech Recognition
72 0
《Multi-Task Multi-Network Joint-Learning of Deep Residual Networks and Cycle-Consistency Generative Adversarial Networks for Robust Speech Recognition》电子版地址
|
机器学习/深度学习 算法 搜索推荐
Paper:《A Few Useful Things to Know About Machine Learning—关于机器学习的一些有用的知识》翻译与解读
Paper:《A Few Useful Things to Know About Machine Learning—关于机器学习的一些有用的知识》翻译与解读
|
机器学习/深度学习 数据挖掘 计算机视觉
CV:翻译并解读2019《A Survey of the Recent Architectures of Deep Convolutional Neural Networks》第四章(一)
CV:翻译并解读2019《A Survey of the Recent Architectures of Deep Convolutional Neural Networks》第四章
CV:翻译并解读2019《A Survey of the Recent Architectures of Deep Convolutional Neural Networks》第四章(一)
|
机器学习/深度学习 数据挖掘 Java
CV:翻译并解读2019《A Survey of the Recent Architectures of Deep Convolutional Neural Networks》第四章(二)
CV:翻译并解读2019《A Survey of the Recent Architectures of Deep Convolutional Neural Networks》第四章