# Auditing health-related recommendations in social media: A Case Study of
Abortion on YouTube

Mohammed Lahsainia, Mohamed Lechiakha, Alexandre Maurera
a UM6P College of Computing, Mohammed VI Polytechnic University, Ben Guerir,
Morocco  Corresponding author. E-mail address<EMAIL_ADDRESS>(Mohamed Lechiakh)

###### Abstract

Recommendation algorithms used by social media, like YouTube, significantly
shape our information consumption across various domains. Their influence is
especially critical in healthcare, where they can endanger lives by promoting
misleading health information and practices. Hence, algorithmic auditing
becomes crucial to uncover their potential bias and misinformation,
particularly in the context of controversial topics like abortion. We
introduce a simple yet effective sock puppet auditing approach to investigate
how YouTube recommends abortion-related videos to individuals with different
backgrounds. First, we generate user data from YouTube recommendation sessions
using simulated individual interactions based on different watching histories
and opinions about abortion. Second, we employ graph analysis methods to
identify the most influential recommendations made to users among 11174
videos. Then, we evaluate our findings on bias and misinformation in YouTube’s
abortion-related recommendations. Our findings show that the user’s watch
history does not substantially affect the type of recommended videos. In
addition, YouTube predominantly promotes pro-abortion content, with only 4%
being misleading, as shown by the 58.4% pro-abortion videos in their prominent
recommendations. However, We found that individuals with medical backgrounds
or extensive histories of medical-related content are less likely to come
across abortion myth-debunking videos, while those who have engaged with
feminism-related material are more likely to encounter anti-abortion videos.
We emphasize the black-box evaluation of YouTube recommendations and assess
the veracity of its claims that it has removed deceptive content about
abortion. Our framework allows for efficient auditing of recommendation
systems, regardless of the complexity of the underlying algorithms.

Keywords: Abortion misinformation, YouTube recommendation, Graph analysis,
Algorithmic bias, Black-box recommendation systems, Recommendation auditing

##  1 Introduction

###  1.1 Background

Platforms for user-generated videos, like YouTube, have seen a sharp increase
in popularity in recent years. For many people, it has emerged as one of the
most important information sources [39]. Unfortunately, these platforms can be
a source for the dissemination of false information that might harm
individuals and alter their viewpoints and decisions [57], such as health-
related misinformation [36, 52, 22]. They can also be aligned with some
viewpoint on specific issues [3] or exhibit undesirable behaviors [27, 48].
Auditing algorithmic recommendations provided by social media platforms [9] is
critical to improving the reliability and trustworthiness of their content,
particularly when it comes to health knowledge.

Because there is a substantial amount of user-created data being shared on
these platforms, they must depend on algorithms that provide features like
personalization, recommendations, and content filtering. This is the case with
YouTube [5], in which video suggestion and feed personalization, as well as
enforcing community guidelines [2] (that specify what sort of material is and
is not permitted on the network), cannot be achieved by humans alone. However,
these algorithms may use probabilistic decision-making techniques that are too
complex for humans to comprehend, or too costly to monitor.

As a result, efforts to audit these algorithmic solutions have grown more
common [14, 8], since auditing provides an operational trail that demonstrates
bias and promotes transparency.

###  1.2 Motivation

Social media platforms may contribute to a safer and more reliable online
environment for healthcare content by improving algorithmic control and
rigorous auditing, encouraging greater confidence among users seeking accurate
and reputable health information. In this context, abortion is a major
healthcare concern that faces numerous challenges, as a result of the spread
of misinformation and biased opinions on social media platforms. As a very
sensitive subject, abortion discussions often become polarized, leading to the
spread of inaccurate information and misconceptions.

On June 24, 2022, the US Supreme Court overruled the historic Roe v. Wade
decision, in which the Court determined that the United States Constitution
granted the right to abortion. This means that decisions on the legality of
abortion are left to the states, making access to abortion vary dramatically
across the country [61]. This sparked several rallies around the country,
pushing the problem into the spotlight. According to Google Trends, there has
been an increase in searches for keywords such as “abortion”, “abortion in
US”, “women’s rights”, “ban abortion”, “abortion laws”, “Roe v Wade”, “Post
Roe”, “pro-choice”, and “pro-life”.

Consequently, Google blogged that it will automatically delete location
history when users visit sensitive places like abortion clinics [19]. Three
weeks later, YouTube announced its intention to stop the spread of incorrect
information and dangerous advice about abortion [68, 16]. This involves
removing videos that instruct users on how to perform hazardous abortions or
encourage untrue claims.

YouTube’s involvement might have an impact beyond the US, since countries
differ in their views on abortion, and there is controversy over its legality
internationally. This motivates us to audit the platform to see if it has been
successful in removing content that spreads misinformation about abortion, and
whether YouTube tries to promote one viewpoint, in the anti-/pro-abortion
debate, more than another.

###  1.3 Objective

YouTube’s algorithms serve two key purposes: search and recommendation. The
search engine assists the user in finding videos quickly by suggesting queries
based on search terms connected to the user search and watch history, as well
as what other users have previously looked for [1]. It then identifies
relevant materials, and ranks them by order of significance. The
recommendation algorithm suggests videos that the user may find interesting.
These suggestions are displayed as a list of recommendations on the right side
of the screen while a video is playing, and as a feed when the user visits the
home page or other sections (trending, subscriptions…).

YouTube’s algorithms bias can be present in the search results [24, 49], in
the homepage feed [42, 62] or in the list of recommendations (we will refer to
it as YouTube recommendations), which this study tries to measure.

While YouTube has not disclosed the technical details of its recommendation
algorithm, they are likely to still be using a deep learning process [15] in
which candidates are first selected from a corpus of videos based on user
history and context, and then ranked based on the features of the videos and
other factors. However, without a thorough understanding of the algorithm, the
whole video database upon which the algorithm operates, and the user’s
behaviors in response to algorithmic suggestions, the recommendation system
(RS) is essentially a “black box” from the perspective of social scientist,
regulators, or external auditors.

For this reason, we study YouTube recommendations empirically. We implement a
data gathering mechanism to mimic users watching a series of recommended
YouTube videos under various experimental scenarios. The most prominent videos
are then classified based on the trustworthiness of their information and
their viewpoint on the issue. Finally, we examine the empirical findings to
look at how YouTube recommends abortion-related videos.

##  2 Literature review

###  2.1 Misinformation and bias in recommendation systems

There are many potential sources of bias in a recommendation system that
generally reflect individuals’ own cognitive and societal biases [6]. These
biases can range from individual behavioral biases (selective exposure [65])
to data bias (homophilous social network [7]) and algorithmic bias (filter
bubble [44]). Thus, the loop effect resulting from combining all these bias
types represents a vicious cycle wherein social recommendation platforms
progressively amplify ideological bias. This entails suggesting political
content that aligns with users’ past engagement, leading to a reinforcing loop
of exposure to ideologically similar viewpoints. Misinformation refers to
false or inaccurate information that is deliberately propagated to
intentionally cause public harm and misleading, or for profit [67].
Misinformation and bias are linked dynamics on social media platforms such as
YouTube. Given the various methods of reinforcing users’ existing biases, this
can make users more susceptible to accepting and sharing misinformation that
confirms their preconceived ideas [71, 37]. For instance, the algorithmic
amplification and the virtual filter bubble construction contribute easily to
the rapid spread of misinformation within specific YouTube communities, which
shows the intricate interplay between personal beliefs, recommendation
algorithms, and the distribution of unreliable content. YouTube, a widely used
online social media platform, faces significant concerns related to its
recommendation system. Its recommendation algorithm has been described as a
”long-term addiction machine” [51], which has been criticized for putting its
users in ”rabbit holes” [31]. Given that recommendations drive 70% of
YouTube’s content consumption [50], the potential for unintentionally exposing
audiences to more and more biased content becomes notably concerning.

###  2.2 In the context of health-related content

It is critical to emphasize the importance of misinformation and biased
content particularly in the context of health topics and information. The
possibility of accidentally exposing users to biased or inaccurate health
content is not simply an issue of misinformation promotion, but also a serious
threat to public health [59, 13]. The impact of recommendation system dynamics
on health issues highlights the critical necessity for responsible algorithmic
thinking, auditing and content curation to protect the well-being of
individuals seeking trustworthy health information.

While the scientific community has mainly focused on the consequences of
misinformation about vaccines and communicable diseases in the context of
public health (e.g., COVID-19 misinformation [54, 33, 64]), there is an
important gap in addressing individual health-related misinformation. The
spread of abortion misinformation is a striking example of this gap [45, 56].
Personal decisions and understandings of abortion-related misinformation could
definitely contribute to shaping public knowledge and attitudes, and
propagating societal considerations and actions. This is particularly
important in this era of big data and giant social media platforms, where
prior studies have shown that 70.1% of women obtain information regarding
abortion from the internet [34]. Prior works have focused on investigating
abortion misinformation in internet and social media through empirical studies
that delve into users’ experiences with abortion-related content [56, 45, 66].
These studies mainly identify the various types and key sources of
misinformation [56, 66], provide statistics based on user interaction metrics
[66], and examine users’ strategies for coping with this misleading
information [56]. To the best of our knowledge, our work is the first study to
present an auditing framework for misinformation and bias of abortion-related
recommendations on YouTube.

###  2.3 Auditing YouTube recommendations

Over the past decade, the research community has conducted several audit
studies on YouTube, concentrating on diverse methodological approaches to
analyze the potential of the platform’s recommendation algorithms for
promoting radicalization and misinformation [58, 4, 25]. An interesting line
of research involves using active measurements, often involving sock puppets
(without previous watching history), to investigate algorithmic pathways that
steer users from ideologically moderated content to more extreme content via
video and channel recommendations [48, 32]. These works illuminate how
YouTube’s recommendation system might accidentally guide users toward
polarized and extreme content. In the same context, there have been some works
[23, 48] that used passive measurements to prove the same result based on user
interaction histories (e.g., previous watched videos, clicks, comments, …).
Here, the sock puppet training is crucial for personalized recommendations and
observing the loop bias effect in practice [24, 55, 43, 41]. However, the
audit using real user activity cannot clearly separate the effects of
recommendation algorithms from other factors driving radicalization and bias
amplification.

Misinformation and biased content in YouTube recommendation have always been a
major concern to judge the platform ethical policy and quality of services.
YouTube has already announced efforts for mitigating these effects in its
recommendations [60]. In the literature, there are many intervention
strategies that can be used to address this problem. These proposed approaches
can essentially be implemented from a system design perspective using pre-
processing [69, 47, 35], or in-processing [70, 20, 12], or post-processing
approaches [38, 46]. Indeed, such solutions have the potential to be valuable
for auditing recommendations. However, they come with a significant
requirement: having in-depth knowledge and special access to the platform’s
algorithms and models for implementation and modification. In other words, the
platform itself would need to actively implement and test these methods
internally, which is a complex task and often not feasible. Therefore,
auditing black-box systems has always been a challenging topic poorly
addressed by the research community. Among the recently published related
works about this topic, Srba et al. [58] used a sock puppet audit methodology
that demonstrated the possibility to “burst the bubbl” of misinformation
videos on YouTube by consuming videos debunking that misinformation.
Carrascosa et al. [11] also proposed a trained sock puppet approach for
measuring and understanding behavioural targeted advertising in the online
advertising market. Also, Figueiredo et al. [18] explored how targeted YouTube
video-ads meet the regulatory policies (e.g., ethics and laws) regarding
children advertising in Brazil and Canada, and Le et al. [30] developed a sock
puppet auditing system to investigate the personalization of web search
results based on users’ browsing histories, which can be inferred by search
engines via third-party partnerships. In an interesting study on Twitter,
Bartley et al. [9] used a sock-puppet audit and provided evidence that
algorithmic curation of content systematically distorts the information people
see.

In the same context, we present in this work a trained sock-puppet audit
methodology (using artificial user-bots) for abortion-related videos on
YouTube, which is audited as a black-box RS. The choice of the abortion topic
is motivated by its significant societal and health implications, as well as
the problematic content it presents. Moreover, its exploration within the
context of auditing RS is novel from a scientific and research perspective.

##  3 Material and methods

