Recommendation systems are widely used in web services, such as social networks and e-commerce platforms, to serve personalized content to the users and, thus, enhance their experience.
While personalization assists users in navigating through the available options, there have been growing concerns regarding its repercussions on the users and their opinions. Examples of negative impacts include the emergence of filter bubbles and the amplification of users' confirmation bias, which can cause opinion polarization and radicalization.
In this paper, we study the impact of recommendation systems on users, both from a microscopic (i.e., at the level of individual users) and a macroscopic (i.e., at the level of a homogenous population) perspective. Specifically, we build on recent work on the interactions between opinion dynamics and recommendation systems to propose a model for this closed loop, which we then study both analytically and numerically.
Among others, our analysis reveals that shifts in the opinions of individual users do not always align with shifts in the opinion distribution of the population. In particular, even in settings where the opinion distribution appears unaltered (e.g., measured via surveys across the population), the opinion of individual users might be significantly distorted by the recommendation system.

Recommendation systems are widely used in web services, such as social networking and e-commerce platforms.
The underlying idea is to enhance users' experience by serving personalized content that matches their interest in order to enable them to best navigate the countless available options.
However, there are growing concerns that excessive personalization can lead to the emergence of filter bubbles, which may narrow down the positions available to users about specific issues.
Furthermore, personalization amplifies users' confirmation bias and leads to a feedback (closed) loop where users' interaction with recommended items reinforces over time, favoring the emergence of opinion polarization and radicalization.
This paper examines the distinction between the microscopic and macroscopic impact of this closed loop and raises important questions about the potential distortion of individual opinions, even in situations where the overall macroscopic situation appears unaltered.

§ INTRODUCTION

Over the past few years, recommendation systems have become an essential component of online services, including e-commerce platforms and social networking sites. Their primary objective is to filter through the vast amount of information available and guide users towards the most relevant content.
Recommendation systems make use of diverse machine learning methods to assess the relevance of items and provide personalized content based on the recorded online behaviors of users.
These techniques enable the systems to not only measure the absolute relevance of items but also tailor the recommendations to the users' expected tastes <cit.>.
While recommendation systems have been a remarkable technological advancement, their impact on users' behavior has raised questions.
Personalization is a key feature of these systems that improves the user experience but also poses concerns: Excessive personalization may limit the range of perspectives available to users, leading to “filter bubbles” <cit.>. These bubbles can induce opinion polarization and radicalization, which can be harmful <cit.>.
Although later research <cit.> has downplayed concerns about the negative effects of personalization, evidence suggests that it has the potential to strengthen users' prejudices. For instance, numerous studies showed that it aggravates confirmation bias, which is the human propensity to seek and consider information that confirms their beliefs and ideas <cit.>. This bias can lead to an unconscious one-sided argument-building process, reinforcing users' preconceived notions. Therefore, it is reasonable to conclude that personalization may exacerbate the confirmation bias phenomenon, potentially leading to further polarization and division among users.

Since empirical evidence supports the idea that confirmation bias is extensive, strong, and multiform, and its effects may be amplified by curation algorithms <cit.>, a recent stream of literature <cit.> has started exploring the impact of the closed-loop dynamics between personalized recommendations and user preferences and opinions.
For example, <cit.> examined how this loop can reinforce user preferences and lead to polarization and filter bubbles, with <cit.> focusing mainly on the interaction between the user and the recommendation system, while <cit.> also included the effect of social influence by considering users being embedded in their social network.
Differently, <cit.> studied how to disentangle feedback loops in order to improve recommendation accuracy.
The overall goal of this research field is to overcome the potential negative consequences of personalization by designing recommendation algorithms that can influence users' opinions and preferences in a more beneficial way <cit.>.

While these works generally show that the closed loop between opinion dynamics and recommendation systems bears the potential to steer individuals' opinions, it remains unclear (i) to what extent it may also steer the opinion distribution of a population (thus leading to significant concerns with regard to, e.g., political debates) and (ii) if seemingly similar opinion distributions (at the population level, e.g., surveys) can hide substantial individual shifts.
To shed light on these questions, this paper builds on the recent model of <cit.> and examines the micro- and macroscopic impact of the closed loop between users and a recommendation system. This way, we can both study the impact of recommendation systems on the opinion distribution of a population and determine if shifts in opinions at the individual level can be concealed by their cumulative effect on the population level.

With our work, we formalize the interaction between users and recommendation systems both from a microscopic (i.e., one user interacting with a recommendation system) and macroscopic (i.e., a homogeneous population interacting with a recommendation system) perspective.
This way, we identify several tractable yet insightful instances, which we can investigate analytically and help us shed light on the impact of recommendation systems on users' opinions. Among others, our analytical analysis and numerical simulations uncover and explain a discrepancy between micro- and macroscopic behaviors, whereby the opinion of individual users is highly impacted by the recommendation system while, macroscopically, the opinion distribution remains unaffected.
This insight reveals that, even when population surveys (e.g., exit polls) do not indicate opinion shifts, individuals' beliefs might be highly impacted by the recommendation systems.

This paper unfolds as follows.
In <ref>, we present our model of the closed loop between a user and a recommendation system. We study its properties in <ref> and present numerical results in <ref>. <ref> draws the conclusions of this paper. finalsubmissionProofs are included in the online extended version of this paper.Proofs are deferred to the appendix.

