Proposal
Two related additions to AutoModerator built together as a prototype and proposed for discussion. We may not deploy either to production.
Local scoring.
AutoModerator scores every edit by calling the LiftWing revert-risk endpoint, or by reading an ORES score. That external dependency makes it harder to deploy. A deterministic local backend reproduces the language-agnostic model in pure PHP: the same score, no network call, no new database storage. It is selectable alongside the existing language-agnostic and multilingual backends. This is only available for the language agnostic model because the XGBoost algorithm can be implemented in PHP, but the multilingual model is a BERT transformer.
Explain page.
Even with a score in hand, there is no on-wiki way to see why a given edit scored the way it did. A Special:AutoModerator page takes a revision ID and shows a per-factor breakdown: the overall probability of revert, the model's base rate, and how each signal (editor experience, page age, wikilinks, references, etc) moved the score up or down, ranked by how much it mattered.
The two connect: scoring locally means walking the model's trees in PHP, which is what makes the per-factor Shapley attribution possible. Each also stands on its own; local scoring is useful without the explain page, and the explain page works against any wiki running the local backend.
There is a working prototype. Implementation notes and references are in the first comment.
Screenshots (explain page)
Desktop overview:
A factor expanded, showing the underlying feature values and the score caveat:
Mobile:
Open questions
- Audience, and where the explain link appears: the automoderator revert log entry, the reverted user's talk-page message, or just leave it buried?
- The explain page re-scores on demand, so live inputs (the editor's current edit count and rights, the page's current history) drift from the score AutoModerator acted on when it made the revert. Good enough, or do we persist the score at revert time? I considered dumping the SHAP output into a hidden log entry so that the explanation page could look up the historical values.
- How does the committed model artifact get refreshed when the upstream model changes? and how we gate that refresh on fidelity to LiftWing?
- Language-agnostic-only. Wikis running the multilingual model get neither the local score nor the explanation. Is this useful enough as a "language agnostic only" feature?
Acceptance criteria
Local scoring
- Scores a main-namespace revision locally, reproducing the language-agnostic model within epsilon of LiftWing, with no LiftWing or ORES call.
- Selectable via site config alongside the language-agnostic and multilingual backends, reusing the existing caution-level threshold.
- No new database storage on the scoring path.
Explain page
- Given a main-namespace revision ID, the page shows the revert probability, the base rate, and a per-factor contribution breakdown.
- Each factor shows its contribution, its direction (raises or lowers risk), its share of the total movement, and the underlying feature values.
- The page renders on desktop and mobile.
- A disclaimer states the score can be wrong and that it is recomputed on demand.


