Skip to content
Back to skills

Least Squares Mask Tuning

ASecurity

Tune surviving pruning mask coefficients with damped least squares for activation reconstruction.

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

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 least_squares_mask_tuning --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Least Squares Mask Tuning?

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

Security grade badge for Least Squares Mask Tuning
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-least-squares-mask-tuning/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-least-squares-mask-tuning)

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: least_squares_mask_tuning
description: Tune surviving pruning mask coefficients with damped least squares for activation reconstruction.
---

# Least Squares Mask Tuning

Use this skill for the paper's final post-training pruning stage, after a binary structured mask has been selected and rearranged. It tunes only surviving mask entries to reconstruct original layer activations. Do not use it as model-weight retraining, and never revive pruned entries.

## Inputs

- Matrix `A` of per-unit activation contributions.
- Target vector `b` for reconstruction.
- Binary keep mask.
- Damping and acceptable coefficient range.

## Outputs

A real-valued mask, baseline/tuned reconstruction errors, and an accepted flag. Pruned entries remain zero.

## Workflow

Restrict `A` to kept columns, solve damped normal equations, insert the coefficients into the full mask, and reject coefficients outside the range. Report whether reconstruction error improved.

## Validation

Run the included deterministic synthetic tests.

Files in this skill

  • SKILL.md1 KB
  • scripts/least_squares_mask_tuning.py1.9 KB
  • tests/test_least_squares_mask_tuning.py290 B
  • tests/test_range_guard.py234 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.