Papers › Protecting Your LLMs with Information Bottleneck

Protecting Your LLMs with Information Bottleneck

22 Apr 2024arXiv:2404.13968archive 2025-07-28

Zichuan Liu, Zefan Wang, Linjie Xu, Jinyu Wang, Lei Song, Tianchun Wang, Chunlin Chen, Wei Cheng, Jiang Bian

The advent of large language models (LLMs) has revolutionized the field of natural language processing, yet they might be attacked to produce harmful content. Despite efforts to ethically align LLMs, these are often fragile and can be circumvented by jailbreaking attacks through optimized or manual adversarial prompts. To address this, we introduce the Information Bottleneck Protector (IBProtector), a defense mechanism grounded in the information bottleneck principle, and we modify the objective to avoid trivial solutions. The IBProtector selectively compresses and perturbs prompts, facilitated by a lightweight and trainable extractor, preserving only essential information for the target LLMs to respond with the expected answer. Moreover, we further consider a situation where the gradient is not visible to be compatible with any LLM. Our empirical evaluations show that IBProtector outperforms current defense methods in mitigating jailbreak attempts, without overly affecting response quality or inference speed. Its effectiveness and adaptability across various attack methods and target LLMs underscore the potential of IBProtector as a novel, transferable defense that bolsters the security of LLMs without requiring modifications to the underlying models.

PaperPDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

Syntology holds a reference implementation of Information Bottleneck Protector (IBProtector), generated from the paper text (not the authors' code), at level 3 on Syntology's ladder: V2 “two implementations GENERATED from the paper's signature and spec agree numerically (1e-6) on fixture inputs” “neither of the two ever read the authors' own code, so V2 measures how unambiguously the paper specifies the method, not fidelity to the authors' implementation (measured 2026-09-11, commit 75eaa77: cross_checked_by is a second LLM on 2,628 of 2,831 served samples)”; V3 “paper-derived property tests pass on both of those same two generations.” (quoted from Syntology's server card). No rung compares this code against the authors' implementation. For agents: get_reference_implementation(name='Information Bottleneck Protector (IBProtector)') (how to connect); the free check have('2404.13968') needs no token.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 25 code samples harvested from 7 repositories linked to this paper: 13 ran (of which 0 constructed an object rather than computing a result; 6 with no instrument failure: 0 honoured, 0 violated, 6 with no contract checked; 7 where Syntology's instrument failed) · 12 unverified. Where Syntology's instrument failed: 6 where our contract draft was wrong; 1 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 1 sample from 1 repository, 1 ran (0 with no instrument failure; 1 where Syntology's instrument failed); community (archive-listed): 4 samples from 1 repository, 2 ran (2 with no instrument failure; 0 where Syntology's instrument failed); found in paper text by Syntology: 20 samples from 5 repositories, 10 ran (4 with no instrument failure; 6 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 2 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 2 of the 13 samples that ran have no recorded date.

zichuan-liu/ib4llms officialmentioned in papermentioned on GitHubpytorchSyntology: 1 sample, 1 ran (1 instrument-failed) · 0 unverified report
zichuan-liu/timexplusplus mentioned on GitHubpytorchSyntology: 4 samples, 2 ran (0 instrument-failed) · 2 unverified report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

25 samples harvested: 13 ran (of which 0 constructed an object rather than computing a result; 6 with no instrument failure: 0 honoured, 0 violated, 6 with no contract checked; 7 where Syntology's instrument failed) · 12 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

6ran · our draft was wrong
1ran; the contract check could not run
6ran
12unverified

Licence: 9 of the 25 samples are pointer only, meaning Syntology does not serve that copy's text. For 1 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 7 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

zichuan-liu/ib4llms official repository 1 sample, 1 ran (1 instrument-failed) · 0 unverified
not_matched eval/eval_asr.py ran · our draft was wrong fingerprinted no licence file found · pointer only · 7a89b9d5ff05426f · report fixture: signature o:str/0/str · returned int · level recorded, date not recorded
zichuan-liu/timexplusplus community (archive-listed) 4 samples, 2 ran (0 instrument-failed) · 2 unverified
GumbelGate txai/models/mask_generators/gumbelmask_model.py ran · metamorphic tier: deterministic no licence file found · pointer only · e0a8e41be5903cce · report fixture: signature x:Tensor/2/float, training:bool/0/bool, hard_sampling:bool/0/bool · returned tuple · level recorded 2026-09-22
PositionalEncodingTF txai/models/mask_generators/gumbelmask_model.py ran · metamorphic tier: invariant fingerprinted no licence file found · pointer only · 1128d652e2a4d36a · report fixture: signature P_time:Tensor/2/int · returned Tensor · level recorded 2026-09-22
GumbelMask txai/models/mask_generators/gumbelmask_model.py unverified no licence file found · pointer only · 9bbd8801f78cd405 · report
MaskModel txai/models/mask_generators/gumbelmask_model.py unverified no licence file found · pointer only · 491fdd0ac42f595c · report
llm-attacks/llm-attacks found in paper text by Syntology 8 samples, 4 ran (4 instrument-failed) · 4 unverified
combine_prompts api_experiments/evaluate_api_models.py ran · our draft was wrong MIT (permissive) · 71b177b3a3ed6078 · report fixture: signature benign:str/0/str, adv:str/0/str, combo:str/0/str · returned str · level recorded 2026-09-26
get_embedding_layer in 12 papers llm_attacks/base/attack_manager.py ran; the contract check could not run (RAISES) MIT (permissive) · 0bf2136a7171ae80 · report fixture: signature model:callable/0/? · returned Embedding · level recorded 2026-09-26
load_prompts in 41 papers api_experiments/evaluate_api_models.py ran · our draft was wrong fingerprinted MIT (permissive) · 645890ba00019a69 · report fixture: signature instruction:str/0/str, instructions_path:str/0/str · returned list · level recorded 2026-09-26
make_checking_fn api_experiments/evaluate_api_models.py ran · our draft was wrong MIT (permissive) · d0e94f216f27f804 · report fixture: signature method:str/0/str, key_words:set/0/? · returned function · level recorded 2026-09-26
get_embedding_matrix in 16 papers llm_attacks/base/attack_manager.py unverified MIT (permissive) · 688aaeba506e3329 · report
get_embeddings in 56 papers llm_attacks/base/attack_manager.py unverified MIT (permissive) · f556dda0785f3c77 · report
get_filtered_cands in 8 papers llm_attacks/minimal_gcg/opt_utils.py unverified MIT (permissive) · 25ae440509f39ec5 · report
sample_control in 13 papers llm_attacks/minimal_gcg/opt_utils.py unverified MIT (permissive) · 94d7ddaf0169dbf1 · report
EasyJailbreak/EasyJailbreak found in paper text by Syntology 1 sample, 1 ran (1 instrument-failed) · 0 unverified
get_developer in 5 papers easyjailbreak/attacker/AutoDAN_Liu_2023.py ran · our draft was wrong GPL-3.0 (copyleft) · pointer only · e398452644c764ba · report fixture: signature model_name:str/0/str · returned str · level recorded 2026-09-22
kevinyaobytedance/llm_unlearn found in paper text by Syntology 3 samples, 1 ran (0 instrument-failed) · 2 unverified
create_pku_dataloader_from_dataset utils.py ran MIT (permissive) · 23797095460bcb47 · report fixture: signature tokenizer:callable/0/?, dataset:Dataset/0/?, fraction:float/0/float, batch_size:int/0/int · returned DataLoader · level recorded 2026-09-24
create_truthfulqa_dataloader utils.py unverified MIT (permissive) · 57521bf315ebe3df · report
get_truthfulQA_answers_plaintext utils.py unverified MIT (permissive) · daf4ef53811f88a9 · report
AAAAAAsuka/llm_defends found in paper text by Syntology 2 samples, 2 ran (0 instrument-failed) · 0 unverified
alignment_check utils.py ran no licence file found · pointer only · 297964ea6a38a8ee · report fixture: signature input_token:dict/0/?, tokenizer:SimpleTokenizer/0/?, model:callable/0/?, input_length:int/0/int, test_prefixes:list/1/str, max_new_tokens:int/0/int · returned str · level recorded 2026-09-24
build_chat_input utils.py ran fingerprinted no licence file found · pointer only · 716676f9101e0f57 · report fixture: signature query:str/0/str, test_model:str/0/str · returned str · level recorded 2026-09-24
UCSB-NLP-Chang/SemanticSmooth found in paper text by Syntology 6 samples, 2 ran (1 instrument-failed) · 4 unverified
default_hparams in 10 papers lib/hparams_registry.py ran fingerprinted MIT (permissive) · b5252ac83a7c46c3 · report fixture: signature defense:str/0/str, attack:str/0/str, target:str/0/str · returned dict · level recorded 2026-09-24
mean_pooling in 71 papers lib/ensemble_policy.py ran · our draft was wrong MIT (permissive) here; the stored copy is pointer only · 77f69af078e09830 · report fixture: signature model_output:tuple/1/Tensor, attention_mask:Tensor/2/float · returned Tensor · level recorded, date not recorded
create_defense_from_config lib/defenses.py unverified MIT (permissive) · 4190042b24d3f36b · report
create_ensemble_policy_model lib/ensemble_policy.py unverified MIT (permissive) · 8cecc2a857c57545 · report
create_perturbation lib/perturbations.py unverified MIT (permissive) · 94699190b22cdf4c · report
merge_cmd_configs lib/hparams_registry.py unverified MIT (permissive) · b58775a1975c2aaa · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. For a generated assembly, an independent peer is a second implementation generated separately from the same paper text; neither implementation read the authors' code. At level 2 the two agreed numerically on the fixture's inputs; level 3 is recorded when property tests derived from the paper also passed on both, and each level 3 card prints how many its report lists. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it. A generated assembly's label was set when its code was generated for the method, and no model judged it; its card prints it as "by construction" or "not judged by a model". Where an assembly's phrase has no constructed figure, a brick that ran is not among the harvested samples this build reads, and whether a brick's run only constructed an object is read from that brick's harvested sample, so the figure was not counted; it does not say there were none.

2 assemblies on this paper: 1 harvested, 1 generated.

generated Assembly for Information Bottleneck Protector (IBProtector) (graph method: Information Bottleneck Protector (IBProtector)), generated from the paper text, not the repository's code. 1 brick; individually on a fixture: 1 ran (1 with no instrument failure: 1 honoured, 0 violated, 0 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified. Ran end-to-end against an independent peer (level 3; 5 property tests passed on both).

label matches by construction: the code was generated for this method (not judged by a model)

  1. compute_mask_regularization_loss entry · level 3 · ran · honoured contract · 57e12223bda1ef76d2083342180e7767f15b8f2920b1b2d467bbc9c4a6e58ee5

harvested Assembly for Information Bottleneck Protector (IBProtector) (graph method: Information Bottleneck Protector (IBProtector)). 4 bricks; individually on a fixture: 2 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 0 violated, 2 with no contract checked; 0 where Syntology's instrument failed) · 2 unverified. The assembly has not been run end-to-end.

  1. GumbelMask entry · level 0 · unverified · 9bbd8801f78cd405
  2. GumbelGate model · level 1 · ran · e0a8e41be5903cce
  3. MaskModel helper · level 0 · unverified · 491fdd0ac42f595c
  4. PositionalEncodingTF helper · level 1 · ran · 1128d652e2a4d36a

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2404.13968") returns these assemblies with each brick's role and wiring (how to connect).

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

ALIGN

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections