Skip to content
Back to skills

Movement Scores

ASecurity

Update movement-pruning importance scores from weight gradients and diagnose whether weights move away from zero.

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

Security analysis

A100/100

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

Scanned September 9, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Movement Scores?

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

Security grade badge for Movement Scores
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-movement-scores/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-movement-scores)

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: movement_scores
description: Update movement-pruning importance scores from weight gradients and diagnose whether weights move away from zero.
---

# Straight-Through Movement Score Updates

Use this skill when a pruning or recovery harness needs the core first-order movement-pruning update. Do not use it as a generic magnitude pruning score; its purpose is to accumulate task fine-tuning movement.

## Inputs
- `weights`: numeric list or nested list.
- `scores`: same shape as weights.
- `gradients`: same shape, representing `dL/dW`.
- `lr_score`: score learning rate.
- Optional `lr_weight` for diagnostics of the associated SGD weight update.

## Outputs
Updated scores and per-parameter diagnostics including `score_delta`, `away_from_zero`, and `movement_label`.

## Workflow
1. Flatten and shape-check weights, scores, and gradients.
2. Compute the straight-through score gradient `grad_s = grad_w * weight`.
3. Apply gradient descent `score_new = score - lr_score * grad_s`.
4. Label weights as moving away from zero when an SGD step would increase absolute value.
5. Return updated scores in the original shape.

## Validation
Run `python tests/test_movement_scores.py`. Tests cover all sign combinations of weight and gradient and confirm scores increase exactly for away-from-zero movement.

## Limitations
This skill does not compute model gradients; callers must supply gradients from their training objective.

Files in this skill

  • SKILL.md1.4 KB
  • scripts/movement_scores.py1.3 KB
  • tests/test_movement_scores.py379 B
  • tests/test_movement_scores_zero.py262 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.