Skip to content
Back to skills

Inverse Faithfulness Audit

ASecurity

Audit inverse Bayesian-network structures for naturalness, local I-map consistency, and edge-minimality evidence using d-separation checks.

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

Security analysis

A100/100

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

Scanned September 9, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Inverse Faithfulness Audit?

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

Security grade badge for Inverse Faithfulness Audit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-inverse-faithfulness-audit/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-inverse-faithfulness-audit)

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: inverse_faithfulness_audit
description: Audit inverse Bayesian-network structures for naturalness, local I-map consistency, and edge-minimality evidence using d-separation checks.
---

# Inverse Faithfulness Audit

Use this skill when a generated inverse graph needs structural validation against a generative Bayesian network. It is designed for small recovery graphs, regression tests, and mechanism evidence. It is not a full theorem prover for arbitrary large graphical models.

## Inputs

- Generative `parents` mapping for the original BN.
- `inverse_parents` mapping from latent factor variable to inverse parents.
- Lists of `latents` and `observed` variables.
- `mode`: `topological` or `reverse_topological`.

## Outputs

- `ok`, `natural_ok`, `local_imap_ok`, and `minimality_ok`.
- `issues`: a list of failed checks with variable and conditioning-set details.
- `checked_edges`: number of inverse edges audited for edge-removal evidence.

## Workflow

1. Validate that all inverse factor variables are latent variables.
2. Check naturalness relative to generative ancestors and descendants.
3. Enumerate local Markov assertions induced by the inverse graph and verify each with d-separation in the generative graph.
4. For every inverse edge, remove that parent from the local conditioning set and confirm the removed parent would not be d-separated from the child in the generative graph.
5. Treat any issue as a request to refine the graph inversion or factor contract.

## Validation

Run:

```bash
python tests/test_audit.py
```

The tests use only standard-library imports.

## Limitations

The audit checks singleton local Markov assertions and edge-removal witnesses. That is sufficient for reduced recovery evidence and regression tests, while the paper's proof remains the authority for NaMI's general correctness.

Files in this skill

  • SKILL.md1.8 KB
  • scripts/audit_inverse.py7.2 KB
  • tests/test_audit.py1.6 KB

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.