§.§ Notation and background material

We denote by $\nonnegativereals$ the non-negative real numbers. The space of (Borel) probability distributions over $\reals$ is $\Pp{}{\reals}$ and the space of probability distributions over $\reals$ with finite second moment is $\Pp{2}{\reals}\coloneqq \{\mu\in\Pp{}{\reals}:\int_{\reals}\abs{x}^2\d\mu(x)<+\infty\}$.
The mean of a probability distribution $\mu\in\Pp{}{\reals}$ is $\expectedValue{\mu}{x}$ and its variance is $\variance(\mu)$.
The pushforward of a probability distribution $\mu\in\Pp{}{\reals}$ via a (Borel) map $f:\reals\to\reals$ is defined by $(\pushforward{f}\mu)(A)=\mu(f^{-1}(A))$ for each Borel set $A\subset\reals$; if $X\sim\mu$, then $Y=f(X)\sim\pushforward{f}\mu$.
The convolution of two probability distributions $\mu,\nu\in\Pp{}{\reals}$ is denoted by $\mu\ast\nu$; if $X\sim\mu$ and $Y\sim \nu$ are independent, then $X+Y\sim\mu\ast\nu$.
The (type-$p$) Wasserstein distance between two probability distributions $\mu,\nu\in\Pp{}{\reals}$ is defined by

\begin{equation*}
\wasserstein{p}{\mu}{\nu}
\coloneqq
\left(\min_{\gamma\in\setPlans{\mu}{\nu}}\int_{\reals\times\reals}\abs{x-y}^p\d\gamma(x,y)\right)^{\frac{1}{p}},
\end{equation*}

where $\setPlans{\mu}{\nu}\subset\Pp{}{\reals\times\reals}$ is the set all probability distributions over $\reals\times\reals$ with marginals $\mu$ and $\nu$ (referred to as transport plans) <cit.>.
The Wasserstein distance is the minimum cost to transport $\mu$ onto $\nu$ when transporting a unit of mass from $x$ to $y$ costs $\abs{x-y}^p$. Accordingly, a transport plan $\gamma\in\setPlans{\mu}{\nu}$ encodes the allocation of probability mass: If $(x,y)$ is in the support of $\gamma$, then some of the probability mass at $x$ is displaced to $y$, or, equivalently, $\gamma(A\times B)$ is the mass transferred from the set $A\subset\reals$ to the set $B\subset\reals$.
Finally, a sequence of probability distributions $(\mu_n)_{n\in\naturals}\subset\Pp{2}{\reals}$ converges weakly in $\Pp{2}{\reals}$ if $\int_{\reals}\phi(x)\d\mu_n(x)\to\int_{\reals}\phi(x)\d\mu(x)$ for all continuous functions $\phi:\reals\to\reals$ with at most quadratic growth (i.e., $\phi(x)\leq A(1+\abs{x}^2)$ for some $A>0$).

§ MODEL

In this section, we present our model. It consists of two interconnected parts: the user model and the recommendation system model; see <ref>.
We start with a detailed description of each component. Then, we illustrate the behavior of our model in a numerical example.
Our model is based on the mathematical framework from <cit.>.

[rectangle,draw,thick,align=center] at (0,0) (o) Opinion dynamics
$\opinion_{k+1}\!=\!\weightbias\opinion_0\!+\!\weightopinion \opinion_k\!+\!(1\!-\!\weightbias\!-\!\weightopinion)\rec_k$;
[rectangle,draw,thick,align=center] at (0,-1.5) (r) Recommendation system
$\rec_k=$ argmax reward or explore;

[->,thick] (o.east) – (+2.35,0) |- (r.east);
[->,thick] (r.west) -| (-2.35,0) – (o.west);

[align=center] at (+3.3,-0.75) Reward
[align=center] at (-3.4,-0.75) Recommendation

Closed loop between a user (whose opinion dynamics are detailed in <ref>) and a recommendation system (whose algorithm is detailed <ref>).

§.§ Modeling of the users' opinion dynamics

We consider a large homogeneous population of users. The opinion of each user evolves according to the Friedkin-Johnson model <cit.>

\begin{equation}\label{eq:opinion dynamics}
\opinion_{k+1}
\weightbias \opinion_0
\weightopinion \opinion_k + (1-\weightbias-\weightopinion) \rec_k,
\end{equation}

where $\opinion_k\in\reals$ is the user's opinion at time $k$, $\opinion_0$ is her/his opinion bias and initial opinion, and $\rec_k\in\reals$ is the recommendation at time $k$.  The parameters $\weightbias\in[0,1]$ and $\beta\in[0,1)$ (with $\weightbias+\weightopinion\leq 1$) arbitrate between the impact of the user's bias, the current opinion, and the received recommendation on the future opinion. All users in the population share the same parameters $\weightbias$ and $\weightopinion$ but have different biases.
In particular, the bias/initial opinion distribution of the population is $\dopinion_0\in\Pp{2}{\reals}$. Similarly, we denote by $\dopinion_k$ the opinion distribution at time $k$ or, equivalently, the probability distribution associated with the opinion of a generic user.
Given the recommendation, the users produce a reward according to monotonically decreasing function $\reward:\nonnegativereals\to\nonnegativereals$, so that the reward at time $k$ is $\reward(\abs{\opinion_k-\rec_k})$. Intuitively, the closer the recommendation is to the user's opinion, the more the user appreciates the content and thus the higher the benefit for the recommendation system (e.g., more clicks, more time on the platform). The reward is the only observable quantity; in particular, users' opinions are private and not revealed to the recommendation system.

