Page MenuHomePhabricator

Develop manual testing strategy for bias detection
Open, LowPublic

Description

To complement our unsupervised strategy for learning clusters of damaging/not-damaging edits, we should also experiment with looking for bias in places we think are likely.

In order to do this, I image us withholding a random sample during revscoring train_test and testing the fitness of the model on interesting sub-sets. E.g. edits by newcomers, edits by anonymous users, etc.

We'll likely want to automate this because training and testing a model takes a long time. We'll also need to create a utility for running a new test-set through a pre-trained model.

This card is done when we have a plan for implementing a manual bias detection strategy and the specific tasks have been created.

Event Timeline

Halfak created this task.Nov 2 2015, 3:00 PM
Halfak updated the task description. (Show Details)
Halfak raised the priority of this task from to Needs Triage.
Halfak moved this task to Active on the Scoring-platform-team (Current) board.
Halfak added a subscriber: Halfak.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 2 2015, 3:00 PM
Halfak added a comment.EditedNov 2 2015, 3:24 PM

I'm imagining that we'd so something like this:

$ wc rev_features.tsv -l
20000
$ shuf rev_features.tsv > rev_features.shuffled.tsv
$ head -n 15000 rev_features.tsv > rev_features.train_set.tsv
$ tail -n+15000 rev_features.tsv > rev_features.test_set.tsv
$ cat rev_features.train_set.tsv | \
> revscoring train \
> revscoring.scorer_model.LinearSVC  \
>   editquality.feature_lists.enwiki.damaging \
>   --label-type=bool > \
> my_model.linear_svc.model
Accuracy: 0.692
ROC-AUC: 0.891

Table:
...
$ cat rev_features.test_set.tsv | \
> revscoring filter_features \
>   editquality.feature_lists.enwiki.damaging \
>   --exclude-all \
>   --include 'user.is_anon == True' | \
> revscoring test | \
>   my_model.linear_svc.model
Observations: 5000
Filtered observations: 2200

Accuracy: 0.763
ROC-AUC:  0.750

Table:
...

In this example, I'm imagining that we'd refactor train_test into two utilities: train and test. train would withhold testing data and apply the test unless told not to (like train_test does now). We'd also need a powerful way to filter feature sets. I've imagined the filter_features utility that would take --include and --exclude arguments and parse them to grab the feature with the corresponding name and apply the filter.

awight added a subscriber: awight.Dec 3 2015, 9:05 AM
Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptDec 3 2015, 9:05 AM
Halfak moved this task from Untriaged to Ideas on the Scoring-platform-team board.Mar 30 2016, 4:52 PM
Halfak triaged this task as Low priority.Aug 18 2016, 2:46 PM
Halfak added a project: revscoring.
Halfak set Security to None.
awight removed a subscriber: awight.Mar 21 2019, 3:59 PM
Restricted Application added a project: artificial-intelligence. · View Herald TranscriptMar 21 2019, 3:59 PM