Giter VIP home page Giter VIP logo

data4comp's Introduction

Data Factors for Better Compositional Generalization

This repository contains the official code for the paper:

Data Factors for Better Compositional Generalization

Xiang Zhou, Yichen Jiang and Mohit Bansal

EMNLP 2023

Dependencies

The code is tested on Python 3.7.9 and PyTorch 1.8.1.

Other dependencies are listed in requirements.txt and can be installed by running pip install -r requirements.txt

This repository uses wandb for logging experiments. So before running your experiments, you need to log in you wandb account.

Datasets and Preprocessing

The preprocessed datasets and resources used in our experiments can be downloaded at here.

To replicate the experiments below, please download the datasets and extract it under the root folder.

Experiments

We provide scripts to run experiments in our paper. All the scripts are under the scripts folder.

For the experiments on increasing the lexical or length complexity of the dataset in Sec. 3, the corresponding scripts are

  • Increasing primitive complexity in SCAN SCAN_transformer_huge.sh. The corresponding baseline for SCAN can be replicated from the instructions at owenzx/met-primaug
  • Increasing primitive complexity in GeoQuery GEO_transformer_prim.sh The corresponding baseline is at GEO_transformer_baseline.sh
  • Increasing length complexity in SCAN SCAN_length.sh

For the experiments changing the curriculum in Table 4 in Sec. 4, the corresponding scripts are

  • On the original dataset: GEO_curriculum_transformer.sh and GEO_curriculum_transformer_prim.sh
  • On the 20x augmentation dataset: GEO_large_curriculum_transformer.sh and GEO_large_curriculum_transformer_prim.sh

For the AugZero experiments in Sec. 4, the corresponding script is

  • On SCAN: SCAN_transformer_zero.sh
  • On Geoquery: GEO_transformer_zero.sh

For the difficulty-related experiments in Sec. 5, the corresponding scripts are

  • Prototype-based difficulty experiments (Fig. 4): ATIS_transformer_difficulty.sh, SMCAL_transformer_all_difficulty.sh and SMCAL_cs_transformer_all_difficulty.sh
  • Increasing example difficulty in SCAN (Fig. 5): SCAN_transformer_jump_complete_len.sh and SCAN_tranformer_jump_complete_pe.sh

Acknowledgement

The code in this repository is based on https://github.com/ekinakyurek/lexical

Reference

@inproceedings{zhou2023data,
  title={Data Factors for Better Compositional Generalization},
  author={Xiang Zhou and Yichen Jiang and Mohit Bansal},
  booktitle={Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing (EMNLP)},
  year={2023}
}

data4comp's People

Contributors

owenzx avatar

Stargazers

 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.