§.§ Modeling of the recommendation system

The recommendation system aims at maximizing the reward. To do so, it outputs the recommendation that has generated the largest reward throughout the entire past until time $k$, with the exception of exploration steps, happening at the beginning of the horizon ($k=0$) and every $T$ steps ($k=nT$ for $n\in\naturals$). Thus, for $k\notin\{0,T,2T,\ldots\}$

\begin{equation*}
\rec_k
\argmax_{u_0,\ldots,u_{k-1}} \{\reward(\abs{\opinion_0-\rec_0}),\ldots,\reward(\abs{\opinion_{k-1}-\rec_{k-1}})\}.
\end{equation*}

When exploring, the recommendation system samples a recommendation from the recommendation distribution $\drec\in\Pp{2}{\reals}$; i.e., $\rec_k\sim\drec$ for $k\in\{0,T,2T,\ldots\}$. This strategy is in line with the classical $\varepsilon$-greedy action selection in multi-armed bandit problems in reinforcement learning, which also outputs the reward-maximizing action but explores with some probability $\varepsilon$ (instead of at fixed time steps) <cit.>.

§.§ Discussion of the model

A few comments are in order.
First, we consider a homogeneous population, whereby all users have the same $\weightbias$ and $\weightopinion$. This way, we can study the effect of the recommendation systems on ensembles of users, rather than on a specific user with given $\weightbias$ and $\weightopinion$, bias/initial opinion $\opinion_0$, and realizations of the random recommendations. When presenting our results in <ref>, we consider various populations to illustrate the roles of $\weightbias$ and $\weightopinion$.
Second, without loss of generality, we assume $\weightopinion\neq 1$. If $\weightopinion=1$ (i.e., users are infinitely stubborn), we trivially conclude $\opinion_{k+1}=\opinion_k$ and $\dopinion_k=\dopinion_0$ for all $k$.
Third, we do not include peer-to-peer interactions within the population, in line with our focus being the interaction between a recommendation system and its users. In any case, our model and analysis can be extended to include influences between the users (e.g., via graphons <cit.>). Nonetheless, we argue that, if interactions are to be considered, they do not happen between the users, but rather through the recommendation system. An example is collaborative filtering, where the system generates recommendations for a given user based on other users considered similar <cit.>.
Fourth, there are of course many other models of recommendation systems based on more sophisticated algorithms, which include more general exploration strategies, collaborative filtering, priors on the users, machine learning techniques, etc. We leave their study to future research.
Fifth, as we shall see below, the reward function $\reward$ does not impact our analysis, as long as a mild (and, arguably, realistic) monotonicity assumption is satisfied.
Finally, to ease the notation, we assume that $\weightbias$, $\weightopinion$, and the recommendation distribution $\drec$ are time-invariant. Provided this time-varying behavior is sufficiently regular, our model and analysis extend to the time-varying setting.

§.§ Illustrative example

To illustrate our model, we consider a population with $\weightbias=0.1$ and $\weightopinion=0.7$. For simulation purposes, we consider 5000 users, whose bias/initial opinion $\opinion_0$ is distributed uniformly on $[0,2]$ (blue, $x$-axis in <ref>).
The recommendation distribution $\drec$ is a zero-mean Gaussian with a standard deviation of $0.5$ (red in <ref>) and exploration happens every $5$th time step. We run the system for $50$ time steps.
Our results are in <ref>.
At a macroscopic level, the opinion distribution shifts towards the recommendation distribution so that the final opinion distribution $\dopinion_N$ is a slightly asymmetric Gaussian (right plot in <ref>).
At a microscopic level, the opinion of most (but not all) users is lower than their initial opinion (central plot in <ref>), which collectively contributes to the centralization of the opinion distribution observed at a macroscopic level.

[group style=group size=2 by 2, horizontal sep=0.2cm, vertical sep=0.2cm,
width=2.5cm, height=2.5cm]

xmin=-2.0, xmax=2.0,
xtick=, ytick=]
[hist=density,bins=25,ETHblue,fill=ETHblue,fill opacity=0.5] table [y expr=0, col sep=comma] figures/illustrative_example.csv;
[ETHred,very thick,domain=-2:2,samples=30] 1/(0.5*sqrt(2*3.14))*e^(-0.5*x^2/0.5^2);

[group/empty plot]

[width=5cm, height=5cm,
xmin=-2.0, xmax=2.0, ymin=-2.0, ymax=2.0,
xlabel=Bias/initial opinion $\opinion_0$, ylabel=Final opinion $\opinion_N$]
[ETHblue,only marks,mark size=0.5pt] table[x expr=0, y expr=1, col sep=comma] figures/illustrative_example.csv;
[gray, dashed, ultra thick] x;

xmin=-2.0, xmax=2.0,
ytick=,xtick=,rotate=-90,x dir=reverse]
[hist=density,bins=25,ETHblue,fill=ETHblue,fill opacity=0.5] table [y expr=1, col sep=comma] figures/illustrative_example.csv;
[ETHred,very thick,domain=-2:2,samples=30] 1/(0.5*sqrt(2*3.14))*e^(-0.5*x^2/0.5^2);

