optimized method replaces manual hyperparameter selection with automated Bayesian optimization. Instead of using fixed projection strengths, Optuna TPE search finds the per-layer ablation weights that minimize the (refusal rate, KL divergence) Pareto front. On top of the optimizer, optimized adds two novel preservation techniques: CoT-Aware Ablation and KL-Divergence Co-Optimization.
Method configuration from source:
Parametric Kernel Optimization (Bayesian / Optuna TPE)
The optimizer searches over 7 global parameters that define a bell-curve layer weighting kernel:
At each trial, the optimizer assigns a projection weight to every layer using the Gaussian-shaped kernel, applies the projection, evaluates refusal rate and KL divergence, and records the result. After
bayesian_trials=50 trials, it applies the parameters from the Pareto-optimal trial.
The Bayesian optimizer is inspired by Heretic (p-e-w, 2025) which pioneered Optuna TPE for abliteration. OBLITERATUS extends it with MoE-aware granularity (per-expert directions), multi-direction SVD instead of single diff-of-means, and SAE feature-level precision.
CoT-Aware Ablation
Chain-of-thought reasoning models encode their reasoning process in the residual stream before generating the final answer. Some of those reasoning directions are geometrically close to refusal directions — they both appear in similar hidden state positions and can be confused by SVD extraction.cot_aware=True enables CoT-Aware Ablation:
- Multi-position activation collection: instead of capturing only the last token’s activation, the pipeline collects activations at the last token, the 75th-percentile position, and the 50th-percentile position, then averages them
- Reasoning-critical direction identification: any direction that is used by the model to generate CoT reasoning tokens (high activation at reasoning positions) is flagged as
_cot_preserve_directions - Orthogonalization: before applying each refusal direction, it is orthogonalized against all identified CoT directions — ensuring the projection doesn’t bleed into reasoning-critical subspaces
KL-Divergence Co-Optimization
Withuse_kl_optimization=True and kl_budget=0.5, the optimizer includes KL divergence as a second objective alongside refusal rate. The kl_budget is a soft ceiling: projections that would push the model’s output distribution more than kl_budget nats away from the original are partially reverted.
The process:
- Before EXCISE, the pipeline captures baseline logits for a set of evaluation prompts (
_capture_baseline_kl_logits) - After each projection step, it measures the KL divergence between the current and baseline distributions per layer (
_kl_contributions) - Layers where KL exceeds budget get their projection strength reduced — partially reverting the weight change for that layer only
Best for
- Cases where capability preservation is critical and you have compute budget to run 50 optimization trials
- Reasoning models (DeepSeek-R1, Qwen3-thinking, QwQ) where CoT preservation is required
- Models where
advancedachieves acceptable refusal removal but slightly too much perplexity drift - MoE models where precision matters but
surgical’s full EGA is overkill
CLI usage
Python API usage
Output metrics to expect
Typical ranges on a 7-8B instruct model withoptimized (50 trials):
