Document attacking translation models with morpheus/seq2sick - #840
Merged
Conversation
Add a verified, working example for MorpheusTan2020 attacking a seq2seq translation model (BLEU vs. a reference translation), and cross-reference the equivalent seq2sick variant (compares against the model's own unperturbed output instead). Answers the open question in #725 about attacking BART on an en-de translation task, now that HuggingFaceModelWrapper's .generate() path (#771) makes it possible. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MorpheusTan2020example for attacking a seq2seq translation model (BLEU vs. a reference translation)Seq2SickCheng2018BlackBoxvariant (compares against the model's own unperturbed output instead of a reference)HuggingFaceModelWrapper's.generate()path (Issues attacking se2seq model (seq2sick)聽#771) makes it possibleTest plan
MorpheusTan2020example end-to-end againstt5-small(translation + attack succeeded).generate()code path against a BART-family checkpoint separatelymake docsrebuild introduces no new Sphinx warnings (same 4 pre-existing, unrelated ones)Closes/relates to #725
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com