# Computational Approaches for App-to-App Retrieval
and Design Consistency Check

Seokhyeon Park  Wonjae Kim  Young-Ho Kim  Jinwook Seo

###### Abstract

Extracting semantic representations from mobile user interfaces (UI) and using
the representations for designers’ decision-making processes have shown the
potential to be effective computational design support tools. Current
approaches rely on machine learning models trained on small-sized mobile UI
datasets to extract semantic vectors and use screenshot-to-screenshot
comparison to retrieve similar-looking UIs given query screenshots. However,
the usability of these methods is limited because they are often not open-
sourced and have complex training pipelines for practitioners to follow, and
are unable to perform screenshot set-to-set (i.e., app-to-app) retrieval. To
this end, we (1) employ visual models trained with large web-scale images and
test whether they could extract a UI representation in a zero-shot way and
outperform existing specialized models, and (2) use mathematically founded
methods to enable app-to-app retrieval and design consistency analysis. Our
experiments show that our methods not only improve upon previous retrieval
models but also enable multiple new applications.

Machine Learning, ICML

##  1 Introduction

Designing attractive yet informative user interfaces for mobile applications
is as important, if not more, as engineering the core functionality of the
app. In the early phase of the design process, designers often rely on
curation services such as Dribbble or Pinterest to get inspiration (Wu et al.,
2021; Lu et al., 2022) and search for the design choices of their competitor
apps. As the app reaches its release, designers focus on validating the
overall consistency of their app to maximize the quality of the app, rather
than seeking more inspiration. (Lu et al., 2022) For senior-level designers,
it is sometimes more important to maintain the design consistency among
different screens of their app than to consider design alternatives of the
curation services (Wu et al., 2021).

To help the inspiration process, the HCI and Machine Learning communities have
been trying to model the process as a visual search task, which is essentially
a UI screenshot-to-screenshot retrieval task (Kumar et al., 2013; Ritchie et
al., 2011; Huang et al., 2019; Chen et al., 2020; Li et al., 2021; Bunian et
al., 2021; Liu et al., 2018). Using machine learning-based models, recent
works such as Screen2Vec (Li et al., 2021) or VINS (Bunian et al., 2021) first
embedded the UI screenshots and their accompanying metadata including UI view
hierarchy (Deka et al., 2017) into vectors representing the semantics of the
screenshots. As the distance between these encoded vectors indicates the
similarity between the original screenshots, designers can easily query
similar UI screenshots to an input.

Designers in the field often design UIs as UI flow to support the users’
interaction flow, which involves multiple UI screenshots111In this paper, we
use the term screenshot to denote a rasterized image of an app screen without
any metadata about the screen elements. However, existing systems are bound to
screenshot-to-screenshot retrieval based on a single UI screenshot, which
creates challenges when the designers want to explore design alternatives for
a sequence of UI screenshots, (e.g., “which app contains UI flows that are
semantically similar to ours?”), such models hardly support these tasks due to
the lack of well-defined measures for set-to-set distance. Building upon the
concept of screenshot-to-screenshot retrieval, we propose a novel app-to-app
retrieval using a mathematically founded optimal transport method. The method
not only provides a scalar metric that represents the distance between the
apps but also shows the optimal matching score between UI pages in the queried
and retrieved apps, enhancing the interpretability of the system. Since most
of the apps in the widely used Rico dataset (Deka et al., 2017) contain less
than 10 screenshots, it is challenging to show the usefulness of app-to-app
retrieval. Consequently, to show the effectiveness of our proposed method, we
gathered a new dataset from Mobbin222https://mobbin.com/, a curated mobile UI
screenshot hub, where each app includes 126 screenshots on average.

Another crucial task enabled by the analysis of set-level UI representation is
the automated validation of the UI design consistency, a domain that has yet
to be extensively explored. Early studies (Mahajan & Shneiderman, 1997; Ivory
& Hearst, 2001) along with recent ones (Yang et al., 2021; Burny &
Vanderdonckt, 2022) attempted to predict whether queried UIs violated
heuristic design guidelines. While valuable, these guidelines often prove
insufficient as field designers prioritize the company’s own guidelines.
Consequently, academic guidelines are often dismissed as they might conflict
with design intentions (Colusso et al., 2017), suggesting a promising
direction for future research.

We posit that it is vital to employ data-driven design rules directly from
designers’ queries (i.e., pre-existing UIs in the app) without resorting to
heuristics. By doing so, the extracted semantics can be more closely aligned
with the designers’ intention. To achieve such a goal, we exploit the metric
of uniformity (Wang & Isola, 2020) to measure the consistency among UIs in a
specific set (i.e., UIs in the app). With the uniformity metric, practitioners
would easily measure the effect of newly added sets of UIs and compare
different alternatives.

For both retrieval and consistency check tasks, it is required to acquire the
semantic representation of the graphical UI. Recent works (Li et al., 2021;
Bunian et al., 2021) employ machine learning (ML) models to produce semantic
vectors from UI screens, typically trained on small-sized datasets like Rico
(Deka et al., 2017). However, advancements in foundation models (Bommasani et
al., 2021) demonstrate that models trained on extensive web-scale datasets can
surpass those trained on smaller, meticulously curated datasets, as evidenced
by the success of GPT-3 (Brown et al., 2020) and CLIP (Radford et al., 2021).

Since it is still unclear whether models trained on uncurated web-crawled
datasets can outperform specialized models trained for UI retrieval using
well-curated UI screens, we conducted qualitative and quantitative studies to
evaluate our model. As a result, we found that the model actually grasps the
semantics of UIs in a zero-shot way and its semantic vectors result in more
preferred UI retrieval compared to specialized models when tested with human
crowd workers.

We summarize our contributions as follows:

  * •

We extend screenshot-to-screenshot retrieval to app-to-app retrieval with an
optimal transport method, enabling new applications of the data-driven UI
design inspiration process.

  * •

We rethink the task of design consistency check and enable data-driven
consistency check with the metric of uniformity.

  * •

We investigate the zero-shot applicability of visual foundation models for UI
semantics through comprehensive experiments.

##  2 Background

In this section, we cover related work in the areas of (1) computational UI
understanding and its adoption; (2) optimal transport for an app-to-app
retrieval; and (3) uniformity for design consistency check.

###  2.1 Computational UI understanding and its adoption

Multiple studies (Bonnardel, 1999; Wu et al., 2021; Lu et al., 2022; Herring
et al., 2009) report that designers prefer to get inspiration from pre-
existing design examples. Lee et al. (2010) showed that designers use various
examples during the design process, and even showed that interfaces created
through the process involving multiple references are preferred over those
without references. To meet such needs, the HCI community has studied
computational approaches for understanding user interfaces (Jiang et al.,
2022). From traditional computer vision algorithms (Kumar et al., 2013;
Ritchie et al., 2011) to deep learning models (Huang et al., 2019; Chen et
al., 2020; Li et al., 2021; Bunian et al., 2021; Liu et al., 2018), the
community tried to distill the semantics of given UI screenshots into usable
representations.

Although beneficial prima facie, practitioners are frustrated with these tools
for multiple reasons (Lu et al., 2022; Colusso et al., 2017). As Lu et al.
(2022) pointed out, one of the most common pitfalls of these models is their
lack of ability to understand an app’s problem domains and functionalities.
The problem arises as these models only allow queries with a single UI
screenshot, and it’s nearly impossible to infer the app’s intention with a
single screenshot. In this work, we seek ways to support querying and
retrieving a similar app instead of a single UI screenshot.

###  2.2 Optimal transport for an app-to-app retrieval

Figure 1: UI screenshots of various functionality from the Uber, Lyft, and
Google Maps apps. The red number is a cosine distance between the
representations of two screenshots. For set destination UI screenshot, we can
see the distances are the same between the Uber and Google Maps pair and the
Uber and Lyft pair.

Defining an app as a set of UI screenshots, we can derive an app’s problem
domains and functionalities from the relations between screenshots from
different apps. For example, in Figure 1, if designers use the set destination
UI screenshot of the Uber app, its cosine distance to Google Maps and Lyft
app’s set destination screenshot is equal. However, considering screens for
other functionalities of the Uber app (e.g., confirm ride, reserve car, …)
comprehensively, we can more reliably infer that Lyft is semantically closer
to Uber than Google Maps. This process is revisited later in Figure 5.

Comparing multiple screenshots congruently can be viewed as the transportation
of virtual masses from a query set of UIs to a target set of UIs. As deep-
learning-based models make UIs into vectors on the n-dimensional Euclidean
space $\mathbb{R}^{n}$, we can imagine virtual masses distributed over the set
of vectors of the app. Then, there exist multiple transportation plans that
transport these masses to the target app’s UI vectors, and each plan can be
written as a doubly stochastic matrix as it should preserve the total amount
of the masses. Considering both the transportation plan and the distance
between each pair, we can compute the optimal transport (OT) plan (Villani,
2009; Peyré et al., 2019; Santambrogio, 2015), which minimizes the
transportation cost. Such cost is a scalar value that describes the distance
between two apps and can be used to enable app-to-app retrieval. In this work,
we leverage the OT plan to efficiently compute the relationship between apps
to boost up both the latency and quality of the retrieval task.

###  2.3 Uniformity for design consistency check

Beyond inspiration, checking the overall consistency of screens for the same
app (e.g., checking the consistency of a new design draft against the existing
screens) is also one of the primary tasks for app designers (Wu et al., 2021).
Traditionally, the HCI community has focused on producing general guidelines
predominantly targeted for inclusiveness (e.g., accessibility) and detecting
violations of the interface guidelines in an automated manner (Mahajan &
Shneiderman, 1997; Ivory & Hearst, 2001; Yang et al., 2021; Burny &
Vanderdonckt, 2022). Despite the usefulness of guidelines, it is not easy for
industrial designers to comply with the guidelines because they might already
have the company’s own design guidelines, not to mention they have to
reinterpret and adapt them to their situation. In this work, we aim to handle
this gap by measuring the consistency of an app and treating the violation as
a decrement in consistency. Although our approaches do not provide explicitly
documented guidelines, it is generally applicable to all situations as long as
the reference set of UI screens (i.e., app) exists.

Given a set of vectors, we can consider the Gaussian potential kernel that
maps a pair of vectors into a positive scalar. If we normalize vectors onto an
(n-1)-dimensional unit hypersphere $\mathcal{S}^{n-1}$, the distributions of
vectors minimizing the average pairwise Gaussian potential (i.e. uniformity)
weakly converge to the uniform distribution (Wang & Isola, 2020). That says,
if we use contrastive representation models such as CLIP (Radford et al.,
2021), we can measure how uniformly the vectors in the set are distributed, as
contrastive loss contains the term minimizing uniformity. This property can
directly be used for measuring the consistency of the app as an app with less
uniformity means an app consists of similar UIs, thus high consistency.

##  3 Methods

In this section, we describe our methodologies for collecting a mobile app
screenshot dataset, calculating vector representations from screenshots, and
the optimal transport to implement an app-to-app retrieval task.

###  3.1 Dataset

Figure 2: Number of applications in Mobbin dataset by app category and
platform

A variety of mobile UI screenshot datasets have been proposed as the basis for
data-driven interface studies. However, these datasets are mostly devised for
screenshot-level analysis. For example, the widely used Rico dataset (Deka et
al., 2017) is limited to being used for app-level analysis as more than 75% of
apps in Rico have less than 10 screens. Other datasets also have limitations
to be used for our analysis such as the public availability and size of the
datasets.

To properly evaluate our methods of app-level UI analysis, we collected a new
dataset from Mobbin, which is a UI curation service providing up-to-date app-
wise screenshots. The dataset was obtained as of June 2022 and has a total of
320 unique mobile apps, and each app has its own sets of screenshots based on
the platform (iOS or Android) and the app version (date), which makes a total
of 783 sets of screenshots, 558 for iOS and 225 for Android. It has a total of
99,228 screenshots (62,315 for iOS and 36,913 for Android), and each app has
an average of 126 screenshots, which is significantly larger than both Rico’s
total screenshot counts and the average number of screenshots per app. The
Mobbin dataset consists of apps with 19 categories, and the number of apps for
each category and the platform is shown in Figure 2.

