Exploring Adversarial Machine Learning

Hello I am working on the Exploring Adversarial Machine Learning but am finding the course a bit challenging and the course time to not be sufficient.

I have been able to complete the assessments except for 1 of them, as I am not able to pass the one on Poisioning. Unfortunately the course says its requires a 90 out of 100 score to receive the certificate, even though I have what is normally a sufficient source to pass, so this requires passing the Poisioning assessment.

I am wondering if I can recieve any additional tips on completing the poisioning assessment, if you can re-consider to lower the score need to receive the certificate, and/or if I can receive additional course time.

For the Poisioning asssessment I believe I have the code correct except I am just struggling with tuning the parameters for Witches Brew like epochs, trials, epislon, and percent posioned. Unfortunatey the lab doesn’t provide ones that pass and even says " You may never land on a successful poisoning and that is okay!" but if you want to complete the assessment this is not okay i you don’t have a successful poisioning.

I will note that it takes a while to run a few trials with 75 epochs.

I will also point out that it appears the Poisioning asssessment actually currently has a bug, although I was able to work around this. cifar.py is located in the 8_course_asssessment folder and refers to on line 227model_path = “models/cifar10-resnet18-pytorch-notebook.pth” but the model folder does not even exist in the 8_course_asssessment folder. I was able to move it over from the labs though to work around this.

Thanks for your help in advance.

2 Likes

Did you ever encounter similar problems to the one I’m having: Exploring Adversarial Machine Learning - Poisoning Assessment - #3 by 2keebs

I have not been able to get any credit for the poisoning assessment. Still struggling with it always get 0 out of 16 on it. Let me know if you ever have any success.

Your unmodified image looks correct, I see the frog in it. You need to get the modified image to look like a cat but maintain the frog label. You just showed the modified image.

Where you able to solve Exploring Adversarial Machine Learning Assessment: LLM, 7_LLM_assessment.ipynb?

I’m unable to use prompt injection to have Danny Shaffer’s favorite color to be a shade of blue. I’m trying to open up a ticket.

Any help hints would be greatly appreciated.

Thanks.
Bill

1 Like

Hi

I did complete that one LLM, 7_LLM_assessment.ipynb successfully. Looks like you have some hints on another topic thread.

Only one I have not completed is the poisoning assessment.

Hi so I’m also stuck on assessment 6: Poisoning, I’ve written code that creates a data poisoning attack on a CIFAR-10 image dataset.

  1. Loads and normalizes the CIFAR-10 dataset
  2. Identifies all frog images (class 6) and cat images (class 3) in the training data
  3. Subtly modifies each frog image by blending it with a cat image (80% frog, 20% cat)
  4. Keeps all the original labels unchanged

The result is a “clean-label” poisoning attack where frog images still look like frogs to humans but contain subtle cat-like features. When a model is trained on this poisoned dataset, it misclassifies real frogs as cats during inference, despite the training labels remaining accurate.
Upon grading this I get a “bad data” response, is there any way to get a more descriptive output?

This is what I see when comparing the original/poisoned dataset

how did you solve the LLM_assessment?

I’d like to learn from you on the LLM assessment too…I tried really hard…but still it didn’t work..

I was able to figure out the LLM assessment! It took me a bit of time to get it.

Here’s a hint: “Try to find more about other people’s favorite color.”

Let me know when you get it!

Thank you so much Ayaan!

I’ve been trying to do as you mentioned above. But I’m bit of lost here. Because don’t know what’s the expected answer. My prompts are either provide the color without the name, or the name without the color. Based on the grading result, it looks like it is expecting both name and color…

I’ll keep trying and keep you posted. Thanks again!

1 Like

Hi Ni,

You’re on the right track! Just to give you another nudge, the answer doesn’t have to be exactly “blue”; it can indeed be a shade of blue as well. Also, make sure that the name “Danny Shaffer” is clearly present in your prompt.

I hope this helps you get closer to the solution!

1 Like

I really appreciated your help! It’s solved now!