facebookresearch / audioseal

Localized watermarking for AI-generated speech audios, with SOTA on robustness and very fast detector
MIT License
466 stars 56 forks source link

SHUSH Attack #25

Closed vijay-jaisankar closed 8 months ago

vijay-jaisankar commented 8 months ago

Why ?

This PR introduces the SHUSH attack, a simple and fast algorithm that modifies the input audio tensor by setting a fraction of its indices to 0. Researchers can test out Audioseal models under different settings of the SHUSH attack for their datasets and use-cases.

How ?

The SHUSH attack takes in a tensor and sets K of its first indices, i.e tensor[:K] to 0.0, and is a synthetic alternative to audio corruption or third-party masking. This implementation allows K to be set through parameters, hence researchers can make the attack more severe or less severe for their analysis.

Test plan

We tried different variants of the attack on the RAVDESS Emotional Speech Audio dataset. The corresponding Kaggle notebook can be found here. Audioseal shows strong performance in both realistic settings of low tampering and settings with high tampering attacks.

facebook-github-bot commented 8 months ago

Hi @vijay-jaisankar!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

facebook-github-bot commented 8 months ago

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

vijay-jaisankar commented 8 months ago

Thanks a lot for the suggestions!

Will push the optimisation in the review with a consolidated version of the notebook for review soon in the coming days.

Update: The notebook has been added via https://github.com/facebookresearch/audioseal/pull/25/commits/25649826a0aa35e7b9702a06af58e98342bcb120

antoine-tran commented 8 months ago

@vijay-jaisankar Apologies if I sound nitpicking here, but could you remove the copy-paste code of attacks.py in your note book and import it instead ? I guess that was the whole point of migrating your code to audioseal :)

vijay-jaisankar commented 8 months ago

Hello @antoine-tran , sorry, I missed making that change in the previous commit. The code has been replaced with the import statement accordingly in https://github.com/facebookresearch/audioseal/pull/25/commits/6a5bcea4129847d27201d7c2dea7bb358bd039ce, please check.

Thanks!