Git Product home page Git Product logo

protoco's Introduction

Prompt to be Consistent is Better than Self-Consistent? Few-Shot and Zero-Shot Fact Verification with Pre-trained Language Models (Accepted as Findings of ACL 2023)

This is the official repository of Few-Shot and Zero-Shot Fact Verification model ProToCo.

  • ProToCo is a novel prompt-based consistency training method for improving PLMs on few-shot and zero-shot fact verification by explicitly imposing a general factuality-grounded consistency scheme on PLMs.

Requirements

Our code is developed based on the T-Few codebase. Plese refer to the T-Few repo for setup instruction.

The format of input data

Please ensure that the train and test data files are in JSONL format, with the following fields for each line::

{"id": instance id, "gold_evidence_text": gold evidence text, "claim":claim text, "label": label}

You may also download the processed files from this link.

Training & Evaluation

To train ProToCo with default hyperparameters, run the following command for few-shot setting:

sh train_fs.sh

run the following command for zero-shot setting:

sh train_zs.sh

After training, the script will automatically output the test results. You can also customize the hyperparameters and data directory in the default.json file to train your custom dataset with specific hyperparameters. If you set the eval_before_training parameter in default.json to true and num_steps to 0, you can use the same command to test the trained model without training.

Citation

If you use this code in your research, please cite our paper.

@inproceedings{zeng-gao-2023-prompt,
    title = "Prompt to be Consistent is Better than Self-Consistent? Few-Shot and Zero-Shot Fact Verification with Pre-trained Language Models",
    author = "Zeng, Fengzhu  and
      Gao, Wei",
    booktitle = "Findings of the Association for Computational Linguistics: ACL 2023",
    month = jul,
    year = "2023",
    address = "Toronto, Canada",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2023.findings-acl.278",
    pages = "4555--4569"
}

Contact for issues

References & Open sources

protoco's People

Contributors

znhy1024 avatar 1170300920 avatar

Watchers

 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.