Skip to content
Back to skills

Early Example Scoring

ASecurity

Compute EL2N and GraNd example-importance scores for supervised classification pruning experiments.

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
researchpythonbashgit

Works with

  • cli

Security analysis

A100/100

Scanned September 9, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Early Example Scoring?

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

Security grade badge for Early Example Scoring
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-early-example-scoring/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-early-example-scoring)

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

SKILL.md
---
name: early_example_scoring
description: Compute EL2N and GraNd example-importance scores for supervised classification pruning experiments.
---

# Early Example Scoring

Use this skill when a recovery or experiment needs paper-faithful per-example scores from "Deep Learning on a Data Diet": EL2N from class probabilities and labels, or GraNd from per-example gradient vectors. Do not use it to choose subsets or report final model accuracy; downstream selection and evaluation own those steps.

## Inputs
- Probability rows shaped as `n_examples x n_classes`.
- Labels as integer class ids or one-hot rows.
- Optional multiple probability runs for score averaging.
- Optional per-example gradient vectors for GraNd.

## Outputs
- Per-example EL2N scores `||p_i - one_hot(y_i)||_2`.
- Averaged EL2N scores across independent runs.
- Per-example GraNd scores from gradient-vector norms.
- JSON diagnostics from the CLI.

## Workflow
1. Validate finite probability rows and labels.
2. Convert integer labels to one-hot rows.
3. Compute EL2N with Euclidean norm of probability error.
4. Average scores over repeated runs when provided.
5. Compute GraNd as gradient-vector Euclidean norm when gradients are available.

## Validation
Run:

```bash
python tests/test_scoring.py
python scripts/score_examples.py --fixture
```

## Limitations
- The script expects probabilities, not raw logits.
- It does not normalize invalid probability rows automatically.
- It does not sort, prune, or train models.

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…