RockyLzy / TextDefender

codes for "Searching for an Effective Defender:Benchmarking Defense against Adversarial Word Substitution"
MIT License
31 stars 2 forks source link

Text length Issue #6

Open Han8931 opened 2 years ago

Han8931 commented 2 years ago

Hi,

It seems the code limits the maximum sequence length of input texts, but in the original paper, I can't find such a setting. What is the correct experiment setup?

zjiehang commented 2 years ago

Hi,

It seems the code limits the maximum sequence length of input texts, but in the original paper, I can't find such a setting. What is the correct experiment setup?

For SST-2 and agnews, we recommend small sequence_length (eg. 128), since the average length of SST-2 and agnews is approximately 25 and 45. For IMDB, we recommend larger, e.g., 256 or larger.