###  3.2 UI Representations

Figure 3: Example of our image augmentation for mobile screenshots. We applied
the appropriate mockup device according to the resolution and the platform of
the screenshot.

To ease the use of machine learning models for practitioners, we employed
OpenAI’s CLIP model (Radford et al., 2021). CLIP consists of a visual encoder
and a text encoder, both of which are trained using a huge dataset of image-
text pairs by optimizing contrastive loss. So CLIP ensures that the encoded
vectors of positive pairs (i.e. aligned image-text pairs) that are closer than
those of negative pairs. By doing so, semantic vectors of both images and
texts having similar semantics can be embedded in the vicinity of the joint
representation space. Radford et al. (2021) further used these encoders on
unseen datasets like ImageNet (Krizhevsky et al., 2017) for a classification
task without any fine-tuning of the model. It can be done by first embedding
all the ImageNet labels and retrieving the closest label for the given image
query. Such application of the model has been named zero-shot classification
and is a core functionality of foundation models (Bommasani et al., 2021). We
thought that CLIP could understand the representation of UI screenshots, as
CLIP understands images that are not seen during training well.

As a sanity check, we first used DALL·E 2 (Ramesh et al., 2022), which is an
image-generation AI that internally uses a noisy version of CLIP, to assess
how well CLIP understands the semantics of the UI for the appropriate text
prompts associated with the UI screenshots. By prompting text such as ”A
mobile user interface image of shopping application” to DALL·E 2, we observed
that the generated mobile UI images usually come with a mobile device mockup
rather than just by themselves (e.g., No Augmentation in Figure 3). Based on
this observation, we augmented images with mockups as shown in Figure 3 to
yield a better representation from CLIP. We encoded all images with publicly
available333https://github.com/openai/CLIP CLIP ViT-L/14@336px

##### Uniformity of contrastive representation

Since CLIP embeds images onto the unit hypersphere, we can compute the
uniformity loss (Wang & Isola, 2020) of an app’s screenshots. Let
$I_{e}\in\mathbb{R}^{n\times d}$ be the set of embedding vectors of UI
screenshots that make up an app and let $I_{e}^{(i)}\in\mathbb{R}^{d}$ be the
$i$-th screenshot of the set having a norm of 1. Then, we can define the
uniformity loss $L_{u}$ of an app $L_{u}(I_{e})$ as follows:

$\displaystyle L_{u}(I_{e})$
$\displaystyle\triangleq\log\frac{1}{n^{2}}\sum_{i,j}G_{t}(I_{e}^{(i)},I_{e}^{(j)})$
(1) $\displaystyle=\log\frac{1}{n^{2}}\sum_{i,j}e^{2t\cdot
I_{e}^{(i)\mathsf{T}}I_{e}^{(j)}-2t},\quad t>0,$ (2)

where $G_{t}$ is a Gaussian potential, and we set $t=2$.

The uniformity loss $L_{u}$ ranges from -4 to 0 for $t=2$. As uniformity loss
is negative of uniformity value, lower uniformity loss means the set has more
uniformly distributed UI representations. Since semantically consistent UI
screenshots are not uniformly distributed, the lower $L_{u}$ also means the
lower consistency of the set, and vice versa, the high $L_{u}$ for the high
consistency of the screenshot set.

###  3.3 Optimal Transport

We employ optimal transport (OT) for app-to-app retrieval, where a
transportation plan ${\bf T}\in\mathbb{R}^{n_{a}\times n_{b}}_{+}$ is computed
to optimize the alignment between two apps $\mathbf{a}$ and $\mathbf{b}$. We
consider apps $\mathbf{a}$ and $\mathbf{b}$ as two discrete distributions
$\mathbf{\alpha}$ and $\mathbf{\beta}$, formulated as
$\mathbf{\alpha}=\sum_{i=1}^{n_{a}}\mathbf{n}_{i}\delta_{\mathbf{a}_{i}}$ and
$\mathbf{\beta}=\sum_{j=1}^{n_{b}}\mathbf{m}_{j}\delta_{\mathbf{b}_{j}}$,
where $\mathbf{a}_{i}$ and $\mathbf{b}_{j}$ are the embeddings of screenshots
making up each app $\mathbf{a}$ and $\mathbf{b}$, and $\delta$ as the Dirac
function centered on each screenshot vector. The marginal plan $\mathbf{n}$
and $\mathbf{m}$ are belong to the $n_{a}$\- and $n_{b}$-dimensional simplex
(i.e., $\sum_{i=1}^{n_{a}}\mathbf{n}_{i}=\sum_{j=1}^{n_{b}}\mathbf{m}_{i}=1$).
The OT distance between the app $\mathbf{a}$ and $\mathbf{b}$ is then defined
as:

$\displaystyle\mathcal{D}_{ot}(\mathbf{a},\mathbf{b})=\underset{{\bf
T}\in\Pi(\mathbf{n},\mathbf{m})}{\text{min}}\sum_{i=1}^{n_{a}}\sum_{j=1}^{n_{b}}{\bf
T}_{ij}\cdot c(\mathbf{a}_{i},\mathbf{b}_{j}),$ (3)

where $\Pi(\mathbf{n},\mathbf{m})=\\{{\bf T}\in\mathbb{R}^{n_{a}\times
n_{b}}_{+}|{\bf T}{\bf 1}_{n_{b}}=\mathbf{n},{\bf T}^{\mathsf{T}}{\bf
1}_{n_{a}}=\mathbf{m}\\}$ is a coupling of $\mathbf{n}$ and $\mathbf{m}$, and
$c(\cdot,\cdot)$ is the cosine distance.

##  4 Experiments

###  4.1 Supremacy of Foundation Models

To assess how well the foundation model understands the UI semantics, we
examined its ability to classify the app category of individual screenshots.
Furthermore, we conducted a Mechanical Turk study, following the settings of
Li et al. (2021), to compare the retrieval performance of the foundation model
against the existing UI semantic representation models.

####  4.1.1 Zero-shot App Category Classification

Table 1: Top-1 and top-5 zero-shot classification accuracies on the Mobbin dataset (19 classes) with our augmentations and prompts. | Top-1 (↑) | Top-5 (↑)
---|---|---
Random | 5.26 | 26.31
ImageNet Prompts | No augmentation | 32.82 | 65.32
+Mockup | 34.33 | 66.10
+Mockup+Squared | 36.00 | 66.92
Our Prompts | No augmentation | 37.68 | 70.95
+Mockup | 39.67 | 74.28
+Mockup+Squared | 40.49 | 74.65

As mentioned earlier, the foundation model we used (CLIP) has the capability
to perform image classification in a zero-shot manner without additional
training. The zero-shot classification proceeds in the following order: first,
we prepare appropriate text prompts those match each class (e.g., A photo of a
{class}). Second, we extract text features for each prompt using the CLIP text
encoder. Lastly, the top-k labels are predicted by the cosine similarity
between their text features and the query image feature.

Each screenshot in the Mobbin dataset is classified by CLIP according to its
app category shown in Figure 2. Furthermore, to demonstrate the effectiveness
of data augmentation in Figure 3, we compared the classification accuracy
between the original screenshots, the screenshots added mockup template, and
the square-resized version of them. There are a total of 19 app categories in
the Mobbin dataset, thus it has 5.2 and 26.3 by-chance accuracy for top-1 and
top-5 classification, respectively. Original CLIP paper uses seven text
prompts
444https://github.com/openai/CLIP/blob/main/notebooks/Prompt_Engineering_for_ImageNet.ipynb
(e.g., itap of a {category}., a photo of the [small/large] {category}) for
ImageNet zero-shot classification. Since the prompts are engineered for
ImageNet’s images, which are mainly made up of photos of an object, we
redesigned twelve prompts for UI screenshots, each of which includes user
interfaces, UI, mobile screen, or screenshot (e.g., a screenshot of {category}
app, A user interface of {category} application., UI of {category} app.)

Table 1 shows overall zero-shot app category classification results on the
Mobbin dataset. Based on each augmentation result, we can confirm that the
CLIP’s understanding of UI semantics was improved when our augmentations,
mockup templates, and square-resizing are applied. The same classification,
but with the custom text prompts designed for the UI screenshots resulted in
superior performance when compared to those of prompts for the natural photos
(ImageNet). CLIP showed top-1 accuracy of approximately six times (with naive
CLIP setting) to eight times (with our engineering) better than randomly
classifying the original screenshots without additional training. This result
indicates that CLIP has a certain level of understanding of user interfaces
and application categories.

####  4.1.2 Screenshot Retrieval Comparison

To find out whether the foundation model’s retrieval results are preferred by
humans or not, we conducted a comparative Mechanical Turk user study proposed
by Li et al. (2021) and compared the results with Screen2Vec (Li et al.,
2021). To carry out the experiment fairly, we used the Rico dataset for the
retrieval experiment following the settings and baselines in Li et al. (2021).
The models used for their Mechanical Turk experiments are as follows:

##### Screen2Vec

Screen2Vec uses Rico’s screenshot and its metadata. The GUI components and
their location information are encoded into a 768-dimensional vector. Plus,
the application information is extracted using Sentence-BERT resulting in
another 768-dimensional vector, then the two vectors are concatenated into a
1536-dimensional GUI screen embedding vector.

##### TextOnly

This variant reproduces the models proposed in Li et al. (2020). It extracts
text features of all texts in a screenshot using pre-trained Sentence-BERT
(Reimers & Gurevych, 2019) and averages the features into a single
768-dimensional vector.

##### LayoutOnly

This variant reproduces the autoencoder model proposed in Deka et al. (2017).
It embeds the layout of a screenshot into a 64-dimensional feature.

CLIP image features were extracted both with mockup templates and square-
resized augmentation to quantitatively prove the effect of image augmentation
in retrieval tasks. We randomly selected 50 screenshots from Enrico (Leiva et
al., 2020), which is a curated subset of Rico. Using these screenshots as the
queries, the top-5 screenshots were retrieved from the entire Rico dataset for
each model. Since each of the five models (i.e., CLIP, CLIP+aug, Screen2Vec,
TextOnly, LayoutOnly) retrieves five screenshots, a total of 25 similar images
were obtained for each query screenshot. We removed duplicates from the
retrieved, thus making fewer than 25 screenshots for some of the queries,
resulting in a total of 999 pairs of screens (query and retrieved screen),
averaging 19.98 per query screen.

Screen pair similarity was measured using the criteria from Li et al. (2021),
including app similarity (likeness between two apps), screen type similarity
(parity in the roles of two screens), and content similarity (congruity of the
displayed contents). Crowd workers were asked to measure the similarity of
five sets of query screenshots on a five-point Likert scale and the
corresponding retrieved screenshots for each task, and five different workers
measured similarities for each pair of screenshots. We paid two dollars for
each batch of five source screens and it took an average of 28 minutes.

Table 2: The mean similarity score and its standard deviation ($N=1250$ each) were measured by Mechanical Turk workers. A higher score means more preferred retrieval results. The Mann-Whitney U test shows our models are statistically significantly better than Screen2Vec and other models ($p<0.0001$). | Score (↑)
---|---
Li et al. (2021) | Screen2Vec | 2.92±1.36
Li et al. (2020) | TextOnly | 3.22±1.30
Deka et al. (2017) | LayoutOnly | 3.00±1.33
Ours | No augmentation | 3.50±1.16
+Mockup+Squared | 3.57±1.08

Table 2 reports the mean similarity value measured by the crowd worker for
each model. The study revealed a worker preference for screenshots retrieved
via CLIP image features, outperforming the three comparative models
(Screen2Vec, TextOnly, LayoutOnly). Moreover, the utilization of mockup
templates and square-resize augmentation enhanced the assessment of CLIP.
Notably, the Mann-Whitney U test underscored the superior performance of the
two CLIP models with statistical significance ($p<0.0001$).

###  4.2 App-to-App Retrieval

Figure 4: Distribution of pairwise distance of applications on three criteria:
(left) app name, (middle) app category, and (right) platform (operating
system). Figure 5: (Left) The list of retrieved apps for given query apps
across various categories; retrieved apps are sorted with their
$\mathcal{D}_{ot}$ to their query. (Right) The detailed process of getting
$\mathcal{D}_{ot}$, as described in Section 3.3.

