this folder contains the scripts used to create SWAG, including adversarial filtering. Here's the rough overview:
- Compile a bunch of datasets. We used MPII and ActivityNet Captions.
- Train the LM on those datasets (train first on toronto books). See the folder
lm/
for more info. - Oversample and then perform Adversarial Filtering. See
generate_candidates/
- Ask turkers to rank the distractors. You can use
turktemplate.html
as a starting point. - You're done!
This code is pretty hacky and comes with few guarantees (as with adversarial filtering itself); I figure you're probably going to need to do something different anyways. But hopefully it helps! Open up an issue if you notice anything wrong.