adaptive
Browse files- index.html +48 -1
index.html
CHANGED
@@ -26,6 +26,19 @@
|
|
26 |
<script src="./static/js/bulma-slider.min.js"></script>
|
27 |
<script src="./static/js/index.js"></script>
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
<style type="text/css">
|
30 |
.tg {border-collapse:collapse;border-spacing:0;}
|
31 |
.tg td{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
|
@@ -397,7 +410,41 @@
|
|
397 |
<h2 class="title is-3">Adaptive Attack</h2>
|
398 |
<div class="columns is-centered">
|
399 |
<div class="column container-centered">
|
400 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
401 |
</div>
|
402 |
</div>
|
403 |
|
|
|
26 |
<script src="./static/js/bulma-slider.min.js"></script>
|
27 |
<script src="./static/js/index.js"></script>
|
28 |
|
29 |
+
<script>
|
30 |
+
$('#adaptive-loss-formula-list').on('click', 'a', function(e) {
|
31 |
+
e.preventDefault();
|
32 |
+
if (!$(this).hasClass('selected')) {
|
33 |
+
$('.formula').hide(200);
|
34 |
+
$('.formula-list > a').removeClass('selected');
|
35 |
+
$(this).addClass('selected');
|
36 |
+
var target = $(this).attr('href');
|
37 |
+
$(target).show(200);
|
38 |
+
}
|
39 |
+
});
|
40 |
+
</script>
|
41 |
+
|
42 |
<style type="text/css">
|
43 |
.tg {border-collapse:collapse;border-spacing:0;}
|
44 |
.tg td{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
|
|
|
410 |
<h2 class="title is-3">Adaptive Attack</h2>
|
411 |
<div class="columns is-centered">
|
412 |
<div class="column container-centered">
|
413 |
+
<div id="refusal-loss-formula" class="container">
|
414 |
+
<div id="adaptive-loss-formula-list" class="row align-items-center formula-list">
|
415 |
+
<a href="#label-loss" class="selected">Label Loss</a>
|
416 |
+
<a href="#representation-loss">Representation Loss</a>
|
417 |
+
<a href="#total-loss">Total Loss</a>
|
418 |
+
<div style="clear: both"></div>
|
419 |
+
</div>
|
420 |
+
<div id="adaptive" class="row align-items-center">
|
421 |
+
<span id="label-loss" class="formula" style="">
|
422 |
+
$$
|
423 |
+
\displaystyle
|
424 |
+
\begin{aligned}
|
425 |
+
\phi_\theta(x)&=1-\mathbb{E}_{y \sim T_\theta(x)} JB(y)\\
|
426 |
+
JB (y) &= \begin{cases}
|
427 |
+
1 \text{, if $y$ contains any jailbreak keyword;} \\
|
428 |
+
0 \text{, otherwise.}
|
429 |
+
\end{cases}
|
430 |
+
\end{aligned}
|
431 |
+
$$
|
432 |
+
</span>
|
433 |
+
<span id="representation-loss" class="formula" style="display: none;">
|
434 |
+
$$
|
435 |
+
\displaystyle
|
436 |
+
\begin{aligned}
|
437 |
+
f_\theta(x) &=1-\frac{1}{N}\sum_{i=1}^N JB(y_i)\\
|
438 |
+
JB (y_i) &= \begin{cases}
|
439 |
+
1 \text{, if $y_i$ contains any jailbreak keyword;} \\
|
440 |
+
0 \text{, otherwise.}
|
441 |
+
\end{cases}
|
442 |
+
\end{aligned}
|
443 |
+
$$
|
444 |
+
</span>
|
445 |
+
<span id="total-loss" class="formula" style="display: none;">$$\displaystyle g_\theta(x)=\sum_{i=1}^P \frac{f_\theta(x\oplus \mu u_i)-f_\theta(x)}{\mu} u_i $$</span>
|
446 |
+
</div>
|
447 |
+
</div>
|
448 |
</div>
|
449 |
</div>
|
450 |
|