To extend data-driven UI inspiration beyond simple single screenshot-level
retrieval, we introduce the concept of optimal transport to properly implement
app-to-app retrieval. Figure 5 illustrates the detailed process of app-to-app
retrieval using optimal transport by example. First, we extract the semantic
representation of the augmented screenshot in each application using the CLIP
encoder we used throughout the paper. Using these features, we obtain the
pairwise cosine distance matrix between the UI semantic vector sets of two
applications. We assign uniform mass over the screenshots to form a uniform
distribution, which makes the initial $n$ and $m$ in Section 3.3 to a uniform
distribution. Then using the pairwise distance matrix and the distributions,
we solve the optimal transport problem using POT (Flamary et al., 2021) as
described in Section 3.3 to get an optimal transportation plan. Finally, we
calculate a 1-Wasserstein distance (i.e., $\mathcal{D}_{ot}$) between the
application pair by element-wise multiplying the distance matrix with the
transportation plan matrix and summing the elements up, following Equation 3.
To assess app-to-app retrieval based on $\mathcal{D}_{ot}$, we perform a
quantitative analysis of $\mathcal{D}_{ot}$ as a distance between applications
and conducted a case study on the possible applications of the transportation
matrix.

#####  $\mathcal{D}_{ot}$ as an app-to-app distance

We calculated $\mathcal{D}_{ot}$ for 306,153 pairs of apps for a total of 783
apps of 319 unique app names555We use the term name to indicate a universally
unique identifier (UUID); thus, different apps with the same name are treated
individually in this paper. in the Mobbin dataset. The calculation took about
32 minutes to process all pairs, which is about 158 app pairs per second using
a machine with a single NVIDIA Titan RTX GPU. Using $\mathcal{D}_{ot}$ of the
pairs, we analyze the statistics of the Mobbin dataset in three criteria: each
app’s name, category, and platform (iOS or Android). Figure 4 shows distance
distribution by the app’s name, category, and platform, respectively. There
are 944 pairs sharing an app name but differing in version (platform or
release date), 21,141 pairs with identical categories, and 180,603 pairs on
the same platform Apps with the same app name, category, and platform are
displayed in blue, whereas apps with a different app name, category, and
platform are displayed in orange. Across all three cases, the distance was
significantly shorter when the app pairs shared the same app name, as the
overall composition and semantics of screenshots in the app do not change much
for different releases of the app. This outcome aligns with the designers’
intent of maintaining app identity through updates or cross-platform
deployment, affirming the suitability of $\mathcal{D}_{ot}$ for modeling app
distance While category and platform act as group identifiers and are thus
less unique than an app’s name, our $\mathcal{D}_{ot}$ model effectively
demonstrated a shorter $\mathcal{D}_{ot}$ for apps sharing the same
category/platform compared to those differing in these criteria. Notably,
$\mathcal{D}_{ot}$ also revealed that platform information, representing a
larger group of apps, is more general than category information, evidenced by
a smaller $\mathcal{D}_{ot}$ distribution gap for the platform criterion. We
want to note that it is a very significant result since the figure is drawn
with more than 300,000 pairs of pairs.

##### Interpretability of an optimal transportation plan

Besides the dataset-wide quantitative analysis, we highlight a few examples of
retrieved apps for given queries in Figure 5. The figure demonstrates the
method’s efficacy by showcasing retrieved apps, from various categories like
Airbnb, Spotify, Nike, and Uber, that bear similar semantics. Impressively,
these results were acquired using merely app screenshots, sans any metadata
like app category or component hierarchy. The transport plan, or optimal
transport matrix, describes how to optimally move masses when there are two
distributions. The transport plan, or optimal transport matrix, describes the
optimal mass movement between two distributions, enabling the identification
of similar screenshots between two apps, as they will exhibit similar vector
representations.

###  4.3 Design Consistency Check

Figure 6: Our experiment conditions and sample result (Netflix app) of
validating uniformity loss $\Delta L_{u}$ as design consistency check metric.
Figure 7: Distribution of $L_{u}$ by app category, sorted by median Figure 8:
The amount of change of uniformity loss $\Delta L_{u}$ according to our
experimental conditions. (Top) $\Delta L_{u}$ when we change the images in the
app randomly, (Bottom) $\Delta L_{u}$ when we change the images in the app
with the reserved screenshots from the same app

As described in Section 3.2, we use $L_{u}$ to measure the consistency of an
app. We calculated $L_{u}$ for every app in the dataset, Figure 7 shows
statistics of $L_{u}$ grouped by the app categories. $L_{u}$ in the dataset
ranges from $-1.41$ to $-0.66$. Categories such as entertainment, education,
and social networking turned out to have a lower $L_{u}$, indicative of
inconsistent and diverse screenshots, owing to their UI screens frequently
consisting of various media types. On the other hand, the latter categories
generally consist of their UI with icons and symbols rather than media, thus
resulting in high $L_{u}$.

To test whether $L_{u}$ could serve as a metric for data-driven design
consistency check discussed in Section 2.3, we designed two studies on the
Mobbin dataset. The first, simulating a hypothetical scenario, involved
designers assessing the alignment of new UI screen drafts with existing
screens. This process, labeled as Random Change in Figure 6, consisted of
substituting $N$ images per app with random ones from other apps in the
dataset and subsequently calculating $L_{u}$. Testing different $N$ values
facilitated an examination of the robustness of our uniformity metric in
relation to the set size intended for inspection by the designer.

The difference between two $L_{u}$s ($\Delta L_{u}$) is shown in the first
figure of Figure 8. As shown in the figure, $\Delta L_{u}$ decreases as the
number of randomly changed images increases. Through the t-test, the drop of
$L_{u}$ is statistically significant regardless of $N$ ($p<0.0001$).

The second study is to test whether this drop occurs within the same design
semantics, as the metric would be meaningless if it drops regardless of the
semantics of the changed images. To implement the study, we first set aside
five UI screenshot images from each app666For brevity, we also used this
setting that set aside five UI screenshots while measuring $L_{u}$ of the
random screenshot change experiment. in the dataset. Subsequently, we replaced
$N$ images for each app with the images we had set aside, as opposed to images
from random apps as in the previous study. The second figure of Figure 8
indicates no changes in $\Delta L_{u}$ in this scenario. A t-test confirmed
that $L_{u}$ remained constant irrespective of $N$ ($p>0.28$). These studies
collectively underscore $L_{u}$ as a robust proxy for assessing design
consistency.

##  5 Limitations and Future Work

Although we explored the conceptual applications of app-to-app retrieval and
in-app design consistency based on various reports on designers’ preferences
(Colusso et al., 2017; Wu et al., 2021; Lu et al., 2022), it is still required
to prove their efficacy in the real environment. As such studies require
conducting formative studies and in-depth user studies, making it out of the
scope of our paper proposing novel applications of UI representation models,
we leave it for future work.

Optimal transport allows various initial marginal distributions, assigning
more mass to one screenshot than another. Since we assumed the condition with
no information on which screenshot is more important than another in the app,
we used a uniform distribution throughout the paper. A uniform distribution is
a good choice to admit the maximum entropy probability distribution (Bernardo
& Smith, 2009), but assigning different initial marginal distributions could
enable different applications such as focusing more on certain screenshots or
neglecting user-selected UI components during $\mathcal{D}_{ot}$ computation.
The manipulation of the initial marginal distribution remains for future work.

Another possible future work could be to extend the dataset to group
screenshots with their feature or functionality rather than an app. Although
we only tested primitive app groups of screenshots, since an app is made up of
at least a few dozen screenshots, grouping screenshots with other criteria
would be much easier to make a dataset since it requires fewer screenshots per
group and yields different retrieval opportunities.

Regarding design consistency, $L_{u}$ is innately a relative metric, and
hence, cannot evaluate design quality in absolute terms. Although it was not
our focus to build absolute guidelines, future work could involve defining a
golden standard for specific design principles and utilizing $\Delta L_{u}$ to
quantify the deviation of the query set from this standard.

##  6 Conclusion

In this paper, we envisioned the applications of UI representation models
including app-to-app retrieval and design consistency check. As the first
stage of this research, we investigated the supremacy of zero-shot adaptation
of a foundation model, CLIP, and how its representation appeals to humans by
conducting a Mechanical Turk study on a single-screenshot retrieval task.
Using the CLIP UI representation, we devised (1) $\mathcal{D}_{ot}$ that
measures the distance between apps by computing the optimal transportation
plan between their UI screenshots, and (2) $L_{u}$ that measures the semantic
design consistency of an app by computing the pairwise Gaussian potentials
between the UI screenshots of the app. Through multiple proofs of concept and
analysis on our newly collected Mobbin dataset, we showed that both
$\mathcal{D}_{ot}$ and $L_{u}$ are valid metrics for app-to-app retrieval and
in-app design consistency check, respectively. We would like to highlight that
our proposed methods can be executed on a personal laptop without expensive
equipment such as GPU clusters while opening numerous opportunities for
computational UI engineering. Going forward, we are excited to continue our
endeavors toward building interfaces for designers that are equipped with our
computational approaches.