Simulation of the closed-loop system over a horizon of 50 time steps. The central plot shows the final opinion of each user, as a function of their initial opinion. The top histogram shows the bias/initial opinion distribution; the one on the right is the final opinion distribution. For reference, we include, in solid red, the recommendation distribution.

§ ANALYSIS

In this section, we investigate some of the theoretic properties of our model.
We start with a formulation of the dynamics in a tree structure, which immediately unveils the combinatorial nature of the problem. Thereafter, we study the more tractable yet insightful limit cases of $\exploration=+\infty$ (no exploration) and $\exploration=1$ (exploration at every time step).

§.§ The general case: A combinatorial problem

A general analysis of the closed-loop system is combinatorial. After each exploration step, there are two possibilities: (i) the exploration input led to a higher reward and thus the recommendation system sticks to that recommendation for the subsequent steps, at least until the next exploration phase; (ii) the exploration input led to a lower reward and is therefore discarded, and the recommendation system “goes back” to the last recommendation. Accordingly, the probability of successful exploration coincides with the probability of sampling a recommendation (strictly) closer to the current opinion compared to the current recommendation. Formally:

Let $\rec_k$ be the current recommendation and $\opinion_k$ be the opinion at time $k$. Then, the probability of successful exploration is

\begin{equation*}
\begin{aligned}[t]
\\&-F_{\drec}(\opinion_k-|\opinion_k-\rec_k|),
\end{aligned}
\end{equation*}

where $F_{\drec}:\reals\to[0,1]$ is the cumulative distribution function of the recommendation distribution $\drec$, and $\rho(\{a\})$ is the probability of sampling the recommendation $a\in\reals$.

<ref> predicates that the probability of successful exploration is controlled by the difference between the current opinion and recommendation, together with the properties of the recommendation distribution $\rho$. For instance, if $\drec$ is uniform between $-1$ and $+1$, then $\rho(\{x\})=0$ for all $x\in\reals$ and
$F_\rho(x)=\frac{1}{2}(1+\max\{-1,\min\{1,x\}\})$, so that
$p(\opinion_k,\rec_k)=\frac{1}{2}(1+\max\{-1,\min\{1, \opinion_k+\abs{\opinion_k-\rec_k}\}\})-\frac{1}{2}(1+\max\{-1,\min\{1,\opinion_k-\abs{\opinion_k-\rec_k}\}\})$.
If $\opinion_k\pm\abs{\opinion_k-\rec_k}\in[-1,+1]$, then $p(\opinion_k,\rec_k)=\abs{\opinion_k-\rec_k}$, showing that, at least in the case of a uniform recommendation distribution, the probability of successful exploration is precisely $\abs{\opinion_k-\rec_k}$.
With <ref>, the dynamics are as in <ref>, which explains why the analysis of the closed-loop system becomes intractable after a few exploration steps. Thus, in the sequel, we restrict our analysis to two tractable yet insightful limit cases: exploration only at the initial time and exploration at every time step.

mycircle=[circle,draw,font=,inner sep=1pt,minimum size=0.8cm]
myarrow = [thick]

[mycircle] at (-0.5,1.5) (o) $\opinion_0$;

[mycircle] at (1,3) (up1) $\opinion_1$;
[->,myarrow] (o) – (up1) node[pos=.5,above left,font=] $\rho(\{+1\})$;

at (2,3) (up2) $\ldots$;
[mycircle] at (3,3) (up3) $\opinion_T$;
[-,myarrow] (up1) – (up2);
[->,myarrow] (up2) – (up3);

[mycircle] at (4.5,4.5) (upup1) $\opinion_{T+1}$;
[mycircle] at (4.5,3.5) (upup2) $\opinion_{T+1}$;
[mycircle] at (4.5,2.5) (upup3) $\opinion_{T+1}$;
[mycircle] at (4.5,1.5) (upup4) $\opinion_{T+1}$;
[->,myarrow] (up3) – (upup1) node[pos=.5,font=,inner sep=0pt] (a1) ;
[->,myarrow] (up3) – (upup2) node[pos=.5,font=,inner sep=0pt] (a2) ;
[->,myarrow] (up3) – (upup3) node[pos=.5,font=,inner sep=0pt] (a3) ;
[->,myarrow] (up3) – (upup4) node[pos=.5,font=,inner sep=0pt] (a4) ;
[->,myarrow] (upup1) –++ (1,0) node[pos=1,right] (b1) …;
[->,myarrow] (upup2) –++ (1,0) node[pos=1,right] (b2) …;
[->,myarrow] (upup3) –++ (1,0) node[pos=1,right] (b3) …;
[->,myarrow] (upup4) –++ (1,0) node[pos=1,right] (b4) …;

[-,dashed] (a1) – ($(a1)+(-0.8,0.5)$) node[pos=1,above,font=,align=center] $\rho(\{+1\})p(\opinion_T,+1)$
(successful exploration);
[-,dashed] (a2) – ($(a2)+(-1,0.6)$) node[pos=1,left,font=,align=center] $\rho(\{+1\})(1-p(\opinion_T,+1))$
(non-successful exploration);
[-,dashed] (a3) – ($(a3)+(-0.8,-0.5)$) node[pos=1,left,font=,align=center] $\rho(\{-1\})p(\opinion_T,-1)$
(successful exploration);
[-,dashed] (a4) – ($(a4)+(-1.2,-0.6)$) node[pos=1,below,font=,align=center] $\rho(\{+1\})(1-p(\opinion_T,-1))$
(non-successful exploration);

