GithubHelp home page GithubHelp logo

lshy687 / d-ladan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prometheusxn/d-ladan

0.0 0.0 0.0 1.28 MB

The source code of article "Distinguish Confusion in Legal Judgment Prediction via Revised Relation Knowledge of Law Articles", which is the revised journal version of article ''Distinguish Confusing Law Articles for Legal Judgment Prediction'', ACL 2020.

License: MIT License

Python 100.00%

d-ladan's Introduction

D-LADAN (under construction)

The source code of the article "Distinguish Confusion in Legal Judgment Prediction via Revised Relation Knowledge of Law Articles", which is the revised journal version of the article ''Distinguish Confusing Law Articles for Legal Judgment Prediction'', ACL 2020.

In this version, we consider the confusing law article (or charge) problem from both prior and posterior perspectives. Through the analysis of the problem, we conflate the posterior confusing law article (or charge) problem and the data imbalance problem together and make further improvements to our conference model: LADAN.

Compared with LADAN, our main improvement in this work is the proposed momentum-updated revised memory mechanism, which dynamically senses the posterior similarity relationships between law articles (or charges) learned by the model during the training process. Besides, a combined weighted graph distillation operation (GDO) is proposed to adaptively capture the distinguishable features from such a post-hoc similarity graph structure. So far, D-LADAN can correct the negative bias caused by the data imbalance problem and accurately extract the differences between law articles (or charges) to distinguish them. The overall framework of D-LADAN is as follows:

image

Introduction

We refactored LADAN based on the Tensorflow2.x, and built this project. Here, we briefly described the structure of the project and the functionality of each subfolder, as follows:

Config			// [important] the config of our D-LADAN and some baselines
Model_component     // [important] the model components that make up the various models.
├── Ladan_component.py      //[important] the main component of the LADAN model.
├── Ladan_ppk_component_Criminal.py     // main LADAN component for the criminal datasets.
├── Ladan_ppk_component.py      //[important] the main component of the D-LADAN model.
└── Ladanppk_component_Criminal.py 
Model     // [important] the keras model for various models.
├── LADAN_model.py      //[important] the Tensorflow 2.x version of the full LADAN+MTL model.
├── LADAN_model_C.py
├── DLADAN_model.py     //[important] the Tensorflow 2.x version of the full D-LADAN(+MTL, TOPJUDGE, MPBFN) model.
└── DLADAN_model_C.py
train     // [important] the train code for the corresponding models.
├── train_LADAN.py      // [important] the training code of the LADAN+MTL model.
├── train_LADAN_C.py
├── train_DLADAN.py      // [important] the training code of the D-LADAN model.
└── train_DLADAN_C.py 

utils     // some util functions used in our project.

Data Processing

For training, you should generate the input data format and put them into the "processed_dataset" folder.

You can download our processed dataset from our Google Driver: processed dataset (for D-LADAN).

Usage

The basic requirements for all the libraries are in the requirements.txt.

Future Work

There are many recent works comparing the models that have a PLM backbone with our work to verify their effectiveness. We complain that such a comparison is unfair and does not directly prove the superiority of their frameworks, due to the inherent performance differences between the simple backbones (e.g., CNN, RNN, and LSTM) and the PLM-like backbone (e.g., BERT, Lawformer, and so on). Thus, we'll implement BERT versions of LADAN and D-LADAN later. We call for an objective and fair comparison between methods, so as to further advance the development of the industry.

d-ladan's People

Contributors

prometheusxn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.