## References

  * Bernardo & Smith (2009) Bernardo, J. M. and Smith, A. F.  _Bayesian theory_ , volume 405.  John Wiley & Sons, 2009.
  * Bommasani et al. (2021) Bommasani, R., Hudson, D. A., Adeli, E., Altman, R., Arora, S., von Arx, S., Bernstein, M. S., Bohg, J., Bosselut, A., Brunskill, E., et al.  On the opportunities and risks of foundation models.  _arXiv preprint arXiv:2108.07258_ , 2021.
  * Bonnardel (1999) Bonnardel, N.  Creativity in design activities: The role of analogies in a constrained cognitive environment.  In _Proceedings of the 3rd conference on Creativity & cognition_, pp. 158–165, 1999.
  * Brown et al. (2020) Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al.  Language models are few-shot learners.  _Advances in neural information processing systems_ , 33:1877–1901, 2020.
  * Bunian et al. (2021) Bunian, S., Li, K., Jemmali, C., Harteveld, C., Fu, Y., and Seif El-Nasr, M. S.  Vins: Visual search for mobile user interface design.  In _Proceedings of the 2021 CHI Conference on Human Factors in Computing Systems_ , CHI ’21, New York, NY, USA, 2021. Association for Computing Machinery.  ISBN 9781450380966.  doi: 10.1145/3411764.3445762.  URL https://doi.org/10.1145/3411764.3445762.
  * Burny & Vanderdonckt (2022) Burny, N. and Vanderdonckt, J.  (semi-) automatic computation of user interface consistency.  In _Companion of the 2022 ACM SIGCHI Symposium on Engineering Interactive Computing Systems_ , pp. 5–13, 2022.
  * Chen et al. (2020) Chen, J., Chen, C., Xing, Z., Xia, X., Zhu, L., Grundy, J., and Wang, J.  Wireframe-based ui design search through image autoencoder.  _ACM Transactions on Software Engineering and Methodology (TOSEM)_ , 29(3):1–31, 2020.
  * Colusso et al. (2017) Colusso, L., Bennett, C. L., Hsieh, G., and Munson, S. A.  Translational resources: Reducing the gap between academic research and hci practice.  In _Proceedings of the 2017 Conference on Designing Interactive Systems_ , pp. 957–968, 2017.
  * Deka et al. (2017) Deka, B., Huang, Z., Franzen, C., Hibschman, J., Afergan, D., Li, Y., Nichols, J., and Kumar, R.  Rico: A mobile app dataset for building data-driven design applications.  In _Proceedings of the 30th Annual ACM Symposium on User Interface Software and Technology_ , UIST ’17, pp. 845–854, New York, NY, USA, 2017. Association for Computing Machinery.  ISBN 9781450349819.  doi: 10.1145/3126594.3126651.  URL https://doi.org/10.1145/3126594.3126651.
  * Flamary et al. (2021) Flamary, R., Courty, N., Gramfort, A., Alaya, M. Z., Boisbunon, A., Chambon, S., Chapel, L., Corenflos, A., Fatras, K., Fournier, N., Gautheron, L., Gayraud, N. T., Janati, H., Rakotomamonjy, A., Redko, I., Rolet, A., Schutz, A., Seguy, V., Sutherland, D. J., Tavenard, R., Tong, A., and Vayer, T.  Pot: Python optimal transport.  _Journal of Machine Learning Research_ , 22(78):1–8, 2021.  URL http://jmlr.org/papers/v22/20-451.html.
  * Herring et al. (2009) Herring, S. R., Chang, C.-C., Krantzler, J., and Bailey, B. P.  Getting inspired! understanding how and why examples are used in creative design practice.  In _Proceedings of the SIGCHI Conference on Human Factors in Computing Systems_ , CHI ’09, pp. 87–96, New York, NY, USA, 2009. Association for Computing Machinery.  ISBN 9781605582467.  doi: 10.1145/1518701.1518717.  URL https://doi.org/10.1145/1518701.1518717.
  * Huang et al. (2019) Huang, F., Canny, J. F., and Nichols, J.  Swire: Sketch-based user interface retrieval.  In _Proceedings of the 2019 CHI Conference on Human Factors in Computing Systems_ , CHI ’19, pp. 1–10, New York, NY, USA, 2019. Association for Computing Machinery.  ISBN 9781450359702.  doi: 10.1145/3290605.3300334.  URL https://doi.org/10.1145/3290605.3300334.
  * Ivory & Hearst (2001) Ivory, M. Y. and Hearst, M. A.  The state of the art in automating usability evaluation of user interfaces.  _ACM Computing Surveys (CSUR)_ , 33(4):470–516, 2001.
  * Jiang et al. (2022) Jiang, Y., Lu, Y., Nichols, J., Stuerzlinger, W., Yu, C., Lutteroth, C., Li, Y., Kumar, R., and Li, T. J.-J.  Computational approaches for understanding, generating, and adapting user interfaces.  In _CHI Conference on Human Factors in Computing Systems Extended Abstracts_ , pp. 1–6, 2022.
  * Krizhevsky et al. (2017) Krizhevsky, A., Sutskever, I., and Hinton, G. E.  Imagenet classification with deep convolutional neural networks.  _Communications of the ACM_ , 60(6):84–90, 2017\.
  * Kumar et al. (2013) Kumar, R., Satyanarayan, A., Torres, C., Lim, M., Ahmad, S., Klemmer, S. R., and Talton, J. O.  Webzeitgeist: design mining the web.  In _Proceedings of the SIGCHI Conference on Human Factors in Computing Systems_ , pp. 3083–3092, 2013.
  * Lee et al. (2010) Lee, B., Srivastava, S., Kumar, R., Brafman, R., and Klemmer, S. R.  Designing with interactive example galleries.  In _Proceedings of the SIGCHI Conference on Human Factors in Computing Systems_ , CHI ’10, pp. 2257–2266, New York, NY, USA, 2010. Association for Computing Machinery.  ISBN 9781605589299.  doi: 10.1145/1753326.1753667.  URL https://doi.org/10.1145/1753326.1753667.
  * Leiva et al. (2020) Leiva, L. A., Hota, A., and Oulasvirta, A.  Enrico: A dataset for topic modeling of mobile ui designs.  In _22nd International Conference on Human-Computer Interaction with Mobile Devices and Services_ , pp. 1–4, 2020.
  * Li et al. (2020) Li, T. J.-J., Chen, J., Xia, H., Mitchell, T. M., and Myers, B. A.  Multi-modal repairs of conversational breakdowns in task-oriented dialogs.  In _Proceedings of the 33rd Annual ACM Symposium on User Interface Software and Technology_ , pp. 1094–1107, 2020.
  * Li et al. (2021) Li, T. J.-J., Popowski, L., Mitchell, T., and Myers, B. A.  Screen2vec: Semantic embedding of gui screens and gui components.  In _Proceedings of the 2021 CHI Conference on Human Factors in Computing Systems_ , CHI ’21, New York, NY, USA, 2021. Association for Computing Machinery.  ISBN 9781450380966.  doi: 10.1145/3411764.3445049.  URL https://doi.org/10.1145/3411764.3445049.
  * Liu et al. (2018) Liu, T. F., Craft, M., Situ, J., Yumer, E., Mech, R., and Kumar, R.  Learning design semantics for mobile apps.  In _Proceedings of the 31st Annual ACM Symposium on User Interface Software and Technology_ , UIST ’18, pp. 569–579, New York, NY, USA, 2018. Association for Computing Machinery.  ISBN 9781450359481.  doi: 10.1145/3242587.3242650.  URL https://doi.org/10.1145/3242587.3242650.
  * Lu et al. (2022) Lu, Y., Zhang, C., Zhang, I., and Li, T. J.-J.  Bridging the gap between ux practitioners’ work practices and ai-enabled design support tools.  In _CHI Conference on Human Factors in Computing Systems Extended Abstracts_ , pp. 1–7, 2022.
  * Mahajan & Shneiderman (1997) Mahajan, R. and Shneiderman, B.  Visual and textual consistency checking tools for graphical user interfaces.  _IEEE Transactions on software engineering_ , 23(11):722–735, 1997.
  * Peyré et al. (2019) Peyré, G., Cuturi, M., et al.  Computational optimal transport: With applications to data science.  _Foundations and Trends® in Machine Learning_ , 11(5-6):355–607, 2019.
  * Radford et al. (2021) Radford, A., Kim, J. W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., et al.  Learning transferable visual models from natural language supervision.  In _International Conference on Machine Learning_ , pp. 8748–8763. PMLR, 2021.
  * Ramesh et al. (2022) Ramesh, A., Dhariwal, P., Nichol, A., Chu, C., and Chen, M.  Hierarchical text-conditional image generation with clip latents.  _arXiv preprint arXiv:2204.06125_ , 2022.
  * Reimers & Gurevych (2019) Reimers, N. and Gurevych, I.  Sentence-bert: Sentence embeddings using siamese bert-networks.  _arXiv preprint arXiv:1908.10084_ , 2019.
  * Ritchie et al. (2011) Ritchie, D., Kejriwal, A. A., and Klemmer, S. R.  d. tour: Style-based exploration of design example galleries.  In _Proceedings of the 24th annual ACM symposium on User interface software and technology_ , pp. 165–174, 2011.
  * Santambrogio (2015) Santambrogio, F.  Optimal transport for applied mathematicians.  _Birkäuser, NY_ , 55(58-63):94, 2015.
  * Villani (2009) Villani, C.  _Optimal transport: old and new_ , volume 338.  Springer, 2009.
  * Wang & Isola (2020) Wang, T. and Isola, P.  Understanding contrastive representation learning through alignment and uniformity on the hypersphere.  In _International Conference on Machine Learning_ , pp. 9929–9939. PMLR, 2020.
  * Wu et al. (2021) Wu, Z., Xu, Q., Liu, Y., Peng, Z., Xu, Y., and Ma, X.  Exploring designers’ practice of online example management for supporting mobile ui design.  In _Proceedings of the 23rd International Conference on Mobile Human-Computer Interaction_ , pp. 1–12, 2021.
  * Yang et al. (2021) Yang, B., Xing, Z., Xia, X., Chen, C., Ye, D., and Li, S.  Don’t do that! hunting down visual design smells in complex uis against design guidelines.  In _2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE)_ , pp. 761–772. IEEE, 2021.


# Accretion of matter onto black holes in massive gravity with Lorentz
symmetry breaking

Abdul Jawad<EMAIL_ADDRESS>Department of Mathematics, COMSATS
University Islamabad, Lahore-Campus, Lahore-54000, Pakistan.  Kimet Jusufi
<EMAIL_ADDRESS>Physics Department, State University of Tetovo,
Ilinden Street nn, 1200, Tetovo, North Macedonia  M. Umair Shahzad
<EMAIL_ADDRESS>Department of Mathematics, University of Okara, Okara,
Pakistan.

###### Abstract

In this paper we study the accretion of matter onto the black holes and the
shadow images obtained by an infalling accretion flow of gas in a theory of
massive gravity (MG) with a spontaneously breaking Lorentz symmetry. This
black hole solution is characterized by mass $M$, scalar charge $S$ and the
parameter $\lambda$. In order to extract the astrophysical results of our
analyses, firstly, we have assumed a specific range for the parameter
$\lambda$ to constrain the scalar charge $S$ using the EHT result. To this
end, we have studied the effect of the scalar charge on the intensity of the
electromagnetic radiation from the black hole. Moreover, we investigate the
behavior of polytropic as well as the isothermal fluid flow onto massive
gravity black hole and notice that accretion starts from supersonic/subsonic
flow, passes through the critical point using particular model parameter and
ends near the horizon. We also analyzed the mass accretion rate in the
presence of various fluids which indicates important signatures. We also
elaborate on the possibility to analyze the phase transition and the stability
of the black hole using the shadow formalism.

###### pacs:

##  I Introduction

During the last decades a lot of efforts has been made to modify general
relativity and, in particular, to formulate a theory with massive gravitons
known as massive gravity theory. Such a theory is speculated to have rich
phenomenology, for example it may explain many problems is cosmology without
invoking the concept of dark energy. Initially it was formulated a linear
theory of MG by Fierz and Pauli fp , but unfortunately it was shown that this
theory suffered from the so-called discontinuity which was subsequently
addressed by Vainshtein (v, ). Furthermore it was also shown to exists another
issue in MG, namely a ghost instability bd , which then lead to further
extension of this theory de . Note that recently other formulations of MG have
been proposed oth . It is interesting that a relation between the hierarchy
problem and brane-world theories with the MG was investigated in Ref. bw .
Recently, Bebronne and Tinyakov bebronne , found an interesting black hole
solution in MG which depends on additional parameter known as the scalar
charge $S$. In this theory the deflection of light was studied in Ref.
Jusufi:2017drg , strong lensing sl , shadows in rotating regular BH in MG was
investigated in Ref. Jusufi:2019caq , phase transition and thermodynamics ft ;
td , quasi-normal modes qnm  and references therein.

Nowadays it is widely known that the process of accretion of matter onto a
black hole plays significant role in explaining many astrophysical phenomena.
In particular, the accretion of gas onto the black holes is linked to the
quasi-periodic oscillations observed by astronomers. On the other hand, the
emission of electromagnetic radiation in the form of gamma-ray burst, X-ray
binaries and the tidal disruption events are manly related to the process of
accretion matter onto black holes.

In this work, we would like to understand to what extant the effect of massive
gravity with a spontaneously breaking Lorentz symmetry are important in the
accretion of matter onto black holes and investigate the shadow images. In
order to have a more realistic picture, we are going to use the EHT result for
the M87 black hole to constrain the scalar charge parameter in this theory. We
aim to construct the shadow images and the intensity of radiating infalling
gas (see related works with different accretion models, Narayan -Zeng ). To
this end, we are going to investigate the matter accretion, we are going to
use a polytropic fluid flow and address the critical points of the accretion
process obtained by different fluids such as: sub-relativistic fluid,
radiation fluid, ultra-relativistic fluid and ultra-stiff fluid. In this
regard, beside the effect of black hole mass it is interesting to investigate
the effect of ”hair parameter” ($\lambda$) and scalar charge $S$ on the change
of mass or accretion rate using a particular domain of parameters. For studies
related to the accretion of matter onto black holes see the following Refs.
(19 -Farooq:2020lgm ).

The rest of this paper is structured. In Sec. II we shortly review the basics
of the BH solution in MG. In Sec. III we study the BH shadow using a radiation
thin accretion flow and the intensity of infalling radiating gas. In Sec. IV
we use the EHT result to constrain the scalar charge $S$ and the parameter
$\lambda$. In Secs. V and VI, we investigate the accretion rate using fluid
with different EoS such as the polytropic fluid using different fluids. In
Sec. VII we elaborate on the connection between the phase transition and the
shadow radius. Finally in Sec. VIII we comment on our results. In the present
paper we set the natural units $G=c=\hbar=1$.

##  II Black holes in massive gravity

In the present work we shall consider the massive gravity model described by
the following action bebronne

$\mathcal{S}_{MG}=\int
d^{4}x\sqrt{-g}\left[\frac{R}{16\pi}+\Lambda^{4}\mathcal{F}(X,W^{ij})\right],$
(1)

