Machine learning models/Production/Portuguese Wikipedia damaging edit
Model card | |
---|---|
This page is an on-wiki machine learning model card. | |
Model Information Hub | |
Model creator(s) | Aaron Halfaker (User:EpochFail) and Amir Sarabadani |
Model owner(s) | WMF Machine Learning Team (ml@wikimediafoundation.org) |
Model interface | Ores homepage |
Code | ORES Github, ORES training data, and ORES model binaries |
Uses PII | No |
In production? | Yes |
Which projects? | Portuguese Wikipedia |
This model uses data about a revision to predict the likelihood that the revision is damaging. | |
Motivation
[edit]Some goodfaith edits are damaging to an article, and not all damaging edits are in bad faith. This model (together with a goodfaith model) is intended to differentiate between edits that are intentionally harmful (badfaith/vandalism) and edits that are intended to be harmful (good edits/goodfaith damage).
This model helps to prioritize review of potentially damaging edits or vandalism. It provides a prediction on whether or not a given revision is damaging, and provides some probabilities to serve as a measure of its confidence level.
Users and uses
[edit]- This model should be used for prioritizing the review and potential reversion of vandalism on Portuguese Wikipedia.
- This model should be used for detecting damaging contributions by editors on Portuguese Wikipedia.
- This model should not be used as an ultimate arbiter of whether or not an edit ought to be considered damaging.
- The model should not be used outside of Portuguese Wikipedia.
- Portuguese Wikipedia uses the model as a service for facilitating efficient vandalism triage, edit reviews, or newcomer support.
- On an individual basis, anyone can submit a properly-formatted API call to ORES for a given revision and get back the result of this model.
https://ores.wikimedia.org/v3/scores/ptwiki/1234/damaging
Ethical considerations, caveats, and recommendations
[edit]Portuguese Wikipedia decided to use this model. Over time, the model has been validated through use in the community.
This model is known to give newer editors higher probability of damaging edits.
Internal or external changes that could make this model deprecated or no longer usable are:
- Data drift means training data for the model is no longer usable.
- Doesn't meet desired performance metrics in production.
- Portuguese Wikipedia community decides to not use this model anymore.
Model
[edit]Performance
[edit]Test data confusion matrix:
Label | n | ~True | ~False |
---|---|---|---|
True | 2349 | 1878 | 471 |
False | 26376 | 3875 | 22501 |
Test data sample rates:
Rate | Sample | Population |
---|---|---|
sample | 0.082 | 0.918 |
population | 0.069 | 0.931 |
Test data performance:
Statistic | True | False |
---|---|---|
match_rate | 0.192 | 0.808 |
filter_rate | 0.808 | 0.192 |
recall | 0.799 | 0.853 |
precision | 0.287 | 0.983 |
f1 | 0.423 | 0.913 |
accuracy | 0.849 | 0.849 |
fpr | 0.147 | 0.201 |
roc_auc | 0.916 | 0.914 |
pr_auc | 0.516 | 0.993 |
Implementation
[edit]{
"type": "GradientBoosting",
"params": {
"scale": true,
"center": true,
"labels": [
true,
false
],
"multilabel": false,
"population_rates": null,
"ccp_alpha": 0.0,
"criterion": "friedman_mse",
"init": null,
"learning_rate": 0.01,
"loss": "deviance",
"max_depth": 7,
"max_features": "log2",
"max_leaf_nodes": null,
"min_impurity_decrease": 0.0,
"min_impurity_split": null,
"min_samples_leaf": 1,
"min_samples_split": 2,
"min_weight_fraction_leaf": 0.0,
"n_estimators": 700,
"n_iter_no_change": null,
"presort": "deprecated",
"random_state": null,
"subsample": 1.0,
"tol": 0.0001,
"validation_fraction": 0.1,
"verbose": 0,
"warm_start": false
}
}
{
"title": "Scikit learn-based classifier score with probability",
"type": "object",
"properties": {
"prediction": {
"description": "The most likely label predicted by the estimator",
"type": "boolean"
},
"probability": {
"description": "A mapping of probabilities onto each of the potential output labels",
"type": "object",
"properties": {
"true": {
"type": "number"
},
"false": {
"type": "number"
}
}
}
}
}
https://ores.wikimedia.org/v3/scores/ptwiki/1234/damaging
Output:
{
"ptwiki": {
"models": {
"damaging": {
"version": "0.5.1"
}
},
"scores": {
"1234": {
"damaging": {
"score": {
"prediction": true,
"probability": {
"false": 0.14149723830516603,
"true": 0.858502761694834
}
}
}
}
}
}
}
Data
[edit]Licenses
[edit]- Code: MIT license
- Model: MIT license
Citation
[edit]Cite this model card as:
@misc{
Triedman_Bazira_2023_Portuguese_Wikipedia_damaging,
title={ Portuguese Wikipedia damaging model card },
author={ Triedman, Harold and Bazira, Kevin },
year={ 2023 },
url={ https://meta.wikimedia.org/wiki/Machine_learning_models/Production/Portuguese_Wikipedia_damaging_edit }
}