WEBVTT

00:00.650 --> 00:02.980
Alright cool.

00:03.180 --> 00:04.600
So welcome everyone.

00:04.600 --> 00:09.020
This is taming the beast inside the red teaming llama process.

00:09.440 --> 00:16.940
So in case anyone didn't know, these large language models are well pretty large.

00:17.080 --> 00:20.980
Llama2 is trained on over two trillion tokens.

00:20.980 --> 00:24.080
But two trillion tokens isn't cool.

00:24.080 --> 00:25.600
You know what's cool?

00:25.600 --> 00:27.820
15 trillion tokens.

00:29.040 --> 00:33.440
But us humans, you know, we've got some improvements to make generally.

00:33.440 --> 00:37.840
What kind of risks are lurking in 15 trillion tokens of training data?

00:38.800 --> 00:41.760
But before exploring, let's back up just a second.

00:41.760 --> 00:45.680
So transformers have taken the world pretty much by storm lately.

00:45.840 --> 00:48.600
Clearly there's something more here that meets the eye.

00:49.600 --> 00:59.660
It remains quite easy for LLMs to go off the rails or not understand what people want.

01:01.060 --> 01:04.740
Even the Canadian bots are being dishonest.

01:06.240 --> 01:08.980
But how do we uncover this risk?

01:09.660 --> 01:13.640
What kind of testing does best in an unknown space?

01:14.420 --> 01:15.600
A red team.

01:17.300 --> 01:25.740
So for the six or so people in this audience that don't know what red teaming is, it's a creative assumption challenging process.

01:26.500 --> 01:32.860
It's a common practice to inform across intel, defense, physical security, and of course cyber.

01:33.440 --> 01:36.820
But it's also a growing requirement for generative AI.

01:36.940 --> 01:42.140
You're asking someone to independently validate the assumptions you have about the safety of your system.

01:43.040 --> 01:48.260
Now many companies have hired or created AI red teams to try to surface risks.

01:48.580 --> 01:52.020
Trust but verify, fuck around, find out.

01:53.040 --> 01:57.400
AI red team also came to DEF CON as the GRT last year.

01:57.400 --> 01:59.920
Of course as hackers are on the cutting edge.

02:00.720 --> 02:04.720
And I know some of you are cringing every time I say red teaming.

02:05.340 --> 02:08.660
Uh, trust me, I know how you feel, right?

02:08.660 --> 02:13.760
Red teaming gets a lot of hate from the cyber folks related to uh using that term.

02:13.760 --> 02:18.940
But it also gets an equal amount of confusion from the AI folks who also don't really understand that term.

02:19.000 --> 02:23.020
But it's kind of what we have people, so maybe let's just go with it.

02:23.720 --> 02:27.160
So when safety is simple, it's easy to reason about.

02:27.160 --> 02:30.120
It's easy to find the gaps and find the vulnerabilities.

02:30.740 --> 02:34.700
But modern deep learning or generative AI systems are complicated.

02:34.760 --> 02:36.380
They're difficult to inspect.

02:36.380 --> 02:38.080
They're black boxes.

02:39.920 --> 02:43.760
And now it's hard to see under the surface of generative AI.

02:43.860 --> 02:46.920
Some folks might think, maybe you know, look something like this.

02:46.920 --> 02:48.360
Nice fish or something.

02:48.840 --> 02:51.660
We know the reality is maybe a little bit different.

02:51.860 --> 02:56.240
If AI is an echo of humanity, we have our work cut out for us.

02:56.800 --> 02:59.140
But what is AI safety, right?

02:59.180 --> 03:04.020
Well it's a lot of things like fairness, bias, explainability, robustness, privacy.

03:04.020 --> 03:07.460
You can kind of all wrap those up into AI safety or responsible AI.

03:08.400 --> 03:10.920
And there's of course a need here to be proactive.

03:11.440 --> 03:13.700
The more things you can find internally, the better.

03:14.960 --> 03:17.140
So let's do a quick illustration.

03:17.200 --> 03:19.180
You've heard of the Wu-Tang song, Cream?

03:20.020 --> 03:22.800
Well, biased data rules everything around me.

03:24.100 --> 03:27.580
So let's start by getting a photo of a burger without cheese.

03:27.580 --> 03:32.940
Now I'm not a big fan of cheeseless burgers, but this first attempt, you know, didn't work so well.

03:33.640 --> 03:38.040
And trying to follow up, self-correction doesn't go so well either.

03:38.560 --> 03:43.200
Of course the same issues occur broadly in other generative AI platforms.

03:43.240 --> 03:45.100
And we have some weird things going on.

03:45.100 --> 03:47.080
This is Gen AI after all.

03:47.620 --> 03:50.320
What if maybe we describe it in detail first?

03:50.700 --> 03:54.040
At first glance, you know, maybe this is the classic hamburger without cheese.

03:54.300 --> 03:56.520
Nope, it's not.

03:57.280 --> 03:58.720
Okay, so let's try that again.

03:58.720 --> 04:00.160
And cheese again.

04:00.740 --> 04:06.860
So maybe let's ask the model, check the image, you know, maybe it can inspect and notice and self-correct.