with $R$ being the scalar curvature and function $\mathcal{F}$ which describes
the scalar fields $\psi^{i}$ and $\psi^{0}$, respectively. Note that the
scalar field is minimally coupled to gravity while in the theory the Lorentz
symmetry is spontaneously broken. The parameter $\Lambda$ is proportional to
$\sqrt{m}$, with $m$ being the graviton mass. It is possible to express the
function $\mathcal{F}$ in terms of two Goldstone fields, $X$ and $W^{ij}$,
given by

$X=\frac{\partial^{0}\psi^{i}\partial_{0}\psi^{i}}{\Lambda^{4}},$ (2)
$W^{ij}=\frac{\partial^{\mu}\psi^{i}\partial_{\mu}\psi^{j}}{\Lambda^{4}}-\frac{\partial^{\mu}\psi^{i}\partial_{\mu}\psi^{0}\partial^{\nu}\psi^{j}\partial_{\nu}\psi^{0}}{\Lambda^{4}X}.$
(3)

It is important to note that finding analytical solutions for a generic
function $\mathcal{F}$ is not possible. One can choose this function in such a
way that the resulting equations are solvable analytically. Using a static and
spherically symmetric metric (detailed derivation can be found in bebronne )

$ds^{2}=-f(r)dt^{2}+g(r)dr^{2}+r^{2}\left(d\theta^{2}+\sin^{2}\theta
d\phi^{2}\right),$ (4)

with

$\psi^{0}=\Lambda^{2}(t+N(r)),\,\,\,\,\psi^{i}=\phi(r)\frac{\Lambda^{2}x^{i}}{r},$
(5)

along with the choice bebronne

$\mathcal{F}=c_{0}\left(\frac{1}{X}+w_{1}\right)+c_{1}(w_{1}^{3}-2w_{1}w_{2}-6w_{1}+2w_{3}-12),$
(6)

where $c_{0}$ and $c_{1}$ are some dimensionless constants and

$w_{1}=-(f_{1}+2f_{2}),\,\,\,w_{2}=f_{1}^{2}+2f_{2}^{2},\,\,w_{3}=-(f_{1}^{3}+2f_{2}^{3}),$
(7)

with

$f_{1}=\frac{{\phi^{\prime}}^{2}}{fgX},\,\,\,f_{2}=\frac{\phi^{2}}{r^{2}},\,\,\,X=\frac{g-f{N^{\prime}}^{2}}{fg}.$
(8)

Solving the field equations the solution is found to be bebronne

$f(r)=1-\frac{r_{s}}{r}-\frac{S}{r^{\lambda}}+\Lambda_{c}r^{2},$ (9)

in which $r_{s}$ and $S$ are integrating constants, and

$\lambda=-12b^{6}\frac{c_{1}}{c_{0}},\,\,\Lambda_{c}=2m^{4}c_{1}(b^{6}-1).$
(10)

Furthermore it was shown that the following equations holds bebronne

$\displaystyle g(r)$ $\displaystyle=$ $\displaystyle\frac{1}{f(r)},$
$\displaystyle N(r)$ $\displaystyle=$
$\displaystyle\pm\int\frac{dr}{f(r)}\left[1-f(r)\left(\frac{S\lambda(\lambda-1)}{c_{0}m^{2}}\frac{1}{r^{\lambda+2}}+1\right)^{-1}\right]^{\frac{1}{2}},$
$\displaystyle\phi(r)$ $\displaystyle=$ $\displaystyle br.$ (11)

Note that $b$ is related to $c_{0}$ and $c_{1}$, and satisfies the following
equation bebronne

$\displaystyle(b^{2}-1)(6b^{4}+6b^{2}+c_{0}/c_{1})=0.$ (12)

We can see that if $b=1$ and $c_{1}/c_{0}>0$, then $\Lambda_{c}=0$ and
$\lambda<0$. Then the black hole metric is not asymptotically flat, if
$c_{1}/c_{0}<0$ then $\lambda>0$. However one can further observe that when
$\lambda<1$ the the ADM mass of these solutions is infinite. Therefore to
recover a spacetime with a finite ADM mass we shall focus on the case
$\lambda\geq 1$ and set $b=1$. In such a case the solution reduces to

$f(r)=1-\frac{2M}{r}-\frac{S}{r^{\lambda}},$ (13)

where in the limit of vanishing scalar charge $S$ the Schwarzschild black hole
solution is obtained. We have identified $r_{s}=2M$, and $M$ is the AMD mass
provided $\lambda>1$. We can see this fact by using the following definition
for the ADM mass Shaikh:2018kfv

$M=\lim_{r\to\infty}\frac{r}{2}\left[\frac{1-f(r)}{f(r)}\right]\simeq
M+\frac{S}{2r^{\lambda-1}}.$ (14)

If we set $\lambda=1$, the ADM mass shifts by a constant and we can say that
such a black hole cannot be distinguished from the Schwarzschild black hole,
due to the simple scaling of mass $M\to M+S/2$. But for any $\lambda>1$ the
ADM mass is exactly $M$. The scalar charge in general can be positive, i.e.,
$S>0$, or negative i.e., $S<0$. The parameter $\lambda$ is known also as the
“hair parameter”. As a special case $\lambda=2$, and $S=-\mathcal{Q}^{2}$, we
obtain the RN black hole spacetime, but obviously the case $\lambda=2$ for
$S>0$ differs from the RN black hole.

Figure 1: Images of shadows with the corresponding intensities using the
infalling gas model seen by a distant observer using different values of
$\lambda$ and $S$. The first plot with corresponds to the Schwarzschild black
hole with $S=0$.

##  III Black hole shadow via radiating and infalling accretion gas

In this section we turn our attention to the shadow images and, for that
purpose, let us write the Hamilton-Jacobi equation

$\frac{\partial\mathcal{S}}{\partial\sigma}+\mathcal{H}=0,$ (15)

in the last equation $\sigma$ represents an affine parameter. For the
Hamiltonian for light rays it can be shown Perlick:2015vta

$\frac{1}{2}\left[-\frac{p_{t}^{2}}{f(r)}+f(r)p_{r}^{2}+\frac{p_{\phi}^{2}}{r^{2}}\right]=0.$
(16)

From the Hamiltonian one can obtain the two conserved quantities defined as

$\displaystyle p_{t}$
$\displaystyle\equiv\frac{\partial\mathcal{H}}{\partial\dot{t}}=-\mathcal{E},$
(17) $\displaystyle p_{\phi}$
$\displaystyle\equiv\frac{\partial\mathcal{H}}{\partial\dot{\phi}}=\mathcal{L},$
(18)

that is the energy $\mathcal{E}$ and angular momentum of the photon
$\mathcal{L}$. The unstable orbits are obtained via the effective potential
under the conditions

$\mathcal{V}_{\rm
eff}(r)\big{|}_{r=r_{ph}}=0,\qquad\frac{\partial\mathcal{V}_{\rm
eff}(r)}{\partial r}\Big{|}_{r=r_{ph}}=0,$ (19)

One can now easily show that Perlick:2015vta

$\frac{dr}{d\phi}=\pm
r\sqrt{f(r)\left[\frac{r^{2}f(r_{ph})}{r_{ph}^{2}f(r)}-1\right]}.$ (20)

Let us consider that a light ray is sent from the static observer located far
away from the black hole at a position $r_{0}$ along with some angle
$\vartheta$ w.r.t. the radial direction. In that case, one can write
Perlick:2015vta

$\cot\vartheta=\frac{\sqrt{g_{rr}}}{g_{\phi\phi}}\frac{dr}{d\phi}\Big{|}_{r=r_{0}}.$
(21)

Using all these equations one can relate now the shadow radius seen by the
observer and his located using the equation

$r_{s}=r_{ph}\left(\frac{1-\frac{2M}{r_{0}}-\frac{S}{r_{0}^{\lambda}}}{1-\frac{2M}{r_{ph}}-\frac{S}{r_{ph}^{\lambda}}}\right)^{1/2}\simeq\frac{r_{ph}}{\sqrt{1-\frac{2M}{r_{ph}}-\frac{S}{r_{ph}^{\lambda}}}},$
(22)

in which $r_{ph}$ determines the photon radius. Furthermore one can obtain the
circular shape of the shadow, which can be though as a stereographic
projection on the observers plane by using the coordinates, say $(X,Y)$, that
are defined by

$\displaystyle X$ $\displaystyle=$
$\displaystyle\lim_{r_{0}\longrightarrow\infty}\left(-r_{0}^{2}\sin\theta_{0}\frac{d\phi}{dr}\Big{|}_{(r_{0},\theta_{0})}\right),$
(23) $\displaystyle Y$ $\displaystyle=$
$\displaystyle\lim_{r_{0}\longrightarrow\infty}\left(r_{0}^{2}\frac{d\theta}{dr}\Big{|}_{(r_{0},\theta_{0})}\right).$
(24)

As we already noted that, the position of the observer far away from the black
hole is given by the coordinates $(r_{0},\theta_{0})$. In our setup, we
consider here a very simple model which consists of a spherically symmetrical
accretion model of infalling and radiating gas. One can now define the
specific intensity $I_{\nu 0}$ which is observed at $(X,Y)$ by the observer by
using the following equation Narayan ; Falce ; Bambi ; Shaikh ; k1 ; k2 ; k3 ;
Zeng

$I_{obs}(\nu_{obs},X,Y)=\int_{\gamma}\mathrm{g}^{3}j(\nu_{e})dl_{\text{prop}}.$
(25)

Figure 2: The regions of parameter space $(S,\lambda)$ and the diameter of the
black hole. In the left panel $S>0$ in the right panel $S<0$ and both plots
covers the range diameter range pf the shadow given by $9.5\leq d_{M87}\leq
12.5$

In the last equation we have the following important quantities:
$\mathrm{g}=\nu_{obs}/\nu_{e}$ being the red-shift factor, $\nu_{e}$
($\nu_{obs}$) is the photon frequency which is measured in the rest-frame of
the emitter (or observer), respectively. Importantly, the quantity
$dl_{\text{prop}}=k_{\alpha}u^{\alpha}_{e}d\kappa$ measures the infinitesimal
proper length, and $\kappa$ is some affine parameter. On the other hand, the
quantity $j(\nu_{e})$ represents the emissivity say per unit volume in the
rest-frame of the emitter and, in the present work, we are going to assume a
gas such that the emission is monochromatic with emitter’s-rest frame
frequency given as

$j(\nu_{e})\propto\frac{\delta(\nu_{e}-\nu_{\star})}{r^{2}}.$ (26)

Note here that in general one can chose a different power low for the radial
profile given by

$\displaystyle
j(\nu_{e})\propto\frac{\delta(\nu_{e}-\nu_{\star})}{r^{\delta}},$ (27)

thus, in in our case we identify $\delta=2$, but also $\delta=3$ is a commonly
used case. To obtain the red-shift factor we can use the following relation
Narayan ; Falce ; Bambi ; Shaikh ; k1 ; k2 ; k3

$\mathrm{g}=\frac{k_{\alpha}u^{\alpha}_{\text{obs}}}{k_{\beta}u^{\beta}_{e}},$
(28)

with $k^{\mu}$ being the 4-momentum of the photon, $u^{\mu}_{\text{obs}}$ the
4-velocity of the distant observer and $u^{\alpha}_{e}$ the 4-velocity of the
infalling and radiating gas which has the components (see for more details
Bambi )

$\displaystyle
u_{e}^{t}=\frac{1}{f(r)};\,u_{e}^{r}=-\sqrt{1-f(r)};\,u_{e}^{\theta}=u_{e}^{\phi}=0.$
(29)

In order to obtain the black hole images we need to integrate the intensity
over all the observed frequencies, in other words we need the observed flux
given by

$F_{obs}(X,Y)\propto-\int_{l_{\gamma}}\frac{\mathrm{g}^{3}k_{t}}{r^{2}k^{r}}dr.$
(30)

The corresponding intensities obtained from accretion gas along with the
shadow images with accretion gas by varying the hair parameter and the scalar
charge are depicted in Fig. 1. Note that we have used a region of parameters
within $1\sigma$ and found that the size of the shadow radius is bigger when
$S>0$ compared to the case when $S<0$. Contrary to that, we observe that the
range of the intensity of the radiation is stronger for the case $S<0$. This
feature can be explained from the fact that when the scalar charge is
positive, i.e., $S>0$, the deflection angle of light increases meaning that a
larger number of light rays are captured by the black hole as a result the
number of light rays that escape from the black hole can decrease.

