Tackle Facebook with a machine learning snippet
Background
Facebook is a complicated case because there are multiple ways they display sponsored posts. Different users have slightly different variants of Facebook, and it is very hard to come up with a scalable filter to block them all. In situations where there is a need of complicated rules machine learning approaches tend to deliver good results. We would like to try a ML-based snippet for hiding ads on Facebook.
In #25 (closed) we are adding a way to run machine learning models inside an extension using tensorflow.js. We should leverage that to implement Facebook specific snippet.
What to change
Implement a ML-based snippet to hide sponsored posts on Facebook. The idea is to use a CSS selector to narrow down on a list of potential candidates to be hidden and then apply a trained machine learning model to distinguish which of the candidates should be hidden.
See also #25 (closed) for more implementation details. The tracking ticket for producing the best possible model for this task is here [internal].
In a spirit of data ethics and transparency we should release a snippet together with a dataset it has been trained on.
Hint for testers
It is useful to use a debug
version of a filter, to see how it performs in the Developer Console. A snippet with a debug flag enabled can be added, by adding this filter: facebook.com#$#debug; ml-hide-if-graph-matches [id^=hyperfeed_story_id] DIV