The overarching goal of our study is to examine the extent to which YouTube
recommendations spread misinformation and biased content about abortion. Given
the difficulty of auditing black-box systems such as YouTube, we aimed to
replicate the typical customary browsing and watching behavior of individuals.
To this purpose, we take into account the different prevalent ideologies and
personal attitudes of individuals seeking abortion-related information online.
Thus, we design and implement a sock puppet auditing system to train user
profiles through watching sessions of recommended videos on YouTube about
abortion, guided by specific search query rules and video selection criteria.
Figure 1 shows the general process and steps of our auditing system that are
discussed below.

Figure 1: Our sock puppet auditing system to measure bias and the spread of
misinformation of abortion-related content on YouTube.

###  3.1 Data collection

Sandvig et al. [53] reviewed several black box algorithm audit designs, in
particular: code audit (when the algorithm is disclosed), noninvasive user
audit (which rely on users’ answers to questions about how they interact with
the platform), scraping audit (in which repeated queries are sent to the
platform to observe the outcome), sock puppet audit (where a program assumes
the role of a user), and crowdsourced audit (that uses hired users). For our
study, we opted for an approach similar to the sock puppet audit, because it
offers us a great deal of flexibility in the manipulation of fake users and in
data collection.

Using bots, we mimic users who are seeking information about abortion on
YouTube. Each bot begins by watching videos gathered from the results of
specific search queries on YouTube. While doing so, the recommended abortion
videos are collected to be watched next in the following iteration. Each
sequence is collected using a distinct Google account with different watch and
search history on YouTube. We finally processed over 38k videos, 11174 of
which are unique. We detail each stage of the experiment below. The videos
have been viewed across multiple sessions over a week to ensure more accurate
and relevant recommendations, reduce noise, and align closely with user
preferences. This method efficiently minimizes the influence of noise in the
final analysis, providing more reliable and meaningful insights.

####  3.1.1 Data collection process

Although YouTube provides an official API that allows the collection of data
and has been used in many studies [3, 28, 32], we do not use it in our work.
Instead, we use Selenium and Python to simulate user behavior and collect
recommended video features. The reason for this is that we want to study the
effect of the user’s watch history on the recommendations, but individual
personalizations are not applied to suggestions provided by the API [54]. In
fact, they are based on item-to-item similarity and overall user engagement
and satisfaction metrics. The consideration of interface affordance shows that
users are presented with video recommendations through five distinct pathways:
recommendations following keyword queries in the search bar; personalized
suggestions based on user interactions; a feed featuring trending videos in
specific geographic regions; and a segment displaying new or unwatched content
from subscribed channels. For the scope of this study, our focus will be
exclusively directed towards recommendations appearing after querying
abortion-related keywords.

####  3.1.2 Simulated profiles

To investigate how YouTube suggestions vary based on what a user has
previously seen or looked for, we created six profiles using different YouTube
accounts (Google accounts) and had them search for and watch specific types of
content on Google and YouTube:

  * •

Profile 1: radical feminism and general pro feminism.

  * •

Profile 2: anti feminism, male supremacy, incel (Males who may exhibit
misogynistic behavior and believe that they are unjustly treated by women and
society.).

  * •

Profile 3: no search or watch history.

  * •

Profile 4: medical lecture and trustworthy medical content.

  * •

Profile 5: conspiracy theories (flat earth, UFO…).

  * •

Profile 6: no search or watch history.

In each profile, except for Profile 3 and 6, before we start any collection of
data, a bot connects to the appropriate account and executes specific search
queries on Google and YouTube, as well as watching videos and visiting
websites according to the ideology (theme) of the profile. We ensure that the
bot watches 3 minutes of selected videos and stays on each website for at
least 5 seconds. According to [42], for YouTube to start offering more
customized suggestions, a user must view a minimum of 22 videos. Therefore,
the number of videos seen by each profile (to have even more targeted
recommendations) ranges between 70 and 130.

Although Profiles 3 and 6 are freshly created and will have no history when we
begin collecting suggested abortion videos, they are still distinct from using
the API or a private browser. This is because they will remain connected to
YouTube while watching abortion-related content, allowing YouTube to provide
us with a higher degree of personalization. Additionally, it is important to
note that they do not serve the same purpose, since the first three profiles
are used to examine viewpoints in YouTube recommendations, whereas the final
three profiles are used to assess the spread of misinformation.

####  3.1.3 Search queries

Each sequence of collected video starts with a search query. For the first
three profiles, where our goal is to see the prevalence of pro-, neutral-, and
anti-abortion videos in YouTube recommendations, we must be aware of not
including any search query bias. For that purpose, we chose to have these
profiles solely search for the term “abortion”, because this is the most
neutral word that we can use to look for videos that address the topic.
However, for the last three profiles, we want to start our watch session from
the results of biased search queries, since YouTube claims to have eliminated
abortion misinformation from the platform (as discussed in 1.2). For that
purpose, we run search queries on the following sentences: “abortion affects
fertility”, “abortion causes emotional and mental harm”, “abortion causes
cancer”, “abortion herbs are safer”, “post-abortion syndrome”, “died from
abortion”, “abortion is dangerous”, “abortion destroys”, “how to abort fetus”,
“illegal abortion”, “abortion pills”, “abortion is not safe”, “self abortion”,
“home abortion”, “abortion causes”, “does mugwort induce abortion”, “abortion
reversal pills”.

Following the execution of the selected search queries, each profile scrolls
the result page enough times to compile a list of videos that will serve as
seed videos. Each profile then start its watching session from its seed
videos, prompting YouTube to recommend videos. Since we are only interested in
bias induced by the RS, we do not watch the seed videos in the order they
appear on the search result page, to avoid any ranking bias from the search
engine.

####  3.1.4 Video selection

We want to simulate individuals who are exclusively interested in abortion
videos. A word frequency study revealed that the word “abortion” predominates
in the titles (Over 80% of videos that appear in the search results, after
executing the search queries presented in Section 3.1.3, include the word
“abortion” in their titles.), and even when other common words like “ban” and
“rights” are included in the title, the word “abortion” is also used in that
title. For this reason, we only consider videos whose titles mention the word
“abortion”.

Using the same profile, each video is watched for an average of 10 seconds,
and never watched twice to avoid having a different list of recommendations
for the same video. Meanwhile, we collect video information like the number of
views, duration, and so on. Most importantly, we scroll the page enough times
to collect (in the order they appear in the list) recommended videos that
include “’abortion” in the title. These videos are watched in the next
iteration, and the procedure is repeated.

###  3.2 Data annotation and analysis

In similar empirical studies, the annotation of collected data represents a
crucial part. But given the amount of data, it requires a lot of time and
labor. Some studies employ machine learning (ML) [52, 42], although such
approaches necessitate human labeling of a portion of the data to be used as a
training set, since there is hardly any dataset resembling the collected data.
Moreover, approaches relying on ML may be inaccurate without a sufficiently
large initial training set. As a result, we propose a method that only
requires manual labeling, but meaningfully extracts most relevant items to be
labelled.

First, we generate a recommendation graph where nodes represent videos, and a
directed edge from a node A to a node B is added if video B appears in the
recommendation list of video A. The weight of the edge from node A to node B
reflects the rank of video B in A’s list, and what we assume is the
probability of watching video B next. Thus, we want the sum of a node’s
outgoing edges to equal one. Additionally, we do not want to have a big
difference between the outgoing edges weights of a node, because we assume
that a user will still be interested in a video that appears at the bottom of
the list. In our case, when watching a video, an average of 8 videos with the
word “abortion” in the title get recommended. Thus, we chose to assign weights
according to a geometric series: $\frac{1-r}{1-r^{n}}\times r^{j}$, such that
$r=0.9$, $j$ is the rank of the video in the recommendation list, and $n$ is
the length of the list. As a result, the weights for the videos at the bottom
of the list will not be negligible.

Then, we remove videos that were not recommended (i.e., seed videos that did
not appear in any watched video suggestion list) and then calculate multiple
measures for every node (in-degree, eccentricity…). We use six of them to rank
nodes according to their importance in the graph:

  * •

_In-degree_ , which qualifies how many times a video was recommended.

  * •

_Weighted in-degree_ , to take into account the rank of the video in others
recommendation lists, because appearing few times at the top of the lists may
be better than appearing many times at the bottom of the list.

  * •

_Eigen centrality_ , which is related to the frequency with which a node is
visited during a random walk.

  * •

_PageRank_ , which uses the in-degree as the main measure, without letting
nodes with no outgoing edges absorb all the scores of nodes connected to them.

  * •

_Katz centrality_ , to enable popular videos to propagate their full weight to
successors.

  * •

_Authority_ (Hyperlink Induced Topic Search [29]), which gives a node a high
score if it is linked by a node that links to many relevant vertices.

Since we want all measures to have the same weight in determining the
significance of the videos, we normalize each measure and sum them to have a
new score for each node. Furthermore, the measures are correlated in our
graphs, and thus, averaging them makes sense: if they were not, the top videos
(according to the averaged score) may not be considered important by any
measure.

We rank videos according to the newly calculated score, and choose the top one
percent from each of the six graphs to be labeled manually. We consider that
this is more efficient than labeling all videos, not only because it is way
quicker, but also because any genuine user who follows the recommendations
will not watch thousands of videos, but only a very tiny subset, and their
recommendation feed will probably include many of the most influential nodes.
In other words, quantifying the bias of the RS using all suggested videos may
not be the best solution, because recommending a biased item multiple times
(in particular, in the recommendation list of popular items) may be way more
dangerous than having many rarely recommended biased items.

Selected videos from the first three profiles were categorized as “pro-
abortion”, “neutral”, or “anti-abortion”. For the last three profiles, we
classified them into: “debunk” “misinformation”, “neutral”, or
“misinformation”.

###  3.3 Labeling methodology

The labeling of abortion-related videos is carried out by first analyzing the
text of the video’s title, description, and popular well-rated comments to get
an initial impression of the video’s stance on the abortion topic. Determining
these stances involves different methods, such as analyzing the titles,
descriptions, and tags of their videos, reviewing the content of their videos
for expressed opinions on abortion, examining comments and engagement
feedback, researching their online presence and reputation, and checking for
affiliations or endorsements with organizations holding known stances on
abortion. Combining these approaches allows us to gain insights into the pro
or anti-abortion tendencies of the responsible party behind the YouTube
channel. In this way, each video is carefully watched and investigated, to
determine whether it presents a clear pro-abortion or anti-abortion stance. If
the video information strongly advocate for one side or the other, it is
labeled accordingly. Alternatively, if no argument has been made for or
against abortion, the video can be classified as neutral.

In case of confusing content (difficult-to-classify videos), we further
consider the source that produced the video’s content to gain further insights
into the potential biases and perspectives presented in the video. In this
case, we mainly investigate the person or entity (i.e., the YouTube channel)
that uploaded the video, to see if they are known for promoting a particular
type of pro or anti-abortion stance. We also analyze their content history,
which may suggest a particular ideological leaning to abortion-related topics.
Additionally, we also considered the time spent discussing each viewpoint, to
strengthen our belief about the right classification of the video.

##  4 Results & Discussion

(a) Profile 1

(b) Profile 2

(c) Profile 3

(d) Profile 4

(e) Profile 5

(f) Profile 6

Figure 2: Recommendations graphs for the six profiles. The node’s size and
color are correlated with the length and number of views of the video,
respectively.

###  4.1 Classification of YouTube’s recommendations

A circle-pack layout was used to visualize the networks (Figure 2). This
arrangement enables nodes (i.e., videos) to be grouped hierarchically by
attributes and plotted in circles, wherein nodes have close attribute values.
In our case, nodes were grouped first by their “in” degree, and then by their
“weighted in” degree. The view count and the length of the video had no
correlation with the six measures we used. A visual inspection of the graphs
confirms this, since each circle has nodes of various sizes and colors. Table
1 reports some basic statistics about the networks. Except for the third
profile, all graphs are comparable w.r.t. these statistics.

Recommendation graph | Nodes | Edges | Avg. degree | Avg. path length | Diameter
---|---|---|---|---|---
Profile 1 | 6837 | 53187 | 7.78 | 5.95 | 19
Profile 2 | 6974 | 55432 | 7.95 | 5.95 | 18
Profile 3 | 3241 | 14314 | 4.42 | 6.99 | 26
Profile 4 | 5761 | 43171 | 7.49 | 6.34 | 18
Profile 5 | 6734 | 47650 | 7.08 | 6.40 | 22
Profile 6 | 7486 | 54474 | 7.28 | 6.38 | 20
Table 1: Statistics of the recommendation graphs of the six profiles.