##  IV Observational constraints on the scalar charge

In this section, we are going to constrain the scalar charge $S$ using the EHT
result $\theta_{s}=(42\pm 3)\mu as$, where the distance of the black hole M87
is $D=16.8$ Mpc,and the mass of the M87 black hole is chosen $M=(6.5\pm
0.9)\times 10^{9}$ M$\odot$. It follows that the diameter of the shadow in
units of mass $d_{M87}$ reads con

$\displaystyle d_{M87}=\frac{D\,\theta_{s}}{M_{87}}=11.0\pm 1.5.$ (31)

Within $1\sigma$ confidence, we have the range $9.5\leq d_{M87}\leq 12.5$,
yielding the lower and upper bound of the scalar charge as follows
$-0.17\lesssim S\lesssim 0.41$. This parameter space is shown in Fig. 2 where
the range for $\lambda$ in our analyses is chosen to be $1\leq\lambda\leq 3$.
The diameter of the shadow is smaller for negative $S$ when the value of
$\lambda$ approaches one, on the other hand, the diameter increases when $S>0$
when the value of $\lambda$ approaches one. We can see this fact from Fig. 1,
for instance if we compare to the Schwarzschild black hole (case $S=0$) shadow
for the values $\lambda=1.1$ and $S>0$ the shadow is considerably bigger but
as the value of $\lambda$ increases the shadow radius decreases. From that
figure we also the case with the smaller shadow radius obtained for
$\lambda=1.1$ and $S<0$.

##  V Polytropic Test fluid

The motion of fluid near the BH is very important to see the particular
signature of BH and there are different models which described the behavior of
fluid. In this study, our particular interesting model is Chaplygin gas which
leads to very interesting results. In astrophysics, the most general exotic
fluid is modified Chalpygin gas 16 . Its equation of state is given by

$p=An-\frac{B}{n^{\sigma}},$ (32)

where $A$ and $B$ are arbitrary constants and $0<\sigma<1$. If we plug $A=0$,
$B=-Z$ and $\sigma=-\gamma$, we get polytropic equation of state 3  i.e.

$p\equiv Zn^{\gamma},$ (33)

where $Z$, $\gamma$ are arbitrary constants and $\gamma>0$ for ordinary
matter. Now using the technique given in Refs. (16 -34 ), one can find the
final form of the Hamiltonian, that is

$H=\frac{f(r)}{1-v^{2}}\left(1+L\left(\frac{1-v^{2}}{r^{4}f(r)v^{2}}\right)^{\frac{\gamma-1}{2}}\right)^{2},$
(34)

where

$L\equiv\frac{Z\gamma
n_{c}^{\gamma-1}}{m(\gamma-1)}\left(\frac{r_{c}^{5}f(r_{c})_{,r_{c}}}{4}\right)^{(\frac{\gamma-1}{2})}=constant,$
(35)

along with the critical points

$(\gamma-1-v_{c}^{2})(\frac{1-v_{c}^{2}}{r_{c}^{4}f(r_{c})v_{c}^{2}})^{\frac{\gamma-1}{2}}=\frac{n_{c}}{2L}(r_{c}^{5}f(r_{c})r_{c})^{\frac{1}{2}}v_{c}^{2},$
(36) $v_{c}^{2}=\frac{r_{c}f(r_{c}),r_{c}}{r_{c}f(r_{c}),r_{c}+4f(r_{c})}.$
(37)

Figure 3: Left panel is the contour plot for infalling gas model seen by
distant observer using $S=0.35$($\lambda=1$) with
$M=1,n_{c}=0.2$,$\gamma=0.535$ and $L=-0.2$. The parameters are $r_{c}\approx
3.480626053,v_{c}\approx 0.5847583391,H_{c}\approx 0.1650133794$. Right panel
is the contour plot for infalling gas model seen by distant observer using
$S=0.35$($\lambda=2$) with $M=1,,n_{c}=0.2$,$\gamma=0.5$ and $L=-0.2$. The
parameters are $r_{c}\approx 2.297206433,v_{c}\approx
0.8939292467,H_{c}\approx 0.1429485501$.

Figure 4: Left panel is the contour plot for infalling gas model seen by
distant observer using $S=0.1$($\lambda=3$) with $M=1,n_{c}=0.2$,$\gamma=0.5$
and $L=-0.2$. The parameters are $r_{c}\approx 1.894211057,v_{c}\approx
1.159808543,H_{c}\approx 0.10765175091$. Right panel is the contour plot for
infalling gas model seen by distant observer using $S=-0.1$($\lambda=3$) with
$M=1,n_{c}=0.2$,$\gamma=0.5$ and $L=-0.2$. The parameters are $r_{c}\approx
1.732859099,v_{c}\approx 1.403403718,H_{c}\approx 0.07812913389$.

Figure 5: Left panel is the contour plot for infalling gas model seen by
distant observer using $S=0.35$($\lambda=1$) with
$M=1,n_{c}=0.001$,$\gamma=1.5$ and $L=0.125$. The parameters are
$r_{c_{1}}\approx 3.012941963,v_{c_{1}}\approx 0.6854442942,H_{c_{1}}\approx
0.4684637242$ and $r_{c_{2}}\approx 55.08762356,v_{c_{2}}\approx
0.1049634266,H_{c_{2}}\approx 0.9817239945$. Right panel is the contour plot
for infalling gas model seen by distant observer using $S=0.35$($\lambda=2$)
with $M=1,n_{c}=0.001$,$\gamma=1.5$ and $L=0.125$. The parameters are
$r_{c_{1}}\approx 2.748090692,v_{c_{1}}\approx 0.6898671753,H_{c_{1}}\approx
0.4912239522$ and $r_{c_{2}}\approx 69.55648888,v_{c_{2}}\approx
0.08593066630,H_{c_{2}}\approx 0.9904976826$.

Figure 6: Left panel is the contour plot for infalling gas model seen by
distant observer using $S=0.1$($\lambda=3$) with
$M=1,n_{c}=0.0.001$,$\gamma=1.5$ and $L=0.125$. The parameters are
$r_{c_{1}}\approx 2.567839201,v_{c_{1}}\approx 0.6932484363,H_{c_{1}}\approx
0.4769661820$ and $r_{c_{2}}\approx 70.06543962,v_{c_{2}}\approx
0.08539629339,H_{c_{2}}\approx 0.9906416885$. Right panel is the contour plot
for infalling gas model seen by distant observer using $S=-0.1$($\lambda=3$)
with $M=1,n_{c}=0.001$,$\gamma=1.5$ and $L=0.125$. The parameters are
$r_{c_{1}}\approx 2.508290694,v_{c_{1}}\approx 0.6943815761,H_{c_{1}}\approx
0.4664014420$ and $r_{c_{2}}\approx 70.07167753,v_{c_{2}}\approx
0.08538979385,H_{c_{2}}\approx 0.9906431420$.

Figure $(3)$ shows the contour plot for the corresponding intensities using
infalling gas model seen by distant observer using $S=0.35(\lambda=1)$ (left
panel) and using $S=0.35(\lambda=2)$ (right panel). We observe that the
accretion for corresponding intensities for $S=0.35(\lambda=2)$ begins from
subsonic flow for $r$ approaches to infinity, then follows supersonic flow
avoiding the saddle (critical) point and ends into the horizon. The supersonic
outflow starts in the region of horizon avoiding the saddle (critical) point
and ends to subsonic flow for $r$ approaches to infinity. On the other hand,
the accretion for corresponding intensities for $S=0.35(\lambda=1)$ begins
from subsonic flow for $r$ approaches to infinity, then follows supersonic
flow passes through critical (saddle) point and ends into the horizon. The
supersonic outflow starts in the region of horizon passing the critical
(saddle) point and ends subsonically for $r$ approaches to infinity. Figure
$(4)$ shows the contour plot for the corresponding intensities using infalling
gas model seen by distant observer using $S=0.1(\lambda=3)$ (left panel) and
using $S=-0.1(\lambda=3)$ (right panel). We analyze that the accretion for
both corresponding intensities starts from subsonic flow for $r$ approaches to
infinity, then follows supersonic flow avoiding the saddle (critical) point
and ends into the horizon. The supersonic outflow starts in the region of
horizon avoiding the saddle (critical) point and ends subsonically for $r$
approaches to infinity. In Figure (5) and (6), we present the contour plot for
different corresponding intensities using infalling gas model seen by distant
observer. We presented three sorts of fluid flow, $(i)$ subsonic non-global
flow, $(ii)$non-heteroclinic flow, $(iii)$ non-relativistic outflow because
the solution curves avoiding the critical points and accretion starts from the
furthest left point until the horizon.

##  VI Black Hole’s Accretion Rate

Mass accretion rate is described by the change in mass of BH per unit time. It
is the area times flux of BH at the event horizon and symbolically represented
by Ṁ. Here, we will point out factor that how the radius of accretion changes
by the effect of different fluids. The relativistic statement of the flux of
mass-energy density is modeled by $\dot{M}|_{rh}=4\pi r^{2}T_{t}^{r}|_{rh}$
(see, 21 -34 ). The energy-momentum tensor of perfect fluid is given by
$T_{t}^{r}=(\rho+p)u_{t}u^{r}$ 17 ; 24 . As energy of our dynamical system is
conserved so we have $\nabla_{\mu}J^{\mu}\equiv 0$ and
$\nabla_{\nu}T^{\mu\nu}\equiv 0$, from these conservation equations it follows
that

$r^{2}u^{r}(\rho+p)\sqrt{(f(r)+(u^{r})^{2})}=K_{3},$ (38)

where $K_{3}$ is a constant of integration. Now considering the equation of
state $p\equiv p(\rho)$, the equation of relativistic energy flux is (21 -34 )

$\frac{d\rho}{\rho+p}+\frac{du^{r}}{u^{r}}+2\frac{dr}{r}=0.$ (39)

By integrating the above equation,

$r^{2}u^{r}\exp\Big{[}\int_{\rho\infty}^{\rho}\frac{d\acute{\rho}}{\acute{\rho}+p(\acute{\rho})}\Big{]}=-K_{4},$
(40)

where $K_{4}$ is a constant of integration. After simplify the equation (40)
and (38), it can be shown

$K_{5}=-\frac{K_{3}}{K_{4}}=(\rho+p)\sqrt{Y(r)+(u^{r})^{2}}\exp\Big{[}-\int\frac{d\acute{\rho}}{\acute{\rho}+p(\acute{\rho})}\Big{]},$
(41)

where $K_{5}$ is a constant. Consider the boundary condition at infinity, then
$K_{5}\equiv\rho_{\infty}+p(\rho_{\infty})=-\frac{K_{3}}{K_{4}}$, here
$K_{3}\equiv(\rho+p)u_{t}u^{r}r^{2}=-K_{4}(\rho_{\infty}+p(\rho_{\infty}))$.
Using above relations it follows that

$\frac{\rho+p}{n}\sqrt{f(r)+(u^{r})^{2}}\equiv K_{7},$ (42)

where $K_{7}$ is a constant such that
$K_{7}=\frac{(\rho_{\infty}+p_{\infty})}{n_{\infty}}$. Using (38), we get new
relation of BH’s accretion rate

$\dot{M}=-4\pi r^{2}u^{r}(\rho+p)\sqrt{f(r)+(u^{r})^{2}}=-4\pi K_{3},$ (43)

then it becomes

$\dot{M}=-4\pi K_{4}(\rho_{\infty}+p(\rho_{\infty})).$ (44)

The above result holds for all those fluids due to boundary condition at
infinity on which the equation of state holds in the form $p=p(\rho)$. So, the
accretion rate of BH takes the form

$\dot{M}=-4\pi K_{4}(\rho+p)|_{r=r_{h}},$ (45)

at event horizon $r_{h}$.

Let us take an isothermal equation of state, i.e., $p=k\rho$, which implies
that $(\rho+p)\equiv\rho(1+k)$. Then equation (40) reduces to
$r^{2}u^{r}\rho^{\frac{1}{1+k}}=-K_{4}$, that is