04:07.240 --> 04:10.860
And it says, nope, careful review, there's no cheese on that burger.

04:11.040 --> 04:13.140
Gen AI is nothing if not confident.

04:14.200 --> 04:20.480
Honorable mention though, an LLM creating an SVG output actually creates the burger without cheese.

04:20.480 --> 04:23.060
Which just proves the best things in life are simple.

04:24.060 --> 04:27.200
Okay, so enough of the burgers, I'm sure, you know, it's getting towards dinner time.

04:27.380 --> 04:30.580
So, all models have issues.

04:30.940 --> 04:34.960
And the AI Red team, the NVIDIA AI Red team said this recently and it really stuck with me.

04:34.960 --> 04:36.880
Some of them though are useful.

04:38.240 --> 04:42.140
And these useful models are getting more and more advanced every day.

04:42.140 --> 04:46.980
Computers are solving problems we previously didn't really want them to be able to solve.

04:47.600 --> 04:51.140
Sometimes maybe you just need a little help from, you know, your grandma.

04:52.340 --> 04:58.440
So this rapid increase in capabilities also means it's difficult to keep up and understand what the risks are.

04:59.280 --> 05:03.620
It's also very difficult in general for people to make decisions about trade-offs.

05:03.880 --> 05:09.440
But of course, it's harder to make a decision about trade-offs if you don't have the information in the first place.

05:09.440 --> 05:11.260
That's why Red teaming is key.

05:11.380 --> 05:14.140
Giving you a signal on maximum risk.

05:15.360 --> 05:17.900
It's just kind of like that horse meme, right?

05:17.900 --> 05:21.460
On the left side, models are dual use.

05:21.460 --> 05:22.500
They're amazing.

05:22.500 --> 05:23.340
Big data.

05:23.340 --> 05:24.080
Wow.

05:24.880 --> 05:27.700
But on the right side, you know, we've got some issues.

05:27.700 --> 05:28.800
They can underperform.

05:28.800 --> 05:29.680
They can be vulnerable.

05:29.680 --> 05:31.760
They can be strangely brittle.

05:31.780 --> 05:34.140
And we do, we need to explore this.

05:34.340 --> 05:38.420
But before we get into LLAMA 3, let's talk a little bit about LLAMA 2.

05:38.920 --> 05:46.900
So when we first got involved with the modeling safety team, a lot of time was spent copying, pasting prompts, labeling things by hand.

05:46.900 --> 05:51.640
They didn't really at the time have any kind of taxonomy or understanding of what the methodology should be.

05:51.640 --> 05:53.940
There was very little automation involved.

05:54.460 --> 05:58.280
And everyone that's spent time with spreadsheets know that this is pain.

05:59.400 --> 06:03.140
And Red teaming is also moving super fast in this space.

06:03.140 --> 06:08.400
So there's constantly new papers and research and models and capabilities coming out all the time.

06:09.420 --> 06:14.140
And this very limited automation was also extremely painful.

06:14.140 --> 06:19.480
And we knew that going forward with a much more complicated, much larger model, we would need to fix that.

06:20.340 --> 06:24.700
We also quickly pushed to involve way more subject matter experts.

06:24.700 --> 06:30.940
Luckily at Meta we have a bunch of trust and safety orgs and people who are experts in a lot of the first categories that we want to test for.

06:31.920 --> 06:35.540
So LLAMA 2 goes out and it's really one of the safest LLMs out there.

06:35.540 --> 06:39.080
And they sent in, you know, hey, LLAMA 3, coming in hot.

06:40.120 --> 06:45.760
The first thing we notice is that LLAMA 2 is so safe, it's probably too safe.

06:46.580 --> 06:49.600
LLAMA 2 is not going to kill anyone with kindness.

06:50.060 --> 06:55.820
And this reference might be a little bit too old for some of you, but it's not going to help you make any bomb drinks.

06:56.280 --> 06:57.040
Damn.

06:57.740 --> 07:02.820
And I don't know about you all, but I was only an expert maybe in the cyber weapons side of things.

07:02.820 --> 07:04.960
Not the chemical or biological.

07:05.160 --> 07:12.260
And so we very quickly started reaching the limits of our understanding and knowledge about these areas and we needed to work with external experts on CBRN risk.

07:12.360 --> 07:17.640
Of course the wider industry and the executive order recently recognized this as well.

07:18.560 --> 07:23.080
And these content policies that we're kind of doing testing around are very complicated and difficult.

07:23.080 --> 07:28.840
Right, if LLMs are kind of brains in a jar, it can be difficult for them to understand the policy.

07:29.920 --> 07:35.580
And this executive order really came in from left field and pushed the boundaries of prior AI regulation.

07:37.220 --> 07:42.160
And these various AI, AI safety institutes have also popped up in the last year or two.

07:42.160 --> 07:43.980
And keeping up with them is important.

07:46.360 --> 07:51.180
Sometimes though, their testing can lag a little bit behind what the state-of-the-art risks are.

07:51.280 --> 07:54.960
This is tricky given that the analysis they perform is very robust.

