Machine learning models/Production/English Wikipedia article quality
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? | English Wikipedia |
This model uses data about a revision to predict the likelihood that the article is of a certain quality level. | |
Motivation
editThis model card describes a model for predicting the quality of Wikipedia articles. It uses structural features extracted from the article to label Wikipedia articles with a probability score for each article quality class.
Wikipedia articles range in quality from rich, well-illustrated, fully-referenced articles that fully cover their topic and are easy to read to single sentence stubs that define the topic of the article but do not offer much more information. It is very useful to be able to reliably distinguish between these extremes and the various stages of quality along this spectrum. Wikipedia editors have developed rich rubrics for how to evaluate the quality of Wikipedia articles and are constantly assessing article quality to assist in coordinating work on the wikis. Editors use these quality scores to evaluate and prioritize their work. Researchers use these quality scores to understand content dynamics. Developers use these quality scores as filters when building recommender systems or other tools.
Wikipedia is always changing, which makes it time-consuming (and largely impossible) for editors to keep these quality assessments complete and up-to-date. An automatic quality model can help fill these gaps by evaluating the quality for articles that are unassessed or have changed substantially since they were last assessed. In doing so, it can provide researchers and tool developers with more consistent data and even potentially help editors identify articles that would benefit from a human assessment.
Users and uses
edit- high-level analyses of article quality trends
- filtering / ranking articles in tools – e.g. only show low-quality articles in a recommender system
- identifying potential ways to improve articles – e.g. using the lowest-value feature from the model as a recommendation
- projects outside of English Wikipedia
- namespaces outside of 0, disambiguation pages, and redirects
- directly comparing article quality across language editions – the scores are for a given project so e.g., an article that received a 0.5 score on English Wikipedia would get a much higher score if it had been on Simple English Wikipedia instead (because high-quality articles on English Wikipedia generally have more content than high-quality articles on Simple English Wikipedia)
This model is a part of ORES, and generally accessible via API. It is used for high-level analysis of Wikipedia, platform research, and other on-wiki tasks.
Example API call:https://ores.wikimedia.org/v3/scores/enwiki/1234/articlequality
Ethical considerations, caveats, and recommendations
edit- The source data for this model is several years old — data drift may skew current outputs relative to the training data.
- The model does not currently take into account the quality of the specific writing, so a long article with many fake words would register as high quality. It does take into account structure though, so a long article would be penalized if it did not have many sections or was poorly referenced.
- Different wikis have different labeling schemes — do not use this model in conjunction with other models to conduct an interwiki analysis.
Model
editPerformance
editTest data confusion matrix:
Label | n | ~Stub | ~Start | ~C | ~B | ~GA | ~FA |
---|---|---|---|---|---|---|---|
Stub | 5415 | 4589 | 791 | 23 | 11 | 1 | 0 |
Start | 5440 | 670 | 3504 | 852 | 349 | 63 | 2 |
C | 5466 | 65 | 943 | 2703 | 1063 | 603 | 89 |
B | 5472 | 35 | 651 | 1362 | 2176 | 892 | 356 |
GA | 5495 | 3 | 38 | 306 | 330 | 3527 | 1291 |
FA | 4996 | 1 | 2 | 22 | 235 | 900 | 3836 |
Test data sample rates:
Stub | Start | C | B | GA | FA | |
---|---|---|---|---|---|---|
sample | 0.168 | 0.169 | 0.169 | 0.169 | 0.17 | 0.155 |
population | 0.576 | 0.322 | 0.054 | 0.035 | 0.01 | 0.003 |
Test data performance:
Statistic | Stub | Start | C | B | GA | FA |
---|---|---|---|---|---|---|
match_rate | 0.501 | 0.269 | 0.117 | 0.085 | 0.097 | 0.066 |
filter_rate | 0.499 | 0.731 | 0.883 | 0.915 | 0.903 | 0.934 |
recall | 0.847 | 0.644 | 0.495 | 0.398 | 0.642 | 0.768 |
precision | 0.976 | 0.772 | 0.229 | 0.161 | 0.065 | 0.031 |
f1 | 0.907 | 0.702 | 0.313 | 0.229 | 0.118 | 0.06 |
accuracy | 0.9 | 0.824 | 0.882 | 0.908 | 0.906 | 0.936 |
fpr | 0.029 | 0.09 | 0.096 | 0.074 | 0.092 | 0.064 |
roc_auc | 0.978 | 0.905 | 0.857 | 0.831 | 0.91 | 0.954 |
pr_auc | 0.983 | 0.788 | 0.251 | 0.175 | 0.128 | 0.078 |
Implementation
edit{
"type": "GradientBoosting",
"params": {
"scale": true,
"center": true,
"labels": [
"Stub",
"Start",
"C",
"B",
"GA",
"FA"
],
"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": 500,
"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,
"label_weights": null
}
}
{
"title": "Scikit learn-based classifier score with probability",
"type": "object",
"properties": {
"prediction": {
"description": "The most likely label predicted by the estimator",
"type": "string"
},
"probability": {
"description": "A mapping of probabilities onto each of the potential output labels",
"type": "object",
"properties": {
"Stub": {
"type": "number"
},
"Start": {
"type": "number"
},
"C": {
"type": "number"
},
"B": {
"type": "number"
},
"GA": {
"type": "number"
},
"FA": {
"type": "number"
}
}
}
}
}
https://ores.wikimedia.org/v3/scores/enwiki/1234/articlequality
Output:
{
"enwiki": {
"models": {
"articlequality": {
"version": "0.9.2"
}
},
"scores": {
"1234": {
"articlequality": {
"score": {
"prediction": "Start",
"probability": {
"B": 0.3790633394131496,
"C": 0.1204378834675403,
"FA": 0.010048173553616778,
"GA": 0.007491559717980675,
"Start": 0.38017055528903365,
"Stub": 0.10278848855867896
}
}
}
}
}
}
}
Data
editLicenses
edit- Code: MIT license
- Model: MIT license
Citation
editCite this model card as:
@misc{
Triedman_Bazira_2023_English_Wikipedia_article_quality,
title={ English Wikipedia article quality model card },
author={ Triedman, Harold and Bazira, Kevin },
year={ 2023 },
url={ https://meta.wikimedia.org/wiki/Machine_learning_models/Production/English_Wikipedia_article_quality }
}