Representation and Parameter Analysis
Skill75 starsChanged 4 months agoMITView on GitHub
Representation and Parameter Analysis interprets and controls a model by directly manipulating its two kinds of internal objects — features (the hidden-state activations produced during a forward pass) and weights (the parameters of the target model). The analysis side relies on standard linear-algebra tools applied straight to these objects: techniques such as PCA, mean-difference, or simple linear classifiers are run over collected features (e.g., from contrastive prompt pairs) or over weight differences between a fine-tuned and a pre-trained checkpoint, in order to extract a small set of meaningful directions. The control side then operates directly through arithmetic on those objects: adding such a direction back into the features steers behavior at inference time, while adding, subtracting, or combining task-level weight differences edits the model in one shot — so that interpretability findings translate into behavioral control without any retraining.
In this repository52 other files it gives its agents.
- ablation-plannerSkill
- analyze-resultsSkill
- arxivSkill
- auto-claimSkill
- auto-experimentSkill
- auto-iteration-loopSkill
- autoSkill
- verify-pick-alternativesSkill
- auto-verifySkill
- data-ruleSkill
- experiment-auditSkill
- experiment-planSkill
- experiment-queueSkill
- finetune-hyperparameter-sweepSkill
- imageSkill
- multiple-choice-evaluationSkill
- experiment-tipsSkill
- steering-block-selectionSkill
- steering-coefficient-tuningSkill
- hypothesis-batchSkill
- idea-creatorSkill
- impact-checkSkill
- mechanic-db-searchSkill
- mechanism-auditSkill
- mechanism-behavior-discoverySkill
- mechanism-exploreSkill
- causal-attributionSkill
- CircuitSkill
- Feature Dictionary LearningSkill
- gradient-detectionSkill
- Magnitude AnalysisSkill
- Multi-Modal InterpretabilitySkill
- Neural Feature LearningSkill
- ProbingSkill
- SHAPSkill
- mechanism-skillsSkill
- Vocabulary ProjectionSkill
- mguideSkill
- mhistorySkill
- monitor-experimentSkill
- msearchSkill
- next-roundSkill
- notifySkill
- novelty-checkSkill
- paper-figureSkill
- research-litSkill
- research-refine-pipelineSkill
- research-refineSkill
- research-reviewSkill
- result-to-claimSkill
- run-experimentSkill
- training-checkSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 36
Default choice: If the user has not specified a particular method, recommend Steering features first — it is the simplest to set up and run.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Advantage
Features and weights provide a single low-dimensional handle for both analysis and control, with no retraining needed. Once a concept direction is identified, reading becomes a projection and editing becomes an addition — the same primitive supports monitoring, classification, steering, model editing, and capability composition. This is far cheaper than the intervention sweeps in Causal Attribution or full fine-tuning. Linearity also makes operations compose: directions can be subtracted to contrast concepts, and task-level weight edits can be added or negated to mix in or remove capabilities, each step with a clear semantic meaning.
Limitation
The approach assumes target concepts are linearly encoded. When the encoding is non-linear, distributed, or entangled with other concepts, a single direction misses much of the signal and additive edits spill into neighboring features. Results are also basis- and checkpoint-specific — directions rarely transfer across models — and large edit strengths push the model off-distribution, breaking the linear regime the method relies on.
Submethods
The category typically takes 4 forms:
- Representation Engineering: Reads, monitors, and edits LLM behavior by extracting concept directions from hidden-state features using contrastive prompt pairs. RepReading projects features onto the concept direction to detect attributes such as truthfulness, emotion, fairness, harmlessness, or memorization, while RepControl writes the same direction back into the residual stream during generation to steer the model toward or away from the concept. You can find a demo for this method in ./representation-engineering. This demo shows representation-engineering: Use this skill when working with Representation Engineering (RepE) for AI transparency, monitoring, or controlling internal representations of large language models including truthfulness detection, emotion control, harmlessness steering, and memorization analysis.
- Steering Vectors: A focused instance of directly editing features at inference time: steering directions are built from contrastive activation pairs (Contrastive Activation Addition / CAA) and added to a chosen layer's residual stream during generation. It is especially useful for behavioral control of chat models, where concepts of interest are easy to frame via paired examples of desired vs. undesired behavior. You can find a demo for this method in ./steering-vectors. This demo shows steering_vectors: Work with Llama 2 model steering using Contrastive Activation Addition (CAA) for behavioral control, including generating steering vectors, evaluating model behavior, and analyzing activation patterns.
- Steering features: Directly intervenes on the target feature rather than adding a separately built steering vector to the residual stream. The feature that corresponds to the target behavior is first located and scored for how strongly it drives the output — keeping features with a high output effect over merely input-correlated ones — and during generation its activation is directly amplified or shrunk to steer behavior. When the feature lives in a Sparse Autoencoder (SAE), this takes the encode → amplify target feature → decode form (Feature Clamping): the SAE encodes the residual stream into feature space, the target feature's activation is scaled, and the result is decoded back. The SAE is not essential, though — the same direct-intervention idea applies to a feature identified in the model's own backbone activations, where its activation is scaled in place with no encode/decode step. Because control acts on one isolated, near-monosemantic feature, it is more targeted and less entangled than dense contrastive steering vectors. You can find a demo for this method in ./steer-features. This demo shows steer-features: Use this skill when working with Sparse Autoencoders (SAEs) for model steering, feature analysis, or interpretability research. Particularly useful for selecting and scoring SAE features to influence model outputs toward desired concepts.
- Parameter-Space Task Vectors: Lifts the same idea to weight space and edits weights directly: a task vector is the displacement between a fine-tuned checkpoint and its pre-trained checkpoint, and arithmetic on these vectors — addition for multi-task composition, negation for unlearning, and analogy-style combinations across related tasks — modifies model behavior without any further training. You can find a demo for this method in ./parameter-space-task-vectors. This demo shows task-vectors: Use this skill when working with task arithmetic for editing neural network models, including creating task vectors from pre-trained and fine-tuned checkpoints, combining them via arithmetic operations (negation, addition, analogies), and applying them to CLIP vision models for multi-task learning.
Practical Notes
Default choice. If the user has not specified a particular method, recommend Steering features first — it is the simplest to set up and run.
Check for an available SAE. Before implementing, search whether a Sparse Autoencoder has already been released for the target model (and for which layers). If one exists, use it to locate the target feature: SAE features are more monosemantic/interpretable than directions read off the raw backbone activations, and intervening on them usually gives a cleaner, stronger effect. If no SAE is available, fall back to a feature identified directly in the model's own activations — the same direct-intervention procedure applies, without the encode/decode step.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

