LeakVerity AI — Find the Leak. Measure the Damage. Test the Claim.

Inspiration: What If the Answers Were Already There?

Imagine a student scoring 100% on an exam.

Impressive, right?

But what if the student accidentally received the answer key along with the questions?

Suddenly, that perfect score doesn't seem so impressive.

The same thing can happen in machine learning.

A model might achieve an excellent score because it accidentally learned information it was never supposed to see.

This is called data leakage, and it can make machine learning results appear much better than they actually are.

But detecting leakage is only half the solution.

Think about that student again.

If we discover that the student had access to the answer key, we know something went wrong. But we still don't know how much the answer key helped.

What if the student takes another exam without the answer key? Would they still score 100%, or would their score drop to 60%?

The only way to know is to test them fairly.

I realized that machine learning experiments need the same kind of verification.

Researchers spend months developing models, and their results can influence scientific publications, healthcare decisions, and real-world applications. Yet a hidden evaluation mistake can make those results misleading.

That inspired me to create LeakVerity AI, a research-integrity platform designed to answer one important question:

If we find and correct the hidden mistakes, does the original research claim still hold?

My goal was not just to identify leakage. I wanted to measure its consequences and help researchers understand what their models can genuinely achieve.

What It Does: Giving Research a Fair Test

Imagine a teacher discovering that a student's exam may have been compromised.

The teacher would investigate what happened, remove the unfair advantage, give the student another exam, and compare the results.

LeakVerity follows a similar process for machine learning experiments.

I designed the platform around six steps:

1. Reproduce the Experiment: Upload a Python notebook and dataset. LeakVerity runs the original experiment and checks whether the reported result can be reproduced.

2. Investigate Leakage: The system searches for hidden problems, including duplicate records, overlapping training and testing data, future information, incorrect preprocessing, and unfair model selection.

3. Repair and Verify: Instead of simply displaying warnings, LeakVerity prepares corrected evaluation code, runs it, and verifies that the targeted problems have been addressed.

4. Measure the Damage: The platform compares the original and corrected results and measures how different categories of mistakes contributed to the performance change.

5. Test the Claim: The corrected model is evaluated for stability, differences across population groups, and time-based reliability.

6. Generate a Claim Survival Certificate: The platform produces an evidence-based assessment of whether the original research conclusion remains trustworthy.

The certificate has five possible outcomes:

  • Supported: The original claim still holds.
  • Overstated: The model works, but not as well or as broadly as claimed.
  • Contradicted: The corrected evidence rules out the claim.
  • Insufficient Evidence: There isn't enough reliable evidence to decide.
  • Depends on Review: Human confirmation is needed before reaching a final conclusion.

Think of it as a report card for scientific research, showing not just the result, but whether that result can be trusted.

My Demonstration: A Hospital Model That Looked Almost Perfect

To demonstrate LeakVerity, I used a simulated hospital-readmission experiment.

Imagine a hospital developing a machine learning model to predict whether patients will return within 30 days after discharge.

The original model reported an AUC of 0.939, suggesting excellent performance. AUC measures how well the model distinguishes between patients who will and will not experience an outcome.

At first, the result looked impressive.

But when LeakVerity investigated the experiment, it discovered several problems.

60 test records were copies of training records, and 332 patients appeared in both training and testing groups. The experiment also contained incorrect preprocessing and repeated test-set selection.

The most concerning problem was a feature containing information about emergency department visits during the 30 days after discharge.

Think about that.

How can a model predict what will happen in the next 30 days if it already knows what happened during those 30 days?

That's like giving a student tomorrow's answer sheet before tomorrow's exam.

LeakVerity initially marked this feature as Depends on Review, because determining whether information was available at prediction time required confirmation.

After confirming the feature was unavailable, the corrected experiment revealed a very different result.

Original vs. Corrected Performance

Evaluation AUC
Original reported performance 0.939
Performance after verified corrections 0.709
True performance on fresh simulated patients 0.713

The reported AUC dropped from 0.939 to 0.709.

More importantly, the corrected result was remarkably close to the model's true performance on fresh simulated patients.

LeakVerity also discovered that performance among patients aged 65 and older was only approximately 0.60 AUC.

This meant the original claim that the model was suitable for all adult patients was not adequately supported.

Final Claim Survival Certificate: Overstated.

The model was not necessarily useless. But its original performance and reliability had been exaggerated.

This is exactly why I created LeakVerity.