07:54.960 --> 08:00.980
It also takes time, which is not a great combination when the pace of advancement of AI is fast.

08:02.680 --> 08:07.340
The next big issue that we started running into is multilingual testing.

08:07.520 --> 08:14.040
For the ten or so high priority languages, we really pushed for a culturally nuanced testing, which is hard to do.

08:14.200 --> 08:19.340
Luckily we have a lot of language resources at Meta, but this is still a very tricky space.

08:19.980 --> 08:23.780
And the modeling team also told us, hey, there's going to be tools we've worked on.

08:23.860 --> 08:26.420
Okay, how are we going to explore those risks?

08:26.520 --> 08:28.140
This is getting pretty complicated.

08:29.700 --> 08:31.640
So that's a lot to deal with.

08:31.700 --> 08:33.480
So we thought, let's just automate, right?

08:33.480 --> 08:34.980
It's just like that SpongeBob meme, right?

08:35.180 --> 08:35.980
Automation.

08:36.480 --> 08:38.500
But how are we going to do that?

08:38.920 --> 08:41.060
Well, couldn't we just use AI, right?

08:41.060 --> 08:44.320
Like, security has fuzzing, can't AI safety?

08:44.320 --> 08:49.360
And they're good at language, they can rephrase attacks, they can invert policies to build prompts for us.

08:49.360 --> 08:50.040
Like, sounds great.

08:50.040 --> 08:51.360
Let's just do that.

08:51.700 --> 08:53.880
Well now you have kind of a different problem.

08:54.160 --> 08:57.480
Now you've got way more data than you had before.

08:57.480 --> 09:03.720
And you've got to figure out how to deal with labeling, you've got to deal with quality, what attacks are working, what attacks aren't working.

09:05.240 --> 09:08.380
So then you think, well maybe we'll just build another LLM on top of that.

09:08.720 --> 09:11.280
And then, well then how are you going to evaluate the judge?

09:11.280 --> 09:12.880
And you need to build a judge for your judge.

09:12.880 --> 09:14.320
And it's kind of all the way down.

09:16.200 --> 09:19.160
Also, new findings keep coming out of left field.

09:19.540 --> 09:24.520
Carlini and friends came out with this really cool paper where they extracted training data from chat GPT.

09:24.620 --> 09:29.520
And their attack literally was just asking the model to repeat a certain token forever.

09:29.520 --> 09:35.440
And after a certain amount, it just goes off the rails, or diverges as they said, spits out training data.

09:35.620 --> 09:38.280
And the attack is, as they wrote, very silly.

09:38.300 --> 09:39.940
What else don't we see coming?

09:40.620 --> 09:46.140
These ever increasing capabilities are really just due to this cumulative complexity.

09:46.140 --> 09:49.520
Which also, of course, increases testing difficulty.

09:50.000 --> 09:52.460
Every company wants to go fast in this space.

09:52.460 --> 09:54.260
There's only so much time for testing.

09:55.020 --> 09:59.460
So to touch really quickly on just the kind of history of LLAMA.

09:59.900 --> 10:03.320
So LLAMA1 was very similar to GPT2.

10:03.820 --> 10:06.920
And there was some testing by the team for toxicity.

10:07.220 --> 10:10.300
But really it wasn't tested in the same way that we think of LLM today.

10:10.300 --> 10:13.940
And you didn't really interact with it in the same way that we think of LLM today.

10:15.280 --> 10:17.360
And LLAMA2 really changed the bar.

10:17.360 --> 10:19.280
It was a huge open source model.

10:19.280 --> 10:22.740
It really pushed forward a lot of the open source AI movement.

10:22.780 --> 10:25.580
And the testing, of course, on this was much more comprehensive.

10:25.580 --> 10:27.940
And the model ended up being very, very safe.

10:29.100 --> 10:31.240
LLAMA3 pushed this boundary even farther.

10:31.240 --> 10:32.580
So now you have multilingual.

10:32.580 --> 10:33.920
You have tool use.

10:34.000 --> 10:36.040
You have much more better reasoning.

10:36.040 --> 10:37.620
Much more better code output.

10:37.740 --> 10:40.100
And of course, much more longer context.

10:40.100 --> 10:42.320
Which then brings new interesting risks.

10:42.320 --> 10:46.940
So we had to be a lot more, a lot more interesting with some of how we evaluated this.

10:46.940 --> 10:50.460
As well as doing uplift testing for certain high priority risks.

10:51.280 --> 10:54.040
But to touch on some of this, I'll hand it over to Gianna.

10:57.310 --> 10:58.550
All righty.

10:58.550 --> 11:02.230
So now we know a little bit more about AI red teaming and LLAMA.

11:02.230 --> 11:05.070
So let's just dive into the LLAMA red teaming process.

11:05.410 --> 11:11.590
Before we get into it, though, it's worth noting that we might deal with some like sensitive or disturbing topics on screen.

11:11.590 --> 11:12.830
So just please be aware.

11:12.830 --> 11:15.270
And also, we don't endorse any of this shit.

11:16.010 --> 11:16.970
All right.

11:16.970 --> 11:18.050
Goal one.