[mycircle] at (1,0) (down1) $\opinion_1$;
[->,myarrow] (o) – (down1) node[pos=.5,below left,font=] $\rho(\{-1\})$;
at (2,0) (down2) $\ldots$;
at (3,0) (down3) $\ldots$;
[-,myarrow] (down1) – (down2);
[->,myarrow] (down2) – (down3);

Dynamics in the simple case of two possible recommendations ($\pm 1$, i.e., $\drec=p \delta_{-1}+(1-p)\delta_{+1}$ for $p\in[0,1]$) and deterministic bias/initial opinion $\opinion_0\in\reals$ (i.e., $\dopinion_0=\delta_{\opinion_0}$). The transitions are $\opinion_{k+1}=\weightbias\opinion_0 +\weightopinion\opinion_k+(1-\weightbias-\weightopinion)\rec_k$; the quantity associated with each arrow is the probability of that transition.

§.§ Special case: No exploration

Suppose now that the recommendation system does not perform exploration; i.e., $\exploration\to+\infty$. In this case, the initial recommendation, which is random, will be applied at all time steps, regardless of the reward returned by the user. As a result, each user's opinion converges to a convex combination of the bias and the received recommendation (at the initial time). Macroscopically, the opinion distribution approaches a “convex combination” of the bias distribution and the recommendation distribution:

Let $T=+\infty$.
Let $\dopinion_0\in\Pp{2}{\reals}$ be the bias/initial opinion distribution, $\dopinion_k\in\Pp{2}{\reals}$ be the opinion distribution at time $k$, and $\drec\in\Pp{2}{\reals}$ be the recommendation distribution.
Then, the opinion distribution $\dopinion_k$ converges weakly in $\Pp{2}{\reals}$ to the opinion distribution

\begin{equation}\label{eq:specialcase:exploration:limit}
\mu\coloneqq
\pushforward{\left(\frac{\weightbias}{1-\weightopinion}x\right)}\dopinion_0
\ast
\pushforward{\left(\left(1-\frac{\weightbias}{1-\weightopinion}\right)x\right)}\drec.
\end{equation}

Of course, the opinion distribution of a population with finitely many users is stochastic and depends on the specific realization of recommendations received by the users.

Therefore, <ref> should be interpreted as follows: The opinion distribution of a population of infinitely many agents, whose opinion is initially distributed according to $\dopinion_0$, eventually resembles distribution (<ref>). Equivalently, the probability distribution associated with the opinion of a generic user approaches the distribution (<ref>). With this approach, we can reason about the time evolution of opinions without worrying about the specific realization of the sampling of recommendations. Analogous considerations apply to all our subsequent results.

<ref> proves weak convergence of the opinion distribution (i.e., convergence of the integral of each continuous function which grows at most quadratically) and does not prove strong convergence (i.e., $\mu_k(A)\to\mu(A)$ for every Borel set $A$). Namely, we prove that all macroscopic quantities converge (e.g., $\phi(x)=x$ in the definition of weak convergence in $\Pp{2}{\reals}$ yields convergence of the expected value), and refrain from conducting a microscopic analysis for each and every (infinitesimal) user of the population. In particular, if $\weightbias=0$, then the opinion distribution asymptotically converges to the recommendation distribution.
While simple, <ref> unveils a fundamental discrepancy between a macroscopic analysis, aiming to study the opinion distribution of the population, and a microscopic analysis, which considers the change of opinions for individual users. We illustrate the phenomenon in the following analytic example and discuss it more in detail when presenting our numerical results in <ref>.

[Microscopic vs. macroscopic behavior]
Suppose that the bias/initial opinion distribution $\dopinion_0$ coincides with the recommendation distribution $\drec$ and that all distributions are zero-mean Gaussian with standard deviation $\sigma>0$. By <ref> (together with the expressions for the pushforward and convolution of Gaussians), the opinion distribution converges to a zero-mean Gaussian with standard deviation $\sigma\sqrt{(\frac{\weightbias}{1-\weightopinion})^2+(1-\frac{\weightbias}{1-\weightopinion})^2}$, so that the (type-2) Wasserstein distance between the bias/initial opinion distribution $\dopinion_0$ and the final distribution $\dopinion$ (defined in (<ref>)) reads

\begin{equation*}
\wasserstein{2}{\dopinion_0}{\mu}^2
\sigma^2\abs{1-\sqrt{\left(\frac{\weightbias}{1-\weightopinion}\right)^2+\left(1-\frac{\weightbias}{1-\weightopinion}\right)^2}}^2,
\end{equation*}

where we used the closed-form expression for the Wasserstein distance between Gaussians.
Conversely, from a microscopic perspective, the opinion of a user with bias $\opinion_0$ who receives the recommendation $\rec_0$ converges to $\frac{\weightbias}{1-\weightopinion}\opinion_0+(1-\frac{\weightbias}{1-\weightopinion})\rec_0$. Thus, the opinion shift is $(1-\frac{\weightbias}{1-\weightopinion})(\opinion_0-\rec_0)$, and the expected squared opinion shift for a user is

