Skip to content
Back to skills

Representation Distance Scoring

ASecurity

Compute class-center representation distances for Moderate-DS style data selection from labeled feature records.

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

Works with

  • cli

Security analysis

A100/100

Scanned September 9, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Representation Distance Scoring?

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

Security grade badge for Representation Distance Scoring
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-representation-distance-scoring/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-representation-distance-scoring)

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

SKILL.md
---
name: representation_distance_scoring
description: Compute class-center representation distances for Moderate-DS style data selection from labeled feature records.
---

# Representation Distance Scoring

Use this skill when a recovery or application has labeled examples with numeric hidden representations and needs the Moderate-DS distance score. Do not use it to train a model, choose the coreset size, or evaluate downstream accuracy; those are separate modules.

## Inputs
- A JSON list of records with `id`, `label`, and `representation` fields.
- Numeric representation vectors must have consistent dimensionality.

## Outputs
- Class centers keyed by label.
- Per-record Euclidean distance scores from each representation to its own class center.

## Workflow
1. Validate record ids, labels, and representation dimensions.
2. Average representation vectors separately for every class label.
3. Compute the Euclidean norm between each record representation and the matching class center.
4. Return stable diagnostics that preserve the input ids and labels.

## Validation
Run `python scripts/score_representations.py --self-test` or `python -m pytest tests` when pytest is available. The deterministic tests cover centers, distances, and schema failures.

## Limitations
This skill assumes representations already exist. It intentionally does not read the original paper repository, access model internals, or perform data augmentation.

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.