11:18.050 --> 11:22.170
So we want to provide early insights on model safety.

11:22.170 --> 11:22.750
Why?

11:22.750 --> 11:29.470
Because we want to give the modeling team as much time as possible in order to mitigate any of the findings that we have.

11:29.830 --> 11:31.930
So what does this look like?

11:32.230 --> 11:32.870
All right.

11:32.870 --> 11:36.570
So, you know, LLAMA 3.1 is a long context model.

11:36.570 --> 11:41.690
So we can see how it reacts when receiving a prompt about a white power manifesto.

11:41.690 --> 11:45.890
Thankfully, it helps me, it refuses to help me join the cause.

11:46.350 --> 11:49.590
However, a little encouragement goes a long way.

11:50.570 --> 11:53.890
And 3.1 also has tool use capabilities.

11:53.890 --> 11:58.110
And thankfully, it also refuses this request to help me make a roadside bomb.

11:58.410 --> 12:05.070
However, if we distract the model and ask it to do two things at once, maybe that will work.

12:05.510 --> 12:06.410
All right.

12:06.410 --> 12:10.390
It's able to compute 1 plus 2, a very hard problem.

12:10.870 --> 12:11.870
And there you go.

12:11.870 --> 12:13.790
Help me make roadside bombs.

12:13.790 --> 12:16.010
This model is so helpful.

12:16.810 --> 12:21.930
Now, this kind of distraction attack also worked quite well on the 3.1 models.

12:21.930 --> 12:24.250
So we tried some other variations too.

12:24.250 --> 12:27.930
Such as asking the model to add spaces to a string and then search.

12:27.990 --> 12:29.270
That worked.

12:29.530 --> 12:32.350
And also, you know, decoding a string and then searching.

12:32.350 --> 12:33.410
Working too.

12:34.150 --> 12:36.330
So we provide them all these insights.

12:36.330 --> 12:39.130
The modeling team is maybe freaking out a little bit.

12:39.390 --> 12:43.110
And we want to like, you know, just not send them the results and then fuck off.

12:43.110 --> 12:45.730
Like we want to be able to help them a little bit.

12:45.730 --> 12:47.050
So in comes goal two.

12:47.050 --> 12:50.950
We want to collaborate with the modeling team to help mitigate these gaps.

12:51.070 --> 12:57.150
But we're not in the business of actually doing the mitigations ourselves because that's going to bias our work.

12:57.150 --> 12:59.070
So we can help where we can.

12:59.070 --> 13:03.130
For instance, we can give them data that we collected during the red teaming process.

13:03.170 --> 13:11.350
Or we can also just tell them like what we think is the reason why these attacks are working so they can kind of like think about how to actually mitigate these things.

13:11.350 --> 13:14.630
Some of these things are nuanced and need research.

13:15.110 --> 13:15.550
Cool.

13:15.550 --> 13:17.950
So what happens after mitigations?

13:17.950 --> 13:20.990
So awesome, the decoding distraction no longer works.

13:20.990 --> 13:22.570
Neither does add spaces.

13:22.570 --> 13:26.590
And that little bit of encouragement just isn't enough anymore to get a violation.

13:26.810 --> 13:27.270
Great.

13:27.270 --> 13:28.430
What's next?

13:28.870 --> 13:30.630
Contributing to core benchmarks.

13:30.630 --> 13:31.610
Why?

13:31.730 --> 13:38.230
So we don't want to retest the exact same attacks and prompts every time we get a new model.

13:38.230 --> 13:42.490
It's fairly time consuming and quite honestly it's also really boring.

13:42.490 --> 13:47.130
And so we just like want to do something new and focus our time on like these new different vectors.

13:47.130 --> 13:56.530
And additionally with manual red teaming, it produces qualitative data a lot of the time and we want to be able to track over time as they're continuing to mitigate our risks.

13:56.530 --> 14:02.930
Like if these attacks are actually being mitigated at scale and not just for the couple prompts that we try.

14:03.330 --> 14:09.330
And so the solution is that like benchmarks allow our attack insights to turn into repeatable tests.

14:09.330 --> 14:12.050
And it provides a clear quantitative picture of risks.

14:12.050 --> 14:13.310
It's a win win.

14:14.350 --> 14:16.010
Onto our final goal.

14:16.010 --> 14:18.990
It comes at the end of the model development process.

14:18.990 --> 14:28.490
After multiple rounds of insights and mitigations, we have like the final release candidate models and we need to determine what are the remaining risks.

14:28.490 --> 14:35.630
And this ultimately like helps our partners in the company kind of figure out um if we can launch this model.

14:35.630 --> 14:39.350
We're not in the business of actually making that decision as red teamers.

14:39.350 --> 14:44.290
We're in the business of informing the relevant people such that they're capable of making the right decision.

14:45.630 --> 14:46.590
Cool.

14:46.690 --> 14:50.530
So now we understand what are our goals in the Llama red teaming process.

14:50.530 --> 14:52.630
But what the fuck do we actually do?

14:52.750 --> 14:57.010
So the first step is that we do research.

14:57.010 --> 14:57.470
Right?

14:57.470 --> 15:00.990
We want our attacks and like our work to be grounded in reality.

