Git Product home page Git Product logo

lreasoner's Introduction

LReasoner

The source code of Paper "Logic-Driven Context Extension and Data Augmentation for Logical Reasoning of Text"

Our ensemble system is the first to surpass human performance on both EASY set and HARD set of ReClor (EvalAI leaderboard). If you find this paper useful, please cite this paper:

@misc{wang2021logicdriven,
      title={Logic-Driven Context Extension and Data Augmentation for Logical Reasoning of Text}, 
      author={Siyuan Wang and Wanjun Zhong and Duyu Tang and Zhongyu Wei and Zhihao Fan and Daxin Jiang and Ming Zhou and Nan Duan},
      year={2021},
      eprint={2105.03659},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

Setting up

  1. To set up the environment, please install the packages in the requirements.txt.
pip install -r requirements.txt
  1. To get the datasets, you can refer to the paper ReClor: A Reading Comprehension Dataset Requiring Logical Reasoning to get the original data. We also provide our preprocessed data in reclor-data directory. Or you can start from the original data and preprocess it by the following steps:
  • Step 1: exrtact the logical symbols and identify the logical expressions in the context, then infer the entailed logical expressions;
  • Step 2: select a logical expreesion in the context and construct the negative samples based on it.
cd DataPreprocess
python extract_logical_expressions_v2.py
python construct_negative_samples_v2.py

Usage

Then you can run the LReasoner system in the scripts directory as following:

1. to run LReasoner_roberta
        bash run_roberta_DA_CE.sh
    
2. to run LReasoner_albert
        bash run_albert_DA_CE.sh

Here CE means context extension while DA means data augmentation.

Result

We obtain the following results:

Model Test EASY HARD
LReasoner-RoBERTa 62.4 81.4 47.5
LReasoner-ALBERT 70.7 81.1 62.5
Human Performance 63.0 57.1 67.2

The checkpoints of LReasoner-RoBERTa and LReasoner-ALBERT can be accessed here: https://drive.google.com/drive/folders/1Gqoa7DR9wZmMhpLHuXQnznEhdnlZnkbp?usp=sharing.

We only evaluate our model on the ReClor dataset and plan to try more datasets. As codes are publicly available, anyone interested could also have a try.

lreasoner's People

Contributors

siyuanwangw avatar

Watchers

James Cloos 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.