NoriInterpreter turns
it into a standalone glass-box Explainable Boosting Machine
(EBM / GA²M) — an additive model whose entire decision logic is a set of readable
per-feature curves. You keep most of Nori’s accuracy but get a model you can
inspect, ship, and audit line by line, which is often what a review or a
regulated deployment actually needs.
examples/explainability_credit.py
interpretability extra (shapiq, interpret-core, joblib,
scipy), which covers the whole glass-box workflow.How it works
A singlefit(X, y) runs three steps and stores every artifact:
Measure importance
Prune to what matters
retain (default 95%) of Nori’s skill.Distill a glass-box
baseline + Σ per-feature contributions.Quickstart
Worked example — UCI Credit Default
examples/explainability_credit.py
runs the full flow on the UCI Credit Default table (23 features, ~30k rows,
downloaded fresh). The permutation ranking is dominated by PAY_0 — the most
recent repayment status — with the credit limit and earlier repayment months
trailing it:

Nori-permutation importance (top 10). PAY_0 — the latest repayment status — carries most of the signal; importance = drop in test AUC when that column is shuffled.
Σ → σ node adds the baseline and every contribution into the final prediction:

The distilled glass-box EBM (7 features, test AUC 0.766). Read left-to-right: each shape function maps a feature's value to how much it pushes default probability up (+) or down (−); grey bars show where the data is dense (trustworthy) vs sparse (extrapolated); Σ then σ combine the baseline and all contributions into ŷ.
Causal view: drivers vs. proxies
Importance says which features Nori relies on; it does not say which way the dependence runs. A feature can be important because it drives the target, or because the target drives it (a proxy, such as a reading taken after the outcome).causal=True adds a second, zero-shot model, NoriCausal, that
reads the table once and scores both directions for every feature:
p_causeis P(feature → target): the probability of a direct edge into the target.p_effectis P(target → feature): the probability that the target directly drives the feature.causal_adjacency_holds the same probabilities for every pair, features included;causal_ranking_is its target row and column, sorted byp_cause.
s5 (serum triglycerides) and bmi stand out as likely causes, and the
features Nori barely uses score low in both directions:

NoriCausal on diabetes. Blue: probability that the feature directly causes progression; orange: probability that progression directly causes the feature. No cutoff is applied: these are scores to rank and compare.
p_effect
and a low p_cause is more likely a proxy of the target than a lever on it.
The scores are evidence to check, not conclusions: here age leans toward
“effect”, which cannot be right (progression does not change age), a reminder
that the model infers direction from distributional patterns alone.
plot_causal_graph() shows the same relations as a graph: the target in the
centre, each feature’s more probable direction as an arrow, labelled with its
probability. Arrows at 0.5 or above are solid; weaker ones are dashed, because
the model leans neither way for them.

interp.plot_causal_graph() on diabetes. Only s5 (0.78) and bmi (0.60) are likely causes of progression; every other feature is below 0.5 in both directions (dashed). The dashed arrows' directions are unreliable: age, sex and bp are measured at baseline, a year before the outcome, so progression cannot cause them.
fit raises for classification
targets. The output is probabilities, not a graph; no cutoff is applied.
Weights (~30M parameters) download from the Hugging Face Hub on first use.
Up to 25 features the table is read in one pass; wider tables are read as
30-column subsets with the target in every subset that contains it, until each
feature has been read with the target at least 3 times (target_coverage).Configuration
NoriInterpreter parameters
NoriInterpreter parameters
interpretability.glassbox.importance (nori_permutation_importance,
nori_shap_importance), interpretability.glassbox.ebm (fit_ebm, ebm_structure), and
interpretability.glassbox.pipeline (run, the end-to-end importance → EBM driver).
NoriCausal is also usable on its own: synthefy_nori.causal.NoriCausal().fit(X, y)
returns the edge-probability matrix as adjacency_ (y is optional).
Good to know
- Runs on the local Python package (
synthefy-nori), not the hosted API. - Nori remains the source of truth for accuracy — the EBM is a faithful, auditable approximation on the selected features, so expect a small score gap (≈0.01 AUC on the credit example).
- For single-prediction attributions, feature interactions, and partial dependence, see Explainability.