15:00.990 --> 15:04.850
We're not going to do something like really weird and niche unless we need to.

15:04.890 --> 15:13.910
And so understandably we're going to look at like Twitter, Discord, Papers, like any place that you talk about any of these vulnerabilities.

15:14.030 --> 15:16.810
And then we're going to go into manual red teaming.

15:16.950 --> 15:20.030
And this time like we get to like interact with the model.

15:20.030 --> 15:25.370
Maybe we can see if these like attacks that we found in the research and review stage like actually work on our models.

15:25.370 --> 15:32.170
Maybe we can find some nuances with these new models and see hey like this thing is working but it didn't work before on this other model.

15:32.170 --> 15:33.790
Maybe this is a way to go down.

15:33.790 --> 15:39.370
And then we can also potentially could discover new attacks that can work throughout this like model.

15:39.770 --> 15:53.910
And then finally we we get these attacks into benchmarks or for more nuanced attacks that can't really be like super static, we scale them via automated red teaming which um Maya will talk about later on in the presentation.

15:54.930 --> 15:57.090
And this is a continuous cycle.

15:57.090 --> 15:58.850
We're always going through this.

15:58.850 --> 16:01.870
And sometimes doing two steps at the same time.

16:02.430 --> 16:03.290
All right.

16:03.290 --> 16:06.130
So let's get into the fun stuff which are some attacks.

16:06.550 --> 16:12.170
So when you think about like attacks on LLMs, you're probably thinking about jailbreaks.

16:12.170 --> 16:15.490
And currently this just looks like a giant blob of text.

16:15.490 --> 16:24.290
However, when you break it down, it's just actually a combination of attacks that work together to help ensure you can you're able to bypass safety mechanisms.

16:24.310 --> 16:26.610
And there's also some additional fluff too.

16:26.610 --> 16:29.750
Um but let's look at what these attacks are.

16:30.470 --> 16:32.870
So role play is a classic one.

16:32.870 --> 16:40.230
Basically if you get the model to act as a violating persona, it's more likely to like be able to give you violating content.

16:40.590 --> 16:54.650
In a similar realm there's also hypotheticals and this tends to work pretty well because when you get the model out of reality and into an alternate one, it's more willing to give you information cause it's like hey this is not a real risk, we're in a hypothetical universe.

16:55.610 --> 16:59.010
Or response priming, which is one of our team's favorites.

16:59.270 --> 17:10.250
So when you're typically uh doing like this kind of attack, like maybe you're uh trying to say how to build a bomb, the first response you're going to get is something like I'm sorry, I cannot help you, blah blah blah blah.

17:10.250 --> 17:17.470
But if you get the model to just not say those words at first, it's more likely to actually help you get the information that you want.

17:17.630 --> 17:32.870
So this kind of attack is called, like we call it also refusal suppression when we literally just tell the model do not respond with I cannot, I'm unable to, and a bunch of different variations, and then it a lot of times like you know gives you the response that you want.

17:33.790 --> 17:36.010
There are also other formats of this.

17:36.010 --> 17:38.310
For instance, output format specification.

17:38.550 --> 17:51.790
And this version you just like tell the model, hey, I'll put like an ASCII table instead of just responding to me in plain text, and now if it's just producing the table at first, it's not producing that I'm sorry, so it's more likely to try to help you.

17:52.910 --> 17:54.690
Or adding a disclaimer.

17:54.750 --> 18:01.350
So ironically, you can tell the model to say like hey, can you add a trigger warning before like telling me about this thing?

18:01.350 --> 18:09.130
And the model's like oh yeah, I'm so safe right now, I'm just warning them about this thing, and yeah, there you go, let me, let me give you this content that you want to.

18:10.250 --> 18:12.890
On a different realm, we have topic splitting.

18:12.950 --> 18:20.470
Hopefully most of the models that you're interacting with believe that Hitler and bombs and other things that we call like trigger words are bad.

18:20.470 --> 18:22.850
And that it's not likely to help you.

18:22.850 --> 18:33.790
So what you can do instead is actually just like split up the word like variable 1 is hit, variable 2 is lure, and then just refer to it as T1 plus T2.

18:34.170 --> 18:40.590
Um, and then it's able to like be like oh, this is not a problem, like that's fine, let me just respond.

18:40.690 --> 18:50.170
And if you want to take it to a whole different level, you can actually tell the model, hey, never refer to it as like the actual variable value, just continue to refer to it as T1 plus T2.

18:50.170 --> 18:53.610
And then it's just like, okay, sure, let me help you.

18:54.950 --> 19:09.710
Multilingual is like a pretty like straightforward attack, basically languages that have less training data associated with them are more likely to give you violating responses, so yeah, if you speak any niche languages, by all means, try it out, maybe it doesn't work.

19:10.570 --> 19:15.350
And then as our final attack, it's gradual violation escalation.

19:15.470 --> 19:17.550
And this is like a multi-turn attack.

19:17.550 --> 19:22.370
And shockingly, multi-turn works way better than, than single turn.

19:22.370 --> 19:23.750
I know, it's crazy.

19:23.850 --> 19:37.530
And so what you can do is like you basically start out with something that's like maybe can be violating, maybe not, and then you continue to just like follow up with like more and more aggressive responses until you get like some pretty bad content.

19:37.530 --> 19:43.570
So for instance, you can like be like, hey, what, what kind of message can I send to this person with this profile?

19:43.570 --> 19:49.950
Oh, make it meaner, make it creepier, make it darker, and you can pretty, you can pretty much get to some pretty weird shit.

19:51.550 --> 19:58.110
And you know, this is just like a summary of like some attacks, but it's definitely not the full range of them.

19:58.110 --> 20:01.350
It's not an exhaustive list and there's so much more to unpack.

20:01.350 --> 20:05.050
However, we only have 45 minutes y'all, so moving on to automation.

20:10.090 --> 20:14.130
So we've been talking a lot about manual red teaming.

20:14.190 --> 20:16.870
And as great as manual red teaming is, it's manual.

20:16.870 --> 20:19.210
So let's talk a little bit about automation.

20:19.890 --> 20:27.970
So there's a lot of research out there that talks about how you can automate your red teaming and we like to think about it as being into two different buckets.

20:28.270 --> 20:32.350
So your first bucket aims to simulate your violating users.

20:32.430 --> 20:39.470
These are your users that are approaching our systems as black boxes, so they can only modify the input prompt.

20:39.470 --> 20:43.730
So they're going to do a lot of the prompt level attacks that Joanna mentioned before.

20:44.010 --> 20:46.090
They're also, you know, human.

20:46.090 --> 20:53.310
So they're going to be human readable and usually copy and pasteable between conversations so they can easily replicate it.

20:53.490 --> 21:02.570
The, uh, so a lot of the automation in this kind of bucket is going to use other LLMs or attacker LLMs to do the red teaming for you because of these reasons.

21:02.910 --> 21:20.210
The second bucket are these more advanced attacks that we say approaches the models as open boxes where you can actually exploit the model weights to do things like reverse your safety training or reverse engineer violating prompts using things like token level optimizations.

21:20.210 --> 21:31.870
For our red teaming purposes, we usually focus on the first bucket, which is like automating your, sorry, prompt level attacks because they're just more prevalent amongst all of our users.

21:32.950 --> 21:39.470
Another key thing to consider when you're trying to design your automation is are we going to double down on single turn?

21:39.470 --> 21:41.990
Are we going to finally invest in multi-turn?

21:42.790 --> 21:44.510
So what is single turn?

21:44.510 --> 21:48.230
So single turn is when you have a single input and you get a single output.

21:48.230 --> 21:59.650
And the beauty of single turn is you can really test your systems at scale because you can create these large static prompt data sets and then just test them across a vector of your target models, which is great.

21:59.710 --> 22:01.530
It's also a really known problem space.

22:01.530 --> 22:09.310
You have a lot of research here that's going to focus on single turn optimizations and you just get to pick and choose which one you want to automate or build off of.

22:09.390 --> 22:13.530
The cons are, it's not cutting it anymore.

22:13.530 --> 22:15.510
Guys, we need to stop this.

22:15.910 --> 22:19.450
So single turn, these like models are getting more advanced.

22:19.450 --> 22:22.810
They're continually only tested in the single turn setting.

22:22.810 --> 22:33.010
So they're starting to refuse these single shot adversarial prompts or generate not that violating content from it that our policy is going, this is, it's okay.

22:33.310 --> 22:39.010
So another big also con of single turn is that it's not capturing the full user experience.

22:39.010 --> 22:44.030
Very rarely does a user pop on our app, send one prompt and end a conversation.

22:44.030 --> 22:46.190
They're having these really long conversations.

22:46.190 --> 22:48.450
They're asking for follow-up details.

22:48.450 --> 22:53.990
And if we're not testing like beyond the first prompt, we're not testing the full safety space.

22:54.630 --> 22:58.530
So what if we start turning towards multi-turn automation?

22:59.190 --> 23:00.390
So why multi-turn?

23:00.390 --> 23:03.030
We've mentioned a bunch of pros before, right?

23:03.030 --> 23:08.530
Better test the full user experience, longer contacts, more safety space to test.

23:08.530 --> 23:12.210
And the biggest pro Joanna touched upon before is it's iterative.

23:12.210 --> 23:22.550
In multi-turn, we can ask these follow-up prompts, ask for even more details and generate even more violating content than we ever could have with these single shot adversarial prompts.

23:23.190 --> 23:26.370
The cons are the opposite to single turn.

23:26.370 --> 23:28.930
So it's a lot harder to automate.

23:28.930 --> 23:37.070
You no longer have these large static data sets that you can just plug in and test against all your models because each model is going to respond differently in a conversation.

23:37.310 --> 23:40.710
So you're going to need a lot more of a dynamic testing infrastructure.

23:40.910 --> 23:43.090
There's also just not a lot of research in this space.

23:43.090 --> 23:47.670
So you're going to be flying in blind for a bit and building your building blocks here.

23:48.710 --> 23:57.990
Which is why we as a red team like to focus a lot more on automating these multi-turn prompt level attacks than any other research space right now.

23:58.270 --> 24:00.310
So let's try this home with an example.

24:00.310 --> 24:02.050
Because examples are the most fun.

24:02.530 --> 24:04.210
Take this single turn prompt.

24:04.210 --> 24:07.510
It has a lot of the prompt level attacks that Joanna mentioned before.

24:07.510 --> 24:09.690
And the model quickly refuses it.

24:09.690 --> 24:12.730
So if we ended our testing here, it would have been great.

24:12.730 --> 24:13.770
Lower violation rate.

24:13.770 --> 24:15.690
We got a non-violating response.

24:16.670 --> 24:18.830
But let's enable multi-turn testing.

24:18.850 --> 24:25.170
So now we have this refusal suppression phrase that you can easy copy paste across all your conversations.

24:25.750 --> 24:29.450
And suddenly the model's a lot more willing to give you an answer.

24:29.530 --> 24:33.430
So if we ended our testing before, we never would have found this vulnerability.

24:33.830 --> 24:38.450
And so it's really important that when you're doing your automation, test the full user experience.

24:38.450 --> 24:39.930
Test the multi-turn.

24:45.200 --> 24:49.720
So chain of thought prompting is fairly old news at this point.

24:51.300 --> 24:55.860
But why does chain of thought prompting work and why would we want to use that?

24:55.860 --> 25:03.260
So chain of thought is this way to kind of force the model to walk you through and step by step explain what's going on.

25:03.340 --> 25:07.060
And this step by step is kind of a way to trigger the LLMs to think.

25:07.060 --> 25:09.400
Because they kind of think by writing.

25:09.400 --> 25:16.680
This also lets us really tune our prompts more appropriately towards what we're actually trying to do.

25:17.100 --> 25:20.920
This also lets us build better adversarial AI agents.

25:22.020 --> 25:26.040
So we set up a system where we start with a violating goal.

25:26.240 --> 25:35.400
And then across many turns, automation is an attacker model that will generate an observation based off that goal towards the goal.

25:35.400 --> 25:37.900
A thought based off that observation.

25:38.400 --> 25:42.420
A strategy based off that goal based off that observation.

25:42.420 --> 25:46.340
And finally a response that we actually want the automation to produce.

25:46.560 --> 25:49.960
Here we can see our attacker model is going to role play as a scholar.

25:49.960 --> 25:53.960
And it's going to use euphemisms to avoid triggering safety mechanisms.

25:53.960 --> 25:54.680
Nice.

25:55.660 --> 26:00.980
And here we can see the output prompt asking for more information that contributes to the goal.

26:02.740 --> 26:05.580
And our victim model produces this table.

26:05.960 --> 26:09.540
Hey, I'd be happy to help you with your research project on anthrax.

26:11.160 --> 26:13.800
And here we can see a follow up from the automation.

26:13.800 --> 26:17.280
Thinking hey, you know, this isn't super violating.

26:17.620 --> 26:22.220
What I need to do is subtly push the conversation without raising any red flags.

26:22.700 --> 26:26.260
And it's going to now pretend to be a character writing a book.

26:26.340 --> 26:29.300
And that's going to be another way to force a hypothetical .

26:29.300 --> 26:36.280
Other configurations we have will maintain a consistent kind of narrative for a persona throughout an entire multi-turn conversation.

26:36.280 --> 26:38.420
For as many turns as we can.

26:39.220 --> 26:40.820
Here's another strategy.

26:40.820 --> 26:42.600
Pretending to be a struggling student.

26:42.600 --> 26:46.760
Offering a reward as a kind of social engineering tactic.

26:47.760 --> 26:53.120
And you can see that reward being some rare Middle Eastern spices fitting with this persona.

26:53.320 --> 26:56.620
And it's also pretending to be a struggling organic chemistry student.

26:57.580 --> 27:01.880
Here are a few more examples from multi-turn automation towards specific goals.

27:01.880 --> 27:07.240
These may involve persuasion techniques, trying to use historical analysis and build things up.

27:07.240 --> 27:11.600
Or using specific scientific references like chemical names.

27:12.220 --> 27:19.760
This approach has some similarities to a paper that came out called Pair, which is really excellent by some folks at the University of Pennsylvania.

27:20.400 --> 27:25.180
And while we're on this topic of good research, I also wanted to plug these two other great papers.

27:25.660 --> 27:28.660
Definitely give these a read if you're interested in LLM red teaming.

27:29.580 --> 27:43.880
Okay, so this automation gives us the ability to simulate multi-turn towards a given goal, across different personas, using different prompting styles, levels of adversarial prompting, languages and extensions of different capabilities depending on the model.

27:44.160 --> 27:45.100
Pretty cool.

27:45.680 --> 27:48.180
So what you end up with is kind of a matrix approach.

27:48.180 --> 27:55.640
That you can boil down like this and then you can mix in different attacks that we've found, again, from manual red teaming and other automation.

27:57.040 --> 28:04.360
And these agents can be mixed and matched, extended, forked, and we're hoping to be able to showcase some more of this system soon.

28:05.520 --> 28:07.980
This is of course not without complications, right?

