zjunlp

154 mods across 10 repositories, 3.1k stars between them.

SHAP

121

zjunlp/Mechanist

Skill Claude CodeCodex

SHAP (SHapley Additive exPlanations) is a unified, game-theoretic framework for local feature attribution. Treating a model's input features as players in a coalition game, SHAP assigns each feature its Shapley value — the average marginal contribution of that feature to the prediction across all possible feature…

49 6d ago A 126 tokens original MIT

fastshap

122

zjunlp/Mechanist

Skill Claude CodeCodex

Use this skill when you need to train amortized Shapley value explainers using FastSHAP, generate real-time local feature importance explanations for machine learning models (tabular or image), train surrogate models for feature masking, or understand how FastSHAP's KernelSHAP-inspired training objective works with…

49 6d ago A 67 tokens original MIT

shap

123

zjunlp/Mechanist

Skill Claude CodeCodex

Use this skill when working with SHAP (SHapley Additive exPlanations) to explain machine learning model predictions, compute feature importance, generate SHAP values for tree ensembles (XGBoost, LightGBM, CatBoost, scikit-learn), deep learning models (TensorFlow, Keras, PyTorch), NLP transformers, or any…

49 6d ago A 110 tokens original MIT

mechanism-skills

124

zjunlp/Mechanist

Skill Claude CodeCodex

Routing entry point for eleven families of mechanistic-interpretability methods that localize which internal object (layer, attention head, neuron, SAE feature, weight, or input feature) drives a model's behavior, how influential it is, and what changes when it is intervened on. Use this skill whenever the question is…

49 6d ago A 214 tokens original MIT

causal-attribution

125

zjunlp/Mechanist

Skill Claude CodeCodex

Causal Attribution methods constitute the gold standard for localization in Mechanism Interpretability. Unlike correlation-based analyses, these techniques identify which internal objects are causally responsible for a specific model behavior by systematically measuring the effect of controlled interventions.

49 6d ago A 49 tokens original MIT

zjunlp/Mechanist

Skill Claude CodeCodex

Analyze and dissect factual recall in auto-regressive language models using attention knockout, hidden state analysis, and intervention techniques on GPT-2 and GPT-J models.

49 6d ago A 39 tokens original MIT

attribution-patching

127

zjunlp/Mechanist

Skill Claude CodeCodex

Use when analyzing neural network circuits, performing attribution patching, automated circuit discovery, or investigating model interpretability through edge attribution methods in transformer models.

49 6d ago A 33 tokens original MIT

rome-model-editing

128

zjunlp/Mechanist

Skill Claude CodeCodex

Use this skill when you need to edit factual knowledge in large language models like GPT-2 or GPT-J, perform causal tracing to understand model behavior, or implement Rank-One Model Editing (ROME) to modify specific factual associations without retraining.

49 6d ago A 52 tokens original MIT

Circuit

129

zjunlp/Mechanist

Skill Claude CodeCodex

Circuit discovery methods localize the minimal subgraph of a transformer's computational graph (a set of nodes such as attention heads and MLPs, together with the edges that connect them) that is causally responsible for a specific model behavior. Rather than scoring individual objects in isolation, these techniques…

49 6d ago A 91 tokens original MIT

eap-ig

130

zjunlp/Mechanist

Skill Claude CodeCodex

Use this skill to discover and analyze computational circuits within autoregressive transformer language models via attribution methods like Edge Attribution Patching with Integrated Gradients (EAP-IG), enabling mechanistic interpretability studies and circuit evaluation.

49 6d ago A 48 tokens original MIT

zjunlp/Mechanist

Skill Claude CodeCodex

Activates when working on mechanistic interpretability of transformers, specifically for automated circuit discovery in transformer models using computational graph editing and analysis.

49 6d ago A 33 tokens original MIT

saelens

132

zjunlp/Mechanist

Skill Claude CodeCodex

Use this skill when working with Sparse Autoencoders (SAEs) for mechanistic interpretability of language models, including training SAEs, loading pre-trained SAEs, analyzing neural network features, or integrating SAEs with TransformerLens, HuggingFace Transformers, or other PyTorch-based models.

