Neural Feature Learning

Neural Feature Learning is a skill for Claude Code from zjunlp/Mechanist. It costs 162 tokens per session (1,308 once invoked), scanned A, original, MIT.

A framework for studying how trained neural networks learn useful internal representations, meaning the patterns or features their layers use to process data. It uses Neural Feature Matrices and gradient-based measurements to analyze those features.

In plain words
What is it for?
Use it to analyze features in fully connected or convolutional layers, compare layers and model widths, measure input-gradient structure, and study kernel-style feature-learning methods.
Why use it?
It offers a way to inspect feature learning beyond reading raw weight values. The results still depend on assumptions about model width, parameterization, and training behavior.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the mechanist plugin — 54 skills, 4 agents shipped together

Good fit Use it to analyze features in fully connected or convolutional layers, compare layers and model widths, measure input-gradient structure, and study kernel-style feature-learning methods.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zjunlp/mechanist/neural-feature-learning
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add zjunlp/Mechanist --skill neural-feature-learning
Clone the repo
git clone --depth 1 https://github.com/zjunlp/Mechanist

Made for: Claude Code.

Or install mechanist, the plugin that ships this one along with the rest of its 54 skills, 4 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Neural Feature Learning

README.md
[![agentmods](https://agentmods.dev/badge/skills/zjunlp/mechanist/neural-feature-learning.svg)](https://agentmods.dev/skills/zjunlp/mechanist/neural-feature-learning)
Your own site
<a href="https://agentmods.dev/skills/zjunlp/mechanist/neural-feature-learning"><img src="https://agentmods.dev/badge/skills/zjunlp/mechanist/neural-feature-learning.svg" alt="Measured on agentmods" height="20"></a>
Per session 162 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,308 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00162 $0.01308
Opus 5 $0.00081 $0.00654
Sonnet 5 $0.00032 $0.00262
Haiku 4.5 $0.00016 $0.00131

Measured 8d ago against content hash bc84b9b3ae4d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

Neural Feature Learning scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (eigenvector-feature-direction/scripts/train_network.py, eigenvector-feature-direction/scripts/verify_ansatz.py, gradient-outer-product/scripts/rfm_usage_example.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/mechanism-skills/neural-feature-learning/SKILL.md · 33 lines

How it starts

The opening of the file, as written. The whole thing — 33 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Advantage

The framework supplies a kernel-shaped interpretation of feature learning: any fully-connected or convolutional architecture can be analyzed through its NFM / EGOP, the same diagnostic transfers across layers and widths, and the resulting features are far more interpretable than raw weight matrices. Because the EGOP only needs per-sample input gradients (cheap to obtain via standard reverse-mode autograd), it also powers kernel-style algorithms — Recursive Feature Machines (RFM) iteratively refit a kernel using the EGOP and recover neural-network-style features without backpropagation through model weights — and yields clean theoretical predictions in the infinite-width limits, where the choice of parameterization decides whether the network truly learns features (muP) or freezes into a fixed kernel (NTK / NNGP).

Limitation

Predictions hinge on width, parameterization, and training-dynamics assumptions: the NFM-EGOP alignment is an empirical ansatz verified on standard architectures but is not universal, and the infinite-width limits (NTK, NNGP, muP) describe finite-width training only approximately — and only when initialization scales and learning rates are tuned consistently with the chosen parameterization. Results are also dataset- and layer-specific — features extracted from one site rarely transfer verbatim — and EGOP estimation is expensive on high-resolution inputs because every per-sample input gradient must be accumulated into a dense matrix whose size grows quadratically with the input dimension.

Submethods

The category comprises 4 main forms, progressing from the diagnostic (DNFA), to the algorithmic instantiation (RFM), to the theoretical limits (TP4), and finally to the convolutional extension (ConvRFM):

  • Eigenvector Feature Direction (Deep Neural Feature Ansatz): States that for each fully-connected layer, the principal eigenvectors of the NFM converge during training to the principal eigenvectors of the EGOP measured at that layer's input — so the directions a network ends up using can be read directly from its weights at convergence. This Deep Neural Feature Ansatz (DNFA) supplies the spectral lens for feature learning: visualize the top eigenvectors per layer to see which input directions the network has learned to rely on. You can find a demo for this method in ./eigenvector-feature-direction. This demo shows deep-neural-feature-ansatz: Use this skill when working with the Deep Neural Feature Ansatz (DNFA) — verifying feature learning in neural networks, training fully connected networks on image/tabular datasets, computing Neural Tangent Kernels (NTK) and Neural Network Gaussian Processes (NNGP), or reproducing experiments from the paper "The Deep Neural Feature Ansatz" (arXiv:2212.13881).

Read the full file on GitHub · 33 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 33 lines · 162 tokens per session scan A bc84b9b3ae4d

Subscribe to this mod's changes

Neural Feature Learning is a skill published in the GitHub repository zjunlp/Mechanist (72 stars, last pushed 12d ago), licensed MIT. It adds 162 tokens to every session and 1,308 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.