\begin{equation*}
\begin{aligned}
\Delta
\abs{1-\frac{\weightbias}{1-\weightopinion}}^2\int_{\reals}\int_{\reals}\abs{\opinion_0-\rec_0}^2\d\dopinion_0(\opinion_0)\d\drec(\rec_0)
\\
\end{aligned}
\end{equation*}

For $\weightbias\to 1-\weightopinion$, we recover the trivial case $1-\weightbias-\weightopinion=0$, whereby the recommendation has weight 0 in the opinion dynamics (<ref>). Accordingly, both $\wasserstein{2}{\dopinion_0}{\mu}^2$ and $\Delta$ converge to 0, and the micro- and macroscopic behaviors align.
For $\weightbias\to 0$ and fixed $\weightopinion$, instead, $\wasserstein{2}{\dopinion_0}{\mu}^2\to 0$; i.e., the initial opinion distribution $\dopinion_0$ (which, by assumption, equals $\drec$) coincides with the final opinion distribution $\mu$ (which, by <ref>, also equals  $\drec$). However, $\Delta\to 2\sigma^2>0$. Thus, microscopically, each user's opinion is highly impacted by the recommendation system, while, macroscopically, the opinion distribution of the population is unaltered.

Finally, <ref> considers the limit setting where the recommendation system explores only at the beginning and then sticks to the first, random, recommendation. Nonetheless, the intuition remains valid for sufficiently large values of exploration, as suggested by the numerical results in <ref>.

colorbar, colorbar style=width=0.2cm,xshift=-0.3cm,
width=8.0cm, height=4.4cm,
point meta min=0, point meta max=0.3,
xmin=1, xmax=51,
ylabel=$\weightopinion$, ylabel style=yshift=-0.15cm,
ymin=0, ymax=0.9,

3[surf,mesh/cols=20] table [x expr=0, y expr=1, z expr=2, col sep=comma] figures/wasserstein_distance_convergence_no_exploration.csv;

The (type-1) Wasserstein distance between the final opinion distribution and the distribution (<ref>) is small (dark blue in the colormap) already for relatively small values $T$, especially for $\weightopinion$ small (i.e., the distance is small). Thus, at least qualitatively, <ref> remains valid also in non-asymptotic regimes. For this simulation, we used the same setting as in <ref>.

§.§ Special case: Continuous exploration

We consider now the opposite limit case, where the recommendation system explores at each time step; i.e., $T=1$ and the recommendation received by a user is therefore random at each time step. In this setting, the opinion distribution converges to a “convex combination” of the bias/initial opinion distribution and a distribution “similar” to a Gaussian distribution. Perhaps surprisingly, this result is independent of the initial opinion distribution and, importantly, of the recommendation distribution. Formally:

Let $T=1$.
Let $\dopinion_0\in\Pp{2}{\reals}$ be the bias/initial opinion distribution, $\dopinion_k\in\Pp{2}{\reals}$ be the opinion distribution at time $k$, and $\drec\in\Pp{2}{\reals}$ be the recommendation distribution.
Then, the opinion distribution $\dopinion_k$ converges weakly in $\Pp{2}{\reals}$ to some opinion distribution $\dopinion\in\Pp{2}{\reals}$ with

\begin{equation}\label{eq:always exploration:mean and variance}
\begin{aligned}
\expectedValue{\dopinion}{x}
%\lim_{k\to\infty} \expectedValue{\dopinion_k}{x}
\frac{\weightbias}{1-\weightopinion}\expectedValue{\dopinion_0}{x}
\expectedValue{\drec}{x}
\\
\variance(\dopinion)
\frac{\weightbias^2}{(1-\weightopinion)^2}\variance(\dopinion_0)
\frac{(1-\weightbias-\weightopinion)^2}{1-\weightopinion^2}\variance(\drec).
\end{aligned}
\end{equation}

Moreover, regardless of the bias/initial opinion distribution $\dopinion_0$ and the recommendation distribution $\drec$,

\begin{equation}\label{eq:always exploration:convergence}
\dopinion = \pushforward{\left(\frac{\weightbias}{1-\weightopinion}x\right)}\dopinion_0\ast
\pushforward{\left(\left(1-\frac{\weightbias}{1-\weightopinion}\right)x\right)}\bar\drec,
\end{equation}

where $\bar\rho$  is “almost Gaussian”, in the sense that its normalized distribution $\hat\drec\coloneqq\pushforward{((x-\expectedValue{\bar\drec}{x})/\sqrt{\variance(\bar\drec)})}\bar\drec$  satisfies

\begin{equation}\label{eq:always exploration:almost gaussian}
\wasserstein{1}{\hat\drec}{\Phi}
\leq
\left(\frac{18}{\pi}\right)^{\frac{1}{3}}\left(\frac{1-\weightopinion^2}{e\weightopinion^2}\right)^{\frac{1}{12}}\sup_{\xi\neq 0}\frac{\abs{C_{\drec}(\xi)-C_{\Phi}(\xi)}}{\abs{\xi}^3},
\end{equation}

where $\Phi$ is the zero-mean Gaussian probability distribution with unit variance and $C_{\dopinion}(\cdot)$ is the characteristic function of $\dopinion$.
Finally, if $\dopinion_0$ and $\drec$ are Gaussian distributions, then $\dopinion$ is Gaussian with the mean and variance in (<ref>).