$\rho=\Big{[}-\frac{K_{4}}{r^{2}u^{r}}\Big{]}^{1+k},$ (46)

using above information, equation (38) takes the form

$(u^{r})^{2}-\frac{K_{3}^{2}K_{4}^{-2(1+k)}}{(1+k)^{2}}r^{4k}(-u^{r})^{2k}+f(r)=0,$
(47)

in which the $u^{r}$ can be obtained for the given values of $k$. Using
$u^{r}$, one can find energy density $\rho(r)$ from (46).

Figure 7: Contour plot of mass accretion rate for different intensities of
infalling gas model seen by distant observer with $M=1,K_{3}=1,K_{4}=2$

###  VI.1 Behavior of ultra-stiff fluid

The four-velocity $u^{r}$ is obtained by taking $k=1$ in (47), that is 34a ;
34b ; 34c

$u^{r}=\pm 2K_{4}\sqrt{\frac{f(r)}{K_{3}^{2}r^{4}-4K_{4}^{4}}}.$ (48)

The corresponding energy density is

$\rho=\frac{(K_{3}^{2}r^{4}-4K_{4}^{4})}{4K_{4}^{2}r^{4}f(r)}.$ (49)

One can find the mass accretion rate by using (49) and (45)

$\dot{M}=\frac{2\pi(K_{3}^{2}r^{4}-4K_{4}^{4})}{K_{4}r^{4}f(r)}.$ (50)

Fig. (7) represent the behavior of mass accretion rate for different
intensities of infalling gas model seen by distant observer for the ultra-
stiff fluid $(k=1)$. One can notice that mass accretion rate depends upon the
model parameter $\lambda$ which further depends upon the scalar charge $S$.
The mass accretion rate is increased for higher values of scalar charge $S$.
We find the maximum accretion rate for

  * •

$\lambda=1,S=0.35$, we have $r\approx 3.9$.

  * •

$\lambda=2,S=0.35$, we have $r\approx 4.0$.

  * •

$\lambda=3,S=0.1$, we have $r\approx 4.1$.

  * •

$\lambda=3,S=-0.1$, we have $r\approx 4.12$.

So, we can conclude that mass accretion rate depend upon the parameters
$(\lambda,S)$. It is interesting to mention here, that mass accretion rate is
higher for lower values of scalar charge.

###  VI.2 Behavior of ultra-relativistic fluid

The four-velocity $u^{r}$ is obtained by taking $k=\frac{1}{2}$ in (47), that
is 34a ; 34b ; 34c

$u^{r}=\frac{2r^{2}K_{3}^{2}+\sqrt{4r^{2}K_{3}^{4}-81f(r)K_{4}^{6}}}{9K_{4}^{3}},$
(51)

and corresponding energy density is given by

$\rho=27\Big{(}\frac{K_{4}^{4}}{r^{2}(2r^{2}K_{3}^{2}+\sqrt{4r^{4}K_{3}^{4}-81f(r)K_{4}^{6}})}\Big{)}^{3/2}.$
(52)

By using (52) in (45), we get

$\dot{M}=216\pi
K_{4}\Big{[}\frac{K_{4}^{4}}{r^{2}(2r^{2}K_{3}^{2}+\sqrt{4r^{4}K_{3}^{4}-81f(r)K_{4}^{6}})}\Big{]}^{3/2}.$
(53)

Fig. (8) represent the behavior of mass accretion rate for different
intensities for $(k=\frac{1}{2})$ (ultra-relativistic fluid). We can find the
maximum accretion rate for

  * •

$\lambda=1,S=0.35$, we have $r_{IH}\approx 0.1,r_{OH}\approx 2.336$

  * •

$\lambda=2,S=0.35$, we have $r_{IH}\approx 0.15,r_{OH}\approx 2.15$

  * •

$\lambda=3,S=0.1$, we have $r_{IH}\approx 0.07,r_{OH}\approx 2$

  * •

$\lambda=3,S=-0.1$, we have $r_{IH}\approx 0.25,r_{OH}\approx 1.96$

From above values, it is evident that the maximum mass accretion rate located
at inner horizon (IH) and outer horizon (OH). So, we can conclude that mass
accretion rate depend upon the constants $(\lambda,S)$ and its maximum
accretion rate occur at $\lambda=3$ and $S=-0.1$ as compare to other values.

Figure 8: Contour plot of mass accretion rate for different intensities with
$M=1,K_{3}=0.1,K_{4}=2$.

###  VI.3 Behavior of radiation fluid

The radial velocity for $k=\frac{1}{3}$ is given by 34a ; 34b ; 34c

$\displaystyle u^{r}$ $\displaystyle=$
$\displaystyle\Big{[}\frac{\big{(}-32f(r)K_{4}^{4}+\sqrt{1024f(r)^{2}K_{4}^{8}-27r^{4}K_{3}^{6}}K_{4}^{2}\big{)}^{1/3}}{4K_{4}^{2}}$
(54) $\displaystyle+$
$\displaystyle\frac{3r^{4/3}K_{3}^{2}}{4K_{4}^{2/3}\big{(}(-32f(r)K_{4}^{4}+\sqrt{1024f(r)^{2}K_{4}^{8}-27r^{4}K_{3}^{6}})K_{4}^{2}\big{)}^{1/3}}\Big{]}^{2/3}.$

The energy density put the value of $u^{r}$ as calculated above and
$k=\frac{1}{3}$ in (46), we get

$\displaystyle\rho$ $\displaystyle=$
$\displaystyle\Big{[}\frac{K_{4}}{r^{2}}\Big{]}^{\frac{4}{3}}\Big{[}\frac{\big{(}-32f(r)K_{4}^{4}+\sqrt{1024f(r)^{2}K_{4}^{8}-27r^{4}K_{3}^{6}}K_{4}^{2}\big{)}^{1/3}}{4K_{4}^{2}}$
(55) $\displaystyle+$
$\displaystyle\frac{3r^{4/3}K_{3}^{2}}{4K_{4}^{2/3}\big{(}(-32f(r)K_{4}^{4}+\sqrt{1024f(r)^{2}K_{4}^{8}-27r^{4}K_{3}^{6}})K_{4}^{2}\big{)}^{1/3}}\Big{]}^{\frac{-8}{9}}.$

By using (55) and (45), we can get mass accretion rate

$\displaystyle\dot{M}$ $\displaystyle=$ $\displaystyle\Big{[}\frac{8\pi
K_{4}^{\frac{7}{3}}}{r^{\frac{8}{3}}}\Big{]}\Big{[}\big{(}-32f(r)K_{4}^{4}+\sqrt{1024f(r)^{2}K_{4}^{8}-27r^{4}K_{3}^{6}}K_{4}^{2}\big{)}^{1/3}(4K_{4}^{2})^{-1}$
(56) $\displaystyle+$
$\displaystyle\frac{3r^{4/3}K_{3}^{2}}{4K_{4}^{2/3}}\Big{(}(-32f(r)K_{4}^{4}+\sqrt{1024f(r)^{2}K_{4}^{8}-27r^{4}K_{3}^{6}})K_{4}^{2}\big{)}^{-1/3}]^{\frac{-8}{9}},$

Fig. (9) represent the behavior of mass accretion rate for different
intensities for radiation fluid. Maximum mass accretion rate is located at
inner and outer horizons for radiation fluid. So, we can conclude that mass
accretion rate depend upon the constants $(\lambda,S)$ and its maximum
accretion rate occur at $\lambda=3$ and $S=0.1$ as compared to other values.

Figure 9: Contour plot of mass accretion rate for different intensities with
$M=1,K_{3}=0.1,K_{4}=2$.

###  VI.4 Behavior of sub-relativistic fluid

The mass accretion rate for different corresponding intensities of infalling
gas model seen by distant observer is shown in Fig. $(10)$ for sub-
relativistic fluid. One can notice that mass accretion rate increase for
higher values of lower values of scalar charge i.e. $\lambda=2,S=-0.45$ as
compare to other values. One can find max accretion rate near

  * •

$\lambda=1,S=0.35$, we have $r_{IH}\approx 0.05,r_{OH}\approx 2.34$

  * •

$\lambda=2,S=0.35$, we have $r_{IH}\approx 0.05,r_{OH}\approx 2.15$

  * •

$\lambda=3,S=0.1$, we have $r_{IH}\approx 0.05,r_{OH}\approx 2$

  * •

$\lambda=3,S=-0.1$, we have $r_{IH}\approx 0.2,r_{OH}\approx 1.95$

It is evident that the mass accretion rate is infinite near the singularity
34a ; 34b ; 34c .

Figure 10: Contour plot of mass accretion rate for different intensities with
$M=1,K_{3}=0.1,K_{4}=2$.

##  VII Phase transition via black hole shadows

In this last section we shall explore an interesting idea to analyse the phase
transitions of the black hole based on the black hole shadow formalism
developed in Zhang:2019glo . We know that the specific heat of a black hole
can be: positive, i.e., $C>0$ and negative i.e., $C<0$, meaning a
thermodynamically stable and unstable state, respectively. In addition when
$C=0$ is the phase transition point. Furthermore the entropy $S$ is related to
the event horizon $r_{+}$ of the black hole with $dS/dr_{+}>0$, as a result we
can write

$\text{Sgn}(C)=\text{Sgn}\left(\frac{\partial T}{\partial r_{+}}\right),$ (57)

where Sgn is the sign function. In other words, we can say that in the e
$r_{+}-T$ diagram a positive slope means that the black hole is in a
thermodynamically stable state and a negative slope corresponds to a
thermodynamically unstable black hole. As shown in Ref. Zhang:2019glo  and
subsequently Belhaj:2020nqy , there is a possibility to probe the phase
transitions using the shadow radius of the black holes. To see this, recall
that the effective potential of the photon can be defined by

$V_{eff}(r)+\dot{r}^{2}=0,$ (58)

along with the further condition which allows to obtain the radius of the
photon

$V_{eff}(r)=V^{\prime}_{eff}(r)=0.$ (59)

Figure 11: Left panel: Plot of the shadow radius as a function of the event
horizon for $\lambda=1$. Right panel: Plot of the shadow radius as a function
of the event horizon for $\lambda=2$ using $S=0.2$.

Figure 12: Left panel: Plot of the black hole temperature as a function of the
shadow radius for $\lambda=1$. Right panel: Plot of the black hole temperature
as a function of the shadow radius for $\lambda=2$ and $S=0.2$.

Considering the circular orbit of the photon with

$V^{\prime\prime}_{eff}(r)<0,$ (60)

and using the fact that the Hawking temperature of the black hole is positive
it follows Zhang:2019glo

$\frac{dr_{s}}{dr_{+}}>0$ (61)

Finally for the temperature $T$ of the black hole it was argued that
Zhang:2019glo

$\frac{\partial T}{\partial r_{+}}=\frac{\partial T}{\partial
r_{s}}\frac{dr_{s}}{dr_{+}},$ (62)

which means

$\frac{\partial T}{\partial r_{+}}>0,~{}~{}\frac{\partial T}{\partial
r_{+}}=0,~{}~{}\frac{\partial T}{\partial r_{+}}<0,$ (63)

and

$\frac{\partial T}{\partial r_{s}}>0,~{}~{}\frac{\partial T}{\partial
r_{s}}=0,~{}~{}\frac{\partial T}{\partial r_{s}}<0,$ (64)

respectively. In order to work with analytical expressions we shall simplify
our analyses by considering the special case with: $\lambda=1$ and
$\lambda=2.$

###  VII.1 Case I

In this particular case, $\lambda=1$, we have the following result for the
event horizon

$\displaystyle r_{+}=2M+S$ (65)

along with shadow radius

$\displaystyle r_{s}=\frac{3\sqrt{3}r_{+}}{2},$ (66)

and consequently the temperature

$\displaystyle T=\frac{1}{4\pi r_{+}}.$ (67)

As can be observed from Fig. (11) (left panel) and Fig. (12) (left panel), for
this particular case, we have

$\frac{dr_{s}}{dr_{+}}>0,\,\,\,\frac{\partial T}{\partial r_{s}}<0,$ (68)