Figure 3: Classification of the most influential videos in each graph.

After annotating the most influential videos in each network, we report in
Figure 3 the percentage of each class. We found that the videos that endorse
abortion are predominant in the 1% of the videos most promoted by YouTube
recommendations as identified by our ranking and selection procedure.

Compared to Profile 2, that was more exposed to anti-feminist content, Profile
1 was suggested a slightly greater proportion of pro-abortion videos, and a
smaller proportion of anti-abortion videos. Profile 3, that has no viewing
history, appears to rarely get anti-abortion suggestions.

In terms of dissemination of misinformation, YouTube seems to be successful in
stopping the spread of false content, since all three profiles hardly ever
receive suggestions for misleading content. Although the predominant
recommendations are neutral, a huge chunk of the most influential videos are
those that debunk misinformation. However, compared to the other two profiles,
Profile 4 appears to receive the fewest recommendations for videos that dispel
misconceptions.

###  4.2 Evaluation of the bias of YouTube’s recommendation system

We want to know how the top videos are ranked, and to have a single
measurement of how biased each profile’s recommendations are. For this
purpose, we assign each labeled video a bias score $s$, which is $-1$ if it is
“pro-abortion” or “debunks misinformation”, $0$ if it is neutral, and $+1$ if
it is “anti-abortion” or “deceptive”. We then calculate the total bias for
each profile, using the formula:
$\sum_{j=0}^{n-1}\frac{2\times(n-j)}{n(n+1)}\times s_{j}$, where $n$ is the
number of top 1% videos, and $s_{j}$ is the bias score given to the video of
rank $j+1$. The closer the measure is to $1$, the greater the influence of
anti-abortion/deceptive videos in the profile; conversely, the closer it is to
$-1$, the more “pro-abortion”/“debunks misinformation” videos are in the top.

Profile | Total bias
---|---
Profile 1 | -0.35
Profile 2 | -0.42
Profile 3 | -0.63
Profile 4 | -0.22
Profile 5 | -0.32
Profile 6 | -0.29
Table 2: Measure of existing bias in each profile.

The calculated measure, Table 2, confirms that YouTube is more likely to
recommend pro-abortion videos and those that debunk misinformation, since it
yields a negative score for all profiles. However, when considering how videos
are ranked, Profile 2 seems to tilt more towards pro-abortion videos than
Profile 1. Indeed, while Profile 1 was offered more pro-abortion videos and
fewer anti-abortion videos than Profile 2, the anti-abortion videos were more
influential in its network.

To further compare the profiles (and not only the most important videos), we
calculate the overlap coefficient (OC), which is the percentage of videos that
are shared by the profiles (Table 3). However, the OC does not take into
account how these common videos are ranked in the two profiles. As a result,
we compute the Rank-biased Overlap [63] (RBO) as well (Table 3). RBO analyzes
two ranked lists, and produces a numeric value between 0 and 1 to indicate how
similar they are. RBO is tuned for top-weightedness (i.e., similarities at the
top of the two lists have a greater weight), which is adjusted by a parameter
$p$ that controls the steepness of the weight decline. The smaller $p$, the
more top-weighted the measure is. We used $p=0.97$ to limit the measure to
only the first 1000 rankings when comparing profiles, and to give 95% of the
evaluation weight to the top 1% of videos.

| OC | RBO
---|---|---
Profiles 1 & 2 | 0.78 | 0.47
Profiles 1 & 3 | 0.83 | 0.23
Profiles 2 & 3 | 0.84 | 0.40
Profiles 4 & 5 | 0.77 | 0.44
Profiles 4 & 6 | 0.81 | 0.50
Profiles 5 & 6 | 0.80 | 0.64
Table 3: Overlap between profiles.

Profiles that started with contrasted watch histories (Profiles 1 and 2 /
Profiles 4 and 5) had slightly fewer common videos when compared with those
that started with no watch history. However, we can say that all profiles had
a lot of similar recommendations. When considering the influence of the
overlapping videos in their networks, the RBO measure shows that, despite the
considerable overlap, videos are not recommended in the same way, particularly
in the top rankings.

We found no substantial differences across profiles in the proportion of each
class for labeled videos, except for the lack of anti-abortion recommendations
for Profile 3. This might be because the RS treats all profiles similarly when
proposing abortion videos, or because the quantity of videos seen to establish
the profile history was insignificant in comparison to the number of watched
videos that discuss abortion. In other words, even if the watch history may
have had a bigger effect on the first recommended videos, this effect may have
diminished as the experiment went on. That is why, while studying the effects
of browsing/watch history on the RS, we recommend to periodically revisit a
collection of chosen items, to ensure that the effect of browsing/watch
history persists even in the latter stages of the experiment.

##  5 Discussion

###  5.1 Review of findings and contributions

In this work, we focused on examining YouTube recommendations with the aim of
auditing the spread of misinformation and biased content pertaining to
abortion, a complex and multifaceted topic encompassing both social and health
dimensions. We acquired 11174 unique videos which appeared over 38k times in
the recommendations given by YouTube to six simulated individuals from various
backgrounds looking for abortion content on the platform. We built a graph of
recommendations for each profile, and through the use of graph theory, we
annotated the most important videos in the network based on averaging
different centrality metrics. Our choice of centrality metrics (In-degree,
Weighted in-degree, Eigen centrality, PageRank, Katz centrality, Authority)
demonstrates a thoughtful consideration of different dimensions of influence,
such as connectivity, authority, and popularity. The average of these metrics
allows to (1) identify videos that have consistently high influence across
various criteria, enhancing the reliability of our ranking, and (2) mitigate
potential biases that might arise from relying on a single measure, and
provide a more comprehensive view of the videos’ importance within the
network.

The idea of using graph centrality measures to select the most important nodes
(videos) is a highly commendable approach to performing bias analysis, which
is often used to evaluate social influence in social networks [26, 10]. On the
one hand, by identifying these top-ranked videos, we are effectively
identifying content that significantly shapes the network’s dynamics and user
interactions. These influential videos are likely to hold substantial effect
over opinions and information dissemination, perhaps perpetuating or
challenging biases. On the other hand, this would emphasize a strategic and
optimized use of resources and efforts. Thus, our approach circumvents the
labeling bottleneck, which is usually challenging and time-consuming,
especially for large video datasets. This optimization results in a notably
faster auditing process, enhancing the overall efficiency. We underline the
importance of training the sock puppets, including the initial training to
tailor the selected themes and ideologies, because trained sock puppets offer
a balance between fake and real users for audit purposes [24, 55]. More
precisely, they trigger the same feedback loops as real users to allow for
better personalization, while isolating the impact of YouTube’s
recommendations on bias and radicalization. This is difficult to do if we only
use real user interaction histories.

We anticipated considerable variations in the recommendations that users with
contrasted watching histories would receive, and yet, YouTube appears to
provide similar recommendations to all users when they search for and watch
abortion-related videos. We can thus claim that (1) pro-abortion content seems
to be more prominent than anti-abortion content in YouTube’s recommendations,
and (2) YouTube has been successful in halting the dissemination of false
information, at least when it comes to recommendations. In this context, our
research findings pertaining to the dissemination of abortion-related
misinformation on YouTube align with the platform’s announcement in July 2022
that it intends to undertake measures to eliminate such misinformation [68,
16]. Notably, our study was conducted subsequently to this announcement. It is
worth mentioning that, for a more robust validation of YouTube’s announcement,
a parallel study conducted prior to the aforementioned date could have
provided a basis for enhanced comparison and confirmation. Furthermore, our
analysis show that users with previous watching (and searching) histories of
medical and medicine-related content tend to encounter fewer videos dispelling
abortion misconceptions, while individuals who previously watched feminism-
related content appear to receive more anti-abortion videos. With all that
being said, our contribution stands as the first study to present these
auditing investigations and results regarding YouTube abortion-related
recommendations.

###  5.2 Limitations and future directions

The scope of the study was restricted to measuring bias in the recommendation
list using the topmost 1% of influential videos selected by our graph analysis
approach. While these findings provide valuable insights, particularly in the
context of our abortion-focused study, it is important to note that the
applicability of these results’ production details may not be universally
applicable to other contentious topics in an identical manner. The feasibility
and effectiveness of employing similar methodologies for different topics will
inevitably depend on various factors, including the topic’s sensitivity, its
impact on individuals and societies, and the nature, volume, and prevalence of
its related content across the internet. These factors will definitely
influence the ranking of videos (or information sources in general) based on
the centrality measurements, which will give further insights on the
considerations and selection procedures of the most influential videos. Thus,
we do not consider this variability as a critical limitation of our study,
because it basically serves as a parameter that needs to be tailored to each
specific use case when implementing such auditing methodologies. However, we
agree that using 1% of the videos for analysis could potentially limit the
scope and generalizability of the findings. In this context, it would be
interesting for future works to employ some machine learning techniques to
extrapolate from partially labeled data, which can help to address this
limitation by expanding the dataset. Thus, comparing the outcomes of analyses
performed on both partially labeled data and ML-extrapolated data could
provide useful insights regarding the impact of data size and the performance
of the extrapolation process, which could enhance the comprehensiveness and
reliability of the conclusions of our study.

In addition, the data labeling process was conducted by an individual
committed to maintaining strict neutrality, objectivity, and accuracy with
repetitive revision. Despite these efforts, the potential for some bias and
errors cannot be entirely ruled out. Even with the best intentions, individual
interpretations and subtle subjectivity can inadvertently seep into the
labeling process. Therefore, we agree that our study’s robustness could be
further enhanced by increasing the number of labeled videos and adopting a
more rigorous labeling approach (e.g., using a collaborative labeling method
or implementing comprehensive quality control checks). These improvements
would lead to more precise measurements and statistically strong results.

Our methodology can be used by any third-party auditor, regardless of platform
or topic, and it can be swiftly adopted to audit any RS, without any
understanding of the underlying algorithm. However, to investigate the
formation of filter bubbles [44] in recommendations (or any type of
radicalization that may happen over time), the annotation of the entire
collected data may be required, since we cannot examine such dynamic
properties with only a few labeled items. An interesting extension to this
work might also include measuring bias in the homepage feed and the search
engine.

##  6 Conclusion

This study sheds light on an important problem concerning the algorithmic
personalization behind YouTube’s recommendations for abortion-related videos,
and the impact of inherent recommendation biases on the dissemination of
misinformation and biased content. The importance of this research is
heightened by the increased reliance on internet information, which is driven
by its accessibility and cost-effectiveness. This tendency is especially
noticeable in countries with low and middle incomes, where social media are
increasingly used for health-related purposes [21]. As a result, the spread of
health misinformation on platforms such as YouTube has the potential to lead
to harmful abortion-related health decisions that can have serious
consequences for people’s lives.

The study’s findings show that YouTube’s recommendations tend to prioritize
pro-abortion content over anti-abortion content, and the platform has
generally demonstrated efficacy in reducing misinformation spread within its
recommendations. However, some findings of this study raise intriguing
possibilities regarding the potential emergence of polarization and filter
bubble phenomena. Indeed, the observation that users who engage with medical
content are exposed to fewer videos dispelling abortion misconceptions, while
those interested in feminism-related content receive more anti-abortion
videos, could inadvertently contribute to these concerns. Such behavior may
reinforce pre-existing beliefs, contributing to polarization and inhibiting
constructive discourse. Additionally, the identified content distribution
patterns could imply the presence of filter bubbles, which limit users’
exposure to a diverse range of perspectives. Recommendation systems have to
judiciously personalize their recommendations according to user preferences
while respecting diversity and fairness criteria. These safety measurements in
the recommendations are crucial for preventing the emergence of polarization
and filter bubble effects [40, 17].

In conclusion, by conducting this analysis, we sought to provide insights on
the potential impact of algorithmic recommendations in shaping public
perceptions and understanding of abortion-related content on social media
platforms, which heavily rely on recommendation algorithms. Our research aimed
to identify and address any inaccuracies or biases that could contribute to
the spread of misinformation, with the goal of promoting a more reliable and
trustworthy information environment regarding abortion and its related
healthcare implications.

### Statements and Declarations

##### Competing interests

