Skip to content
Back to skills

Counterfactual Effect Scoring

ASecurity

Estimate training-data removal effects by summing linear datamodel weights and evaluating counterfactual correlations.

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

Security analysis

A100/100

Scanned September 9, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Counterfactual Effect Scoring?

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

Security grade badge for Counterfactual Effect Scoring
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-counterfactual-effect-scoring/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-counterfactual-effect-scoring)

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

SKILL.md
---
name: counterfactual_effect_scoring
description: Estimate training-data removal effects by summing linear datamodel weights and evaluating counterfactual correlations.
---

# Counterfactual Effect Scoring

Use this skill after a linear datamodel has produced per-training-example weights. It estimates how removing a candidate group of examples changes a fixed target outcome.

## Inputs

- Datamodel weights `theta`.
- Candidate removal sets as index lists.
- Optional actual counterfactual effects for validation.

## Outputs

- Predicted effect per removal set.
- Ranked influential training indices.
- Pearson correlation with actual effects when labels are supplied.

## Workflow

1. Validate every removal index against the weight vector.
2. Sum `theta[i]` over each removal set.
3. Rank individual examples by signed or absolute weight.
4. Compare predicted and actual effects if actual counterfactual outcomes are available.

## Validation

Run:

```bash
python scripts/score_counterfactuals.py --demo
python tests/test_score_counterfactuals.py
```

## Limitations

The score is a linear extrapolation from the datamodel. Large or distribution-shifted removal sets should be declared as counterfactual extrapolation.

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.