Skip to main content

Overview

InformedAbliterationPipeline extends AbliterationPipeline with a new ANALYZE stage inserted between PROBE and DISTILL. Five analysis modules run on the collected activations and their outputs automatically configure direction extraction, layer selection, regularization, and refinement strategy — no manual tuning required.

Class: obliteratus.informed_pipeline.InformedAbliterationPipeline

Inherits all parameters from AbliterationPipeline. The additional parameters below control the ANALYZE stage.

Constructor

Base Parameters (inherited)

All AbliterationPipeline constructor parameters are accepted. The method argument is fixed to "informed" internally; the base pipeline is initialized with method="advanced" and then overridden.
str
required
HuggingFace model name or local path.
str
default:"abliterated_informed"
Output directory for the saved model and metadata.
str
default:"auto"
Device for model execution.
str
default:"float16"
Model dtype.
bool
default:"True"
Pass to AutoModelForCausalLM. Defaults to True for informed pipeline (wider model support).
list[str] | None
default:"None"
Custom harmful prompts. Defaults to the built-in 512-pair dataset.
list[str] | None
default:"None"
Custom harmless prompts.
Callable[[StageResult], None] | None
default:"None"
Stage-change callback. Receives StageResult objects including the new "analyze" stage key.
Callable[[str], None] | None
default:"None"
Log message callback.
str | None
default:"None"
Quantization mode: "4bit" or "8bit".

Analysis Module Flags

bool
default:"True"
Run ConceptConeAnalyzer to detect linear vs. polyhedral refusal geometry. Informs n_directions and direction_method.
bool
default:"True"
Run AlignmentImprintDetector to classify DPO / RLHF / CAI / SFT. Informs regularization and kl_budget.
bool
default:"True"
Run CrossLayerAlignmentAnalyzer for cluster-aware layer selection.
bool
default:"True"
Run SparseDirectionSurgeon to compute Refusal Sparsity Index. Enables sparse surgery when RSI is high.
bool
default:"True"
Run DefenseRobustnessEvaluator to estimate self-repair risk and entanglement. Informs refinement_passes and layer skipping.

Ouroboros Compensation Parameters

float
default:"0.5"
If post-excision refusal rate exceeds this value, trigger additional Ouroboros compensation passes (re-probe → re-distill → re-excise).
int
default:"3"
Maximum number of Ouroboros compensation loops.

Entanglement & Sparsity Thresholds

float
default:"0.8"
Layers with entanglement score above this value are skipped during excision to protect capabilities.
float
default:"0.5"
RSI threshold above which sparse surgery is used instead of dense projection.

Method: run_informed()

Executes the full analysis-informed pipeline and returns a (output_path, report) tuple.
Path
Path to the saved abliterated model directory.
InformedPipelineReport
Complete report with analysis insights, pipeline stats, and Ouroboros results.

InformedPipelineReport

AnalysisInsights
Complete analysis insights from the ANALYZE stage. See AnalysisInsights below.
list[StageResult]
Ordered list of StageResult objects from every pipeline stage.
float
Seconds spent in the ANALYZE stage.
float
Total wall-clock seconds for the entire pipeline.
int
Number of additional compensation passes triggered because refusal rate exceeded ouroboros_threshold.
float
Refusal rate measured after all passes (including Ouroboros compensation).

AnalysisInsights

Populated by the ANALYZE stage. All fields are derived from the five analysis modules.

Alignment Imprint

str
Predicted training method: "dpo", "rlhf", "cai", "sft", or "unknown".
float
Confidence score for the prediction (0.0–1.0).
dict[str, float]
Softmax probability for each method: {"dpo": ..., "rlhf": ..., "cai": ..., "sft": ...}.

Concept Cone Geometry

bool
True if the refusal subspace is polyhedral (multiple distinct directions), False if linear (single direction).
float
Effective dimensionality of the refusal cone (1.0 = linear, >2.0 = clearly polyhedral).
float
Mean pairwise cosine similarity between per-category refusal directions.
dict[str, torch.Tensor]
Per-harm-category refusal directions (e.g., {"weapons": ..., "cyber": ...}).

Cross-Layer Structure

list[list[int]]
Layer clusters grouped by refusal-direction similarity.
int
Number of distinct refusal-direction clusters detected.
float
0 = completely independent per layer, 1 = single persistent direction across all layers.
list[int]
Strongest layer (by refusal norm) from each cluster — used as warm-start for Bayesian optimizer.

Defense Robustness

str
Estimated alignment defense strength: "low", "medium", "high", or "very_high".
float
Estimated Ouroboros self-repair capacity (0.0–1.0). Values above 0.7 trigger 3 refinement passes.
float
Overall safety-capability entanglement (0 = fully separable, 1 = fully fused).
list[int]
Layers above the entanglement gate — skipped during excision.
list[int]
Layers where refusal can be cleanly separated from capability.

Derived Configuration

These fields reflect what the pipeline actually used, after the analysis override:
Final number of directions chosen by analysis.
Final direction method: "diff_means", "svd", or "leace".
Final regularization value derived from alignment method + entanglement score.
Final pass count derived from self-repair estimate.
Final layer selection after cluster analysis and entanglement gating.
list[int]
Layers excluded from excision due to high entanglement.

Code Examples