モデル概要
モデル特徴
モデル能力
使用事例
🚀 LEGAL - BERT: 法科大学院を卒業したマッペットたち
LEGAL - BERTは、法的ドメイン向けのBERTモデルファミリーです。法的自然言語処理(NLP)研究、計算法学、および法的技術アプリケーションの支援を目的としています。LEGAL - BERTのさまざまなバリエーションを事前学習するために、公開されているリソースから複数の分野(立法、裁判例、契約など)の多様な英語の法的テキスト12GBを収集しました。サブドメインバリアント(CONTRACTS - 、EURLEX - 、ECHR - )および/または一般的なLEGAL - BERTは、ドメイン固有のタスクにおいて、そのままのBERTよりも優れた性能を発揮します。これは、EU立法に基づいて事前学習されたサブドメインバリアントです。
I. Chalkidis, M. Fergadiotis, P. Malakasiotis, N. Aletras and I. Androutsopoulos. "LEGAL - BERT: The Muppets straight out of Law School". In Findings of Empirical Methods in Natural Language Processing (EMNLP 2020) (Short Papers), to be held online, 2020. (https://aclanthology.org/2020.findings-emnlp.261)
✨ 主な機能
📚 事前学習コーパス
LEGAL - BERTの事前学習コーパスには以下が含まれます。
- 116,062件のEU立法文書で、EURLEX(http://eur - lex.europa.eu)から公開されています。EURLEXはEU出版局の管理下にあるEU法のリポジトリです。
- 61,826件の英国立法文書で、英国立法ポータル(http://www.legislation.gov.uk)から公開されています。
- 19,867件の欧州司法裁判所(ECJ)の判例で、EURLEXからも入手可能です。
- 12,554件の欧州人権裁判所(ECHR)の判例で、HUDOC(http://hudoc.echr.coe.int/eng)から入手できます。
- 164,141件の米国各地の裁判所の判例で、Case Law Access Projectポータル(https://case.law)にあります。
- 76,366件の米国契約書で、米国証券取引委員会(SECOM)のデータベースEDGAR(https://www.sec.gov/edgar.shtml)から取得できます。
🔧 事前学習の詳細
- Google BERTのGitHubリポジトリ(https://github.com/google - research/bert)に提供されている公式コードを使用してBERTを学習させました。
- 英語のBERT - BASEモデル(12層、768隠れ層、12ヘッド、1億1000万パラメータ)に似たモデルを公開しました。
- 同じ学習設定を選択しました。すなわち、バッチサイズ256、シーケンス長512の100万ステップの学習を、初期学習率1e - 4で行いました。
- TensorFlow Research Cloud (TFRC)から無料で提供された単一のGoogle Cloud TPU v3 - 8を使用することができ、GCP research creditsも活用しました。これらのGoogleプログラムに感謝いたします!
📦 モデル一覧
モデル名 | モデルパス | 学習コーパス |
---|---|---|
CONTRACTS - BERT - BASE | nlpaueb/bert - base - uncased - contracts |
米国契約書 |
EURLEX - BERT - BASE | nlpaueb/bert - base - uncased - eurlex |
EU立法 |
ECHR - BERT - BASE | nlpaueb/bert - base - uncased - echr |
ECHR判例 |
LEGAL - BERT - BASE * | nlpaueb/legal - bert - base - uncased |
すべて |
LEGAL - BERT - SMALL | nlpaueb/legal - bert - small - uncased |
すべて |
* LEGAL - BERT - BASEは、Chalkidisら(2020)でLEGAL - BERT - SCと呼ばれているモデルです。このモデルは、以下に述べる法的コーパスで新しく作成された語彙を使用して、同じコーパスで学習されたsentence - pieceトークナイザーによってゼロから学習されました。
** 多くの方がLEGAL - BERT - FPモデル(元のBERT - BASEチェックポイントに依存するモデル)に関心を示されたため、これらのモデルはArchive.org(https://archive.org/details/legal_bert_fp)で公開されています。これらのモデルは二次的なもので、Chalkidisら(2020)の未解決の問題に深く掘り下げたい方にのみ興味があるかもしれません。
🚀 クイックスタート
💻 使用例
基本的な使用法
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("nlpaueb/bert-base-uncased-eurlex")
model = AutoModel.from_pretrained("nlpaueb/bert-base-uncased-eurlex")
言語モデルとしてのLEGAL - BERTバリアントの使用
コーパス | モデル | マスクトークン | 予測結果 |
---|---|---|---|
BERT - BASE - UNCASED | |||
(契約書) | This [MASK] Agreement is between General Motors and John Murray . | employment | ('new', '0.09'), ('current', '0.04'), ('proposed', '0.03'), ('marketing', '0.03'), ('joint', '0.02') |
(ECHR) | The applicant submitted that her husband was subjected to treatment amounting to [MASK] whilst in the custody of Adana Security Directorate | torture | ('torture', '0.32'), ('rape', '0.22'), ('abuse', '0.14'), ('death', '0.04'), ('violence', '0.03') |
(EURLEX) | Establishing a system for the identification and registration of [MASK] animals and regarding the labelling of beef and beef products . | bovine | ('farm', '0.25'), ('livestock', '0.08'), ('draft', '0.06'), ('domestic', '0.05'), ('wild', '0.05') |
CONTRACTS - BERT - BASE | |||
(契約書) | This [MASK] Agreement is between General Motors and John Murray . | employment | ('letter', '0.38'), ('dealer', '0.04'), ('employment', '0.03'), ('award', '0.03'), ('contribution', '0.02') |
(ECHR) | The applicant submitted that her husband was subjected to treatment amounting to [MASK] whilst in the custody of Adana Security Directorate | torture | ('death', '0.39'), ('imprisonment', '0.07'), ('contempt', '0.05'), ('being', '0.03'), ('crime', '0.02') |
(EURLEX) | Establishing a system for the identification and registration of [MASK] animals and regarding the labelling of beef and beef products . | bovine | (('domestic', '0.18'), ('laboratory', '0.07'), ('household', '0.06'), ('personal', '0.06'), ('the', '0.04') |
EURLEX - BERT - BASE | |||
(契約書) | This [MASK] Agreement is between General Motors and John Murray . | employment | ('supply', '0.11'), ('cooperation', '0.08'), ('service', '0.07'), ('licence', '0.07'), ('distribution', '0.05') |
(ECHR) | The applicant submitted that her husband was subjected to treatment amounting to [MASK] whilst in the custody of Adana Security Directorate | torture | ('torture', '0.66'), ('death', '0.07'), ('imprisonment', '0.07'), ('murder', '0.04'), ('rape', '0.02') |
(EURLEX) | Establishing a system for the identification and registration of [MASK] animals and regarding the labelling of beef and beef products . | bovine | ('live', '0.43'), ('pet', '0.28'), ('certain', '0.05'), ('fur', '0.03'), ('the', '0.02') |
ECHR - BERT - BASE | |||
(契約書) | This [MASK] Agreement is between General Motors and John Murray . | employment | ('second', '0.24'), ('latter', '0.10'), ('draft', '0.05'), ('bilateral', '0.05'), ('arbitration', '0.04') |
(ECHR) | The applicant submitted that her husband was subjected to treatment amounting to [MASK] whilst in the custody of Adana Security Directorate | torture | ('torture', '0.99'), ('death', '0.01'), ('inhuman', '0.00'), ('beating', '0.00'), ('rape', '0.00') |
(EURLEX) | Establishing a system for the identification and registration of [MASK] animals and regarding the labelling of beef and beef products . | bovine | ('pet', '0.17'), ('all', '0.12'), ('slaughtered', '0.10'), ('domestic', '0.07'), ('individual', '0.05') |
LEGAL - BERT - BASE | |||
(契約書) | This [MASK] Agreement is between General Motors and John Murray . | employment | ('settlement', '0.26'), ('letter', '0.23'), ('dealer', '0.04'), ('master', '0.02'), ('supplemental', '0.02') |
(ECHR) | The applicant submitted that her husband was subjected to treatment amounting to [MASK] whilst in the custody of Adana Security Directorate | torture | ('torture', '1.00'), ('detention', '0.00'), ('arrest', '0.00'), ('rape', '0.00'), ('death', '0.00') |
(EURLEX) | Establishing a system for the identification and registration of [MASK] animals and regarding the labelling of beef and beef products . | bovine | ('live', '0.67'), ('beef', '0.17'), ('farm', '0.03'), ('pet', '0.02'), ('dairy', '0.01') |
LEGAL - BERT - SMALL | |||
(契約書) | This [MASK] Agreement is between General Motors and John Murray . | employment | ('license', '0.09'), ('transition', '0.08'), ('settlement', '0.04'), ('consent', '0.03'), ('letter', '0.03') |
(ECHR) | The applicant submitted that her husband was subjected to treatment amounting to [MASK] whilst in the custody of Adana Security Directorate | torture | ('torture', '0.59'), ('pain', '0.05'), ('ptsd', '0.05'), ('death', '0.02'), ('tuberculosis', '0.02') |
(EURLEX) | Establishing a system for the identification and registration of [MASK] animals and regarding the labelling of beef and beef products . | bovine | ('all', '0.08'), ('live', '0.07'), ('certain', '0.07'), ('the', '0.07'), ('farm', '0.05') |
下流タスクでの評価
「LEGAL - BERT: The Muppets straight out of Law School」という論文(Chalkidisら、2020、https://aclanthology.org/2020.findings - emnlp.261)の実験を参照してください。
著者 - 出版物
@inproceedings{chalkidis-etal-2020-legal,
title = "{LEGAL}-{BERT}: The Muppets straight out of Law School",
author = "Chalkidis, Ilias and
Fergadiotis, Manos and
Malakasiotis, Prodromos and
Aletras, Nikolaos and
Androutsopoulos, Ion",
booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2020",
month = nov,
year = "2020",
address = "Online",
publisher = "Association for Computational Linguistics",
doi = "10.18653/v1/2020.findings-emnlp.261",
pages = "2898--2904"
}
私たちについて
AUEBの自然言語処理グループは、コンピュータが自然言語テキストを処理および生成できるようにするアルゴリズム、モデル、およびシステムを開発しています。
このグループの現在の研究分野は以下の通りです。
- データベース、オントロジー、ドキュメントコレクション、およびウェブ向けの質問応答システム、特にバイオメディカル質問応答
- データベースおよびオントロジーからの自然言語生成、特にセマンティックウェブオントロジー
- テキスト分類、スパムおよび虐待的コンテンツのフィルタリングを含む
- 情報抽出および意見マイニング、法的テキスト分析およびセンチメント分析を含む
- ギリシャ語向けの自然言語処理ツール、例えばパーサーおよび固有表現認識器
- 自然言語処理における機械学習、特にディープラーニング
このグループは、アテネ経済大学の情報学部の情報処理研究所の一部です。
Ilias Chalkidis 代表 AUEBの自然言語処理グループ
| Github: @ilias.chalkidis | Twitter: @KiddoThe2B |
📄 ライセンス
このプロジェクトはCC - BY - SA - 4.0ライセンスの下で公開されています。



