enforcing-leakage-firewall

Detect data leakage in supervised machine-learning evaluation pipelines.

2|Updated May 23, 2026
One-click install
npx skills add https://github.com/rocklambros/rcs --skill enforcing-leakage-firewall
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: enforcing-leakage-firewall
Source: https://github.com/rocklambros/rcs/tree/main/skills/ml-datasci/enforcing-leakage-firewall
Command: npx skills add https://github.com/rocklambros/rcs --skill enforcing-leakage-firewall

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you avoid trusting inflated test scores when a supervised model can leak information across entities, sources, or post-join features.

Core Features & Use Cases

  • Flags random-split evaluations that hide duplicate rows, repeated customers, repeated patients, or other shared entities across splits.
  • Recommends group-aware splitting, leave-one-source-out validation, and leave-one-feature-out checks to expose cross-source or target-derived leakage.
  • Use it for multi-source crosswalks, recommender histories, merged registries, or any pipeline that shows suspiciously high performance after joins or feature engineering.

Quick Start

Use the enforcing-leakage-firewall skill to audit my model, identify leakage risks, and tell me whether the held-out metric is trustworthy.

Frequently Asked Questions about enforcing-leakage-firewall

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

FAQPage Schema
What is data leakage in machine learning evaluation and how does it happen after joins?▼

Data leakage occurs when supervised model evaluation hides duplicate rows or target-derived signals across splits. It often happens after joins or merges in multi-source crosswalks, causing suspiciously high held-out metrics that fail in production.

How do I validate a machine learning model with grouped entity data to prevent leakage?▼

You validate grouped entity data by applying group-aware splitting and no-row-in-two-splits hashing. This prevents repeated customers, patients, or shared entities from appearing in both training and test sets, ensuring your held-out metric is trustworthy.

When do I need leave-one-source-out validation for crosswalk pipelines?▼

You need leave-one-source-out hub-firewall validation when merging multi-source crosswalks or recommender histories. It exposes cross-source leakage by holding out an entire data source during training, verifying that performance is not driven by source-specific signals.

Does random split evaluation hide duplicate rows in merged registries?▼

Random split evaluation hides duplicate rows in merged registries by distributing repeated entities across training and test sets. This inflates held-out metrics, requiring group-aware splitting and no-row-in-two-splits hashing to detect and block the leakage.

How do I use leave-one-feature-out sweeps to detect target-derived features?▼

You run leave-one-feature-out sweeps by iteratively removing individual features and re-evaluating the model. This identifies target-derived features that artificially inflate performance, helping you isolate suspicious post-join signals before trusting your metric.

What are the limitations of group-aware splitting for leakage detection?▼

Group-aware splitting prevents entity overlap across splits but does not detect target-derived features or cross-source leakage. You must combine it with leave-one-feature-out sweeps and leave-one-source-out validation for comprehensive data leakage detection.