<ref> predicates that the opinion distribution converges to a “convex combination” of the bias/initial condition distribution and a distribution which is “almost Gaussian”, regardless of the recommendation distribution (that is, even for very “non-Gaussian” recommendation distributions).
This effect is reminiscent of the central limit theorem in probability theory, which, however, does not apply here (indeed, we consider trajectories of a stochastic dynamic system and not the sum of i.i.d. random variables). In particular, if $\weightbias=0$, the opinion distribution will asymptotically be “almost Gaussian”.
The upper bound (<ref>), which is valid for all $\weightbias$ and $\weightopinion$ and is non-trivial (i.e., finite) for all distributions with finite third moment <cit.>, indicates that the vicinity to a Gaussian distribution increases continuously as $\weightopinion$ approaches 1. When all distributions are Gaussian, the result becomes exact.
Among others, <ref> explains why, for short exploration times, the final opinion distribution does not depend on the recommendation distribution and why, for small values of $\weightbias$, it resembles a Gaussian distribution, even if all underlying distributions are not Gaussian; see <ref>, where $\weightbias=0$, $\weightopinion=0.8$, and $\exploration=3$.

[group style=group size=2 by 2, horizontal sep=0.2cm, vertical sep=0.2cm,
width=2.5cm, height=2.5cm]

xmin=-2.0, xmax=2.0,
xtick=, ytick=]
[hist=density,bins=25,ETHblue,fill=ETHblue,fill opacity=0.5] table [y expr=0, col sep=comma] figures/gaussian.csv;
[ETHred,very thick,domain=-2:2,samples=30] 0.5/(0.4*sqrt(2*3.14))*(e^(-0.5*(x-1)^2/0.4^2)+e^(-0.5*(x+1)^2/0.4^2));

[group/empty plot]

[width=5cm, height=5cm,
xmin=-2.0, xmax=2.0, ymin=-2.0, ymax=2.0,
xlabel=Bias/initial opinion $\opinion_0$, ylabel=Final opinion $\opinion_N$]
[ETHblue,only marks,mark size=0.5pt] table[x expr=0, y expr=1, col sep=comma] figures/gaussian.csv;
[gray, dashed, ultra thick] x;

xmin=-2.0, xmax=2.0,
ytick=,xtick=,rotate=-90,x dir=reverse]
[hist=density,bins=25,ETHblue,fill=ETHblue,fill opacity=0.5] table [y expr=1, col sep=comma] figures/gaussian.csv;
[ETHred,very thick,domain=-2:2,samples=30] 0.5/(0.4*sqrt(2*3.14))*(e^(-0.5*(x-1)^2/0.4^2)+e^(-0.5*(x+1)^2/0.4^2));

Simulation of the closed-loop system over a horizon of 100. As suggested by our theoretic results in the case of infinitely frequent exploration (and with $\weightbias=0$), the opinion distribution approaches (but does not generally converge to) a Gaussian distribution, even though the bias/initial opinion distribution is uniform and the recommendation distribution (plotted in solid red) is bimodal (a mixture of Gaussians with mean $\pm 1$ and standard deviation 0.4).

§ NUMERICAL RESULTS