The authors declare that they have no known competing financial interests or
personal relationships that could have appeared to influence the work reported
in this paper.

##### Funding

The authors did not receive support from any organization for the submitted
work.

##### Ethical approval

This research involving the collection and analysis of data obtained from the
YouTube API was conducted in compliance with all relevant ethical guidelines
and regulations of YouTube API Services Policies
https://developers.google.com/youtube/terms/developer-policies.

## References

  * [1] Find videos faster - youtube help.  (last accessed December 19, 2022).  URL: https://support.google.com/youtube/answer/9872296.
  * [2] Youtube community guidelines & policies - how youtube works.  (last accessed December 19, 2022).  URL: https://www.youtube.com/howyoutubeworks/policies/community-guidelines/#community-guidelines.
  * [3] Deena Abul-Fottouh, Melodie Yunju Song, and Anatoliy Gruzd.  Examining algorithmic biases in youtube’s recommendations of vaccine videos.  International Journal of Medical Informatics, 140:104175, 2020.  URL: https://www.sciencedirect.com/science/article/pii/S1386505619308743, doi:10.1016/j.ijmedinf.2020.104175.
  * [4] Deena Abul-Fottouh, Melodie Yunju Song, and Anatoliy Gruzd.  Examining algorithmic biases in youtube’s recommendations of vaccine videos.  International Journal of Medical Informatics, 140:104175, 2020.
  * [5] Salman Aslam.  youtube by the numbers (2022): Stats, demographic & fun facts, Aug 2022.  (last accessed 19 December, 2022).  URL: https://www.omnicoreagency.com/youtube-statistics/.
  * [6] Ricardo Baeza-Yates.  Bias on the web.  Commun. ACM, 61(6):54–61, may 2018.  doi:10.1145/3209581.
  * [7] Eytan Bakshy, Solomon Messing, and Lada A. Adamic.  Exposure to ideologically diverse news and opinion on facebook.  Science, 348(6239):1130–1132, 2015.  URL: https://www.science.org/doi/abs/10.1126/science.aaa1160, arXiv:https://www.science.org/doi/pdf/10.1126/science.aaa1160, doi:10.1126/science.aaa1160.
  * [8] Jack Bandy.  Problematic machine behavior: A systematic literature review of algorithm audits.  Proc. ACM Hum.-Comput. Interact., 5(CSCW1), apr 2021.  doi:10.1145/3449148.
  * [9] Nathan Bartley, Andres Abeliuk, Emilio Ferrara, and Kristina Lerman.  Auditing algorithmic bias on twitter.  In Proceedings of the 13th ACM Web Science Conference 2021, pages 65–73, 2021.
  * [10] Ayan Kumar Bhowmick, Martin Gueuning, Jean-Charles Delvenne, Renaud Lambiotte, and Bivas Mitra.  Temporal sequence of retweets help to detect influential nodes in social networks.  IEEE Transactions on Computational Social Systems, 6(3):441–455, 2019.  doi:10.1109/TCSS.2019.2907553.
  * [11] Juan Miguel Carrascosa, Jakub Mikians, Ruben Cuevas, Vijay Erramilli, and Nikolaos Laoutaris.  I always feel like somebody’s watching me: Measuring online behavioural advertising.  In Proceedings of the 11th ACM Conference on Emerging Networking Experiments and Technologies, CoNEXT ’15, New York, NY, USA, 2015. Association for Computing Machinery.  doi:10.1145/2716281.2836098.
  * [12] Shi-Yong Chen, Yang Yu, Qing Da, Jun Tan, Hai-Kuan Huang, and Hai-Hong Tang.  Stabilizing reinforcement learning in dynamic environment with application to online recommendation.  In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, KDD ’18, page 1187–1196, New York, NY, USA, 2018. Association for Computing Machinery.  doi:10.1145/3219819.3220122.
  * [13] Wen-Ying Sylvia Chou, April Oh, and William MP Klein.  Addressing health-related misinformation on social media.  Jama, 320(23):2417–2418, 2018.
  * [14] Sasha Costanza-Chock, Inioluwa Deborah Raji, and Joy Buolamwini.  Who audits the auditors? recommendations from a field scan of the algorithmic auditing ecosystem.  In 2022 ACM Conference on Fairness, Accountability, and Transparency, FAccT ’22, page 1571–1583, New York, NY, USA, 2022. Association for Computing Machinery.  doi:10.1145/3531146.3533213.
  * [15] Paul Covington, Jay Adams, and Emre Sargin.  Deep neural networks for youtube recommendations.  In Proceedings of the 10th ACM Conference on Recommender Systems, RecSys ’16, page 191–198, New York, NY, USA, 2016. Association for Computing Machinery.  doi:10.1145/2959100.2959190.
  * [16] Clare Duffy.  Youtube will start removing misinformation related to abortion, Jul 2022.  (last accessed December 19, 2022).  URL: https://edition.cnn.com/2022/07/21/tech/youtube-abortion-misinformation-policy/index.html.
  * [17] Zakaria El-Moutaouakkil, Mohamed Lechiakh, and Alexandre Maurer.  Polarization in personalized recommendations: Balancing safety and accuracy.  In Ngoc Thanh Nguyen, Tien Khoa Tran, Ualsher Tukayev, Tzung-Pei Hong, Bogdan Trawiński, and Edward Szczerbicki, editors, Intelligent Information and Database Systems, pages 661–674, Cham, 2022. Springer International Publishing.
  * [18] Flavio Figueiredo, Felipe Giori, Guilherme Soares, Mariana Arantes, Jussara M. Almeida, and Fabricio Benevenuto.  Understanding targeted video-ads in children’s content.  In Proceedings of the 31st ACM Conference on Hypertext and Social Media, HT ’20, page 151–160, New York, NY, USA, 2020. Association for Computing Machinery.  doi:10.1145/3372923.3404787.
  * [19] Jen Fitzpatrick.  Protecting people’s privacy on health topics, Jul 2022.  (last accessed December 19, 2022).  URL: https://blog.google/technology/safety-security/protecting-peoples-privacy-on-health-topics/.
  * [20] Yingqiang Ge, Shuchang Liu, Ruoyuan Gao, Yikun Xian, Yunqi Li, Xiangyu Zhao, Changhua Pei, Fei Sun, Junfeng Ge, Wenwu Ou, and Yongfeng Zhang.  Towards long-term fairness in recommendation.  In Proceedings of the 14th ACM International Conference on Web Search and Data Mining, WSDM ’21, page 445–453, New York, NY, USA, 2021. Association for Computing Machinery.  doi:10.1145/3437963.3441824.
  * [21] Emily Hagg, V. Susan Dahinten, and Leanne M. Currie.  The emerging use of social media for health-related purposes in low and middle-income countries: A scoping review.  International Journal of Medical Informatics, 115:92–105, 2018.  URL: https://www.sciencedirect.com/science/article/pii/S1386505618304568, doi:10.1016/j.ijmedinf.2018.04.010.
  * [22] Lê Nguyên Hoang, Louis Faucon, and El-Mahdi El-Mhamdi.  Recommendation algorithms, a neglected opportunity for public health revue médecine et philosophie.  2021\.
  * [23] Homa Hosseinmardi, Amir Ghasemian, Aaron Clauset, Markus Mobius, David M Rothschild, and Duncan J Watts.  Examining the consumption of radical content on youtube.  Proceedings of the National Academy of Sciences, 118(32):e2101967118, 2021.
  * [24] Eslam Hussein, Prerna Juneja, and Tanushree Mitra.  Measuring misinformation in video search platforms: An audit study on youtube.  Proc. ACM Hum.-Comput. Interact., 4(CSCW1), may 2020.  doi:10.1145/3392854.
  * [25] Eslam Hussein, Prerna Juneja, and Tanushree Mitra.  Measuring misinformation in video search platforms: An audit study on youtube.  Proceedings of the ACM on Human-Computer Interaction, 4(CSCW1):1–27, 2020.
  * [26] Umar Ishfaq, Hikmat Ullah Khan, and Saqib Iqbal.  Identifying the influential nodes in complex social networks using centrality-based approach.  Journal of King Saud University - Computer and Information Sciences, 34(10, Part B):9376–9392, 2022.  URL: https://www.sciencedirect.com/science/article/pii/S1319157822003457, doi:10.1016/j.jksuci.2022.09.016.
  * [27] Baris Kirdemir and Nitin Agarwal.  Exploring bias and information bubbles in youtube’s video recommendation networks.  In Rosa Maria Benito, Chantal Cherifi, Hocine Cherifi, Esteban Moro, Luis M. Rocha, and Marta Sales-Pardo, editors, Complex Networks & Their Applications X, pages 166–177, Cham, 2022. Springer International Publishing.
  * [28] Baris Kirdemir, Joseph Kready, Esther Mead, Muhammad Nihal Hussain, and Nitin Agarwal.  Examining video recommendation bias on youtube.  In Ludovico Boratto, Stefano Faralli, Mirko Marras, and Giovanni Stilo, editors, Advances in Bias and Fairness in Information Retrieval, pages 106–116, Cham, 2021. Springer International Publishing.
  * [29] Jon M. Kleinberg.  Authoritative sources in a hyperlinked environment.  J. ACM, 46(5):604–632, sep 1999.  doi:10.1145/324133.324140.
  * [30] Huyen Le, Raven Maragh, Brian Ekdale, Andrew High, Timothy Havens, and Zubair Shafiq.  Measuring political personalization of google news search.  In The World Wide Web Conference, WWW ’19, page 2957–2963, New York, NY, USA, 2019. Association for Computing Machinery.  doi:10.1145/3308558.3313682.
  * [31] Mark Ledwich and Anna Zaitsev.  Algorithmic extremism: Examining youtube’s rabbit hole of radicalization, 2019.  arXiv:1912.11211.
  * [32] Mark Ledwich and Anna Zaitsev.  Algorithmic extremism: Examining youtube’s rabbit hole of radicalization.  First Monday, 25(3), Feb. 2020.  URL: https://firstmonday.org/ojs/index.php/fm/article/view/10419, doi:10.5210/fm.v25i3.10419.
  * [33] Heidi Oi-Yee Li, Elena Pastukhova, Olivier Brandts-Longtin, Marcus G Tan, and Mark G Kirchhof.  Youtube as a source of misinformation on covid-19 vaccination: a systematic analysis.  BMJ Global Health, 7(3), 2022.  URL: https://gh.bmj.com/content/7/3/e008334, arXiv:https://gh.bmj.com/content/7/3/e008334.full.pdf, doi:10.1136/bmjgh-2021-008334.
  * [34] Lisa L. Littman, Adam Jacobs, Rennie Negron, Tara Shochet, Marji Gold, and Miriam Cremer.  Beliefs about abortion risks in women returning to the clinic after their abortions: a pilot study.  Contraception, 90(1):19–22, 2014.  URL: https://www.sciencedirect.com/science/article/pii/S0010782414001152, doi:10.1016/j.contraception.2014.03.005.
  * [35] Dugang Liu, Pengxiang Cheng, Zhenhua Dong, Xiuqiang He, Weike Pan, and Zhong Ming.  A general knowledge distillation framework for counterfactual recommendation via uniform data.  In Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR ’20, page 831–840, New York, NY, USA, 2020. Association for Computing Machinery.  doi:10.1145/3397271.3401083.
  * [36] Kapil Chalil Madathil, A Joy Rivera-Rodriguez, Joel S Greenstein, and Anand K Gramopadhye.  Healthcare information on youtube: A systematic review.  Health Informatics Journal, 21(3):173–194, 2015.  PMID: 24670899.  arXiv:https://doi.org/10.1177/1460458213512220, doi:10.1177/1460458213512220.
  * [37] Sadiq Muhammed T and Saji K Mathew.  The disaster of misinformation: a review of research in social media.  International journal of data science and analytics, 13(4):271–285, 2022.
  * [38] Preetam Nandy, Cyrus DiCiccio, Divya Venugopalan, Heloise Logan, Kinjal Basu, and Noureddine El Karoui.  Achieving fairness via post-processing in web-scale recommender systems$\star$.  In Proceedings of the 2022 ACM Conference on Fairness, Accountability, and Transparency, FAccT ’22, page 715–725, New York, NY, USA, 2022. Association for Computing Machinery.  doi:10.1145/3531146.3533136.
  * [39] Nic Newman, Richard Fletcher, Craig T Robertson, Kirsten Eddy, and Rasmus Kleis Nielsen.  Reuters institute digital news report 2022.  (last accessed December 19, 2022).  URL: https://reutersinstitute.politics.ox.ac.uk/sites/default/files/2022-06/Digital_News-Report_2022.pdf.
  * [40] Tien T. Nguyen, Pik-Mai Hui, F. Maxwell Harper, Loren Terveen, and Joseph A. Konstan.  Exploring the filter bubble: The effect of using recommender systems on content diversity.  In Proceedings of the 23rd International Conference on World Wide Web, WWW ’14, page 677–686, New York, NY, USA, 2014. Association for Computing Machinery.  doi:10.1145/2566486.2568012.
  * [41] Kostantinos Papadamou, Savvas Zannettou, Jeremy Blackburn, Emiliano De Cristofaro, Gianluca Stringhini, and Michael Sirivianos.  ”it is just a flu”: Assessing the effect of watch history on youtube’s pseudoscientific video recommendations.  In International Conference on Web and Social Media, 2020.
  * [42] Kostantinos Papadamou, Savvas Zannettou, Jeremy Blackburn, Emiliano De Cristofaro, Gianluca Stringhini, and Michael Sirivianos.  “it is just a flu”: Assessing the effect of watch history on youtube’s pseudoscientific video recommendations.  Proceedings of the International AAAI Conference on Web and Social Media, 16(1):723–734, May 2022.  URL: https://ojs.aaai.org/index.php/ICWSM/article/view/19329.
  * [43] Kostantinos Papadamou, Savvas Zannettou, Jeremy Blackburn, Emiliano De Cristofaro, Gianluca Stringhini, and Michael Sirivianos.  ”how over is it?” understanding the incel community on youtube.  Proc. ACM Hum.-Comput. Interact., 5(CSCW2), oct 2021.  doi:10.1145/3479556.
  * [44] E. Pariser.  The Filter Bubble: How the New Personalized Web Is Changing What We Read and How We Think.  Penguin Publishing Group, 2011.  URL: https://books.google.co.ma/books?id=wcalrOI1YbQC.
  * [45] Alison J Patev and Kristina B Hood.  Towards a better understanding of abortion misinformation in the usa: a review of the literature.  Culture, Health & Sexuality, 23(3):285–300, 2021.
  * [46] Geoff Pleiss, Manish Raghavan, Felix Wu, Jon Kleinberg, and Kilian Q. Weinberger.  On fairness and calibration.  In Proceedings of the 31st International Conference on Neural Information Processing Systems, NIPS’17, page 5684–5693, Red Hook, NY, USA, 2017. Curran Associates Inc.
  * [47] Bashir Rastegarpanah, Krishna P. Gummadi, and Mark Crovella.  Fighting fire with fire: Using antidote data to improve polarization and fairness of recommender systems.  In Proceedings of the Twelfth ACM International Conference on Web Search and Data Mining, WSDM ’19, page 231–239, New York, NY, USA, 2019. Association for Computing Machinery.  doi:10.1145/3289600.3291002.
  * [48] Manoel Horta Ribeiro, Raphael Ottoni, Robert West, Virgílio A. F. Almeida, and Wagner Meira.  Auditing radicalization pathways on youtube.  In Proceedings of the 2020 Conference on Fairness, Accountability, and Transparency, FAT’20, page 131–141, New York, NY, USA, 2020. Association for Computing Machinery.  doi:10.1145/3351095.3372879.
  * [49] Bernhard Rieder, Ariadna Matamoros-Fernández, and Òscar Coromina.  From ranking algorithms to ‘ranking cultures’: Investigating the modulation of visibility in youtube search results.  Convergence, 24(1):50–68, 2018.  arXiv:https://doi.org/10.1177/1354856517736982, doi:10.1177/1354856517736982.
  * [50] Ashley Rodriguez.  Youtube’s recommendations drive 70% of what we watch.  URL: https://qz.com/1178125/youtubes-recommendations-drive-70-of-what-we-watch.
  * [51] Kevin Roose.  The making of a youtube radical.  URL: https://www.nytimes.com/interactive/2019/06/08/technology/youtube-radical.html.
  * [52] Daniel Röchert, Gautam Kishore Shahi, German Neubaum, Björn Ross, and Stefan Stieglitz.  The networked context of covid-19 misinformation: Informational homogeneity on youtube at the beginning of the pandemic.  Online Social Networks and Media, 26:100164, 2021.  URL: https://www.sciencedirect.com/science/article/pii/S246869642100046X, doi:10.1016/j.osnem.2021.100164.
  * [53] Christian Sandvig, Kevin Hamilton, Karrie Karahalios, and Cédric Langbort.  Auditing algorithms : Research methods for detecting discrimination on internet platforms.  2014\.
  * [54] Leonardo Sanna, Salvatore Romano, Giulia Corona, and Claudio Agosti.  Yttrex: Crowdsourced analysis of youtube’s recommender system during covid-19 pandemic.  In Juan Antonio Lossio-Ventura, Jorge Carlos Valverde-Rebaza, Eduardo Díaz, and Hugo Alatrista-Salas, editors, Information Management and Big Data, pages 107–121, Cham, 2021. Springer International Publishing.
  * [55] Leonardo Sanna, Salvatore Romano, Giulia Corona, and Claudio Agosti.  Yttrex: Crowdsourced analysis of youtube’s recommender system during covid-19 pandemic.  In Juan Antonio Lossio-Ventura, Jorge Carlos Valverde-Rebaza, Eduardo Díaz, and Hugo Alatrista-Salas, editors, Information Management and Big Data, pages 107–121, Cham, 2021. Springer International Publishing.
  * [56] Filipo Sharevski, Jennifer Vander Loop, Peter Jachim, Amy Devine, and Emma Pieroni.  Abortion misinformation on tiktok: Rampant content, lax moderation, and vivid user experiences.  arXiv preprint arXiv:2301.05128, 2023.
  * [57] Larissa Spinelli and Mark Crovella.  How youtube leads privacy-seeking users away from reliable information.  In Adjunct Publication of the 28th ACM Conference on User Modeling, Adaptation and Personalization, UMAP ’20 Adjunct, page 244–251, New York, NY, USA, 2020. Association for Computing Machinery.  doi:10.1145/3386392.3399566.
  * [58] Ivan Srba, Robert Moro, Matus Tomlein, Branislav Pecher, Jakub Simko, Elena Stefancova, Michal Kompan, Andrea Hrckova, Juraj Podrouzek, Adrian Gavornik, and Maria Bielikova.  Auditing youtube’s recommendation algorithm for misinformation filter bubbles.  ACM Trans. Recomm. Syst., 1(1), jan 2023.  doi:10.1145/3568392.
  * [59] Wen-Ying Sylvia Chou, Anna Gaysynsky, and Joseph N Cappella.  Where we go from here: health misinformation on social media, 2020.
  * [60] Youtube Team.  The four rs of responsibility, part 1: Removing harmful content, 2019.  URL: https://blog.youtube/inside-youtube/the-four-rs-of-responsibility-remove/.
  * [61] The New York Times.  Tracking the states where abortion is now banned, May 2022.  URL: https://www.nytimes.com/interactive/2022/us/abortion-laws-roe-v-wade.html.
  * [62] Matus Tomlein, Branislav Pecher, Jakub Simko, Ivan Srba, Robert Moro, Elena Stefancova, Michal Kompan, Andrea Hrckova, Juraj Podrouzek, and Maria Bielikova.  An audit of misinformation filter bubbles on youtube: Bubble bursting and recent behavior changes.  In Proceedings of the 15th ACM Conference on Recommender Systems, RecSys ’21, page 1–11, New York, NY, USA, 2021. Association for Computing Machinery.  doi:10.1145/3460231.3474241.
  * [63] William Webber, Alistair Moffat, and Justin Zobel.  A similarity measure for indefinite rankings.  ACM Transactions on Information Systems, 28(4):1–38, 2010.  doi:10.1145/1852102.1852106.
  * [64] Maxwell Weinzierl and Sanda Harabagiu.  Identifying the adoption or rejection of misinformation targeting covid-19 vaccines in twitter discourse.  In Proceedings of the ACM Web Conference 2022, WWW ’22, page 3196–3205, New York, NY, USA, 2022. Association for Computing Machinery.  doi:10.1145/3485447.3512039.
  * [65] Magdalena Wojcieszak, Stephan Winter, and Xudong Yu.  Social norms and selectivity: Effects of norms of open-mindedness on content selection and affective polarization.  Mass Communication and Society, 23(4):455–483, 2020.  arXiv:https://doi.org/10.1080/15205436.2020.1714663, doi:10.1080/15205436.2020.1714663.
  * [66] Jenny Wu, Melissa Greene, Megan Happ, Esmé Trahair, Melissa Montoya, and Jonas J Swartz.  Medication abortion on tiktok: misinformation or reliable resource?  American Journal of Obstetrics & Gynecology, 2023.
  * [67] Liang Wu, Fred Morstatter, Kathleen M. Carley, and Huan Liu.  Misinformation in social media: Definition, manipulation, and detection.  SIGKDD Explor. Newsl., 21(2):80–90, nov 2019.  doi:10.1145/3373464.3373475.
  * [68] YouTubeInsider.  Youtube will remove content that provides promotes false claims about abortion safety, Jul 2022.  (last accessed December 19, 2022).  URL: https://twitter.com/youtubeinsider/status/1550153517842587661.
  * [69] Jiangxing Yu, Hong Zhu, Chih-Yao Chang, Xinhua Feng, Bowen Yuan, Xiuqiang He, and Zhenhua Dong.  Influence function for unbiased recommendation.  In Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR ’20, page 1929–1932, New York, NY, USA, 2020. Association for Computing Machinery.  doi:10.1145/3397271.3401321.
  * [70] Xiangyu Zhao, Liang Zhang, Zhuoye Ding, Long Xia, Jiliang Tang, and Dawei Yin.  Recommendations with negative feedback via pairwise deep reinforcement learning.  In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, KDD ’18, page 1040–1048, New York, NY, USA, 2018. Association for Computing Machinery.  doi:10.1145/3219819.3219886.
  * [71] Franziska Zimmer, Katrin Scheibe, Mechtild Stock, and Wolfgang G Stock.  Fake news in social media: Bad algorithms or biased users?  Journal of Information Science Theory and Practice, 7(2):40–53, 2019.


