Partial code companion to the paper "With Such Friends, Who Needs Enemies? Using A "Friendly" Question Type Discriminator For Robust QA Training" (see pdf in the repository).
Since the project was developed on top of starter code for the CS224N course at Stanford, the code that trains and evaluates the model is not allowed to be published. We include here in AdvFriendlyQAmodel.py the code for implementing the original neural network architecture that is explained in the paper in PyTorch. To see the theory behind this architecture as well as the way the model was trained and evaluated please see the paper.