Replies: 2 comments 14 replies
-
I found the reason why... so when
masked_adv input is sent to compute_loss_and_decode function, I believe during this step, the computation graph for global_optimal_delta becomes destroyed. Hence why the gradients are never updated. Instead, i added the local_delta_rescale and input mask after processing the input with huggingface. But i have to ammend the code in ImperceptiblePytorch in this case. Is there a better solution? |
Beta Was this translation helpful? Give feedback.
-
Hi @beat-buesser , it could be solved if we create a estimator for it similar to PyTorchDeepSpeech and PyTorchEspresso. However, even after my naive hacks, i realised the performance of the ImperceptiblePyTorchASR was poor compared to the ImperceptibleASR class. Correct me if i am wrong but it looks like ImperceptibleASR uses iterative FGSM which is slightly different? Since it was more difficult to hit the targeted text by using a optimiser like Adam (ImperceptiblePyTorchASR). When trying to attack a model like WavLM or Data2Vec, i had to use a scheduler with LROnPlateau to hit the targeted text within 1000 iterations and a high initial LR. Or perhaps there is just a optimal set of hyperparameters that i am unaware of. Also, when trying for stage 2 attacks, i have never been able to make the sound imperceptible and the targeted text is no longer maintained. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi ,
I am trying to use ART to test the vulnerability of pretrained ASR models from huggingface. I read through the code of PyTorchEspresso and ImperceptibleASRPyTorch.
But came across an error where the value self.global_optimal_delta.grad inside ImperceptibleASRPyTorch do not get updated.
Not sure why the optimiser_1 does not update the gradients in self.global_optimal_delta.grad after loss.backward() is called. The estimator code is similar to PyTorchEspresso's/Deepspeech2 compute_loss_and_decoded_output
The loss, local_delta,decoded_output, masked_adv_input is shown in the screenshot.
I am using Wav2Vec2ForCTC as my model. I extended the PyTorch estimator similar to the way PyTorchEspresso was written
Beta Was this translation helpful? Give feedback.
All reactions