00footnotetext: Support of the research by the Austrian Science Fund (FWF),
project I 4579-N, and the Czech Science Foundation (GAČR), project 20-09869L,
entitled “The many facets of orthomodularity”, as well as by ÖAD, project CZ
02/2019, entitled “Function algebras and ordered structures related to logic
and data fusion”, and, concerning the first author, by IGA, project PřF 2021
030, is gratefully acknowledged.

# Integration in semirings

Ivan Chajda and Helmut Länger

###### Abstract

The concept of integral as an inverse to that of derivation was already
introduced for rings and recently also for lattices. Since semirings
generalize both rings and bounded distributive lattices, it is natural to
investigate integration in semirings. This is our aim in the present paper. We
show properties of such integrals from the point of view of semiring
operations. Examples of semirings with derivation where integrals are
introduced are presented in the paper. These illuminate rather specific
properties of such integrals. We show when the set of all integrals on a given
semiring forms a semiring again.

AMS Subject Classification: 16Y60, 12K10

Keywords: Semiring, derivation, $d$-integral, integrable element, $d$-constant

The concept of derivation in rings is known for many decades, see e.g. [1] and
references therein. This concept was generalized for lattices by G. Szász
([9]), see also e.g. [5]. For semilattices it was generalized by J. S. Golan
and H. Simmons ([7]), see also the monograph [6] and the papers [3], [4] and
[8].

The concept of integration as an inverse to that of derivation was introduced
for rings by I. Banič ([1]). Recently it was extended also for lattices in
[10]. Because both rings and bounded distributive lattices are special cases
of semirings as defined in the monograph [6], it is natural to extend this
concept also to semirings what we will do here.

Although derivations on semirings were already introduced and treated in [3]
and [4] and applied for regular events in [2], for the reader’s convenience we
repeat all necessary definitions.

Recall that a (unitary) semiring is an algebra $\mathbf{S}=(S,+,\cdot,0,1)$ of
type $(2,2,0,0)$ such that

  1. (i)

