You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to get the task name of the victim model during the transformations #444
Hi. First of all, thank you for your awesome project!
I'm trying to add a new recipe with MLM-based substitution (e.g., BAE or CLARE).
And I've struggled to load the BERT that is also trained on the same dataset with the victim model.
For instance, if the victim model is some arbitrary model fine-tuned on the YELP polarity dataset, I want to use the BERT that is also trained on YELP for word substitution or insertion.
This is also an enhancement that I think could be very useful. When trying to enhance Tutorial 9, I needed to find a faster alternative to the CamemBert model that was pretrained on the Allocine dataset. It was hard to locate an alternative dataset where the CamemBert model was pretrained on.
This is a real API design gap — there's currently no clean way for a Transformation to know what dataset/task the victim model was trained on, so MLM-based transformations (BAE/CLARE) can't pick a same-domain masked-LM the way this issue and @donggrant's comment both want. Threading that metadata from AttackRecipe.build(model_wrapper) down into Transformation.__init__ would need a design decision on where that metadata lives (on ModelWrapper? passed explicitly to build()?) — not something to guess at unilaterally. Leaving open as a real, still-valid feature request.
Activity
donggrant commentedon Oct 29, 2021
This is also an enhancement that I think could be very useful. When trying to enhance Tutorial 9, I needed to find a faster alternative to the CamemBert model that was pretrained on the Allocine dataset. It was hard to locate an alternative dataset where the CamemBert model was pretrained on.
qiyanjun commentedon Aug 13, 2026
This is a real API design gap — there's currently no clean way for a
Transformationto know what dataset/task the victim model was trained on, so MLM-based transformations (BAE/CLARE) can't pick a same-domain masked-LM the way this issue and @donggrant's comment both want. Threading that metadata fromAttackRecipe.build(model_wrapper)down intoTransformation.__init__would need a design decision on where that metadata lives (onModelWrapper? passed explicitly tobuild()?) — not something to guess at unilaterally. Leaving open as a real, still-valid feature request.