GithubHelp home page GithubHelp logo

mai-project's Introduction

relevant-evidence-detection

Original paper: https://doi.org/10.48550/arXiv.2311.09939 Orignal Implementation: https://github.com/stevejpapad/relevant-evidence-detection

Reproduce

  • Clone this repo:
git clone https://github.com/jonasrohw/mai-project
cd mai-project
python src/main.py
  • Create a python (>= 3.9) environment (Anaconda is recommended)
  • Install all dependencies with: pip install -r requirements.txt.

Datasets

If you want to reproduce the experiments on the paper it is necessary to first download the following datasets and save them in their respective folder:

Folders:

├── README.md
├── checkpoints_pt
├── create-subset.py
├── data
│   ├── VERITE
│   ├── VisualNews
│   │   └── origin
│   └── news_clippings
│       └── queries_dataset
├── requirements.txt
├── results
├── setup_mnt_data.sh
├── src
│   ├── experiment.py
│   ├── extract_features.py
│   ├── main.py
│   ├── models.py
│   ├── models_dynamic.py
│   ├── prepare_VERITE.py
│   ├── prepare_evidence.py
│   ├── utils.py
│   └── utils_evidence.py
└── verite-healing.py

mai-project's People

Contributors

diiinesh avatar jonasrohw avatar stevejpapad avatar melikaslz avatar aritram23 avatar e-henrich avatar

Watchers

 avatar  avatar

mai-project's Issues

Modality fusion method: Cross Attention between features and evidences

In this modality fusion method, we try to improve the model by applying cross attention to the features and evidences.
By doing that we hope that we get representations that have encoded more complex releationships between the features and evidences.

The modifications to make in the codebase:

  • models.py
    -- implementation of the CrossAttention module and StackedCrossAttention module

  • utils.py
    -- prepare_input(): calling the StackedCrossAttention module and applying cross attention to the features/evidences
    -- eval_verite(), train_step(), eval_step(): all of these functions use the prepare_input funtion

  • run_experiment.py
    -- included new parameters: num_heads_options=4, dropout_options=0.2, num_layers_options=3,
    weight_decay=1e-3
    -- increased early_stopping from 10 to 20
    -- initialization of the StackedCrossAttention module
    -- init weights of the model with xavier weights
    -- modified optimizer such that the parameters of the StackedCrossAttention module also gets optimized and
    -- included weight_decay -> mitigates overfitting
    -- implemented CyclicLR scheduler that increases the learning rate step by step after each epoch, baseLR = 1e-5 and
    max_lr = 1e-3

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.