$(S,+)$ is a commutative semigroup,

  2. (ii)

$(S,\cdot)$ is a semigroup,

  3. (iii)

$x\cdot(y+z)\approx x\cdot y+x\cdot z$ and $(y+z)\cdot x\approx y\cdot
x+z\cdot x$,

  4. (iv)

$x\cdot 0\approx 0\cdot x\approx 0$ and $x\cdot 1\approx 1\cdot x\approx x$.

If $\mathbf{S}$ satisfies the identity $x\cdot y\approx y\cdot x$ then it is
called commutative. We call an element $a$ of $S$ additively invertible or
invertible if it possesses an additive or multiplicative inverse,
respectively. Because of the associativity of $+$ and $\cdot$, such an inverse
is unique. We will denote it by $-a$ or $a^{-1}$, respectively. Sometimes we
consider elements that have only a one-sided inverse. A mapping
$d:S\rightarrow S$ is called a derivation on $\mathbf{S}$ if

  1. (i)

$d(x+y)\approx d(x)+d(y)$,

  2. (ii)

$d(x\cdot y)\approx d(x)\cdot y+x\cdot d(y)$.

The formula describing the derivation of a product of two elements can be
easily extended to a formula describing the derivation of a finite product of
elements.

######  Lemma 1.

Let $\mathbf{S}=(S,+,\cdot,0,1)$ be a semiring,
$d\in\operatorname{Der}\mathbf{S}$, $n$ a positive integer and
$a_{1},\ldots,a_{n},a\in S$. Then

$d(a_{1}\cdot\cdots\cdot a_{n})=d(a_{1})\cdot a_{2}\cdot\cdots\cdot
a_{n}+a_{1}\cdot d(a_{2})\cdot a_{3}\cdot\cdots\cdot
a_{n}+\cdots+a_{1}\cdot\cdots a_{n-1}\cdot d(a_{n})$

and hence $d(a^{n})=n\cdot a^{n-1}\cdot d(a)$ if $\mathbf{S}$ is commutative.

###### Proof.

We use induction on $n$. For $n=1$ the assertion is trivial. Now assume $n$ to
be a positive integer and the formula to hold for $n$ factors. If
$a_{1},\ldots,a_{n+1}\in S$ then

$\displaystyle d(a_{1}\cdot\cdots\cdot a_{n+1})$
$\displaystyle=d\big{(}(a_{1}\cdot\cdots\cdot a_{n})\cdot
a_{n+1}\big{)}=d(a_{1}\cdot\cdots\cdot a_{n})\cdot
a_{n+1}+a_{1}\cdot\cdots\cdot a_{n}\cdot d(a_{n+1})=$
$\displaystyle=\big{(}d(a_{1})\cdot a_{2}\cdot\cdots\cdot
a_{n}+\cdots+a_{1}\cdot\cdots\cdot a_{n-1}\cdot d(a_{n})\big{)}\cdot a_{n+1}+$
$\displaystyle\hskip 14.22636pt+a_{1}\cdot\cdots\cdot a_{n}\cdot d(a_{n+1})=$
$\displaystyle=d(a_{1})\cdot a_{2}\cdot\cdots\cdot
a_{n+1}+\cdots+a_{1}\cdot\cdots\cdot a_{n}\cdot d(a_{n+1}),$

i.e. the formula holds for $n+1$ factors. The last formula can be considered
as the special case $a_{1}=\cdots=a_{n}:=a$. ∎

Let $\operatorname{Der}\mathbf{S}$ denote the set of all derivations on
$\mathbf{S}$.

######  Definition 2.

Let $\mathbf{S}=(S,+,\cdot,0,1)$ be a semiring,
$d\in\operatorname{Der}\mathbf{S}$ and $a,b\in S$. Then $a$ is called a
$d$-integral of $b$ if $d(a)=b$. Let $I_{d}(b)$ denote the set of all
$d$-integrals of $b$. The element $b$ is called $d$-integrable if
$I_{d}(b)\neq\emptyset$. The $d$-integrals of $0$ we call $d$-constants. Let
$\operatorname{Const}_{d}(S)$ denote the set of all $d$-constants of $S$. The
element $b$ of $S$ is called $d$-integrable if $I_{d}(b)\neq\emptyset$. Let
$\operatorname{Int}_{d}(S)$ denote the set of all $d$-integrable elements of
$S$.

Hence $a\in S$ is a $d$-constant if and only if $d(a)=0$. Moreover, it is easy
to see that if $a$ is additively invertible then so is $d(a)$ and
$d(-a)=-d(a)$.

A nice non-trivial example of a semiring with derivation $d$ where the
$d$-integral has interesting properties is in the following one.

######  Example 3.

Let $\mathbf{R}=(R,+,\cdot,0,1)$ be a semiring and

$\mathbf{S}:=(S,+,\cdot,\left(\begin{array}[]{cc}0&0\\\
0&0\end{array}\right),\left(\begin{array}[]{cc}1&0\\\ 0&1\end{array}\right))$

with

$S:=\\{\left(\begin{array}[]{cc}x&y\\\ 0&x\end{array}\right)\mid x,y\in R\\}$

the semiring of $2\times 2$-matrices of this form. It is easy to check that
$S$ is closed with respect to addition and multiplication. Define

$d(\left(\begin{array}[]{cc}x&y\\\
0&x\end{array}\right)):=\left(\begin{array}[]{cc}0&y\\\
0&0\end{array}\right)\text{ for all }x,y\in R.$

Then (see e.g. [6]) $d\in\operatorname{Der}\mathbf{S}$. We have

$\displaystyle\operatorname{Int}_{d}(S)$
$\displaystyle=\\{\left(\begin{array}[]{cc}0&y\\\ 0&0\end{array}\right)\mid
y\in R\\},$ $\displaystyle I_{d}(\left(\begin{array}[]{cc}0&y\\\
0&0\end{array}\right))$ $\displaystyle=\\{\left(\begin{array}[]{cc}x&y\\\
0&x\end{array}\right)\mid x\in R\\}\text{ for all }y\in R,$
$\displaystyle\operatorname{Const}_{d}(S)$
$\displaystyle=\\{\left(\begin{array}[]{cc}x&0\\\ 0&x\end{array}\right)\mid
x\in R\\},$
$\displaystyle\operatorname{Int}_{d}(S)\cap\operatorname{Const}_{d}(S)$
$\displaystyle=\\{\left(\begin{array}[]{cc}0&0\\\ 0&0\end{array}\right)\\}.$

Another example which is close to the classical definition of derivation and
integral in calculus, but has slightly different properties is the following
one.

######  Example 4.

Let $\mathbf{F}[x]=(F[x],+,\cdot,0,1)$ be the semiring of polynomials in one
variable over a field $\mathbf{F}=(F,+,\cdot,0,1)$. Define

$d(\sum_{i=0}^{n}a_{i}x^{i}):=\sum_{i=1}^{n}ia_{i}x^{i-1}$

for all $\sum\limits_{i=0}^{n}a_{i}x^{i}\in F[x]$. Then
$d\in\operatorname{Der}\mathbf{F}[x]$ and we have

