interpretable-models
Choose and operate AIX360's directly interpretable models, rule learners, prototypes, model differencing, teaching explanations, and optional neural interpretable methods.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- interpretable-models
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Choose and operate AIX360's directly interpretable models, rule learners, prototypes, model differencing, teaching explanations, and optional neural interpretable methods.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/api-reference.md13.8 KB
- 参考文档references/model-overview.md6.5 KB
- 参考文档references/troubleshooting.md9.9 KB
- 参考文档references/workflows.md7.7 KB
- 脚本scripts/feature_binarizer_smoke.py5.2 KB
03 SKILL.md 正文
Interpretable models
Use this skill when the request is for a model whose prediction mechanism is itself inspectable, a compact prototype set, an explicit rule list, a comparison of two models, a label-plus-teaching explanation, or a conceptual neural interpretability method. This skill covers AIX360 0.3.0 APIs and their optional dependency boundaries.
Route before coding
- Explain an already trained black box with LIME, SHAP, GroupedCE, or a
neural contrastive method: route to
../local-black-box/SKILL.md. - CEM, recourse, certification, or optimal transport: route to
../counterfactual-and-certification/SKILL.md. - Time-series explainers: route to
../time-series/SKILL.md. - Dataset loading, preprocessing, or metric contracts: route to
../datasets-and-metrics/SKILL.md.
Do not call a rule learner an explainer of an existing model: BRCG, GLRM, RIPPER, CoFrNet, and TED fit a predictive mechanism from labeled data. IMD consumes outputs from two already-fitted models. ProtoDash selects exemplars from a candidate set and can summarize data or support a local comparison. DIPVAE edits a learned latent generative model. ProfWeight trains a simpler model using confidence-derived sample weights.
Operating sequence
- State the object being produced: prototypes, binary/regression rule model, DNF rules, model-difference regions, label/explanation pair, or a latent or confidence-profile model.
- Freeze the training schema. Keep column names and ordering stable; retain
the fitted
FeatureBinarizer/FeatureBinarizerFromTreesfor every later transform. Decide how missing values are represented before fitting. - Select the smallest dependency family in api-reference.md. Treat optional legacy families as unavailable unless their imports and versions are proven.
- Fit only on training data, then predict or explain on a separately transformed/evaluated set. Check output shape, labels/classes, feature names, and rule count before interpreting the result.
- Save a portable semantic summary (rule strings, prototype source indices and weights, diff regions, or latent edit settings), not an opaque live object.
- Report accuracy/coverage or other metrics separately from readability. A compact model is not automatically faithful to another model.
Fast choices
- Prototype selection:
ProtodashExplainer.explain(X, Y, m, ...)returns(weights, indices, objective_history);Yis the candidate pool andXis the data being summarized/explained. - Binary rule classifier: binarize a pandas frame, fit
BooleanRuleCGthroughBRCGExplainer, then callpredictandexplain. - Interpretable regression/classification: use
LinearRuleRegressionorLogisticRuleRegressionthroughGLRMExplainer; callpredict(andpredict_probafor logistic) and inspect the coefficient DataFrame. - Native rule induction: fit
RipperExplaineron a pandasDataFrameandSeries, withtarget_labelfor a binary positive class; callexplain()for a TRXFDnfRuleSet. - Model differencing: obtain aligned predictions from two classifiers on
the same pandas frame, fit
IMDExplainer.fit(X, y1, y2, max_depth=...), and inspectdiffrules,diffregions, andmetrics. - Teaching explanations: fit
TED_CartesianExplainer(base_estimator)on(X, Y, E)where explanation ids are dense non-negative integers; usepredict_explain,predict, andexplain. - Optional neural methods: use CoFrNet for continued-fraction network structure, DIPVAE for latent edits, and ProfWeight for confidence-profile weighted simple models only after their backend environments are validated.
Hard safety checks
FeatureBinarizerFromTrees.fitrequiresy, rejects NaN/None during fit, and its transform schema is learned from selected input features. A missing selected column is a schema error, not a signal to silently impute.BRCGsolves LPs and can emit no useful clauses; inspectw,z, and theruleslist rather than assuming a non-empty explanation.- ProtoDash weights are non-negative but unnormalized; zero, repeated, or numerically unstable weights need a smaller candidate set, finite scaled inputs, or the alternate optimizer.
- TRXF predicates use
Feature,Predicate,Conjunction, andDnfRuleSet. Preserve typed values and operators when serializing; do not userepras a persistence format. - Do not promise compatibility for legacy TensorFlow/Keras 1.x ProfWeight or the optional PyTorch CoFrNet/DIPVAE code from a modern environment without a separate probe. See troubleshooting.md.
For concrete call signatures, output contracts, dependency boundaries, and
recovery procedures, read the four bundled references. The tiny smoke helper
is at scripts/feature_binarizer_smoke.py and is safe to run locally with
--help before running it.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).