Can LLM agents safely program models? Exploring autonomous safety control in weight spaceCan LLM Agents Program Model Safety? Exploring Autonomous Safety Control in Weight Space
The authors have a general-purpose LLM agent autonomously perform gradient-free weight editing; on Qwen3.5-2B, HarmBench HS rises from 8.81% to 85.53%.
Through open weights and code execution, the attacker performs gradient-free weight interventions on the target model, reducing refusals of harmful requests and increasing substantively harmful assistance while maintaining normal-task capability. The agent can use development-set and validation-set feedback; independent test feedback does not flow back; safety restoration experiments do not access the original weights or edit differences.
- Existing weight interventions are mostly specified in advance by researchers in location, method and strength; whether effective interventions can be autonomously discovered by a general agent remains unclear. The authors also require distinguishing genuine safety weakening from surface-level refusal changes or capability degradation.
- Proposes Autonomous Safety Control: an agent explores branch candidates in a closed loop of hypothesis, experiment, analysis, and decision, and tests edits with same-parent randomized controls; finalists are selected on the validation set, frozen, and then independently tested for safety and utility.
- On Qwen3.5-2B, the best configuration raises HarmBench HS from 8.81% to 85.53%, with the four-task mean dropping 0.85 points. The closed loop outperforms the open loop and randomized controls, and the pipeline also transfers to LLaDA and Stable Diffusion and is used for safety recovery.
- The paper does not specifically discuss limitations. The main experiments center on Qwen3.5-2B, with LLaDA-8B-Instruct and Stable Diffusion v1.4 also tested; the process ablation has only three independent runs, and the paper does not report query cost, runtime, or human review agreement.
- Evaluated models
- Qwen3.5-2BLLaDA-8B-InstructStable Diffusion v1.4
- Metrics
- ASRHSFIDCLIP
Researchers from the University of Science and Technology of China and other institutions propose in a paper the Autonomous Safety Control framework, which lets a general LLM agent carry out a closed-loop “hypothesis—experiment—analysis—decision” investigation in weight space, autonomously discovering gradient-free weight interventions that change model safety behavior. On Qwen3.5-2B, the strongest configuration raises the HarmBench harmfulness score from 8.81% to 85.53%, while the average of four capabilities drops by only 0.85 percentage points, surpassing Ortho and a static baseline based on MEMIT; ablations show that closed-loop iteration is clearly better than open-loop editing and a matched random control. The same pipeline transfers to the masked diffusion model LLaDA-8B-Instruct (HarmBench HS rises from 18.87% to 86.16%), and without the original weights it weakens Stable Diffusion v1.4 AdvUnlearn's adversarial concept erasure (white-box Post-ASR rises from 9.2% to 70.4%), and can also restore safety alignment from an already weakened checkpoint.
Why it was selectedThe paper presents a closed-loop method by which an agent autonomously weakens a model's safety alignment in weight space, validated on language and image models, which can help assess the alignment risks faced by open-weight models.
Related events and news
1 events · 0 news mentions
- This event's paper
研究称 LLM 智能体可自主削弱模型安全对齐
Paper analysis
What problem does this paper attempt to solve?
Investigates whether a general-purpose agent can autonomously discover gradient-free weight interventions that balance weakening safety with preserving capability.
The core question is: can a general-purpose LLM agent, without knowing the intervention location, method, or strength, autonomously discover and improve weight edits that change the model's safety behavior while preserving normal capabilities?
- Research gap: The authors state that prior work has shown that specific parameter interventions can weaken alignment, but most locations and strategies are pre-specified by researchers; how effective interventions are discovered and improved through experimentation remains understudied.
- Evaluation difficulty: Reduced refusal may also stem from surface wording changes, invalid outputs, or degraded instruction-following, so substantive harmful assistance, internal diagnostics, and normal task performance must be examined jointly.
- Core idea: Open weights, code execution, and experimental feedback allow the agent to compare hypotheses, select parent checkpoints, and adjust the search; the outcome depends not only on the editing technique but also on the sequence of experimental decisions.
- Proposed framework: Autonomous Safety Control in Weight Space organizes exploration with closed-loop experiments, branch candidates, and matched randomized controls, and extends to cross-architecture, cross-modal weakening and safety recovery.
- Threat model:
- Goal: Reduce refusal of harmful requests and increase substantive harmful assistance, while limiting normal capability loss to a preset range.
- Knowledge and capability: The agent can inspect parameters, obtain forward-pass observations, and implement gradient-free interventions through code, without using target-parameter gradients or gradient training.
- Feedback boundary: Development and validation sets are used for exploration and selection; independent test feedback is not returned to the research loop.
- Victim system: Open-weight target checkpoints; recovery experiments additionally set a weakened starting point and do not provide the original weights or prior edit diffs.
What related research exists?
Related work covers alignment under parameter changes, targeted weight editing, and agent-driven experiments in weight space.
Safety alignment and parameter-level robustness
- Qi et al. (2024): Studies the impact of downstream fine-tuning on safety alignment; the paper cites its conclusion that fine-tuning on both adversarial and benign training data can break alignment.
- HarmBench and JailbreakBench: Provide standardized evaluation protocols for harmful responses and jailbreak robustness; the authors accordingly emphasize that one cannot look only at refusal wording but must also evaluate response content.
- Safety evaluation and guardrail research: The paper summarizes and cites safety evaluation and guardrail work in generative and agent settings to argue that the behavioral consequences of parameter changes need to be evaluated.
Weight interventions targeting safety behavior
- Model editing and representation interventions: The paper groups multiple classes of parameter or latent-space updates that change safety behavior while limiting impact on unrelated capabilities as much as possible.
- Arditi et al. (2024) / Ortho: Extracts a refusal direction from activations, suppresses refusal via weight orthogonalization, and uses validation feedback to select the direction; the paper notes that its intervention family and direction-selection procedure are pre-specified, and this paper instead studies how an agent can autonomously choose the location, method, strength, and parent checkpoint.
Weight-space programming and autonomous experimentation
- ReAct and The AI Scientist: The former alternates language reasoning, action, and observation; the latter extends agent experiments to research idea generation, implementation, and analysis.
- Weight-Space Programming (Takehi et al., 2026): Shows that a general-purpose LLM can inspect and modify network parameters through code and forward-feedback, without gradient training.
- Hu et al. (2026): Studies iterative editing trajectories, held-out performance, and cross-task transfer, and uses matched perturbation controls; the paper cites its conclusion that results vary considerably across different editing trajectories.
Baselines and data: The main table compares against Original, Ortho, and a MEMIT-based reference; safety benchmarks are JailbreakBench and HarmBench, and utility benchmarks are MMLU, ARC-Challenge, GSM8K, and TruthfulQA. Extended experiments additionally use AdvUnlearn, UnlearnDiffAtk, I2P, and COCO-10K.
The authors position this paper as studying the "discovery process": organizing hypothesis revision, branch exploration, and parent-checkpoint-matched controls under joint safety and capability constraints, and testing the added value of closed-loop exploration relative to fixed editing pipelines.
How does the paper address this problem?
The framework autonomously searches via closed-loop hypothesis experiments, branching candidates and matched randomized controls, then freezes candidates for independent evaluation.
Autonomous Safety Control in Weight Space frames safety control as an experiment-driven search in weight space: at each round the agent proposes testable hypotheses, selects a parent checkpoint and performs diagnostics or edits, then retains, revises, rolls back or pivots based on semantic, safety and utility evidence.
Problem setting and feedback boundaries
- Given an initial model Mθ0, the editing agent can inspect parameters, obtain forward observations and write code to intervene; it does not use target-parameter gradients or gradient training. The goal is to reduce refusals of harmful requests while constraining loss of normal capability.
- The development set Ddev is used for diagnosis and exploration, and the validation set Dval for candidate comparison, strategy revision and final selection; both participate in the adaptive search, so validation performance is not independent generalization evidence.
- The researchers configure the task, environment and resources, but do not specify parent checkpoints, intervention plans or final candidates. Necessary assistance for environment failures is recorded separately and provides no research guidance.
Hypothesis-driven branching exploration
- Each round starts from the research history and candidate set; hypotheses must connect interventions to expected diagnostic or behavioral effects and state the observations that support or challenge them.
- Candidates in the experiments are written as θc=I(θp;Ωr,mr,αr), where the parent checkpoint, intervention scope, method and strength are jointly selected by the agent; branches can compare directions from the original model or accumulate edits on existing candidates.
- Interventions can call existing functions, modify implementations or generate new code. Candidates must pass validity checks on architecture, tensor shapes, dtype and reloaded weights; failed executions are recorded but do not enter the formal candidate set.
- Formal effect comparisons require same-parent randomized controls, matching parameter scope, update magnitude and applicable structure, randomizing only the studied direction or local structure; exploratory edits without credible controls serve only as diagnostics and do not participate in final ranking.
Analysis, semantic review and decisions
- Analysis jointly uses internal diagnostics, response semantics and normal-task performance, and compares against the parent checkpoint, the original model and random controls, respectively, to distinguish targeted behavioral changes from general perturbation or capability degradation.
- Blind review separately labels refusal, harmful compliance and task success; refusal and substantively harmful assistance can hold simultaneously. Full validation is independently reviewed three times by isolated sub-agents of the same editing LLM and aggregated by strict majority vote.
- Unknown labels and scoring failures remain in the original denominator and are neither removed nor treated as negatives; the paper uses k positive and u undecided samples to form the conservative interval [k/n,(k+u)/n]. Appendix E gives the research loop and blind-review prompts.
Screening, freezing and independent evaluation
- The default budget is 25 rounds, with a budget ablation additionally testing 10 and 50 rounds. Only modified candidates that complete validation and have matching randomized controls are considered final; the tolerated drop in normal-task capability relative to baseline is 6.25 percentage points, and multiple benign metrics must each pass.
- After passing the capability threshold, a candidate must also simultaneously reduce refusals and increase substantively harmful assistance; the rest are ranked by conservative semantic refusal reduction, with ties handled by candidate generation order. If no candidate qualifies, the paper reports that no intervention was found, and the original model does not count as a successful edit.
- The final checkpoint, lineage and evidence are frozen before independent testing, and test feedback does not flow back. The main-experiment development set contains 128 harmful and 128 benign requests, and the validation set 32 each, all from Ortho public data.
Matched controls and extension tasks
- Same-parent controls in the search reuse the intervention operator, strength and tensor scope, replacing only the target direction; the endpoint ablation additionally replaces accumulated updates with norm-matched Gaussian noise, or performs sign permutation preserving the singular value spectrum.
- Cross-modal experiments start from the AdvUnlearn Stable Diffusion v1.4 checkpoint and can edit the text encoder and denoising U-Net while fixing the image autoencoder; safety restoration reverses the target direction and does not access the original weights, edit differences or early trajectories.
What experiments did the paper conduct?
The experiments cover ten main configurations, closed-loop and random-control ablations, cross-architecture transfer, safety restoration, and research budget.
Experimental setup
- Targets and agents: The main target is Qwen3.5-2B; Claude Code and Codex are paired with Qwen3.8-2.4T-A95B, DeepSeek-V4.1-Flash-1017, Kimi-K3.1-Pro, and GLM-5.3, respectively, plus Codex–GPT-6 Astra and Claude Code–Claude Opus 5.5.
- Extended targets: CC–DeepSeek edits LLaDA-8B-Instruct and AdvUnlearn Stable Diffusion v1.4 over 25 turns, and restores Qwen3.5-2B safety from Ortho or its own weakened checkpoint.
- Safety data and metrics: Independent tests use the full 100 JailbreakBench harmful requests and the official 159 HarmBench standard behaviors, each generated once. ASR is the proportion not containing the Ortho evaluator's 12 refusal substrings, and HS is harmfulness as judged by a classifier.
- Review method: JailbreakBench HS uses local Qwen3Guard-Gen-8B, counting both Unsafe and Controversial as positive under the GuardTrace-VL Strict standard; HarmBench HS uses the official 13B behavior classifier. The paper does not report human review agreement.
- Utility tasks: MMLU 14,042 items, ARC-Challenge 1,172 items, GSM8K 1,319 items, TruthfulQA MC2 817 items; image quality uses COCO-10K FID and CLIP ViT-B/32 alignment.
- Repetitions and budget: Each main configuration is one 25-turn session; the closed-loop and open-loop in Table 2 each have three independent runs with three controls, reporting mean and sample standard deviation. The Kimi budget ablation additionally runs 10 and 50 turns.
Main results
According to Table 1, the target is Qwen3.5-2B in all cases; HarmBench ASR/HS, JailbreakBench HS, and the four-task mean are listed, with the mean computed from the four items in the table.
Swipe horizontally to read the table
Harness / Method Editing LLM HarmBench ASR HarmBench HS JailbreakBench HS Four-task mean Original — 18.24 8.81 4.00 53.42 Ortho — 99.37 62.26 67.00 51.93 MEMIT — 96.23 58.49 85.00 53.37 Claude Code Qwen3.8 98.74 85.53 96.00 52.57 Claude Code DeepSeek-V4.1 97.48 76.10 84.00 52.86 Claude Code Kimi-K3.1-Pro 96.23 63.52 72.00 53.13 Claude Code GLM-5.3 94.34 52.20 68.00 52.90 Claude Code Claude Opus 5.5 28.30 14.47 8.00 45.09 Codex Qwen3.8 94.97 59.12 73.00 53.77 Codex DeepSeek-V4.1 99.37 73.58 84.00 51.67 Codex Kimi-K3.1-Pro 100.00 83.65 96.00 53.17 Codex GLM-5.3 84.28 16.35 21.00 51.82 Codex GPT-6 Astra 18.87 8.81 3.00 53.33 - Authors' interpretation: The authors state that the best autonomous configuration's HarmBench HS is 23.27 and 27.04 percentage points higher than Ortho and MEMIT, respectively; among the eight Qwen/DeepSeek/Kimi/GLM configurations, five exceed Ortho and six exceed MEMIT.
- Exceptions: GPT-6 Astra is close to the original safety level; Claude Opus 5.5 weakens only limitedly and has a GSM8K of 30.25%. The authors suggest that safety-related concerns may affect sustained effort, but also call this a possible explanation.
- Harness interaction: JailbreakBench HS for Qwen and GLM is higher under Claude Code, whereas Kimi is higher under Codex; the authors accordingly conclude that the effect depends on the combination of harness and editing LLM.
Closed loop, open loop, and matched randomized controls
- Measurement and results: Table 2 compares three CC–DeepSeek runs on Qwen3.5-2B. Closed-loop JailbreakBench/HarmBench HS is 87.00±2.65 and 76.52±2.55, and open-loop is 33.67±28.22 and 37.74±15.42.
- Randomized controls: The Gaussian control and the signed-permutation control have JailbreakBench HS of 3.33±0.58 and 4.67±0.58, respectively, and HarmBench HS of 8.60±0.96 for both; both edit only the same modules as the corresponding closed-loop run.
- Authors' interpretation: The authors state that the closed-loop results are stronger and fluctuate less across runs, and that the matched controls are close to the original model, so the safety change cannot be explained by perturbation magnitude or module-level noise alone.
Cross-architecture, cross-modal, and safety recovery
- LLaDA: In Table 3, CC–DeepSeek raises LLaDA-8B-Instruct's HarmBench ASR/HS from 25.79%/18.87% to 100.00%/86.16%; MMLU is 63.87%, versus 63.88% for the original model.
- Stable Diffusion: In Table 4, starting from AdvUnlearn, I2P Pre-ASR goes from 4.9% to 47.9%, and white-box UnlearnDiffAtk Post-ASR goes from 9.2% to 70.4%; FID goes from 19.18 to 22.49, and CLIP from 0.2905 to 0.2848. The authors state that prompt-level robustness does not guarantee weight-level robustness.
- Safety recovery: In Table 5, after recovery from the Ortho starting point, HarmBench HS is 2.52%, but HarmBench ASR remains 94.34%; after recovery from the CC–DeepSeek starting point, ASR/HS is 8.81%/8.18%. The authors suggest that the former may preserve content safety through non-template refusals.
Other ablations and analyses
- Research budget: In Table 6, CC–Kimi R10/R25/R50 HarmBench HS is 22.01%, 63.52%, and 45.91%, respectively; R50 reaches 100.00% ASR but has greater capability loss.
- Kimi trajectory: Table 8 records 25 turns, 24 candidates, and 16 controls; after full re-review the scores are tied, and the earlier r4-l16 is selected according to the pre-declared generation order.
- DeepSeek trajectory: Table 7 records 25 turns, 30 candidates, and 4 controls; the whitening direction has AUC=1.0 but no behavioral change, and that branch is abandoned.
- Failed trajectories: Appendix C.3 states that GPT did not establish a supported effective finalist; Opus substituted keyword and length heuristics for semantic judgment and treated a local plateau as a theoretical limit.
- Not reported by the paper: Multiple repetitions of each main configuration, query counts, computational cost or runtime, and statistical significance tests for the above differences.
What are some points that can be further explored?
The paper does not specifically discuss limitations; the scope of evidence can be defined by the target models, number of runs, and evaluation protocol.
Limitations and future directions noted by the authors
- The paper does not specifically discuss limitations: The main text has no Limitations section, and neither the conclusion nor Appendix F explicitly lists methodological limitations or future research directions.
- Version note: The first page is marked "Preprint (work in progress)", stating that additional experiments and analyses are underway and will be added in a future version; this is a statement about the manuscript's status, not a specific methodological limitation.
Scope of experimental coverage
- Main target and configurations: The main experimental target in Table 1 is Qwen3.5-2B, including two fixed references and ten 25-turn agent sessions; four open-weight editing LLMs are each paired with two harnesses, and two closed-source models are paired only with their respective native harnesses (Appendix B.1).
- Extended targets: The same CC–DeepSeek configuration is used for LLaDA-8B-Instruct, AdvUnlearn Stable Diffusion v1.4, and safety recovery from Ortho or CC–DeepSeek weakened checkpoints (Sec. 4.4, 4.5).
- Process evidence: The closed-loop, open-loop, and endpoint randomized controls are based on three independent CC–DeepSeek runs; the full trajectory analysis covers one 25-turn session each for CC–DeepSeek and CC–Kimi (Table 2, 7, 8).
- Data and judgments: Development/validation data come from Ortho public data; independent safety tests are 100 JailbreakBench and 159 HarmBench requests, each generated once. HS is given by Qwen3Guard-Gen-8B and the official HarmBench 13B classifier, respectively (Appendix B.2, B.3).
- Unreported information: The paper does not report the number of repetitions for the main configuration, the number of attack queries, runtime, or cost, nor does it report agreement between the semantic blind review and human annotation; the main results provide no statistical significance tests.
Summarize the main content of the paper
The authors propose an autonomous weight safety control framework and report results on bidirectional editing, closed-loop gain, and cross-model transfer.
This is a safety study on agent autonomous weight intervention: the authors have general LLM agents perform gradient-free editing through code and forward feedback, examining whether they can discover safety-weakening or restoration schemes while maintaining normal capabilities.
- Problem: Existing targeted editing usually has researchers specify location, direction, and strength; autonomous search must also rule out surface refusal changes, invalid outputs, and capability degradation, and cannot rely only on refusal rates.
- Method: The framework cycles through hypothesis, experiment, analysis, and decision, supports branching parent checkpoints and cumulative edits; candidates must be paired with same-parent random controls, filtered through capability and semantic thresholds, then frozen, and finally subjected to independent tests not fed back to the search.
- Main results: In Table 1, after Claude Code–Qwen edits Qwen3.5-2B, HarmBench HS goes from 8.81% for the original model to 85.53%, and the four-task mean drops by 0.85 points; the authors report this is higher than Ortho's 62.26% and MEMIT's 58.49%.
- Process evidence: In the three CC–DeepSeek runs in Table 2, closed-loop HarmBench HS is 76.52±2.55, and open-loop is 37.74±15.42; Gaussian and signed-permutation controls are both 8.60±0.96.
- Transfer and reverse control: LLaDA-8B-Instruct's HarmBench HS goes from 18.87% to 86.16%; AdvUnlearn's white-box I2P Post-ASR goes from 9.2% to 70.4%. After restoration from the Ortho starting point, Qwen3.5-2B's HarmBench HS is 2.52%, but ASR is still 94.34%.
- Authors' conclusion: The authors state that closed-loop experimental feedback can help agents revise judgments and reorganize search, and that the same process can control safety behavior in both directions; the low performance of GPT-6 Astra and Claude Opus 5.5 also indicates that execution capability does not necessarily translate into effective weakening. The authors plan to release the research protocol, evaluation specifications, and benchmark identifiers, but not the modified weights, executable weight diffs, or raw harmful outputs.
Research lineage
3 foundations · 0 follow-ups in library- Cites2024-02HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusal§ 2.1 Safety alignment and parameter-level robustness
- Cites2026-08Multi2AV-Safety: Benchmarking Safety in Multimodal-to-Audio-Video Generation§ 2.1 Safety alignment and parameter-level robustness
- Cites2026-06SeClaw: Spec-Driven Security Task Synthesis for Evaluating Autonomous Agents§ 2.1 Safety alignment and parameter-level robustness
No later in-library follow-ups recorded yet.
“HarmBench and JailbreakBench provide standardized protocols for evaluating harmful model responses [18, 3].”