jind11 / TextFooler

A Model for Natural Language Attack on Text Classification and Inference
MIT License
485 stars 79 forks source link

Number of queries in attack_classification.py etc. #43

Open superctj opened 3 years ago

superctj commented 3 years ago

Thank you for open-sourcing the code! I would like to double-check the following concerns

  1. Does num_queries in attack_classification.py reflect how many queries were made to the classifier for each input text?

  2. Is the similarity threshold issue reported in the text-attack library already fixed in the current text-fooler implementation?

Another comment is that in the prerequisites part of README, the -r flag is missing in pip install requirements.txt. It should be pip install -r requirements.txt. Hope it helps :-0

jind11 commented 3 years ago
  1. number of queries is the number of times that the classifier is queried for obtaining the output probability vectors
  2. In order to replicate the numbers in our paper, you should set the similarity threshold to 0.5 Thanks for the comment. I will correct it soon!