Mastodon's algorithm

Browsing through one's Mastodon feed, one sees many references to the conscious decision by Mastodon's creator, Eugen Rochko, to not include any algorithm that selects which posts you'll see when scrolling through your feed. There is a consensus in the Mastodon community that such algorithms are bad; they're the tools used by the big social sites to manipulate you into dependence, and take control over your own data away from you.

All of that is mostly true, except for the part that says that “there is no algorithm in Mastodon”. I'll try to explain what I mean here, and although it may sound vain and pedantic at first, I hope it might actually provide ideas for interesting evolutions of either server-side or client-side software.

The pedantic part: what's an algorithm?

So, an algorithm is technically nothing but a sequence of logic that applies to some input. Computer engineers learn about sorting algorithms: different ways to take an arbitrary sequence of “things” (let's say, numbers) and return them according to some ordering rule (say, smallest to largest).

But algorithms get much more complex too. This decade is seeing the mainstream emergence of artificial intelligence, which is a much more “opaque” form of algorithm. While one can follow or predict exactly all the steps that a particular sorting algorithm takes to sort a few numbers, algorithms based on machine learning are trained through complex mathematical models, and in a way, once trained, no one really knows how they work, just that they work (this is a bit oversimplified, I'll admit).

One of the most extreme forms of algorithms is... you, according to a number of people, to which author Yuval Noah Harari belongs (he explains this at length in Homo Deus and 21 Lessons for the 21st Century). Indeed, it is becoming more and more apparent that we are just very complex algorithms processing biochemical information.

Regardless of the complexity of an algorithm, an important aspect of it is that any algorithm that is implemented implies that there was a decision to discard other possible algorithms (mostly, from an infinite set of possibilities), each with their own pros and cons (speed, complexity, cost to implement, etc.). When looking at algorithms, it's interesting to know how they work but also why they were chosen. That latter aspect is why people are right to be unhappy with the big social platforms' choices.

Big social and their algorithms

Even though I've really started being active on Mastodon recently, as so many people ran away from Twitter, I have never really used Twitter myself. I have, however, been a long-time user of Facebook, and I've seen the evolution of the news feed over the years. I'll assume here that Twitter's feed algorithm can be considered similar to Facebook's in many ways, hoping I won't be too far off.

Whether Twitter's and Facebook's algorithms work in the same way or not, is not something many people can know anyway, because a shared attribute is that they are not public. It's part of the secret sauce of each platform. What we can guess with high confidence is that they rely on machine learning and very careful optimisation, as they are central to both platforms' operations.

What are they optimised for, then? Or in other words, why were they selected? They are optimised for “doom-scrolling”. The more time you spend scrolling down an infinite stream of posts, the more successful they are. They engineer instant addiction. Each post should stimulate you enough to keep scrolling (and thus seeing more and more ads) even though the effect on you, beyond the fraction of second you spend on each post, might not be in your best interest. It has been shown that this addictive consumption leads, not only to wasted hours, but also to potential psychological troubles.

So yes, the big social approach to feed algorithms is generally considered unhealthy for good reasons.

Mastodon's algorithm

As discussed earlier, algorithms are everywhere, even when they are basic. I posit that Mastodon does have an algorithm that drives how your feed gets populated. Without having examined the source code — which I could, since it's open source; here's a huge difference vs. big social platforms — I believe the gist of it is as follows:

But it also comes with some side effects, which maybe you've noticed, and which, to be sure, are sometimes annoying to me. One is that as you subscribe to more and more people and/or hashtags (especially popular hashtags), your feed grows big, with many hundreds of posts every day. You might no longer be able to read them all, and there is no forecasting which ones you will miss. If there are some people you're really keen on following, you might miss some of their content (lists are a potential solution to this problem, but until they are improved they are a bit awkward to use). Also, you might see the same posts over and over again as several people you follow boost them at different times. I don't know about you, but this sometimes leaves me wanting for something a bit more efficient.

Evolving the Mastodon algorithm

And I think there would be room for something more efficient. Something where the “why” to the algorithm is a healthy set of considerations, rather than the abusive, ad-driven “why” of the big social algorithms. Something where you would remain in control, but would be able to get the feed you want.

The most immediate things that come to my mind are to break the chronological order in the following ways:

The key thing is, those would be my rules, defined my me, in my own interest.

And in fact, while the above ideas could be implemented as simple options in the Mastodon code that you could enable/disable, I think there's potential for a second layer of customisation: rule engines. Why not have the option to define advanced rules, that could be copied and customised by everyone, to their taste, and inserted into one's feed's logic either on the server side (probably best) or on the client side? Just like you can customise the appearance of some turnkey website solutions by inserting custom CSS, why not have a simple feed customisation language? One would still be in full control, they would be designing their favourite experience rather than blindly going through someone else's unhealthy choices.

What are your thoughts? Am I betraying the spirit of Mastodon with those ideas? Or are there a desirable evolution to make Mastodon more personal for everyone? Comment on this Mastodon post!

Find me on Mastodon under @[email protected] !