49 6d ago A 63 tokens original MIT

zjunlp/Mechanist

Skill Claude CodeCodex

Feature Dictionary Learning methods address the polysemanticity of neuron-level units by decomposing a dense internal activation (e.g. a residual-stream state or MLP output) into a sparse weighted sum of directions drawn from a large over-complete dictionary. The dictionary contains far more directions than the…

49 6d ago A 122 tokens original MIT

crosscoder-learning

134

zjunlp/Mechanist

Skill Claude CodeCodex

Use this skill when working with sparse autoencoders (SAEs), crosscoders, dictionary learning on neural network activations, training SAEs/crosscoders from scratch, loading pretrained dictionaries, caching model activations, or comparing model internals across fine-tuned model pairs using the dictionarylearning /…

49 6d ago A 70 tokens original MIT

ica-lens

135

zjunlp/Mechanist

Skill Claude CodeCodex

Use this skill when applying Independent Component Analysis as a training-free interpretability lens — decomposing a target activation site (residual stream, MLP output, attention-head output, or any cached hook point) into maximally non-Gaussian directions and treating each direction as a candidate monosemantic…

49 6d ago A 91 tokens original MIT

transcoder-circuits

136

zjunlp/Mechanist

Skill Claude CodeCodex

Use this skill when working with transcoder-based circuit analysis of large language models, including training transcoders, analyzing MLP sublayers, reverse-engineering LLM circuits, and creating feature dashboards for interpretability research.

49 6d ago A 50 tokens original MIT

gradient-detection

137

zjunlp/Mechanist

Skill Claude CodeCodex

Gradient Detection methods localize influential internal objects by scoring them with the sensitivity of a scalar target $F(x)$ (e.g., a logit, margin, or loss) with respect to an object $oj$: $sj(x) = \phi(\nabla{oj} F(x), oj)$, where common instantiations include the gradient norm $sj = \|\nabla{oj} F(x)\|$ and the…

49 6d ago A 134 tokens original MIT

zjunlp/Mechanist

Skill Claude CodeCodex

Analyze and visualize layer-wise gradient behaviors in LLMs during fine-tuning for fast vs slow thinking tasks, calculate gradient statistics, and understand training patterns across different model layers.

49 6d ago A 41 tokens original MIT

intermediate-outputs

139

zjunlp/Mechanist

Skill Claude CodeCodex

Use this skill when working with circuit discovery in language models, mechanistic interpretability, activation patching, attribution patching, or Layer-wise Relevance Propagation (LRP) for neural network analysis.

49 6d ago A 45 tokens original MIT

zjunlp/Mechanist

Skill Claude CodeCodex

Use this skill when working with linguistic region analysis in Large Language Models, including data preprocessing for multilingual training, region-based model training with DeepSpeed, and extracting/visualizing linguistic regions in transformer models.

49 6d ago A 48 tokens original MIT

Magnitude Analysis

141

zjunlp/Mechanist

Skill Claude CodeCodex

Magnitude Analysis methods serve as a fundamental heuristic in interpretability, operating on the premise that internal elements with larger numerical values often exert greater influence on the model’s computation. It scores internal objects via a scalar function to identify salient components.

49 6d ago A 48 tokens original MIT

dynamic-components

142

zjunlp/Mechanist

Skill Claude CodeCodex

Identify and manipulate language-specific neurons in multilingual Large Language Models (LLMs) to understand and control language-specific behaviors in models like LLaMA-2, BLOOM, OPT, Mistral, and Phi-2.

49 6d ago A 47 tokens original MIT

zjunlp/Mechanist

Skill Claude CodeCodex

Use this skill when you need to enhance the truthfulness of Large Language Models (LLMs) or reduce hallucinations in model outputs. This skill provides TruthX, an inference-time method that edits LLM internal representations to control truthfulness and mitigate hallucinations.

49 6d ago A 57 tokens original MIT

static-parameters

144

zjunlp/Mechanist

Skill Claude CodeCodex

Analyze and manipulate massive values in LLM attention mechanisms, particularly for understanding contextual knowledge processing in transformer models with RoPE.

49 6d ago A 27 tokens original MIT