meaning that the black hole is thermodynamically unstable.

###  VII.2 Case II

Let us take $\lambda=2$, in this case we have the following result for the
event horizon

$\displaystyle r_{+}=M+\sqrt{M^{2}+S^{2}}.$ (69)

As a result the shadow radius reads

$r_{s}=\frac{(3M+\sqrt{9M^{2}+8S})}{2\Big{[}1-\frac{2M}{(3M+\sqrt{9M^{2}+8S})/2}+\frac{S}{((3M+\sqrt{9M^{2}+8S})/2)^{2}}\Big{]}^{1/2}},$
(70)

where

$\displaystyle M=\frac{r_{+}^{2}-S}{2r_{+}}.$ (71)

Finally, the temperature reads

$\displaystyle T=\frac{r_{+}^{2}-S+r_{+}S}{4\pi r_{+}^{3}}.$ (72)

Similarly, from Fig. (11) and Fig. (12) (right panels) we see that the slope
of the black hole temperature as a function of the shadow radius is negative
hence we conclude that the black hole is thermodynamically unstable for such
domain of parameters.

##  VIII Conclusions

In this paper we have used a model of infalling and radiating gas and studied
the shadow images as well as the intensities in the spacetime of black hole
solutions obtained in a theory of massive gravity with a Lorentz violating
symmetry. In particular we have shown that the properties of the shadow images
depends strongly on the sign before the scalar charge $S$. In the case $S>0$,
we saw that the shadow radii are bigger while the intensities are smaller
compared to $S<0$. Our analyses is based on a range of values for $S$ which
are obtained by constraining $S$ from the EHT results. We discussed the
accretion process of different fluids such as sub-relativistic fluid
($k=1/4$), radiation fluid ($k=1/3$), ultra-relativistic fluid ($k=1/2$) and
ultra-stiff fluid ($k=1$) on massive gravity black hole in the presence of
”Hair parameter” ($\lambda$) and scalar charge $S$. We also investigated the
behavior of the polytropic fluid onto massive gravity black hole where the
accretion starts from supersonic/subsonic flow and it passes through the
saddle (critical) point on the massive gravity black hole using model
parameter $\lambda=1$ and scalar charge $S=0.35$ where as it does not pass
through the critical point on massive gravity black hole for other parameters.
Most importantly, the accretion process ends near the Killing horizon which
agrees with other recent studies.

We also explored the four velocity in radial direction ($u^{r}$), energy
density ($\rho$) and mass accretion rate ($\dot{M}$). We investigated the mass
accretion rate of massive gravity black hole in the presence of different
fluids which indicates important signatures as graphically represented in
Figs. 7, 8, 9 and 10. The mass accretion rate is higher in massive gravity
black hole for higher values of scalar charge in the presence of ultra-stiff
fluid ($k=1$). The maximum mass accretion rate is located at inner and outer
horizons in the presence of radiation and sub-relativistic fluids. For sub-
relativistic, radiation and ultra-relativistic fluids accretion in massive
black hole, the mass accretion rate is higher for lower values of scalar
charge. From figures, it is evident that mass accretion rate is infinite near
singularity in the presence of sub-relativistic, radiation and ultra-
relativistic fluids.

Our final part of this work is devoted to the problem of phase transition and
it’s connection to the shadow radius. We have considered specific cases and
found that the black hole can be thermodynamically unstable in a given domain
of parameters.

## Acknowledgments

K.J. would like to thank Saurabh for very helpful discussions during the
preparation of this work.

## References

  * (1) M. Fierz, W. Pauli, Proc. Roy. Soc. Lond. A, 173, 211 (1939).
  * (2) A. I. Vainshtein, Phys. Lett. B, 39, 393 (1972); E. Babichev, M. Crisostomi, Phys. Rev. D, 88, 084002 (2013); E. Babichev, C. Deffayet, Class. Quant. Grav., 30, 184001 (2013).
  * (3) D. G. Boulware, S. Deser, Phys. Rev. D, 6, 3368 (1972); D. G. Boulware, S. Deser, Phys. Lett. B, 40, 227 (1972)
  * (4) C. de Rham, G. Gabadadze, Phys. Rev. D, 82, 044020 (2010); C. de Rham, G. Gabadadze, A. J. Tolley, Phys. Rev. Lett., 106, 231101 (2011).
  * (5) E. A. Bergshoeff, O. Hohm, P. K. Townsend, Phys. Rev. Lett., 102, 201301 (2009); S. F. Hassan, R. A. Rosen, JHEP, 02, 126 (2012); Y. F Cai, D. A. Easson, C. Gao, E. N. Saridakis, Phys. Rev. D, 87, 064001 (2013)
  * (6) G. Dvali, G. Gabadadze, M. Porrati, Phys. Lett. B, 485, 208 (2000); G. Dvali , G. Gabadadze, M. Porrati, Phys. Lett. B, 484, 112 (2000)
  * (7) Michael V. Bebronne, Peter G. Tinyakov, JHEP, 0904, 100, (2009); Erratum-ibid. 1106, 018, (2011).
  * (8) K. Jusufi, N. Sarkar, F. Rahaman, A. Banerjee and S. Hansraj, Eur. Phys. J. C 78 (2018) no.4, 349
  * (9) R. Zhang, J. Jing and S. Chen, Phys. Rev. D 95 (2017) no.6, 064054
  * (10) K. Jusufi, M. Jamil, H. Chakrabarty, Q. Wu, C. Bambi and A. Wang, Phys. Rev. D 101 (2020) no.4, 044035
  * (11) S. Fernando, Mod. Phys. Lett. A 31 (2016) no.16, 1650096
  * (12) S. Fernando, Mod. Phys. Lett. A 33 (2018) no.31, 1850177
  * (13) B. Liang, S. W. Wei and Y. X. Liu, Int. J. Mod. Phys. D 28 (2019) no.09, 1950113
  * (14) Perlick V., Tsupko O. Y., Bisnovatyi-Kogan G. S., 2015, Phys. Rev. D, 92, 104031
  * (15) R. Narayan, M. D. Johnson and C. F. Gammie, Astrophys. J. 885, no. 2, L33 (2019)
  * (16) H. Falcke, F. Melia and E. Agol, Astrophys. J. Lett. 528 (2000), L13
  * (17) C. Bambi, Phys. Rev. D 87 (2013), 107501
  * (18) R. Shaikh and P. S. Joshi, JCAP 10 (2019), 064
  * (19) K. Jusufi and Saurabh, Mon. Not. Roy. Astron. Soc. 503 (2021), 1310
  * (20) K. Saurabh and K. Jusufi, Eur. Phys. J. C 81 (2021) no.6, 490
  * (21) S. Nampalliwar, S. Kumar, K. Jusufi, Q. Wu, M. Jamil and P. Salucci, Astrophys. J. 916 (2021) no.2, 116
  * (22) X. X. Zeng, H. Q. Zhang and H. Zhang, [arXiv:2004.12074 [gr-qc]].
  * (23) M. Jamel, M. A. Rashid, A. Qadir, Eur. Phys. J. C 58, 325(2008)
  * (24) M. Jamel, Eur. Phys. J.C 62, 609(2009)
  * (25) H. Bondi, MNRAS 112, 195(1952)
  * (26) F. C. Michel, Astrophys. Space Sci. 15, 153(1972)
  * (27) Shapiro S L and Teukolsky S A 1983 Black Holes, White Dwarfs And Neutron Stars: The Physics of compact Objects (New York: Wiley)
  * (28) E. O. Babichev, V. I. Dokuchaev and Eroshenko YU N, Phys. -Usp. 56 1155(2013)
  * (29) U. Debnath, Eur. Phys. J. C 75, 129(2015)
  * (30) J. Karkowski and E. Malec, Phys. Rev. D 87, 044007(2013)
  * (31) P. Mach and E. Malec, Phys. Rev. D 88, 084055 (2013)
  * (32) P. Mach, E. Malec and J. Karkowski, Phys. Rev. D 88, 084056(2015)
  * (33) S. Bahamonde and M. Jamil, Eur. phys. J. C 75, 508(2015)
  * (34) B. P. Abbott et al., Phys. Rev. Lett. 116, 061102(2016)
  * (35) J. Driggers and S. Vitale, arXiv:1706.06183
  * (36) B. P. Abbott et al., Phys. Rev. Lett. 116, 221101(2016)
  * (37) T. Jacobson and D. Mattingly, Phys. Rev. D 64, 024028(2001); T.Jacobson, Proc. Sci., QG-Ph (2007) 020 [arXiv:0801.1547].
  * (38) Y. M. Huang and Y.G. Gong, Sci. China-Phys. Mech. Astron. 59, 640402(2016)
  * (39) T. Jacobson and D. Mattingly, Phys. Rev. D 63, 0415502(2001)
  * (40) Ding, C.: PRD 96, 104021(2017)
  * (41) A. Jawad, and M. U. Shahzad, Eur. Phys. J. C 76, 123 (2016)
  * (42) A. Jawad, and M. U. Shahzad, Eur. Phys. J. C 77, 515 (2017)
  * (43) G. Abbas and A. Ditta, General Relativity And Gravitational 51, 43(2019)
  * (44) P. Berglund, J. Bhattacharyya and D. Mattingly, Phys. Rev. D 85, 124019(2012)
  * (45) C. Ding, A. Wang and X. Wang, Phys. Rev. D 92, 084055 (2015)
  * (46) P. Berglund, J. Bhattacharyya and D. Mattingly, Phys. Rev. D 85, 124019(2012)
  * (47) C. Ding, A. Wang and X. Wang, Phys. Rev. D 92, 084055(2015)
  * (48) K. Yagi, D. Blas, E. Barausse and N. Yunes, Phys. Rev. D 89, 084067 (2014)
  * (49) T. Jacobson, in CPT and Lorentz Symmetry: Proceedings of Fourth Meeting, Bloomington, USA, 11 August 2007, edited by V. A. Kostelecky (World Scientific, Singapore, 2008), p.92
  * (50) M. Azreg-Ainou, A. K. Ahmed, M. Jamil, Classical and Quantum Gravity, 35(23), 235001 (2018).
  * (51) E. Chaverra and O. Sarbach, AIP Conference Proceedings. 1473(1) (2012).
  * (52) S. Bahamonde, M. Jamil, Eur. Phys. J. C 75, 508(2015)
  * (53) A. K. Ahmad, M. Azreg-Ainou, M. Faizal, M. Jamil, Eur. Phys. J. C 76, 280 (2016)
  * (54) A. K. Ahmad, M. Azreg-Ainou, S. Bahamonde, S. Capozziello, M. Jamil, Eur. Phys. J.C 76, 269 (2016)
  * (55) A. K. Ahmad, U. Camci and M. Jamil, Classical and Quantum Gravity 33, 215012 (2016)
  * (56) M. Azreg-Ainou, Eur. Phys. J. C 77, 36(2017)
  * (57) M. Umar Farooq, A. K. Ahmed, R. J. Yang and M. Jamil, Chin. Phys. C 44 (2020) no.6, 065102
  * (58) M. U. Shahzad, R. Ali, A. Jawad, S. Rani, Chinese Physics C, 44(6) 065106 (2020).
  * (59) M. U. Shahzad, R. Ali, A. Jawad, Nuclear Physics B 961, 115182 (2020).
  * (60) G. Abbas, A. Ditta, A. Jawad, M. U. Shahzad, General Relativity and Gravitation, 51(10) 1-20 (2019).
  * (61) Z. Y. Fan, Eur. Phys. J. C 77, no.4, 266 (2017)
  * (62) S. Guo, J. Pu and Q. Q. Jiang, [arXiv:1905.03604 [gr-qc]].
  * (63) M. Zhang and M. Guo, Eur. Phys. J. C 80, no.8, 790 (2020)
  * (64) A. Belhaj, L. Chakhchi, H. El Moumni, J. Khalloufi and K. Masmar, Int. J. Mod. Phys. A 35, no.27, 2050170 (2020)
  * (65) R. Shaikh, Phys. Rev. D 98, 024044 (2018).
  * (66) C. Bambi, K. Freese, S. Vagnozzi and L. Visinelli, Phys. Rev. D 100 (2019) no.4, 044057