Our numerical analysis[Python implementation: <https://gitlab.ethz.ch/lnicolas/impact-of-recommendation-systems-on-opinion-dynamics>.]
concerns the discrepancy between the micro- and macroscopic behavior of the opinion distribution, as a function of $\weightbias, \weightopinion$ and the exploration time $\exploration$.
We consider homogeneous populations with $\weightbias\in\{0,0.1,0.2\}$, $\weightopinion\in\{0,0.1,\ldots,1-\weightbias\}$, and bias/initial opinion $\opinion_0$ uniformly distributed between $-2$ and $2$, and recommendation systems with exploration time $T\in\{1,\ldots,21\}$ and recommendations distributed according to the standard zero-mean Gaussian distribution with unit variance. For each setting, we perform 20 exploration cycles.
To quantify microscopic opinion shifts, we average the difference between users' initial and final opinions (i.e., $\frac{1}{M}\sum_{i=1}^M\abs{\opinion_{0,i}-\opinion_{N,i}}$ with $\opinion_{0,i}$ and $\opinion_{N,i}$ being the initial and final opinion of user $i\in\{1,\ldots,M\}$).
To quantify macroscopic opinion shifts, instead, we use the (type-1) Wasserstein distance between bias/initial opinion distribution $\dopinion_0$ and final opinion distribution $\dopinion_N$.

width=3.6cm, height=3.6cm,
point meta min=0, point meta max=1.0,
xmin=1, xmax=21,
ylabel=$\weightopinion$, ylabel style=yshift=-0.15cm,
ymin=0, ymax=1,
title style=yshift=-0.2cm,

group style = group size=2 by 1,
horizontal sep=0.6cm,
3[surf,mesh/cols=20] table [x expr=0, y expr=1, z expr=2, col sep=comma] figures/d_micro_alpha=0.0.csv;
[samples=30,domain=1.01:22,very thick, dotted, black] 0.81^(1/(x-1));
[samples=30,domain=1.01:22,very thick, dotted, black] 0.33^(1/(x-1));
[samples=30,domain=1.01:22,very thick, dotted, black] 0.05^(1/(x-1));

3[surf,mesh/cols=20] table [x expr=0, y expr=1, z expr=2, col sep=comma] figures/d_macro_alpha=0.0.csv;
[samples=30,domain=1.01:22,very thick, dotted, white] 0.81^(1/(x-1));
[samples=30,domain=1.01:22,very thick, dotted, white] 0.33^(1/(x-1));
[samples=30,domain=1.01:22,very thick, dotted, white] 0.05^(1/(x-1));

$\weightbias=0$ (with isolines $\weightopinion^{\exploration-1}=c\in\reals$).

width=3.6cm, height=3.6cm,
point meta min=0, point meta max=1.0,
xmin=1, xmax=21,
ylabel=$\weightopinion$, ylabel style=yshift=-0.15cm,
ymin=0, ymax=1,
title style=yshift=-0.2cm,

group style = group size=2 by 1,
horizontal sep=0.6cm,
3[surf,mesh/cols=20] table [x expr=0, y expr=1, z expr=2, col sep=comma] figures/d_micro_alpha=0.1.csv;

3[surf,mesh/cols=20] table [x expr=0, y expr=1, z expr=2, col sep=comma] figures/d_macro_alpha=0.1.csv;

$\weightbias=0.1$ (thus, $\weightopinion\leq 0.9$).

width=3.6cm, height=3.6cm,
point meta min=0, point meta max=1.0,
xmin=1, xmax=21,
ylabel=$\weightopinion$, ylabel style=yshift=-0.2cm,
ymin=0, ymax=1,
title style=yshift=-0.2cm,

group style = group size=2 by 1,
horizontal sep=0.6cm,
3[surf,mesh/cols=20] table [x expr=0, y expr=1, z expr=2, col sep=comma] figures/d_micro_alpha=0.2.csv;

[title=Macroscopic,ylabel=,colorbar,colorbar style=width=0.2cm,xshift=-0.3cm]
3[surf,mesh/cols=20] table [x expr=0, y expr=1, z expr=2, col sep=comma] figures/d_macro_alpha=0.2.csv;

$\weightbias=0.2$ (thus, $\weightopinion\leq 0.8$).

In each figure, the left plot shows the microscopic opinion shift as a function of $\weightopinion$ and $\exploration$, measured as the average difference between the initial and the final opinion across the population. The right plot shows the macroscopic opinion shift, captured by the (type-1) Wasserstein distance between the initial opinion distribution and the final one. For comparison purposes, we normalize each value by the maximum value across all $\weightopinion$ and $\exploration$, so that all values are between $0$ and $1$.
Remarkably, our result highlights a marked discrepancy between the micro- and macroscopic behavior: Even if the opinion distribution can be shown to remain stable (e.g., via surveys), the opinion of individual users might be significantly impacted by the recommendation system, especially for low $\weightbias$.

Our results are summarized in <ref>.
First, for small values of $\weightbias$, our simulations suggest a qualitative discrepancy between micro- and macroscopic changes: When the microscopic change is largest (yellow), the macroscopic change is lowest (blue), and vice versa. The trend becomes less marked and eventually disappears as $\weightbias$ increases, as already observed in <ref> for the limit case $T=+\infty$. This discrepancy suggests that, even if the opinion distribution can be proven to be relatively stable (e.g., through surveys), the opinions of individual users may be significantly impacted by the recommendation system.
Second, for $\weightbias\ll 1-\weightopinion$, we observe similar behavior along isolines of $\weightopinion^{\exploration-1}=c\in\nonnegativereals$ in the sense that settings with similar $\weightopinion^{\exploration-1}$ yield similar micro- and macroscopic behaviors (see <ref>). Intuitively, this is a consequence of the probability of successful exploration being modulated by $\abs{\opinion_k-\rec_k}$ (cf. <ref>), since between two exploration steps $k$ and $k-T$:

\begin{equation*}
\begin{aligned}
\abs{\opinion_{k}-\rec_{k}}
\overset{\eqref{eq:opinion dynamics}}&{=}
\abs{\weightopinion^{T-1}(\opinion_{k+1-T}-\rec_k) + \frac{\weightbias-\weightbias\weightopinion^{T-1}}{1-\weightopinion}(\opinion_0-\rec_k)}
\\
\overset{\weightbias\ll 1-\weightopinion}&{\approx} \beta^{T-1}\abs{\opinion_{k+1-T}-\rec_k}.
\end{aligned}
\end{equation*}

Thus, settings with similar $\weightopinion^{\exploration-1}$ result in similar probabilities of successful exploration and thus in similar outcomes.

§ CONCLUSIONS

We studied the impact of recommendation systems on opinion dynamics from a microscopic (i.e., at the individual level) and macroscopic (i.e., at the population level) perspective. We analyzed theoretically and numerically the interaction between users and a recommendation system.
Among others, our work explains why and in which circumstances we observe a fundamental discrepancy between micro- and macroscopic effects, whereby the opinions of individual users are drastically affected by the recommendation system whereas the opinion distribution of the population is unchanged.

In future research, we would like to (i) further investigate the properties of our model, (ii) consider more sophisticated recommendation systems (e.g., collaborative filtering <cit.>), and (iii) model the dynamics of opinion distribution directly in the probability space (e.g., see <cit.>).