Sometimes the problem isn't that a model doesn't work. It's that we believe it works much better than it actually does.

This demonstration uses synthetic patient data, not actual hospital records.

How I Built It

I wanted LeakVerity to go beyond traditional leakage detection and provide a complete, reproducible research investigation.

I developed the project around experiment reproduction, leakage detection, verified corrections, statistical evaluation, and claim assessment.

The platform uses Python, pandas, NumPy, scikit-learn, SciPy, FastAPI, and JavaScript.

Its architecture includes an experiment tracer, leakage detector, replay engine, repair generator, statistical analysis components, and an interactive dashboard.

One important design decision was requiring the system to reproduce the original reported result before estimating leakage impact.

I also incorporated Shapley-based attribution to measure how different correction categories contributed to performance changes, along with statistical confidence intervals to account for uncertainty.

Another important feature is human review. Rather than automatically removing every suspicious feature, LeakVerity evaluates uncertain cases and requests confirmation when necessary.

Finally, I brought the investigation together in an interactive interface where users can examine findings, review corrections, compare results, and generate their Claim Survival Certificate.

I also evaluated the platform through controlled experiments, clean test cases, and separately written notebooks.

Challenges I Faced

Building LeakVerity involved several important challenges.

Reproducing the original result: Before judging whether a result was inflated, I needed a reliable way to reproduce the original experiment. I addressed this with a verification step that prevents unsupported conclusions when reproduction fails.

Understanding multiple leakage problems: Several mistakes can exist together, and their effects may overlap. I incorporated experiments with different combinations of corrections and Shapley-based attribution to measure their contributions more systematically.

Avoiding false accusations: A powerful feature is not necessarily leaked. I introduced conditional evaluations and human confirmation so suspicious information would not automatically be treated as invalid.

Ensuring statistical reliability: A single corrected score can be misleading. Repeated evaluations and confidence intervals help the platform distinguish meaningful changes from uncertainty.

Testing the system itself: Technical reviews uncovered issues involving model pipelines, group information, preprocessing, and corrected code execution. These findings guided further corrections and testing.

One of my biggest lessons was that a platform designed to verify research must also be carefully verified itself.

Results and Accomplishments

I evaluated LeakVerity using 24 generated experiments with known ground truth, including experiments with deliberately introduced leakage and clean controls.

The controlled benchmark achieved:

  • 100% precision and recall in detecting planted leakage.
  • Zero false alarms on six clean experiments.
  • 100% reproduction of the original reported results.
  • 96% coverage of the true performance by the reported 95% confidence intervals.
  • Zero honest research claims incorrectly overturned.

The corrected performance estimates were approximately four times closer to the true results, based on mean error.

After suspected future-information leaks were confirmed, 88% of the benchmark verdicts matched ground truth.

I also tested LeakVerity using 12 separately written notebooks, including experiments based on public datasets.

The results included:

  • 12/12 correct leakage-detection outcomes.
  • 11/12 verdicts matching a separate reference evaluation under default settings.
  • 7/7 applicable repairs verified through execution.

These results are from controlled, relatively small benchmarks. Broader testing on independently developed real-world notebooks remains an important next step.

My proudest accomplishment is the Claim Survival Certificate, which connects leakage detection to the scientific conclusion that actually matters.

What I Learned

This project changed how I think about machine learning performance.

I learned that finding a mistake and understanding its consequences are two very different things.

Some leakage problems barely changed the final result, while a single future-information feature could dramatically inflate performance.

I also learned the importance of reproducibility, statistical uncertainty, transparent evaluation, and knowing when human judgment is necessary.

Most importantly, I learned that trustworthy research isn't about achieving the highest possible score.

It's about ensuring that the reported result reflects what the model can genuinely do.

Going back to the student example, someone who scores 100% with an answer key might still be a good student.

But we cannot know their true ability until we test them fairly.

The same principle applies to machine learning.

What's Next

My next goal is to expand LeakVerity to support more machine learning models, evaluation methods, and complex leakage patterns.

I also want to test it on more independently developed real-world research notebooks and make Claim Survival Certificates easier to integrate into research workflows.

Ultimately, I hope LeakVerity helps researchers, students, and developers identify misleading results before they become published findings or influence important decisions.

Because whether it's a student taking an exam or a machine learning model making predictions, a result only becomes meaningful when we know it was obtained fairly.

LeakVerity AI — Find the Leak. Measure the Damage. Test the Claim.

Built With

Share this project:

Updates

Submission history