Skip to content

berlino/tensor2struct-public

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
November 25, 2021 23:05
November 25, 2021 23:33
November 25, 2021 23:05
April 12, 2021 10:40
April 12, 2021 10:40
July 8, 2021 22:40
March 18, 2021 18:10
November 25, 2021 23:10
April 12, 2021 10:38
April 12, 2021 10:38

Tensor2Struct

tensor2struct is a package that contains a set of neural semantic parsers based on the encoder-decoder framework. Currently, it supports the following datasets:

  • Overnight
  • Spider
  • Chinese Spider
  • SCAN
  • COGS

Setup

Create a virtual environment and run the setup script.

conda create --name tensor2struct python=3.7
conda activate tensor2struct
./setup.sh

wandb is used for logging. To enable it you can create your own account and wandb login to enable logging. Or you could just wandb off to only allow for dryrun locally.

In general, the raw data is expected to be placed under "/data/TASK_NAME/raw" where TASK_NAME could be spider/ssp/overnight.

Make log/ and ie_dir/ which will be used for storing checkpoints and predictions (during inference).

Experiments

Tensor2struct has been the backbone architecture for implementing new models, objectives, algorithms proposed in the following papers. To reproduce experiments from a paticular paper, the corresponding link below will take to detailed instructions.

Citations

If you use tensor2struct, please cite one of the following papers.

bibtex
@inproceedings{wang-etal-2021-meta,
    title = "Meta-Learning for Domain Generalization in Semantic Parsing",
    author = "Wang, Bailin  and
      Lapata, Mirella  and
      Titov, Ivan",
    booktitle = "Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
    month = jun,
    year = "2021",
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/2021.naacl-main.33",
    doi = "10.18653/v1/2021.naacl-main.33",
    pages = "366--379",
}
bibtex
@inproceedings{wang-etal-2021-learning-executions,
    title = "Learning from Executions for Semantic Parsing",
    author = "Wang, Bailin  and
      Lapata, Mirella  and
      Titov, Ivan",
    booktitle = "Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
    month = jun,
    year = "2021",
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/2021.naacl-main.219",
    doi = "10.18653/v1/2021.naacl-main.219",
    pages = "2747--2759",
}
bibtex
@inproceedings{wang-etal-2021-learning-synthesize,
    title = "Learning to Synthesize Data for Semantic Parsing",
    author = "Wang, Bailin  and
      Yin, Wenpeng  and
      Lin, Xi Victoria  and
      Xiong, Caiming",
    booktitle = "Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
    month = jun,
    year = "2021",
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/2021.naacl-main.220",
    doi = "10.18653/v1/2021.naacl-main.220",
    pages = "2760--2766",
}
bibtex
@inproceedings{conklin-etal-2021-meta,
    title = "Meta-Learning to Compositionally Generalize",
    author = "Conklin, Henry  and
      Wang, Bailin  and
      Smith, Kenny  and
      Titov, Ivan",
    booktitle = "Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)",
    month = aug,
    year = "2021",
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2021.acl-long.258",
    doi = "10.18653/v1/2021.acl-long.258",
    pages = "3322--3335",
}
bibtex
@inproceedings{
wang2021structured,
title={Structured Reordering for Modeling Latent Alignments in Sequence Transduction},
author={bailin wang and Mirella Lapata and Ivan Titov},
booktitle={Thirty-Fifth Conference on Neural Information Processing Systems},
year={2021},
url={https://openreview.net/forum?id=X2Cxixkcpx}
}

Acknowledgement

Tensor2struct is a generalization of RAT-SQL.

About

Semantic parsers based on encoder-decoder framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages