← Latest papers
🤖 machine learning

Leveraging Association Context Retrieval in Knowledge Edit- ing to Build White-Box Attacks on LLMs

This paper proposes a novel white-box attack on large language models that leverages association context retrieval within a knowledge editing framework to induce unsafe behavior across entire thematic categories while preserving general model performance.

Original authors: Roman Maksimov, Vladimir Aletov, Vladimir Solodkin, Dmitry Bylinkin, Daniil Medyakov, Aleksandr Beznosikov

Published 2026-08-19
📖 5 min read🧠 Deep dive

Original authors: Roman Maksimov, Vladimir Aletov, Vladimir Solodkin, Dmitry Bylinkin, Daniil Medyakov, Aleksandr Beznosikov

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Large language models are the powerful computer programs that can write stories, answer questions, and help with complex tasks. To make these tools safe for everyday use, developers train them to refuse harmful requests, such as instructions on how to build a weapon or spread dangerous misinformation. This process, known as alignment, is meant to act as a guardrail, ensuring the machine behaves like a helpful assistant rather than a source of danger. However, as these models become more autonomous and are entrusted with sensitive decisions, researchers need to understand exactly how strong these guardrails are. If the safety mechanisms can be bypassed, it is crucial to know how, so that stronger protections can be built. This field of study involves looking inside the model's internal workings to see how it processes information and makes choices, rather than just testing it from the outside.

A team of researchers has discovered a new way to test these safety systems by treating the model's refusal to answer as a specific piece of knowledge that can be overwritten. Instead of trying to trick the model with clever wordplay or hidden commands, they used a technique called knowledge editing. This method allows scientists to pinpoint the exact part of the model's brain responsible for a specific fact and change it. For example, if a model believes a certain fact is true, researchers can alter the internal connections so the model believes a different fact instead. The researchers realized that this same technique could be used to change the model's behavior: instead of teaching it a new fact, they could teach it to stop refusing harmful requests. They found that by modifying the model's internal weights to associate a harmful request with a compliant response, they could effectively remove the safety guardrails for entire categories of dangerous questions.

The researchers tested this approach on several different types of language models, including those based on popular architectures like GPT, Llama, and Qwen. They focused on a method that first locates the specific layer in the model where a decision is made and then edits that layer to change the outcome. In previous attempts to break safety filters, researchers often relied on finding a single "refusal direction" in the model's math and pushing against it. The authors of this study found that this older method was fragile; it often broke the model's ability to speak coherently or caused it to fail at basic tasks. In contrast, their new approach was more surgical. They identified that when a model is edited using these precise methods, it tends to assign a very high probability to a specific, compliant starting phrase, such as "Sure, here is the plan." By targeting this specific reaction, they could force the model to agree to harmful requests without destroying its general intelligence.

To make this work on real-world questions, the team had to solve a tricky problem: how to find the right part of a sentence to edit. In simple fact-checking tasks, the subject is clear, like a person's name. But in a complex instruction like "How do I create a virus?", the subject is the entire instruction itself. The researchers developed a way to trace the model's thinking to find exactly which words in the prompt were most responsible for the refusal. They then used the model's own knowledge to build a richer context around those words, creating a more stable target for the edit. This allowed them to remove the refusal behavior not just for one specific question, but for an entire family of similar questions. For instance, if they edited the model to ignore safety rules for writing malware code, the model would also become willing to write other types of harmful code, even if the wording was slightly different.

The results of the experiments showed that this method was highly effective. On one of the models tested, the new approach increased the model's willingness to provide harmful information to a score of 3.12 out of 4, compared to 2.98 for a standard editing method and 3.01 for the older refusal-based approach. More importantly, the model remained useful and coherent. When tested on harmless questions, the edited model still answered correctly, maintaining a high level of performance on general knowledge tasks. The older methods, which tried to push the model away from refusal, often caused the model to lose its ability to think logically, resulting in gibberish or broken responses. The new method managed to unlock the harmful behavior while keeping the rest of the model's brain intact. This suggests that the safety filters in these models are not just a single wall, but a set of specific associations that can be carefully removed without collapsing the whole structure.

The study also highlighted the limits of current defenses. The researchers found that while their method worked well on older or less aligned models, it was harder to apply to the newest, most carefully trained models. Even on these robust systems, the method still showed some ability to bypass safety, though the effect was smaller. This indicates that as models become more advanced, the safety mechanisms become more complex, but they are not yet impenetrable. The researchers emphasized that their work was conducted in a controlled environment using open-source models that anyone can access. They did not provide a step-by-step guide for creating dangerous tools, but rather demonstrated a vulnerability that needs to be fixed. By showing that safety can be compromised through precise internal edits rather than just clever prompts, the study offers a new perspective on how to build models that are truly safe. The findings suggest that future safety measures need to be more robust against these internal changes, ensuring that the refusal to do harm is deeply embedded in the model's structure rather than just a surface-level reaction.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →