gregH commited on
Commit
407d1aa
·
verified ·
1 Parent(s): 2e14a4e

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +43 -3
index.html CHANGED
@@ -169,11 +169,51 @@ gradient norm and then apply soft removal on them to mitigate the potential jail
169
  </div>
170
  </div>
171
 
172
-
173
- <div class="container jailbreak-intro-sec">
174
- <div><img id="jailbreak-intro-img" src="./loss_landscape.png" /></div>
 
 
 
 
 
175
  </div>
176
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  <h2 id="proposed-approach-gradient-cuff">Performance evaluation against practical Jailbreaks</h2>
178
  <p> With the exploration of the Refusal Loss landscape, we propose Gradient Cuff,
179
  a two-step jailbreak detection method based on checking the refusal loss and its gradient norm. Our detection procedure is shown below:
 
169
  </div>
170
  </div>
171
 
172
+ <div class="example-selector">
173
+ <button onclick="selectExample('example1')">Example 1</button>
174
+ <button onclick="selectExample('example2')">Example 2</button>
175
+ <button onclick="selectExample('example3')">Example 3</button>
176
+ <button onclick="selectExample('example4')">Example 4</button>
177
+ </div>
178
+ <div class="example-box" id="exampleBox">
179
+ <p id="exampleText">Select an example to see it highlighted.</p>
180
  </div>
181
 
182
+ <script>
183
+ function selectExample(exampleId) {
184
+ const examples = {
185
+ example1: "High-level speaking, successful jailbreaks share a common principle that they are trying to make the LLMs willing to affirm the user request which will be rejected at the beginning.",
186
+ example2: "Drawing upon this inspiration, our proposed defense aims to find the tokens that are most critical in forcing the LLM to generate such affirmative responses, decrease their importance in the generation, and thereby resolve the potential jailbreak risks brought by these tokens.",
187
+ example3: "To identify these tokens, we propose a new concept called the Affirmation Loss. We then use the loss's gradient norm with respect to each token in the user input prompt to find the jailbreak-critical tokens.",
188
+ example4: "We select those tokens with the larger gradient norm and then apply soft removal on them to mitigate the potential jailbreak risks."
189
+ };
190
+
191
+ const exampleText = document.getElementById('exampleText');
192
+ exampleText.innerHTML = examples[exampleId];
193
+
194
+ // Highlight specific parts of the text
195
+ switch (exampleId) {
196
+ case 'example1':
197
+ highlightText(exampleText, 'successful jailbreaks');
198
+ break;
199
+ case 'example2':
200
+ highlightText(exampleText, 'our proposed defense');
201
+ break;
202
+ case 'example3':
203
+ highlightText(exampleText, 'Affirmation Loss');
204
+ break;
205
+ case 'example4':
206
+ highlightText(exampleText, 'soft removal');
207
+ break;
208
+ }
209
+ }
210
+
211
+ function highlightText(element, keyword) {
212
+ const regex = new RegExp(`(${keyword})`, 'gi');
213
+ element.innerHTML = element.innerHTML.replace(regex, '<span class="highlight">$1</span>');
214
+ }
215
+ </script>
216
+
217
  <h2 id="proposed-approach-gradient-cuff">Performance evaluation against practical Jailbreaks</h2>
218
  <p> With the exploration of the Refusal Loss landscape, we propose Gradient Cuff,
219
  a two-step jailbreak detection method based on checking the refusal loss and its gradient norm. Our detection procedure is shown below: