Federated Learning is a new subarea of machine learning where the training process is distributed among many users. Instead of sharing their data, users only have to provide weight updates to the server.
This is the first draft of the Firefox addon that implements the client-side part of a Federated Learning system. Everytime users perform searches in the awesome bar, the model's predictions are compared to the actual user behaviour and weight updates are computed. These updates are collected using Telemetry.
about:config
and set extensions.legacy.enabled
to true
about:debugging
, click Load Temporary Add-on and select manifest.json
The addon was built for a beta version of Firefox.
treatment
: The full optimization process is performed, weights change after every iteration and the ranking is recomputedcontrol
: Search works exactly the same way it currently does in Firefox, we only collect additional statisticscontrol-no-decay
: In the current algorithm, frecency scores are decayed over time. treatment
loses this effect since scores are recomputed all the time. To see if the decaying is useful and to make a fairer comparison, this variation only removes the decaying effectAfter the study was installed, the variation can be changed by updating the federated-learning.frecency.variation
pref in about:config
.
The new value needs to be one of the three values listed above.
After the pref was changed, the browser has to be restarted so that the change is taken into account.
frecency
: For interacting with the moz_places
table and recalculating / changing frecency scoresawesomeBar
: For observing interactions with the awesome bar. The required information for history / bookmark searches is retrieved (number of typed characters, selected suggestion, features of other suggestions)prefs
: For reading and writing preferences. This is just used to update the weightstelemetry
: For sending back updates and meta informationstudy
from shield-studies-addon-utils
for study related helperssynchronization
: Everything related to the federated learning protocol. Currently that means sending weight updates back using Telemetry and reading the current model from S3optimization
: For computing model updatesstudySetup
is adapted from shield-studies-addon-utils
and configures the studymain.js
connects everything.$ npm run build
Depending on what should be done with the build, it still needs to be signed by someone else.