Guidelines to implement federated recommender systems?

Hi there, I am a core dev of GitHub - mangaki/mangaki: Site de recommandation de mangas et d'anime which is anime and manga recommendation website based on our own library of recommendation algorithms: GitHub - mangaki/zero: Mangaki's recommendation algorithms

Our team is currently interested in how Mangaki and our library could become more federated / privacy-friendly, in particular, we see two avenues which are complementary IMHO:

  • recommender system based on homomorphic encryption (using El-Gamal for example) ;
  • federated instances of Mangaki / ability to perform compute recommendations across a fediverse

I read the ActivityPub and ActivityStreams W3C specs to wrap my mind into where I can fit the proper messages for the second avenue.

I am interested into seeing how I can wrap this into the Zero library, so this provides us with a generic implementation of federated recommender system, unlocking recommendation for the whole ActivityPub ecosystem, especially PeerTube, Mobilizon, Mastodon, etc.
What is nice from going this way is also to give control back to users on how their recommendations are done (in contrary with how it is done with Twitter, Netflix, etc.), it should be possible to block instances, etc.

A “unique” (not that much implemented elsewhere AFAIK) feature we are interested at Mangaki is group recommendations, given what your friends rated, provide a recommendation that will satisfy the group tastes. It would be interesting how much group recommendations becomes natural in the ActivityPub ecosystem wrt sharedInbox concepts.

I have some open questions to the community:

  • From what I gather, end to end encryption is a suggested extension of ActivityPub spec, where does multi party secure computation fit in all of this? Would it be possible to imagine to keep encrypted data and pass it through servers and let the client perform homomorphic operations on it and extract the recommendation, for example?
  • Our recommender systems are heavily oriented towards collaborative filtering, ratings information (user-work weight, e.g. like, dislike, super like, super dislike, do not want to see, want to see) are crucial, it looks like they fit in the “Like Activity”, can I provide extra information for the weight? dislike := score=-1 and like := score=1, or should I create a whole new class of activities? Same for “liked collections”, but replace “liked” with {dislike, super like, want to see, …}
  • Is there a “test fediverse network” where I can pollute with ActivityPub messages? How to test and build such systems in a real-world way (the answer can be: roll your own test net :P)?

Sorry for the beginner questions,
Thanks in advance for your help!

1 Like