Parameter Selection Guide

Steering parameters are highly dependent on your specific model, task, and use case. This guide explains what each parameter does and how to use Wisent's optimization tools to find the right values for your setup.

Important: Do not use hardcoded parameter values from examples or other projects. Always run optimization on your specific model and task to find optimal parameters.

Key Parameters

Steering Method

The algorithm used to compute steering vectors from contrastive pairs.

MethodDescription
caaContrastive Activation Addition - computes mean(positive) - mean(negative)
hyperplaneClassifier-based steering using logistic regression decision boundary
mlpMLP-based steering using adversarial gradient direction
prismMulti-directional steering with gradient-optimized directions
pulseLayer-adaptive conditional steering with uncertainty-guided intensity
titanJoint optimization of manifold, gating, and intensity

Layer Selection

Which transformer layer(s) to extract activations from and apply steering to. The optimal layer varies significantly by model architecture, size, and task.

Extraction Strategy

How to aggregate activations from tokens in the response.

StrategyDescription
chat_meanAverage activations across all response tokens
chat_lastUse only the last token's activation
chat_max_normToken with maximum activation norm

Steering Strategy

How steering intensity varies across layers or generation steps.

StrategyBehavior
constantSame intensity at all layers
diminishingStronger early, weaker late
increasingWeaker early, stronger late
gaussianPeak at middle, taper at edges
initial_onlyApply only at first generation step

Steering Strength

The multiplier applied to steering vectors. Higher values produce stronger effects but may cause degraded outputs if too high.

Finding Optimal Parameters

Use the optimization commands to find the best parameters for your specific setup.

Full Automatic Optimization

Searches across methods, layers, strategies, and strengths:

Auto Optimization
python -m wisent optimize-steering auto \
  --task YOUR_TASK \
  --model YOUR_MODEL \
  --n-trials 50

Layer Search

Find the optimal layer for steering:

Layer Search
python -m wisent optimize-steering layer-search \
  --task YOUR_TASK \
  --model YOUR_MODEL \
  --num-samples 50

Strength Optimization

Find the optimal steering strength for a given layer:

Strength Optimization
python -m wisent optimize-steering strength \
  --task YOUR_TASK \
  --model YOUR_MODEL \
  --layer LAYER_INDEX \
  --strength-min 0.1 \
  --strength-max 5.0 \
  --strength-steps 20

Geometry Search

Explore combinations of layers and extraction strategies:

Geometry Search
python -m wisent geometry-search \
  --model YOUR_MODEL \
  --benchmarks YOUR_BENCHMARKS \
  --output geometry_results.json

Method-Specific Parameters

Each steering method has additional parameters that can be tuned. See the method-specific documentation for details:

  • PRISM: num_directions, retain_weight, optimization_steps
  • PULSE: sensor_layer, steering_layers, condition_threshold, gate_temperature, max_alpha
  • TITAN: num_directions, gate_hidden_dim, intensity_hidden_dim, max_alpha
  • MLP: hidden_dim, num_layers, dropout, epochs
  • Hyperplane: max_iter, C (regularization)

These parameters are also searched during automatic optimization when using optimize-steering auto.

Saving and Loading Configurations

After optimization, save your configuration for reuse:

Save Model Config
python -m wisent model-config \
  --model YOUR_MODEL \
  --steering-layer OPTIMAL_LAYER \
  --steering-strength OPTIMAL_STRENGTH

The configuration will be automatically loaded in future runs with the same model.

Related Commands

Stay in the loop. Never miss out.

Subscribe to our newsletter and unlock Wisent insights.