representation-freeze-audit

Audits embedding freeze and null-operation correctness in TDA experiment pipelines.

1|Updated Dec 13, 2025
One-click install
npx skills add https://github.com/ZK-Theory/TDL --skill representation-freeze-audit-zk-theory
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: representation-freeze-audit
Source: https://github.com/ZK-Theory/TDL/tree/main/.agents/skills/representation-freeze-audit
Command: npx skills add https://github.com/ZK-Theory/TDL --skill representation-freeze-audit-zk-theory

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? In topological data analysis (TDA) pipelines, errors in how embeddings (PCA/UMAP/scaler fits, GMM labels, recoding) are frozen or applied silently corrupt every downstream persistent homology claim. The signature bug is a null operation that permutes already-embedded rows, leaving the persistence diagram invariant to the very operation the null is meant to test. ## Core Features & Use Cases - Freeze Verification: Confirms loadings, scalers, GMMs, and recoding are frozen before any null draw or cross-group comparison, and fit on reference data with transform-only application elsewhere. - Null Placement Audit: Checks that label/cohort/order shuffles act on raw inputs before embedding, so the persistence diagram actually changes under the null. - Path Separation: Ensures frozen and provisional embeddings write to distinct output paths and provisional embeddings are never consumed as the frozen reference. - Use Case: When reviewing a TDL task that compares persistent homology across cohorts or surrogates, run this audit to get a PASS/FAIL report per checklist item with code locations and an assessment of whether failures invalidate downstream topological results. ## Quick Start Audit this TDA experiment code to verify the embedding is frozen before null shuffles and that shuffles operate on pre-embedding inputs.

Frequently Asked Questions about representation-freeze-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify a null operation actually changes persistent homology output?

Apply label, cohort, or order shuffles to the raw inputs before embedding, so the embedding and resulting persistence diagram change under the null. Permuting already-embedded rows leaves the diagram invariant and invalidates the test.

How should frozen PCA loadings be applied across cohorts in TDA experiments?

Fit loadings and scalers on the designated reference data, then apply them transform-only to all other cohorts, eras, or surrogates. Re-fitting per group makes embeddings incomparable because differences come from the transform rather than the data.

Why does my permutation test fail to reject anything in a persistence pipeline?

A common cause is shuffling rows after embedding, which leaves the persistence diagram invariant to the null operation. Move the shuffle upstream of the embedding step so the null genuinely perturbs the PH input.

What is the difference between frozen and provisional embeddings?

Frozen embeddings are the fixed reference representation used for all comparisons, while provisional embeddings are intermediate fits. They must write to distinct, clearly named paths, and a provisional embedding must never be read as the frozen reference.

When should I escalate or stop during a representation audit?

Stop when a null acts on embedded rows, when a representation is re-fit per group or per draw where it should be frozen, or when a provisional embedding is consumed as the frozen reference, since each invalidates downstream topological claims.