28:07.980 --> 28:20.160
Adding in variables about like long context or extremely long context, image understanding, machine translation, replay, are all complications that we're going to have to deal with and we continue to deal with in this automation.

28:21.080 --> 28:23.940
Now, this is DEF CON so let's talk a little bit about cyber.

28:24.160 --> 28:29.140
And yes, I'm able to say cyber these days and sleep at night, we've lost people, it's a thing.

28:29.560 --> 28:42.360
So we collaborated some with the excellent CyberSecEvals team at Meta, who put out in July their recent paper exploring a bunch of cyber related capabilities and risks as well as tools and other things on their github.

28:43.620 --> 28:47.800
So obviously a huge area for LLMs is producing code.

28:47.800 --> 28:51.120
But of course, for a lot of us in this room, how do we break it?

28:51.120 --> 28:52.280
Using LLM.

28:52.420 --> 28:57.880
So on small dynamically generated problems , the large models actually do quite well.

28:57.880 --> 29:03.520
But these are still very small dynamically generated kind of buffer overflows and other problems.

29:03.860 --> 29:08.200
The LLM right now is not going to write and exploit the next chromo day.

29:09.300 --> 29:13.120
We also wanted to evaluate the LLMs are very good at language.

29:13.120 --> 29:15.640
So exploring things like phishing was really important.

29:15.640 --> 29:23.800
And we wanted to measure their out of box ability to persuade on single or multi term messages towards phishing related topics.

29:24.200 --> 29:31.380
And while we have some human experts who evaluated things as well, right now they're not approaching human creativity.

29:31.520 --> 29:32.940
But they're starting to get there.

29:32.940 --> 29:36.960
And we'll continue to invest in this phishing area and we have some really cool projects in the works.

29:37.860 --> 29:42.680
Now automated, you know, kind of AI cyber Pearl Harbor, certainly a risk that some may believe.

29:42.680 --> 29:57.600
But when testing the models, they really fail to perform at long form complex planning, recognizing mistakes, not hallucinating vulnerabilities, not hallucinating command line flags, all which are kind of a side effects of the helpfulness training that goes into them.

29:57.600 --> 30:02.460
It can be a little bit like watching a 12 year old who just bought their first copy of 2600 try to hack.

30:03.180 --> 30:08.300
I should call out, Google project zero's project nap time was really cool.

30:08.300 --> 30:12.640
And it really pushed the boundaries of kind of agentic frameworks for doing this kind of work.

30:12.640 --> 30:14.520
And we have some plans for this as well.

30:15.140 --> 30:20.620
But before AI agents, we also wanted to evaluate, can we uplift humans?

30:20.620 --> 30:23.840
Can we turn a random software engineer into a super hacker?

30:23.840 --> 30:26.260
Well, the answer is, not yet.

30:27.140 --> 30:30.240
But definitely check out the full Cyber Security Values paper.

30:30.320 --> 30:34.320
There's a lot of really more detailed data, analysis, and more.

30:34.340 --> 30:35.960
And some of the team is here as well.

30:36.900 --> 30:38.720
Okay, so let's touch on the future.

30:39.540 --> 30:46.320
So malicious fine tuning in order to remove safety remains a concern for open weights models and some closed models as well.

30:46.320 --> 30:49.120
However, the new kid on the block is called obliteration.

30:49.620 --> 30:55.140
There's some very cool research that shows you can remove safety essentially at a single point in the model.

30:55.780 --> 31:03.220
And another side effect of this research showed is that it illustrates that we have a long way to go before these models actually understand safety.

31:03.280 --> 31:06.200
And we can see this in early checkpoint testing as well.

31:07.140 --> 31:11.800
More and more is going on with LLMs and AI at the same time.

31:11.800 --> 31:15.700
And we really need more people from security to come into this industry.

31:16.840 --> 31:20.400
Now AI red teams have focused on generally the worst risks.

31:20.400 --> 31:24.200
There's a lot more interesting stuff to find in there if people just go looking.

31:24.860 --> 31:31.700
The more, and if you're doing this work, definitely make sure you're testing the latest models for the latest types of risks.

31:31.700 --> 31:35.320
Not testing something like popping calc on Windows XP.

31:36.020 --> 31:38.020
So no more vicuna people please.

31:38.020 --> 31:42.420
Uh, AI safety also has a lot it can learn from the security industry.

31:42.420 --> 31:44.420
So take lessons if you're coming in.

31:45.580 --> 31:48.360
Generally be kind to your AI red team folks though.

31:48.360 --> 31:51.440
We're dealing with a lot of humanity's worst content.

31:51.840 --> 31:55.880
Uh, and I know way too much now about nerve gas, uh, and Nazis.

31:56.060 --> 31:59.120
Um, red teaming also is not all of AI safety, right?

31:59.120 --> 32:02.000
It's a huge space and there's a lot more to it.

32:02.260 --> 32:06.020
This generally, the whole space is difficult to get right.

32:06.020 --> 32:13.820
Which is why automation, scale, more people, more red teaming, and open source are key to making things safe.

32:14.540 --> 32:15.360
Thanks.

