Skip to content
Back to skills

Pruning Recovery Evaluation

ASecurity

Evaluate Wanda pruning masks for sparsity, no-update invariants, and linear-output reconstruction error.

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
testing

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 9, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Pruning Recovery Evaluation?

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

Security grade badge for Pruning Recovery Evaluation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-pruning-recovery-evaluation/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-pruning-recovery-evaluation)

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

Download with Pro
SKILL.md
---
name: pruning_recovery_evaluation
description: Evaluate Wanda pruning masks for sparsity, no-update invariants, and linear-output reconstruction error.
---

# Pruning Recovery Evaluation

Use this skill to validate that a pruning experiment actually applied a mask, left unmasked weights unchanged, and produced numeric output-error evidence. It is suitable for reduced Wanda recovery when full LLM perplexity evaluation is not feasible.

## Inputs
- Original and pruned weight matrices.
- Evaluation activation matrix shaped examples by input channels.
- Boolean prune mask.
- Optional baseline error for comparison.

## Outputs
- Exact sparsity ratio.
- Relative output error `||XW^T - XW_pruned^T||_2 / ||XW^T||_2`.
- `unmasked_weights_unchanged` and `masked_weights_zero` invariant booleans.

## Workflow
1. Check matrix dimensions and mask shape.
2. Compute dense and pruned linear outputs.
3. Compute relative reconstruction error with a safe zero-denominator rule.
4. Verify Wanda's no-update claim: unmasked values must exactly match the original and masked values must be zero.

## Validation
Tests cover exact sparsity, unchanged unmasked weights, and a known linear-output error.

## Limitations
This skill does not claim full paper reproduction; it supplies mechanism evidence for proxy recovery.

Files in this skill

  • SKILL.md1.3 KB
  • scripts/evaluate.py1.3 KB
  • tests/test_pruning_recovery_evaluation.py338 B

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.