Skip to content
Back to skills

Ffn Value Vector Extraction

ASecurity

Extract and normalize feed-forward output value vectors from transformer-like model weights for concept-promotion analysis.

  • 247 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 9, 2026
testingpython

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill ffn_value_vector_extraction --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ffn Value Vector Extraction?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ffn Value Vector Extraction
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-ffn-value-vector-extraction/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-ffn-value-vector-extraction)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: ffn_value_vector_extraction
description: Extract and normalize feed-forward output value vectors from transformer-like model weights for concept-promotion analysis.
---

# FFN Value Vector Extraction

Use this skill when a recovery or interpretability task needs the value vectors of transformer feed-forward neurons. It is appropriate for state dictionaries, named matrices, or explicit FFN output projection tensors. Do not use it to read an original paper repository during recovery; provide current-attempt matrices or model weights from allowed sources.

## Inputs

- A JSON state dictionary mapping tensor names to 2D numeric arrays, or a direct 2D matrix.
- Optional orientation hint: `neurons_by_rows` or `neurons_by_columns`.
- Optional layer/name hints such as `mlp.c_proj.weight`, `fc2.weight`, `W_out`, or `down_proj.weight`.

## Outputs

A JSON object with `vectors`, each containing `layer`, `neuron`, `source_name`, and `vector`, plus `orientation` and validation metadata.

## Workflow

1. Identify likely FFN output projections by name.
2. Infer whether neurons are rows or columns. GPT-style `c_proj.weight` and `W_out` often need columns-as-neurons; generic `fc2.weight` commonly uses columns-as-neurons when shaped hidden by intermediate.
3. Split the matrix into one vector per neuron and preserve provenance.
4. Validate that vectors are numeric and have a consistent residual dimension.
5. Pass these vectors to the vocabulary projection skill.

## Validation

Run `python scripts/extract_value_vectors.py --fixture` or the tests in `tests/test_extract_value_vectors.py`. The fixture checks orientation and neuron identifiers on deterministic matrices.

## Limitations

The skill does not run a transformer model and does not infer semantic concepts. It only exports the value side of FFN neurons for downstream projection and grouping.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.