Code Monkey home page Code Monkey logo

lm-ood's People

Contributors

uppaal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lm-ood's Issues

Trouble reproducing results on the paper

Hi @Uppaal thanks for the amazing work. We are trying to reproduce some of your results on our local machine and we are unable to replicate the numbers in the paper in Table 2.

  • Conda environment was created with python 3.9.0.
  • Package versions in original “requirements.txt” were removed due to the installer unable to resolve conflict among package requirements.
  • All packages were installed successfully after the removal of versions.
  • Config files were modified to use target dataset:
    For each set of ood detection experiment being run, in domain data is set to “task_name”  and included in the “ood_datasets” list. The real ood data is included as the other element of the list.
    Example config used:
{
    "MODEL_DIR": "~/Desktop/lm-ood/model",
    "DATA_DIR": "~/Desktop/lm-ood/data",
    "root_path": "~/Desktop/lm-ood/data/src",
    "task_name": "imdb",
    "ood_datasets": "['imdb','sst2']",
    "model_class": "roberta",
    "do_train": false,
    "num_train_epochs": 10,
    "CUDA_VISIBLE_DEVICES": 0
}

The rest parameters were left without being modified in config.py. The default config as is, we assume uses SupCon as Loss Function. (seed not changed)
 
In the code, some of the paths are hardcoded to local paths, so auto download breaks. So a pre-trained Roberta model was downloaded from hugging face https://huggingface.co/roberta-base and placed under model/pretained_models folder named as “roberta_base”.
After run

. bin/start.sh
 
followed by 
python run run_ood_detection.py
numbers were recorded from the log as spreadsheet.
To run training with supcon, we modified the “do_train” variable to true and re-run the script.

Our results comparing those from the paper are below:
20NG -> SST2

Screen Shot 2023-09-28 at 10 53 30 AM Screen Shot 2023-09-28 at 10 54 53 AM

20NG ->RTE
Screen Shot 2023-09-28 at 10 56 28 AM
Screen Shot 2023-09-28 at 10 57 55 AM

ImDB-> SST2
Screen Shot 2023-09-28 at 10 59 43 AM
Screen Shot 2023-09-28 at 10 59 15 AM

Furthermore, when use_train=True we find that the supcon results are different on different machines, note that we have left the seed unchanged.

Any help to let us reproduce the results would be greatly appreciated.

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.