AI and store security Research-backed Python

tabular-model-robustnessHow cheaply can an attacker get past your fraud or bot model?

tabular-model-robustness runs cost-aware evasion tests on XGBoost, LightGBM and scikit-learn models with realistic attacker limits, then tries hardening (adversarial training, feature removal) and reports the accuracy, robustness and inference-energy trade-off.

PyPI pip install tabular-model-robustness

Free · MIT license · runs on your machine · no signup PyPI ↗GitHub ↗

How tabular-model-robustness works

Fraud and bot models are judged on accuracy, but attackers do not care about accuracy. They care about what it costs to get a fraudulent order or a scraping bot through: slowing down a little, faking some mouse movement, splitting a basket.

tabular-model-robustness attacks your own model the same way. You describe what an attacker can change, within which limits, and at what cost. It then finds, row by row, the cheapest changes that get past the model, and reports how many attacks succeed at each budget and which features they abuse. It then hardens the model, with adversarial training or by removing cheap-to-fake features, and shows the trade-off between accuracy, robustness and inference energy for each option.

Try it

pip install "tabular-model-robustness[all]"
tabular-model-robustness demo

Free and open source under the MIT license. Running a fraud or bot model and want it tested properly? Book a call.

Agent skill included

Let your AI coding agent run tabular-model-robustness for you

The tabular-model-robustness skill works with Claude Code, Codex, Cursor, Gemini CLI and other agents that read SKILL.md files. It runs the tool, explains each finding in plain words and helps you fix it.

npx skills add MuhammadAhmadZia/tabular-model-robustness --skill tabular-model-robustness

Using the Claude or ChatGPT apps instead? Download the skill ZIP from the GitHub releases page and upload it under Skills.

See all 30 agent skills →

Questions about tabular-model-robustness

Is a model with high accuracy not already safe?

No. Accuracy measures normal traffic. Attackers change the inputs they control until the model lets them through. In the built-in demo, a bot model with 0.97 AUC lets most bots through when each spends very little effort.

Which models does it support?

XGBoost, LightGBM and scikit-learn models, reading their split points for a fast, precise attack, and any model with a predict function through a slower grid search.

What does hardening cost?

That is what the comparison shows: accuracy, recall and false positives on held-out data, how much more an attacker must spend, and the model's latency and energy per prediction, for each hardened version.

Can attackers use this?

It tests models you own, with constraints you write. Real attackers do not have your model; you do, and finding the weak spots first is the point.

UN Sustainable Development Goals

How each tool maps to SDG targets →

Want this set up and tuned for your store?

The tools are free. If you would rather have the checks run, the findings fixed and the results measured for you, that is what I do for clients.