$\displaystyle\operatorname{Int}_{d}(F[x])$
$\displaystyle=\left\\{\begin{array}[]{ll}F[x]&\text{if }{\rm
char}\mathbf{F}=0,\\\ \\{\sum\limits_{i=0}^{n}a_{i}x^{i}\mid a_{i}=0\text{ if
}i\equiv-1\bmod p\\}&\text{if }{\rm char}\mathbf{F}=p,\end{array}\right.$
$\displaystyle I_{d}(\sum\limits_{i=0}^{n}a_{i}x^{i})$
$\displaystyle=\\{\sum\limits_{i=0}^{n}\frac{a_{i}}{i+1}x^{i+1}+b\mid b\in
F\\}\text{ for all
}\sum\limits_{i=0}^{n}a_{i}x^{i}\in\operatorname{Int}_{d}(F[x]),$
$\displaystyle\operatorname{Const}_{d}(F[x])$
$\displaystyle=\left\\{\begin{array}[]{ll}F&\text{if }{\rm
char}\mathbf{F}=0,\\\ \\{\sum\limits_{i=0}^{n}a_{i}x^{i}\mid a_{i}=0\text{ if
}i\not\equiv 0\bmod p\\}&\text{if }{\rm char}\mathbf{F}=p,\end{array}\right.$
$\displaystyle\operatorname{Const}_{d}(F[x])$
$\displaystyle\subseteq\operatorname{Int}_{d}(F[x]).$

Let us recall some elementary, but useful properties of derivations on
semirings.

Let $\mathbf{S}=(S,+,\cdot,0,1)$ be a semiring and
$d_{1},d_{2}\in\operatorname{Der}\mathbf{S}$. Then

$\displaystyle(d_{1}+d_{2})(x+y)$
$\displaystyle=d_{1}(x+y)+d_{2}(x+y)=\big{(}d_{1}(x)+d_{1}(y)\big{)}+\big{(}d_{2}(x)+d_{2}(y)\big{)}=$
$\displaystyle=\big{(}d_{1}(x)+d_{2}(x)\big{)}+\big{(}d_{1}(y)+d_{2}(y)\big{)}=(d_{1}+d_{2})(x)+(d_{1}+d_{2})(y),$
$\displaystyle(d_{1}+d_{2})(x\cdot y)$ $\displaystyle=d_{1}(x\cdot
y)+d_{2}(x\cdot y)=$ $\displaystyle=\big{(}d_{1}(x)\cdot y+x\cdot
d_{1}(y)\big{)}+\big{(}d_{2}(x)\cdot y+x\cdot d_{2}(y)\big{)}=$
$\displaystyle=\big{(}d_{1}(x)\cdot y+d_{2}(x)\cdot y\big{)}+\big{(}x\cdot
d_{1}(y)+x\cdot d_{2}(y)\big{)}=$
$\displaystyle=\big{(}d_{1}(x)+d_{2}(x)\big{)}\cdot
y+x\cdot\big{(}d_{1}(y)+d_{2}(y)\big{)}=$ $\displaystyle=(d_{1}+d_{2})(x)\cdot
y+x\cdot(d_{1}+d_{2})(y).$

Hence $d_{1}+d_{2}\in\operatorname{Der}\mathbf{S}$. Trivially the mapping
$d_{0}:S\rightarrow S$ defined by $d_{0}(x):=0$ for all $x\in S$ is a
derivation on $\mathbf{S}$. Thus $(\operatorname{Der}\mathbf{S},+,d_{0})$
forms a monoid.

We start with some elementary but basic properties of $d$-integrals and sets
of $d$-integrals on a given semiring.

######  Proposition 5.

Let $\mathbf{S}=(S,+,\cdot,0,1)$ be a semiring,
$d\in\operatorname{Der}\mathbf{S}$ and $a,b\in S$. Then

  1. (i)

$I_{d}(a)+I_{d}(b)\subseteq I_{d}(a+b)$,

  2. (ii)

if $e\in I_{d}(a)$ and $f\in I_{d}(b)$ then $e\cdot f\in I_{d}(a\cdot f+e\cdot
b)$,

  3. (iii)

$0\in\operatorname{Const}_{d}(S)$,

  4. (iv)

if $1\in I_{d}(a)$ then $a+a=a$,

  5. (v)

$d(a)\in\operatorname{Int}_{d}(S)$, $a\in I_{d}\big{(}d(a)\big{)}$, and if
$a\in\operatorname{Int}_{d}(S)$ then $d\big{(}I_{d}(a)\big{)}=\\{a\\}$,

  6. (vi)

if $c,1\in\operatorname{Const}_{d}(S)$ and $c$ in invertible then
$c^{-1}\in\operatorname{Const}_{d}(S)$.

###### Proof.

If $e\in I_{d}(a)$ and $f\in I_{d}(b)$ then $d(e)=a$ and $d(f)=b$ and hence

  1. (i)

$d(e+f)=d(e)+d(f)=a+b$, i.e. $e+f\in I_{d}(a+b)$,

  2. (ii)

$d(e\cdot f)=d(e)\cdot f+e\cdot d(f)=a\cdot f+e\cdot b$, i.e. $e\cdot f\in
I_{d}(a\cdot f+e\cdot b)$.

Moreover, we have

  1. (iii)

$d(0)=d(0\cdot 0)=d(0)\cdot 0+0\cdot d(0)=0$.

  2. (iv)

$a+a=d(1)\cdot 1+1\cdot d(1)=d(1\cdot 1)=d(1)=a$.

  3. (v)

This follows from the definition of $I_{d}\big{(}d(a)\big{)}$ and from the
$d$-integrability of $a$.

  4. (vi)

If $c,1\in\operatorname{Const}_{d}(S)$ and $c$ in invertible then

$\displaystyle d(c^{-1})$ $\displaystyle=1\cdot d(c^{-1})=(c^{-1}\cdot c)\cdot
d(c^{-1})=c^{-1}\cdot\big{(}c\cdot d(c^{-1})\big{)}=c^{-1}\cdot\big{(}0+c\cdot
d(c^{-1})\big{)}=$ $\displaystyle=c^{-1}\cdot\big{(}0\cdot c^{-1}+c\cdot
d(c^{-1})\big{)}=c^{-1}\cdot\big{(}d(c)\cdot c^{-1}+c\cdot d(c^{-1})\big{)}=$
$\displaystyle=c^{-1}\cdot d(c\cdot c^{-1})=c^{-1}\cdot d(1)=c^{-1}\cdot 0=0,$

i.e. $c^{-1}\in\operatorname{Const}_{d}(S)$.

∎

It is easy to check that $I_{d_{0}}(0)=S$ and $I_{d_{0}}(x)=\emptyset$ for all
$x\in S\setminus\\{0\\}$. Hence, $\operatorname{Const}_{d_{0}}(S)=S$.

######  Remark 6.

Let $\mathbf{S}=(S,+,\cdot,0,1)$ be a semiring and
$d\in\operatorname{Der}\mathbf{S}$. It is evident that $d$ is surjective if
and only if $I_{d}(x)\neq\emptyset$ for all $x\in S$, i.e. if and only if
every element of $S$ is $d$-integrable. On the other hand, $d$ is injective if
and only if $|I_{d}(x)|\leq 1$ for all $x\in S$ which means that every
$d$-integrable element of $S$ has exactly one $d$-integral.

In the sequel we state several natural results concerning the behavior of
constants in $d$-integrals. The following lemma says that the product of a
$d$-integrable element of $S$ and a $d$-constant of $S$ is again
$d$-integrable.

######  Lemma 7.

Let $\mathbf{S}=(S,+,\cdot,0,1)$ be a semiring,
$d\in\operatorname{Der}\mathbf{S}$, $a\in S$ and
$c\in\operatorname{Const}_{d}(S)$. Then

  1. (i)

$I_{d}(a)+c\subseteq I_{d}(a)$,

  2. (ii)

$c\cdot I_{d}(a)\subseteq I_{d}(c\cdot a)$ and $I_{d}(a)\cdot c\subseteq
I_{d}(a\cdot c)$.

###### Proof.

If $b\in I_{d}(a)$ then

  1. (i)

$d(b+c)=d(b)+d(c)=a+0=a$,

  2. (ii)

$d(c\cdot b)=d(c)\cdot b+c\cdot d(b)=0\cdot b+c\cdot a=0+c\cdot a=c\cdot a$,
$d(b\cdot c)=d(b)\cdot c+b\cdot d(c)=a\cdot c+b\cdot 0=a\cdot c+0=a\cdot c$.

∎

Item (ii) of Lemma 7 implies that
$c\cdot\operatorname{Int}_{d}(S)\subseteq\operatorname{Int}_{d}(S)$. A similar
result does not hold for addition instead of multiplication. If we consider
the semiring $(S,+,\cdot,0,1)$ with derivation $d$ of Example 3 with non-
trivial $R$ then we have $c+a\notin\operatorname{Int}_{d}(S)$ for all
$c\in\operatorname{Const}_{d}(S)\setminus\\{0\\}$ and
$a\in\operatorname{Int}_{d}(S)$.

More interesting results can be obtained if we consider invertible elements of
$S$.

######  Lemma 8.

Let $\mathbf{S}=(S,+,\cdot,0,1)$ be a semiring,
$d\in\operatorname{Der}\mathbf{S}$ and $a,b,e\in S$ and assume $e$ to be
invertible. Then

$\displaystyle a\in I_{d}\big{(}e\cdot d(b)\big{)}$
$\displaystyle\Leftrightarrow b\in I_{d}\big{(}e^{-1}\cdot d(a)\big{)},$
$\displaystyle a\in I_{d}\big{(}d(b)\cdot e\big{)}$
$\displaystyle\Leftrightarrow b\in I_{d}\big{(}d(a)\cdot e^{-1}\big{)},$

###### Proof.

$a\in I_{d}\big{(}e\cdot d(b)\big{)}$ is equivalent to $d(a)=e\cdot d(b)$, and
$b\in I_{d}\big{(}e^{-1}\cdot d(a)\big{)}$ is equivalent to $d(b)=e^{-1}\cdot
d(a)$. The second equivalence follows analogously. ∎

######  Corollary 9.

Let $\mathbf{S}=(S,+,\cdot,0,1)$ be a semiring,
$d\in\operatorname{Der}\mathbf{S}$ and $c\in\operatorname{Const}_{d}(S)$ and
assume $c$ to be inverible. Then $c^{-1}\in I_{d}\big{(}c^{-1}\cdot
d(1)\big{)}\cap I_{d}\big{(}d(1)\cdot c^{-1}\big{)}$.

###### Proof.

Since $c^{-1}\in I_{d}\big{(}d(c^{-1})\big{)}$ we have $1=c\cdot c^{-1}\in
I_{d}\big{(}c\cdot d(c^{-1})\big{)}$ according to (ii) of Lemma 7 whence
$c^{-1}\in I_{d}\big{(}c^{-1}\cdot d(1)\big{)}$ because of Lemma 8. The
assertion $c^{-1}\in I_{d}\big{(}d(1)\cdot c^{-1}\big{)}$ follows analogously.
∎

Converse inclusions to those of Lemma 7 can be proved if we assume that the
constant $c$ in question is additively invertible or invertible, respectively.

######  Proposition 10.

Let $\mathbf{S}=(S,+,\cdot,0,1)$ be a semiring,
$d\in\operatorname{Der}\mathbf{S}$ and $a,b\in S$. Then (i) – (iii) hold:

  1. (i)

If $b$ is additively invertible and $-b\in\operatorname{Const}_{d}(S)$ then
$I_{d}(a)\subseteq I_{d}(a)+b$,

  2. (ii)

if $b$ is invertible and $b^{-1}\in\operatorname{Const}_{d}(S)$ then

$\displaystyle I_{d}(b\cdot a)$ $\displaystyle\subseteq b\cdot I_{d}(a),$
$\displaystyle I_{d}(a\cdot b)$ $\displaystyle\subseteq I_{d}(a)\cdot b.$

###### Proof.

  1. (i)

If $b$ is additively invertible and $-b\in\operatorname{Const}_{d}(S)$ then
according to (i) of Lemma 7 we have

$I_{d}(a)=I_{d}(a)+0=I_{d}(a)+\big{(}(-b)+b\big{)}=\big{(}I_{d}(a)+(-b)\big{)}+b\subseteq
I_{d}(a)+b.$

  2. (ii)

If $b$ is invertible and $b^{-1}\in\operatorname{Const}_{d}(S)$ then according
to (ii) of Lemma 7 we have

$\displaystyle I_{d}(b\cdot a)$ $\displaystyle=1\cdot I_{d}(b\cdot a)=(b\cdot
b^{-1})\cdot I_{d}(b\cdot a)=b\cdot\big{(}b^{-1}\cdot I_{d}(b\cdot
a)\big{)}\subseteq$ $\displaystyle\subseteq b\cdot
I_{d}\big{(}b^{-1}\cdot(b\cdot a)\big{)}=b\cdot I_{d}\big{(}(b^{-1}\cdot
b)\cdot a\big{)}=b\cdot I_{d}(1\cdot a)=b\cdot I_{d}(a),$ $\displaystyle
I_{d}(a\cdot b)$ $\displaystyle=I_{d}(a\cdot b)\cdot 1=I_{d}(a\cdot
b)\cdot(b^{-1}\cdot b)=\big{(}I_{d}(a\cdot b)\cdot b^{-1}\big{)}\cdot
b\subseteq$ $\displaystyle\subseteq I_{d}\big{(}(a\cdot b)\cdot
b^{-1}\big{)}\cdot b=I_{d}\big{(}a\cdot(b\cdot b^{-1})\big{)}\cdot
b=I_{d}(a\cdot 1)\cdot b=I_{d}(a)\cdot b.$

∎

If we assume that $c$ to be (additively) invertible then we obtain the
following result:

######  Corollary 11.

Let $\mathbf{S}=(S,+,\cdot,0,1)$ be a semiring,
$d\in\operatorname{Der}\mathbf{S}$ and $a\in S$ and
$c\in\operatorname{Const}_{d}(S)$. Then

  1. (i)

If $c$ is additively invertible and $-c\in\operatorname{Const}_{d}(S)$ then
$I_{d}(a)+c=I_{d}(a)$,

  2. (ii)

if $c$ is invertible and $c^{-1}\in\operatorname{Const}_{d}(S)$ then

$\displaystyle I_{d}(c\cdot a)$ $\displaystyle=c\cdot I_{d}(a),$
$\displaystyle I_{d}(a\cdot c)$ $\displaystyle=I_{d}(a)\cdot c.$

###### Proof.

This follows from Lemma 7 and Proposition 10. ∎

If a constant $c$ and has a one-side inverse then we can derive the following
$d$-integration rules.

######  Proposition 12.

Let $\mathbf{S}=(S,+,\cdot,0,1)$ be a semiring,
$d\in\operatorname{Der}\mathbf{S}$, $a,b,e\in S$ and
$c\in\operatorname{Const}_{d}(S)$. Then

  1. (i)

If $c\cdot a=1$ then $c\cdot I_{d}(a\cdot b)\subseteq I_{d}(b)$,

  2. (ii)

if $c\cdot a=1$ and $a\cdot e\in I_{d}(b)$ then $e\in I_{d}(c\cdot b)$,

  3. (iii)

if $a\cdot c=1$ then $I_{d}(b\cdot a)\cdot c\subseteq I_{d}(b)$,

  4. (iv)

if $a\cdot c=1$ and $e\cdot a\in I_{d}(b)$ then $e\in I_{d}(b\cdot c)$.

###### Proof.

  1. (i)

If $c\cdot a=1$ then

$c\cdot I_{d}(a\cdot b)\subseteq I_{d}\big{(}c\cdot(a\cdot
b)\big{)}=I_{d}\big{(}(c\cdot a)\cdot b\big{)}=I_{d}(1\cdot b)=I_{d}(b)$

according to (i) of Lemma 7.

  2. (ii)

If $c\cdot a=1$ and $a\cdot e\in I_{d}(b)$ then $e=1\cdot e=(c\cdot a)\cdot
e=c\cdot(a\cdot e)\in I_{d}(c\cdot b)$ according to (i) of Lemma 7.

  3. (iii)

follows analogously to (i).

  4. (iv)

follows analogously to (ii).

∎

######  Lemma 13.

Let $\mathbf{S}=(S,+,\cdot,0,1)$ be a semiring,
$d\in\operatorname{Der}\mathbf{S}$ and $a\in S$ and assume
$d\big{(}d(a)\big{)}=d(a)$ and $d(a)$ to be additively invertible. Then
$a\in\operatorname{Const}_{d}(S)+\operatorname{Int}_{d}(S)$.

###### Proof.

If $e:=a+\big{(}-d(a)\big{)}$ and $b:=d(a)$ then $b$ is $d$-integrable,

$\displaystyle d(e)$
$\displaystyle=d\Big{(}a+\big{(}-d(a)\big{)}\Big{)}=d(a)+d\big{(}-d(a)\big{)}=d(a)+\Big{(}-d\big{(}d(a)\big{)}\Big{)}=$
$\displaystyle=d(a)+\big{(}-d(a)\big{)}=0,$ $\displaystyle e+b$
$\displaystyle=\Big{(}a+\big{(}-d(a)\big{)}\Big{)}+d(a)=a+\Big{(}\big{(}-d(a)\big{)}+d(a)\Big{)}=a+0=a.$

∎

Observe that $d\big{(}d(c)\big{)}=d(0)=0=d(c)$ for all
$c\in\operatorname{Const}_{d}(S)$.

In the next lemma we prove a result similar to “integration per parts” known
in calculus.

######  Lemma 14.

Let $\mathbf{S}=(S,+,\cdot,0,1)$ be a semiring,
$d\in\operatorname{Der}\mathbf{S}$ and $a,b\in S$ and assume $e\in I_{d}(a)$,
$f\in I_{d}\big{(}e\cdot d(b)\big{)}$ and $f$ to be additively invertible.
Then $e\cdot b+(-f)\in I_{d}(a\cdot b)$.

###### Proof.

We have

$\displaystyle d\big{(}e\cdot b+(-f)\big{)}$ $\displaystyle=d(e\cdot
b)+d(-f)=\big{(}d(e)\cdot b+e\cdot d(b)\big{)}+\big{(}-d(f)\big{)}=$
$\displaystyle=a\cdot b+\Big{(}e\cdot d(b)+\big{(}-e\cdot
d(b)\big{)}\Big{)}=a\cdot b+0=a\cdot b.$

∎

Finally, we can show when the addition of two sets of $d$-integrals is again a
set of $d$-integrals.

######  Theorem 15.

Let $\mathbf{S}=(S,+,\cdot,0,1)$ be a semiring,
$d\in\operatorname{Der}\mathbf{S}$ and $a,b\in S$ and assume there exists some
$e\in I_{d}(a)$ which is additively invertible.Then
$I_{d}(a+b)=I_{d}(a)+I_{d}(b)$.

###### Proof.

According to (i) of Proposition 5, $I_{d}(a)+I_{d}(b)\subseteq I_{d}(a+b)$.
Now we prove the converse inclusion. If $f\in I_{d}(a+b)$ and $g:=(-e)+f$ then

$\displaystyle d(g)$
$\displaystyle=d\big{(}(-e)+f\big{)}=d(-e)+d(f)=-d(e)+d(f)=(-a)+(a+b)=$
$\displaystyle=\big{(}(-a)+a\big{)}+b=0+b=b$

and hence $g\in I_{d}(b)$ and

$e+g=e+\big{(}(-e)+f\big{)}=\big{(}e+(-e)\big{)}+f=0+f=f.$

∎

We are going to show that the set of all $d$-integrals on a given semiring
$\mathbf{S}=(S,+,\cdot,0,1)$ (together with the empty set in the case when
$\operatorname{Int}_{d}(S)=S$) can be equipped with two binary operations such
that the resulting structure forms a semiring again. A condition for this
construction is that the set of all $d$-integrable elements of $S$ is closed
under multiplication.

######  Theorem 16.

Let $\mathbf{S}=(S,+,\cdot,0,1)$ be a semiring,
$d\in\operatorname{Der}\mathbf{S}$ and

$I_{d}(S):=\\{\emptyset\\}\cup\\{I_{d}(x)\mid x\in S\\},$

assume

$\operatorname{Int}_{d}(S)\cdot\operatorname{Int}_{d}(S)\subseteq\operatorname{Int}_{d}(S)$
(1)

and define binary operations $+$ and $\cdot$ on $I_{d}(S)$ as follows:

$\begin{array}[]{lll}I_{d}(x)\oplus I_{d}(y)&:=I_{d}(x+y)&\text{if
}I_{d}(x),I_{d}(y)\neq\emptyset,\\\ z\oplus\emptyset=\emptyset\oplus
z&:=z,&\\\ I_{d}(x)\odot I_{d}(y)&:=I_{d}(x\cdot y)&\text{if
}I_{d}(x),I_{d}(y)\neq\emptyset,\\\ z\odot\emptyset=\emptyset\odot
z&:=\emptyset&\end{array}$

($x,y\in S$; $z\in I_{d}(S)$). Then $(I_{d}(S),\oplus,\odot,\emptyset)$ is a
(not necessarily unitary) semiring.

###### Proof.

Let $a,b,c\in S$ and $e,f\in I_{d}(S)$. It is easy to see that $\oplus$ and
$\odot$ are well-defined. Now (i) of Proposition 5 implies
$\operatorname{Int}_{d}(S)+\operatorname{Int}_{d}(S)\subseteq\operatorname{Int}_{d}(S)$.
If $a,b\in\operatorname{Int}_{d}(S)$ then

$I_{d}(a)\oplus I_{d}(b)=I_{d}(a+b)=I_{d}(b+a)=I_{d}(b)\oplus I_{d}(a).$

Moreover,

$\displaystyle\emptyset\oplus e$ $\displaystyle=e=e\oplus\emptyset,$
$\displaystyle e\oplus\emptyset$ $\displaystyle=e=\emptyset\oplus e.$

This shows that $\oplus$ is commutative. If
$a,b,c\in\operatorname{Int}_{d}(S)$ then

$\displaystyle\big{(}I_{d}(a)\oplus I_{d}(b)\big{)}\oplus I_{d}(c)$
$\displaystyle=I_{d}(a+b)\oplus
I_{d}(c)=I_{d}\big{(}(a+b)+c\big{)}=I_{d}\big{(}a+(b+c)\big{)}=$
$\displaystyle=I_{d}(a)\oplus I_{d}(b+c)=I_{d}(a)\oplus\big{(}I_{d}(b)\oplus
I_{d}(c)\big{)}.$

Moreover,

$\displaystyle(\emptyset\oplus e)\oplus f$ $\displaystyle=e\oplus
f=\emptyset\oplus(e\oplus f),$ $\displaystyle(e\oplus\emptyset)\oplus f$
$\displaystyle=e\oplus f=e\oplus(\emptyset\oplus f),$ $\displaystyle(e\oplus
f)\oplus\emptyset$ $\displaystyle=e\oplus f=e\oplus(f\oplus\emptyset).$

This shows that $\oplus$ is associative. Because of

$e\oplus\emptyset=\emptyset\oplus e=e,$

$\emptyset$ is the neutral element with respect to $\oplus$. In order to be
able to prove associativity of $\odot$ we need assumption (1). If
$a,b,c\in\operatorname{Int}_{d}(S)$ then

$\displaystyle\big{(}I_{d}(a)\odot I_{d}(b)\big{)}\odot I_{d}(c)$
$\displaystyle=I_{d}(a\cdot b)\odot I_{d}(c)=I_{d}\big{(}(a\cdot b)\cdot
c\big{)}=I_{d}\big{(}a\cdot(b\cdot c)\big{)}=$ $\displaystyle=I_{d}(a)\odot
I_{d}(b\cdot c)=I_{d}(a)\odot\big{(}I_{d}(b)\odot I_{d}(c)\big{)}.$

We have

$\displaystyle(\emptyset\odot e)\odot f$ $\displaystyle=\emptyset\odot
f=\emptyset=\emptyset\odot(e\odot f),$ $\displaystyle(e\odot\emptyset)\odot f$
$\displaystyle=\emptyset\odot
f=\emptyset=e\odot\emptyset=e\odot(\emptyset\odot f),$ $\displaystyle(e\odot
f)\odot\emptyset$
$\displaystyle=\emptyset=e\odot\emptyset=e\odot(f\odot\emptyset).$

This shows that $\odot$ is associative. If $a,b,c\in\operatorname{Int}_{d}(S)$
then

$\displaystyle\big{(}I_{d}(a)\oplus I_{d}(b)\big{)}\odot I_{d}(c)$
$\displaystyle=I_{d}(a+b)\odot I_{d}(c)=I_{d}\big{(}(a+b)\cdot
c\big{)}=I_{d}(a\cdot c+b\cdot c)=$ $\displaystyle=I_{d}(a\cdot c)\oplus
I_{d}(b\cdot c)=\big{(}I_{d}(a)\odot I_{d}(c)\big{)}\oplus\big{(}I_{d}(b)\odot
I_{d}(c)\big{)}.$

Moreover,

$\displaystyle(\emptyset\oplus e)\odot f$ $\displaystyle=e\odot
f=\emptyset\oplus(e\odot f)=(\emptyset\odot f)\oplus(e\odot f),$
$\displaystyle(e\oplus\emptyset)\odot f$ $\displaystyle=e\odot f=(e\odot
f)\oplus\emptyset=(e\odot f)\oplus(\emptyset\odot f),$ $\displaystyle(e\oplus
f)\odot\emptyset$
$\displaystyle=\emptyset=\emptyset\oplus\emptyset=(e\odot\emptyset)\oplus(f\odot\emptyset).$

This proves one distributive law. The other one can be shown analogously.
Finally,

$e\odot\emptyset=\emptyset\odot e=\emptyset.$

The proof is complete. ∎

It might be interesting to investigate how strong assumption (1) of Theorem 16
is. The following is immediate.

######  Remark 17.

If $d(x)\cdot d(y)=0$ for all $x,y\in S$ then obviously (1) is satisfied.

Finally, let us see in which cases from our previous examples assumption (1)
holds.

######  Example 18.

The semiring from Example 3 together with its derivation satisfies (1) since
$\left(\begin{array}[]{cc}0&x\\\
0&0\end{array}\right)\left(\begin{array}[]{cc}0&y\\\
0&0\end{array}\right)=\left(\begin{array}[]{cc}0&0\\\ 0&0\end{array}\right)$
for all $x,y\in R$.

######  Example 19.

The semiring from Example 4 together with its derivation satisfies (1) if and
only if ${\rm char}\mathbf{F}\in\\{0,2\\}$. This can be seen as follows:

$\operatorname{Int}_{d}(F[x])=\left\\{\begin{array}[]{ll}F[x]&\text{if }{\rm
char}\mathbf{F}=0,\\\ \\{\sum\limits_{i=0}^{n}a_{i}x^{i}\mid a_{i}=0\text{ if
}i\equiv 1\bmod 2\\}&\text{if }{\rm char}\mathbf{F}=2,\\\
\\{\sum\limits_{i=0}^{n}a_{i}x^{i}\mid a_{i}=0\text{ if }i\equiv-1\bmod
p\\}&\text{if }{\rm char}\mathbf{F}=p\geq 3.\end{array}\right.$

Hence, if ${\rm char}\mathbf{F}=p\geq 3$ then
$x,x^{p-2}\in\operatorname{Int}_{d}(F[x])$, but $x^{p-1}=x\cdot
x^{p-2}\notin\operatorname{Int}_{d}(F[x])$.

## References

  * [1] I. Banič, Integration on rings. Open Math. 15 (2017), 365–373.
  * [2] J. A. Brzozowski, Derivations of regular events. J. Assoc. Comp. Mach. 11 (1964), 481–494.
  * [3] M. Chandramouleeswaran and V. Thirnveni, On derivations of semirings. Advances in Algebra 3 (2010), 123–131.
  * [4] S. Dimitrov, Derivations on semirings. AIP Conf. Proc. 2017, 060011, 22 pp.
  * [5] L. Ferrari, On derivations of lattices. Pure Math. Appl. 12 (2001), 365–382.
  * [6] J. S. Golan, Semirings and their Applications. Kluwer, Dordrecht 1999. ISBN 0-7923-5786-8.
  * [7] J. S. Golan and H. Simmons, Derivatives, Nuclei and Dimensions on the Frame of Torsion Theories. Longman, Harlow 1988. ISBN 0-582-03448-5.
  * [8] S. K. Sardar and S. Goswami, On derivations in semirings. Southeast Asian Bull. Math. 33 (2009), 917–928.
  * [9] G. Szász, Derivations of lattices. Acta Sci. Math. (Szeged) 37 (1975), 149–154.
  * [10] M. Yettou, A. Amroune and L. Zedam, Integrations on lattices. Miskolc Math. Notes (to appear).

Authors’ addresses:

Ivan Chajda
Palacký University Olomouc
Faculty of Science
Department of Algebra and Geometry
17\. listopadu 12
771 46 Olomouc
Czech Republic
<EMAIL_ADDRESS>
Helmut Länger
TU Wien
Faculty of Mathematics and Geoinformation
Institute of Discrete Mathematics and Geometry
Wiedner Hauptstraße 8-10
1040 Vienna
Austria, and
Palacký University Olomouc
Faculty of Science
Department of Algebra and Geometry
17\. listopadu 12
771 46 Olomouc
Czech Republic
<EMAIL_ADDRESS>