In the centralized experiments we compute the $(\epsilon,\delta)$-DP
guarantees using the RDP accountant (Mironov, 2017) with
$\delta=1/|\mathcal{D}|$ where $\mathcal{D}$ where $|\mathcal{D}|=CS$ (i.e.
the number of classes $C$ multiplied by shot $S$). Setting
$\delta=1/|\mathcal{D}|$ is a standard choice and simplifies comparisons with
other papers. To allow for an easier comparison among different
$|\mathcal{D}|$ we provide Table 23 which illustrates the change of $\epsilon$
computed using the RDP accountant for $\delta=1e^{-5}$.

Additionally, we recompute the $(\epsilon,\delta)$-DP guarantees with the PRV
accountant (Gopi et al., 2021), which is a accurate numerical accountant and
results in slightly smaller $\epsilon$ than the RDP accountant given the same
privacy parameters and $\delta$. Table 24 shows the results for that.

Table 23: Recomputed $\epsilon$ at $\delta=1e^{-5}$ as a function of $S$ for
the datasets CIFAR-10, CIFAR-100 and SVHN and original
$\epsilon\in\\{1,2,4,8\\}$ that was computed originally at
$\delta=1/|\mathcal{D}|$. The computation is done using the RDP accountant
(Mironov, 2017) provided in opacus (Yousefpour et al., 2021). The ranges of
$\epsilon$ result from the fact that there is not a direct mapping from the
original $\epsilon$ to the recomputed $\epsilon$ but the recomputed $\epsilon$
depends on the used privacy parameters (noise multiplier, subsampling ratio
and number of steps).

original $\epsilon$ $1S$ $5S$ $10S$ $25S$ $50S$ $100S$ $250S$ $500S$ 1
3.30-3.32 2.20-2.33 1.94-2.20 1.69-1.71 1.54-1.56 1.43-1.46 1.30-1.34
1.22-1.24 CIFAR-10 2 5.41-5.43 3.95-4.49 3.56-3.60 3.18-3.22 2.95-2.97
2.76-2.92 2.54-2.66 2.41-2.50 4 9.14-9.16 7.14-8.25 6.57-6.78 5.99-6.11
5.61-5.73 5.31-5.68 4.96-5.31 4.73-4.87 8 15.80-15.82 13.02-13.84 12.19-13.41
11.35-11.71 10.72-11.57 10.25-10.83 9.67-10.50 9.28-9.51 1 1.94-1.97 1.54-1.65
1.43-1.44 1.30-1.34 1.22-1.23 1.16-1.17 1.08-1.09 1.03-1.04 CIFAR-100 2
3.56-3.64 2.95-2.98 2.75-2.77 2.54-2.55 2.41-2.42 2.29-2.30 2.16-2.17
2.07-2.08 4 6.60-6.81 5.63-5.73 5.32-5.42 4.96-5.03 4.73-4.94 4.53-4.55
4.29-4.30 4.14-4.15 8 12.26-12.74 10.76-10.86 10.25-10.48 9.66-9.85 9.28-9.39
8.94-9.03 8.52-8.55 8.25-8.29 1 3.30-3.32 2.19-2.33 1.94-1.96 1.69-1.71
1.54-1.56 1.43-1.50 1.30-1.31 1.22-1.24 SVHN 2 5.41-5.43 3.95-4.03 3.56-3.62
3.17-3.23 2.94-2.97 2.75-2.91 2.54-2.56 2.41-2.43 4 9.14-9.16 7.14-7.44
6.60-7.52 5.99-6.50 5.62-5.93 5.32-5.68 4.96-5.01 4.73-4.77 8 15.80-15.82
13.03-13.73 12.19-12.72 11.34-11.85 10.76-11.02 10.25-10.45 9.67-9.82
9.28-9.40

Table 24: Recomputed $\epsilon$ at $\delta=1e^{-5}$ as a function of $S$ for
the datasets CIFAR-10, CIFAR-100 and SVHN and original
$\epsilon\in\\{1,2,4,8\\}$ that was computed originally at
$\delta=1/|\mathcal{D}|$. The computation is done using the PRV accountant
(Gopi et al., 2021) provided in opacus (Yousefpour et al., 2021). The ranges
of $\epsilon$ result from the fact that there is not a direct mapping from the
original $\epsilon$ to the recomputed $\epsilon$ but the recomputed $\epsilon$
depends on the used privacy parameters (noise multiplier, subsampling ratio
and number of steps).

original $\epsilon$ $1S$ $5S$ $10S$ $25S$ $50S$ $100S$ $250S$ $500S$ 1
3.05-3.07 2.04-2.13 1.79-1.97 1.56-1.57 1.43-1.44 1.32-1.34 1.20-1.22
1.13-1.14 CIFAR-10 2 5.02-5.04 3.66-4.04 3.30-3.33 2.94-2.96 2.73-2.74
2.55-2.62 2.35-2.38 2.23-2.24 4 8.52-8.54 6.64-7.45 6.11-6.24 5.56-5.64
5.21-5.28 4.93-5.11 4.60-4.68 4.39-4.41 8 14.80-14.81 12.17-12.74 11.39-12.17
10.57-10.79 10.00-10.48 9.54-9.83 9.00-9.08 8.63-8.68 1 1.79-1.81 1.43-1.48
1.32-1.33 1.20-1.22 1.13-1.14 1.07-1.08 1.00-1.01 0.96-0.96 CIFAR-100 2
3.30-3.35 2.73-2.75 2.55-2.56 2.35-2.36 2.23-2.24 2.12-2.13 2.00-2.00
1.92-1.92 4 6.12-6.27 5.22-5.28 4.93-4.98 4.60-4.62 4.39-4.46 4.20-4.20
3.98-3.99 3.83-3.84 8 11.43-11.74 10.02-10.08 9.54-9.65 9.00-9.06 8.63-8.66
8.31-8.32 7.92-7.93 7.61-7.68 1 3.05-3.07 2.03-2.13 1.79-1.81 1.56-1.58
1.43-1.44 1.32-1.35 1.20-1.21 1.13-1.14 SVHN 2 5.02-5.04 3.66-3.71 3.30-3.34
2.94-2.97 2.72-2.74 2.55-2.62 2.35-2.36 2.23-2.24 4 8.52-8.54 6.64-6.85
6.12-6.71 5.56-5.83 5.22-5.37 4.93-5.11 4.60-4.62 4.38-4.40 8 14.80-14.81
12.18-12.65 11.39-11.73 10.57-10.86 10.02-10.16 9.54-9.64 9.00-9.05 8.64-8.66


# Proximally Sensitive Error
for Anomaly Detection and Feature Learning

Amogh Gudi, Fritjof Büttner, Jan van Gemert

###### Abstract

Mean squared error (MSE) is one of the most widely used metrics to expression
differences between multi-dimensional entities, including images. However, MSE
is not locally sensitive as it does not take into account the spatial
arrangement of the (pixel) differences, which matters for structured data
types like images. Such spatial arrangements carry information about the
source of the differences; therefore, an error function that also incorporates
the location of errors can lead to a more meaningful distance measure. We
introduce Proximally Sensitive Error (PSE), through which we suggest that a
regional emphasis in the error measure can ‘highlight’ semantic differences
between images over syntactic/random deviations. We demonstrate that this
emphasis can be leveraged upon for the task of anomaly/occlusion detection. We
further explore its utility as a loss function to help a model focus on
learning representations of semantic objects instead of minimizing syntactic
reconstruction noise.

##  1 Introduction

Figure 1: Comparison PSE vs MSE: A face image (left) is subtracted by two
variants (col 2): one with sunglasses (bottom), and one with some random noise
addition (top). MSE between the original image and the two variants is equal
(col 3). However, PSE of the image with sunglasses is much higher than with
random noise (col 4). This illustrates that MSE cannot distinguish between
syntactic/random and semantic/meaningful errors, while PSE can.

Since its introduction by Eukleídēs [1] in $\sim$300BC, Euclidean/L2 distance
has widely been used to express distances between points. The simplicity,
robustness, and mathematical convenience of this metric makes it a popular
choice as a similarity/distance metric in computer vision and machine learning
in the form of mean squared error (MSE) [2, 3, 4], where it finds wide use for
all domains of data types including images [5, 6]. In this work, we present an
alternate to MSE for structured data types (images) in the form of a
proximally sensitive error function.

MSE is well suited for measuring differences between scalars which are single-
dimensional, or vectors which are multi-dimensional. Such data types have no
information in the spatial arrangement of values/elements within, i.e., there
are no patterns in the way their elements are located (they are only required
to be consistent). For example, a feature vector describing an object’s
important characteristics. For such non-structured data types, the relative
locations (indexes) of the differences does not matter. On the other hand, for
structured data types like images, relative locations of the differences do
matter because information is also encoded in the the underlying spatial
arrangement of values. For example, pixels composing a visual image of an
object. However, this is not considered by the mean squared error, as
illustrated with an example in Figure 1 (column 3). In this study, we attempt
to address this drawback of MSE by introducing a locally sensitive metric.

An error function that incorporates spatial location of errors can lead to a
more meaningful error metric for images, since the meaning of the content of
an image relies heavily on the location of the pixel values that represent
semantic or meaningful objects. Based on the observation that adjacent pixels
often form regions of semantic meaning (in other words: objects in the image)
while sparse spread-out errors are caused by random or syntactic noise, we
hypothesise that an error function that emphasizes regions with high
concentrations of pixel-wise reconstruction error forms a better metric (see
example in Figure 1, column 4). Towards this end, we introduce Proximally
Squared Error (PSE), that implements this spatial dependence via Gaussian
convolutions.

In the field of computer vision, one of the utilities of such a location
sensitive error metric can be in tasks involving image reconstruction.
Typically for such tasks, the difference between a reconstructed image and the
original image is computed to iteratively improve the reconstruction [5, 7]
and/or make a downstream classification [8, 9]. To empirically evaluate our
hypothesis, we examine proximally sensitive error against mean squared error
for the tasks of image anomaly detection and unsupervised pre-training, both
involving image reconstruction.

##### Contributions

This work has the following contributions:

  1. (i)

We present proximally sensitive error (PSE), a novel locally sensitive error
function that also takes into account the relative locations of differences
between such structured data types.

  2. (ii)

We examine and provide insights into the applicability of PSE versus MSE for
image reconstruction powered tasks of anomaly detection and unsupervised pre-
training.

##  2 Related Work

##### Distance metrics for images

The straight-forward pixel-wise L2/Euclidian distance, equivalent to the mean
squared error (MSE), is a popular choice for expressing differences between
images [3, 4, 6, 5]. MSE has been used in the image reconstruction terms of
loss functions for training several neural network approaches such as sparse
autoencoders [3], variational autoencoders [4], convolutional autoencoders
[6], and generative adversarial networks [5]. In this work, we propose
proximally sensitive error (PSE) as an alternative to MSE to express
differences between images.

MSE does not match well with visually perceived differences between images by
humans [10, 11]. To counter this, Wang et al. [12] introduced the structured
similarity metric (SSIM), an distance metric specifically designed for
assessment of image/video quality loss due to compression. SSIM is able to
look at neighbouring pixels within a pre-defined window. Concurrently, Li et
al. [13] discovered heuristics from a large dataset to design the dynamic
partial distance function (DPF) that better represents perceptual similarity.
In our work, we propose a simplified distance function for structured data
like images by incorporating regional sensitivity.

##### Image anomaly detection

Anomaly detection in images can be divided into two broad classes (among
others) [14, 15]: direct inference/classification of anomalies [16, 17, 18];
and reconstruction and comparison based anomaly detection (typically un/semi-
supervised) [19, 20, 7]. Bergmann et al. [21] examined SSIM as a distance
metric for autoencoder reconstruction anomaly detection, which yielded results
similar to L2. In our work, we focus on a PCA reconstruction based anomaly
detection setup where we examine the applicability of PSE as a distance
metric.

##### Unsupervised pre-training

Unsupervised pre-training was discovered to provide a superior alternative to
fully stochastic parameter initialization of deep neural networks [22, 23,
24]. The use of end-to-end pre-training on image data has been widely studied
due to its potential benefits [8, 9], typically using the pixel-wise L2/MSE
reconstruction loss for optimization. In this paper, we explore PSE as a
location-sensitive image reconstruction loss for unsupervised pre-training
with images, and examine if this can lead to better feature learning.

##  3 Method

Figure 2: Illustration MSE vs PSE: MSE magnitude in the areas with more
spread-out errors is the same as areas with concentrated grouping of
residuals. In contract, PSE error is higher for closely grouped areas.

For two-dimensional images, the residuals between two images is simply the
differences between individual pixel values of the two images. This can be
expressed mathematically as:

$\mathcal{R}_{i,j}=\hat{Y}_{i,j}-Y_{i,j}\qquad\forall\leavevmode\nobreak\
\leavevmode\nobreak\ i\in M,\leavevmode\nobreak\ \leavevmode\nobreak\ j\in N$
(1)

where $Y_{i,j}$, $\hat{Y}_{i,j}$ represents the $i$th and $j$th pixel in
images $Y$ and $\hat{Y}$ of size $M\times N$.

The Mean Squared Error (MSE) between these two images is essentially the
average of the squares of the residuals between the two images. This is
expressed as:

$\text{MSE}=\frac{1}{MN}\sum_{i,j=1}^{M,N}\left(\mathcal{R}_{i,j}\right)^{2}$
(2)

As can be seen, the squared error values do not take the neighbourhood of
individual errors into consideration. Thus, residuals that are grouped tightly
and residuals that are spread-out contribute equally towards the mean. This is
illustrated in Figure 2.

To counter this, we propose a Proximally Sensitive Error (PSE) function:

$\text{PSE}=\frac{1}{MN}\sum_{i,j=1}^{M,N}\left(\left[\mathcal{R}*k(\sigma)\right]_{i,j}\right)^{2}$
(3)

where $*$ denotes the convolution operation and $k(\sigma)$ denotes a Gaussian
kernel with $\sigma$ as its standard deviation, given by:

$k(\sigma)_{x,y}=\frac{1}{2\pi\sigma^{2}}e^{-\frac{x^{2}+y^{2}}{2\sigma^{2}}}\qquad\forall\leavevmode\nobreak\
\leavevmode\nobreak\ x,y\in 2\sigma$ (4)

Through the convolution operation, every error value incorporates the error
value in its local neighbourhood (defined by $\sigma$). This way, PSE is able
to give a higher importance to residuals grouped close together versus
residuals sparsely spread-out. This is also visualized in Figure 2.

####  3.0.1 Image reconstruction based anomaly detection

Assuming closely grouped errors denote the more meaningful/semantic
differences between images (our hypothesis), we can leverage upon PSE’s
ability to highlight them to perform anomaly detection. The pipeline for
anomaly detection based on image reconstruction involves the following steps,
and illustrated in Figure 3.

  * •

A principle component analysis (PCA) model [25], which is capable of image
reconstruction, is trained on purely non-anomalous images of a particular
object/class.

  * •

The input image is passed through this PCA model and its reconstructed image
is obtained. Due to the model’s training, the non-anomalous parts of the input
image are reconstructed correctly, but the model fails to reconstruct any
anomalies in the image that it hasn’t seen during its training. This effect
can further be enhanced by reducing the number of PCA components used to
reconstruct the image.

  * •

Next, the pixelwise PSE (with a set $\sigma$ parameter) between the original
and reconstructed image is computed. This pixelwise PSE ‘image’ can
essentially be seen as a heatmap of differences between the two images.

  * •

Finally, the maximum PSE value in this computed heatmap is chosen denoting the
area with the highest difference, and this value provides and estimate of
anomalousness in the image.

The $\sigma$ parameter of the PSE function and the number of PCA components
used for image reconstruction can be optimized/learnt (e.g., via grid search)
based on examples of anomalous and non-anomalous images available in the
training set.

Figure 3: Illustration of the anomaly detection pipeline using proximally
sensitive error (PSE). A PCA model trained on non-anomalous images is unable
to reconstruct anomalies present in the input (the crushed part of the capsule
in this example). PSE can be used to highlight this difference, as seen in the
produced heatmap.

####  3.0.2 Feature learning via unsupervised pre-training

If the closely-grouped errors assigned a higher value by PSE are indeed more
semantic in nature (our hypothesis), PSE can essentially perform as a more
meaningful loss function for unsupervised image reconstructing. This is
because the model can be made to focus more on minimizing the reconstruction
of the closely grouped semantic errors over the spread-out syntactic errors
during training, leading to better feature learning.

Such unsupervised image reconstruct can be used as a pre-training step for a
downstream task such as classification using a autoencoder-style neural
network. The steps involved in this setup are as follows given a semi-
supervised dataset of unlabelled and labelled samples:

  * •

First, an autoencoder is trained end-to-end for image reconstruction with PSE
as the loss function using the large set of unlabelled samples.

  * •

Next, the encoder part of the autoencoder is appended with classification
layer(s) (e.g. fully connected layer with softmax activation) while the
decoder is discarded. This new model is now trained on the smaller set of
labelled samples.

Image classification can now be performed with this trained encoder-classifier
model.

##  4 Experiments and Results

###  4.1 Anomaly/Occlusion Detection

We focus on the task of few-shot anomaly detection in these experiments.

##### Setup

The task of anomaly detection consists of classifying if a particular object
in a given input image has an abnormality. For example, picture of a bottle
with a crack in it can be classified as anomalous since normal bottles do not
have cracks. Under the few-shot learning regime for anomaly detection, the
vast majority of available training samples belong to the non-anomalous class,
and only a handful of samples contain anomalies.

##### Datasets

We perform this set of experiments on two publicly available datasets: The
MVTecAD dataset [21] for industrial anomaly detection, and the AR Face dataset
[26] for facial occlusion detection. The MVTecAD dataset consists of
$\sim$5300 images of 15 categories of object classes, with $\sim$4100 non-
anomalous samples and $\sim$1200 images with multiple types of anomalies. The
AR Face dataset consists of 2600 frontal images of faces with varying
illumination and facial expressions, with 1200 of them containing occlusions
caused by sunglasses and scarf. Images from both datasets are resized and
converted to 128$\times$128 grayscale. Examples from these datasets can be
seen in Figure 5(a) (first rows).

####  4.1.1 Industrial Anomaly Detection

The results of 5-shot industrial anomaly detection on the MVTecAD dataset are
shown in Figure 4(a) in terms of average precision. Only 5 labelled samples
per anomaly class are used for optimizing the $\sigma$ hyper-parameter of the
PSE function and the number of PCA components used for image reconstruction.

As can be seen, the use of PSE attains a higher average precision
(0.73$\pm$0.2) than MSE (0.66$\pm$0.3) on average. Better performance is
obtained by PSE w.r.t MSE on 11 of the 15 object categories in the dataset. In
few categories like toothbrush and bottle, the performance gap between PSE and
MSE is marginal while the performance is very high. This is likely due to the
straight-forward appearance of anomalies in the images, thereby making the
task trivial for both PSE and MSE.

On the other hand, images from two of the categories where PSE performer
poorer than MSE (hazelnut and screw) are not pose-normalized and contain
rotation. This results in a very high variation in terms of the object’s pose,
which a simple PCA model is unable to model and reconstruct. For images of the
tile category, some anomalies are in the form of transparent occlusions which
leads to unreliable performance. Lastly, anomaly detection performance for
cable is the lowest for both MSE and PSE. This is because most anomalies in
this category are in the colour space (e.g., differently coloured wires are
swapped), and this information is lost due to the grayscale conversion. These
observations can be seen in the examples shown in Figure 5(a).

####  4.1.2 Facial Occlusion Detection

Figure 4(b) summarises and compares the results of 5-shot facial occlusion
detection on the AR Face dataset using PSE and MSE. Similar to the previous
experiment, 5 labelled samples per class are used to determine the model
hyper-parameters ($\sigma$ and PCA components).

It can be seen that PSE significantly outperforms MSE: PSE obtains an average
precision of $0.84\pm 0.05$ while MSE scores $0.43\pm 0.07$ over all classes.
Both PSE and MSE perform better with detecting sunglasses as compared to
scarf, likely due to the scarf occluding the lower part of the face that
contains more variation due to facial hair and expressions.

Overall, PSE based occlusion detection on faces from the AR dataset works a
lot better than anomaly detection on the MVTecAD dataset. This can be
attributed to the pose-normalisation of face crops in AR and the much higher
number of training samples available, as compared to that of the individual
object categories of MVTecAD.

(a) MVTecAD Industrial Dataset (b) AR Face Dataset Figure 4:  Results of
5-shot anomaly/occlusion detection on the MVTecAD industrial dataset (4(a))
and AR face dataset (4(b)). PSE performs better than MSE in almost all
categories. Poor performance in some categories are due lack of pose
normalization (screw, hazelnut), transparent occlusions (tile), loss of colour
information (cable), and higher variation in lower face (scarf).

[capbesideposition=right,bottom,capbesidewidth=0.5]figure[]

(a) MVTecAD Industrial Dataset (b) AR Face Dataset Figure 5:  Examples of
5-shot anomaly/occlusion detection on the MVTecAD industrial dataset (5(a))
and AR face dataset (5(b)). The PCA is unable to reconstruct (middle rows) the
anomaly in the input image (top rows). Using this, PSE essentially provides a
heatmap of the anomaly (bottom rows). Reconstructions of screw and metal nut
are especially poor due lack of pose-normalization in the images.

[capbesideposition=right,bottom,capbesidewidth=0.52]figure[]

###  4.2 Unsupervised Pre-training

In these experiments, we evaluate the use of PSE vs MSE as a loss function for
the task of unsupervised pre-training.

##### Datasets

Two classification datasets are used in this set of experiments: a modified
version of MNIST handwritten digits dataset [27] (hereby called MNISTX)
composed of 70,000 labelled samples (10 classes); and a grayscale version of
the STL-10 image classification dataset [28] containing 100,000 unlabelled and
500 labelled images (10 classes). Examples from both datasets are shown in
Figure 6. The MNIST dataset has been modified by padding the original image
such that its size is tripled (84$\times$84 pixels) and adding salt-and-pepper
noise to the image. The STL-10 dataset images are 96$\times$96 pixels and
converted to grayscale.

Figure 6: Example images from the modified MNISTX (top row) and STL-10
datasets (bottom row). The depicted classes are (left to right): 1, 2, 3, 4, 5
from MNIST; and airplane, ship, truck, monkey, bird from STL-10.

##### Setup

We consider a simple autoencoder neural network architecture composed on an
input layer, a fully connected hidden layer with ReLU that serves as the
bottleneck, and a fully connected output layer with a sigmoid activation
function. Another fully-connected softmax layer serves as the classification
layer whose dimensions match the number of classes in the dataset, i.e., 10.
The dimensions of the input and output layers match the number of pixels in
the input images (i.e., 84$\times$84 for MNISTX and 96$\times$96 for STL-10).
The $\sigma$ parameter of the PSE loss function is set to 0.5 (determined
empirically).

####  4.2.1 Computational Efficiency

The resulting accuracy obtained by the model using PSE and MSE with respect to
the autoencoder bottleneck size (i.e., dimension of the hidden layer) can be
seen in Figure 7. For both datasets, it can be seen that using PSE results in
higher accuracy than MSE on average per bottleneck size. This means PSE can
achieve the same results as MSE in spite of using smaller models. In the
STL-10 dataset, the accuracy gap between PSE and MSE is largest when the
autoencoder’s bottleneck is the smallest, and this gap reduces gradually as
the bottleneck size increases. On the MNISTX dataset, such an observation is
not as clear (standard deviations overlap), however the accuracy gap does
become smaller/inverts for large bottleneck sizes.

These observations can be attributed to the the fact that a model with fewer
parameters benefits the most from PSE’s ability to focus the learning on
minimizing semantic errors, thereby leading to more computationally efficient
feature learning. On the other hand, the higher learning capacity of larger
models might enable them to learn meaningful features in spite of no explicit
boosting of semantic errors over syntactic ones in MSE.

(a) MNISTX

(b) STL-10

Figure 7: Results of unsupervised pre-training using PSE and MSE on MNISTX
(7(a)) and STL-10 (7(b)) datasets in terms of the autoencoder bottleneck size
(error bars represent standard deviations). PSE performs better than MSE for
models with smaller bottlenecks, but this gap reduces for higher complexity
models.

####  4.2.2 Data Efficiency

Figure 8 shows the accuracy obtained by using PSE and MSE for varying amounts
of unsupervised pre-training data used. As can be seen, PSE consistently
outperforms MSE as a loss function on both datasets over all sizes of the
unsupervised pre-training set. This suggests fewer data is required by PSE to
achieve the same results as MSE.

On MNISTX, the accuracy gap between PSE and MSE is larger for lower training
set sizes, and this gap appears to close in when more training data is
introduced. This could suggest that PSE’s focus on more meaningful errors
helps the model learn more efficiently from the data, and this effect is
magnified when the available training data is limited.

On the STL-10 dataset, such an observation is not apparent. However, PSE seems
to produce more consistent results than MSE, both across and within different
training set sizes (the standard deviation of accuracies is smaller). This
could potentially be caused by the strong attention on the more semantic
errors in PSE overcoming the effect of stochasticity in the model’s parameter
initialization that could have lead to learning distractions.

(a) MNISTX

(b) STL-10

Figure 8: Results of unsupervised pre-training using PSE and MSE on MNISTX and
STL-10 datasets in terms of the size of the pre-training set (error bars
represent training sets). Overall, PSE performs better than MSE over all sizes
of training data used. PSE results are also more consistent, evident by the
smaller standard deviation error bars.

##  5 Discussion

Experiments performed on the application of proximally sensitive error (PSE)
for few-shot anomaly detection appeared to show promising results. PSE was
able to outperform mean squared error (MSE) in detecting anomalies on a large
majority of object categories. This potentially supports our suggestion that
closely grouped differences are primarily semantic in nature and PSE is able
to boost them in comparison with spread-out differences, which are largely
syntactic, i.e., caused by random noise.

In these experiments, the parameter defining the amount of spread of errors
(i.e., the $\sigma$ of the Gaussian kernel) did require to be
estimated/optimized per object category. This suggests that for different
types of objects, the spatial definition of semantic objects vs syntactic
noise is different. Also, inferring/learning this parameter automatically
(along with the number of PCA components used) can improve the applicability
of the proposed anomaly detection pipeline from few-shot towards zero-shot
detection.

Experiments on the use of PSE as a loss function for unsupervised pre-training
suggested that PSE can lead to better feature learning than MSE under
constrained conditions: when the model’s computational capacity is limited, or
when the availability of training data is low. This can make PSE a promising
choice for training models for low-powered computational devices and novel
image tasks. However, the results lack certainty and a wider range of
experiments on different types of datasets and mode complex model
architectures can shed further light on the generalizability of these results.

## References

  * [1] Leonard C. Bruno.  Math and mathematicians : the history of math discoveries around the world.  1999\.
  * [2] Ching-Pei Lee and Chih-Jen Lin.  A study on l2-loss (squared hinge-loss) multiclass svm.  Neural computation, 25(5):1302–1323, 2013.
  * [3] Andrew Ng et al.  Sparse autoencoder.  CS294A Lecture notes, 72(2011):1–19, 2011.
  * [4] Diederik P Kingma and Max Welling.  Auto-encoding variational bayes.  arXiv preprint arXiv:1312.6114, 2013.
  * [5] Xudong Mao, Qing Li, Haoran Xie, Raymond YK Lau, and Zhen Wang.  Multi-class generative adversarial networks with the l2 loss function.  arXiv preprint arXiv:1611.04076, 5:1057–7149, 2016.
  * [6] Min Chen, Xiaobo Shi, Yin Zhang, Di Wu, and Mohsen Guizani.  Deep features learning for medical image analysis with convolutional autoencoder neural network.  IEEE Transactions on Big Data, 2017.
  * [7] Chong Zhou and Randy C Paffenroth.  Anomaly detection with robust deep autoencoders.  In Proceedings of the 23rd ACM SIGKDD international conference on knowledge discovery and data mining, pages 665–674, 2017.
  * [8] Stiaan Wiehman, Steve Kroon, and Hendrik De Villiers.  Unsupervised pre-training for fully convolutional neural networks.  In 2016 Pattern Recognition Association of South Africa and Robotics and Mechatronics International Conference (PRASA-RobMech), pages 1–6. IEEE, 2016.
  * [9] Mathilde Caron, Piotr Bojanowski, Julien Mairal, and Armand Joulin.  Unsupervised pre-training of image features on non-curated data.  In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 2959–2968, 2019.
  * [10] B Girod.  Psychovisual aspects of image processing: What’s wrong with mean squared error?  In Proceedings of the seventh workshop on multidimensional signal processing, pages P–2. IEEE, 1991.
  * [11] Pawan Sinha and Richard Russell.  A perceptually based comparison of image similarity metrics.  Perception, 40(11):1269–1281, 2011.
  * [12] Zhou Wang, Alan C Bovik, Hamid R Sheikh, and Eero P Simoncelli.  Image quality assessment: from error visibility to structural similarity.  IEEE transactions on image processing, 13(4):600–612, 2004.
  * [13] Beitao Li, Edward Chang, and Yi Wu.  Discovery of a perceptual distance function for measuring image similarity.  Multimedia systems, 8(6):512–522, 2003.
  * [14] Guansong Pang, Chunhua Shen, Longbing Cao, and Anton Van Den Hengel.  Deep learning for anomaly detection: A review.  ACM Computing Surveys (CSUR), 54(2):1–38, 2021.
  * [15] Thibaud Ehret, Axel Davy, Jean-Michel Morel, and Mauricio Delbracio.  Image anomalies: A review and synthesis of detection methods.  Journal of Mathematical Imaging and Vision, 61(5):710–743, 2019\.
  * [16] Philipp Liznerski, Lukas Ruff, Robert A Vandermeulen, Billy Joe Franks, Marius Kloft, and Klaus-Robert Müller.  Explainable deep one-class classification.  arXiv preprint arXiv:2007.01760, 2020.
  * [17] Shashanka Venkataramanan, Kuan-Chuan Peng, Rajat Vikram Singh, and Abhijit Mahalanobis.  Attention guided anomaly localization in images.  In European Conference on Computer Vision, pages 485–503. Springer, 2020.
  * [18] Izhak Golan and Ran El-Yaniv.  Deep anomaly detection using geometric transformations.  arXiv preprint arXiv:1805.10917, 2018.
  * [19] Simon Hawkins, Hongxing He, Graham Williams, and Rohan Baxter.  Outlier detection using replicator neural networks.  In International Conference on Data Warehousing and Knowledge Discovery, pages 170–180. Springer, 2002.
  * [20] Jinghui Chen, Saket Sathe, Charu Aggarwal, and Deepak Turaga.  Outlier detection with autoencoder ensembles.  In Proceedings of the 2017 SIAM international conference on data mining, pages 90–98. SIAM, 2017.
  * [21] Paul Bergmann, Kilian Batzner, Michael Fauser, David Sattlegger, and Carsten Steger.  The mvtec anomaly detection dataset: a comprehensive real-world dataset for unsupervised anomaly detection.  International Journal of Computer Vision, 129(4):1038–1059, 2021\.
  * [22] Yoshua Bengio, Pascal Lamblin, Dan Popovici, and Hugo Larochelle.  Greedy layer-wise training of deep networks.  In Advances in neural information processing systems, pages 153–160, 2007.
  * [23] Dumitru Erhan, Pierre-Antoine Manzagol, Yoshua Bengio, Samy Bengio, and Pascal Vincent.  The difficulty of training deep architectures and the effect of unsupervised pre-training.  In Artificial Intelligence and Statistics, pages 153–160. PMLR, 2009.
  * [24] Dumitru Erhan, Aaron Courville, Yoshua Bengio, and Pascal Vincent.  Why does unsupervised pre-training help deep learning?  In Proceedings of the thirteenth international conference on artificial intelligence and statistics, pages 201–208. JMLR Workshop and Conference Proceedings, 2010.
  * [25] Harold Hotelling.  Analysis of a complex of statistical variables into principal components.  Journal of educational psychology, 24(6):417, 1933.
  * [26] A.M. Martinez and R. Benavente.  The ar face database.  1998\.
  * [27] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner.  Gradient-based learning applied to document recognition.  Proceedings of the IEEE, 86(11):2278–2324, 1998.
  * [28] Adam Coates, Andrew Ng, and Honglak Lee.  An analysis of single-layer networks in unsupervised feature learning.  2011\.


11institutetext: Instituto de Ciencias Astronómicas, de la Tierra y del
Espacio (ICATE-CONICET), C.C 467, 5400, San Juan, Argentina 22institutetext:
Universidad Nacional de San Juan (UNSJ), Facultad de Ciencias Exactas, Físicas
y Naturales (FCEFN), San Juan, Argentina 33institutetext: Instituto de
Investigación Multidisciplinar en Ciencia y Tecnología, Universidad de La
Serena, Raúl Bitrán 1305, La Serena, Chile 44institutetext: Departamento de
Física y Astronomía, Universidad de La Serena, Av. Cisternas 1200 N, La
Serena, Chile 55institutetext: Gemini Observatory / NSF’s NOIRLab, Casilla
603, La Serena, Chile 66institutetext: Observatorio Astronómico de Córdoba
(OAC), Laprida 854, X5000BGR, Córdoba, Argentina 77institutetext: Laboratório
Nacional de Astrofísica (LNA/MCTI), rua Estados Unidos 154, Itajubá, MG,
Brasil 88institutetext: The Observatories of the Carnegie Institution for
Science, 813 Santa Barbara Street, Pasadena, CA 91101, USA 99institutetext:
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET),
Argentina

# Disentangling the origin of chemical differences using GHOST

C. Saffe 112299 P. Miquelarena 112299 J. Alacoria 1199 E. Martioli 77 M.
Flores 112299 M. Jaque Arancibia 3344 R. Angeloni 55 E. Jofré 6699 J. Yana
Galarza 88 E. González 22 A. Collado 112299

(Received xx, 2024; accepted xx, 2024)

###### Abstract

Aims. We explore different scenarios to explain the chemical difference found
in the remarkable giant-giant binary system HD 138202 + CD-30 12303. For the
first time, we suggest how to distinguish these scenarios by taking advantage
of the extensive convective envelopes of giant stars.

Methods. We carried out a high-precision determination of stellar parameters
and abundances by applying a full line-by-line differential analysis on GHOST
high-resolution spectra. We used the FUNDPAR program with ATLAS12 model
atmospheres and specific opacities calculated for an arbitrary composition
through a doubly iterated method. Physical parameters were estimated with the
isochrones package and evolutionary tracks were calculated via MIST models.

Results. We found a significant chemical difference between the two stars
($\Delta$[Fe/H] $\sim$ 0.08 dex), which is largely unexpected considering the
insensitivity of giant stars to planetary ingestion and diffusion effects. We
tested the possibility of engulfment events by using several different
combinations of stellar mass, ingested mass, metallicity of the engulfed
object and different convective envelopes. However, the planetary ingestion
scenario does not seem to explain the observed differences. For the first
time, we distinguished the source of chemical differences using a giant-giant
binary system. By ruling out other possible scenarios such as planet formation
and evolutionary effects between the two stars, we suggest that primordial
inhomogeneities might explain the observed differences. This remarkable result
implies that the metallicity differences that were observed in at least some
main-sequence binary systems might be related to primordial inhomogeneities
rather than engulfment events. We also discuss the important implications of
finding primordial inhomogeneities, which affect chemical tagging and other
fields such as planet formation. We strongly encourage the use of giant-giant
pairs. They are a relevant complement to main-sequence pairs for determining
the origin of the observed chemical differences in multiple systems.

###### Key Words.:

stars: chemically peculiar – stars: early type – stars: abundances – planetary
systems

##  1 Introduction

Most binary systems are thought to have formed from a common molecular cloud
that shared the same chemical composition. This is supported by observations
of binary systems in star-forming regions (e.g. Reipurth et al., 2007; Vogt et
al., 2012; King et al., 2012) and by numerical models of binary formation
(e.g. Kratter, 2011; Reipurth & Mikkola, 2012). However, a number of works
studied their chemical composition and found slight but noticeable differences
between the components of some binary systems (e.g. Gratton et al., 2001;
Desidera et al., 2004, 2006).

It is difficult to explain the origin of the chemical differences, and a
number of possible explanations emerge. For instance, Meléndez et al. (2009)
showed that the Sun is deficient in refractory elements when compared to solar
twins. They suggested that the missing refractories might be locked up in
terrestrial planets. They noted that the solar depletion pattern might be
explained by removing the combined mass of the terrestrial planets from the
convective zone alone. Some studies followed this idea and tried to explain
the differences observed in main-sequence binary systems where only one
component hosts a known planet (e.g. Ramírez et al., 2011; Saffe et al., 2015)
or a debris disk (Saffe et al., 2016). Alternatively, Booth & Owen (2020)
suggested that a giant planet can block a mass of dust exterior to its orbit
at the time of planet formation, preventing the dust from accreting onto the
star. In this way, these two scenarios (Meléndez et al., 2009; Booth & Owen,
2020) attributed the chemical differences observed in binary systems to the
planet formation process.

Planetary engulfment events also appear to be a promising scenario to explain
the observed differences in main-sequence binary systems (see, e.g. Gratton et
al., 2001; Saffe et al., 2017; Oh et al., 2018; Nagar et al., 2020; Spina et
al., 2021; Jofré et al., 2021; Flores et al., 2024). We note that chemical
inhomogeneities detected in the open clusters M67, Hyades, and Pleiades were
also ascribed to ingestion events (Oh et al., 2017; Ness et al., 2018; Spina
et al., 2018). In particular, Spina et al. (2021) performed a statistical
study of 107 main-sequence binary systems and suggested that planet engulfment
events are common, with an occurrence $\geq$ 20-35% in solar-like stars. In
stark contrast, Behmard et al. (2023) claimed that engulfment signatures are
rarely detected (a rate closer to $\sim$2.9%) and ruled out practically all
previous engulfment detections in 10 different binary systems. Instead of
ingestion events, Behmard et al. (2023) suggested that the differences
observed in binary systems may be attributed to primordial differences between
stellar components. We also note that on more theoretical grounds, chemical
signatures of planet ingestion seem unlikely (Théado & Vauclair, 2012) because
the ingested material is rapidly diluted by thermohaline mixing. Thus, it is
not entirely clear that engulfment events can explain the chemical differences
observed in binary systems.

Primordial inhomogeneities were also suggested based on a study of binary
systems by Ramírez et al. (2019) and Liu et al. (2021). The two studies found
that binaries with a higher projected separation $d$ present a higher
metallicity difference $|\Delta$[Fe/H]$|$, and they attributed this
correlation to a primordial chemical inhomogeneity. However, Ramírez et al.
(2019) cautioned that engulfment events could blur the proposed correlation,
while Liu et al. (2021) noted that atmospheric diffusion could also add a
possible dependence on the stellar parameters for main-sequence stars. We also
note that diffusion effects could produce chemical differences between stars
in open clusters (e.g. Liu et al., 2019; Souto et al., 2019; Casamiquela et
al., 2020). The studies above illustrate that the origin of the chemical
differences observed in binary systems is strongly debated. In particular, it
is hard to distinguish possible superposed effects such as primordial
inhomogeneities, planetary ingestion, and diffusion effects (e.g. Liu et al.,
2016; Ramírez et al., 2019; Liu et al., 2021; Behmard et al., 2023; Nissen &
Gustafsson, 2018).

Most previous works focused on main-sequence binary systems. However, we note
that giant stars are also widely used to perform detailed comparisons in the
chemical tagging (e.g. Bovy, 2016; Ness et al., 2018; Price-Jones et al.,
2019). Giant stars could present evolutionary effects in species such as C and
N. Some authors preferred to avoid these particular species in the chemical
tagging (e.g. Bovy, 2016) while others preferred to include them with a
caution (e.g. Ness et al., 2018; Price-Jones et al., 2019). In any case, it is
important to note that giant stars are significantly less prone to diffusion
effects than main-sequence stars because their convection zones are deeper and
more massive (e.g. Korn et al., 2007; Dotter et al., 2017, and references
therein). Dotter et al. (2017) suggested the use of giant stars (e.g., in the
APOGEE survey) to minimize diffusion effects in the chemical tagging. In
addition, it is expected that signatures of external pollution (including
their related condensation temperature Tc trends) decrease significantly in
giants stars compared to main-sequence stars (e.g. Fischer & Valenti, 2005;
Pasquini et al., 2007b; Spina et al., 2021). In other words, giant stars are
thought to be significantly less sensitive than main-sequence stars to
diffusion and pollution effects. This makes giant-giant pairs ideal targets
for testing the chemical homogeneity assumed by the chemical tagging to
determine the origin of the observed differences. For example, it would be
highly desirable to explore the correlation suggested between $d$ and
$|\Delta$[Fe/H]$|$ (Ramírez et al., 2019; Liu et al., 2021) using giant-giant
pairs, which would avoid the suggested blur of the correlation due to
diffusion and pollution effects. However, very few works have studied the
composition of giant-giant pairs in detail so far (e.g. Torres et al., 2015).

We present in this work the first detailed analysis of the chemical
composition of the giant-giant binary HD 138202 + CD-30 12303 (hereafter,
stars A and B), with a bound probability $>$95% from Gaia EDR3 data (El-Badry
et al., 2021) and a projected separation of 73” ($\sim$38575 au).
Surprisingly, we found a significant chemical difference between the two stars
($\Delta$[Fe/H] $\sim$ 0.08 dex), which is largely unexpected considering
their insensitivity to planetary ingestion and diffusion effects. We consider
this a remarkable result for several reasons. First, we found a difference
between the two components in a binary system in which we separated the source
of the chemical differences for the first time (and we attributed them to
primordial inhomogeneities). This would imply that metallicity differences
should in general be taken with caution because they might originate in
scenarios that are unrelated to engulfments. Thus, in order to claim ingestion
events, it would become mandatory to explore additional evidence such as the
study of Tc trends, the lithium content, and the stellar rotation. Second, if
it is confirmed that the slight chemical differences we detected are
primordial (which would be more in line with the results of Behmard et al.,
2023), it could have important implications as follows. It would challenge the
main assumption of chemical tagging, that is, the chemical homogeneity. It
would place important constraints on formation models of multiple systems
(e.g. Bate, 2019; Guszejnov et al., 2021) and interstellar medium (ISM) mixing
(e.g. Feng & Krumholz, 2014; Armillotta et al., 2018). Finally, a primordial
difference could severely impact planet formation, which might help to
explain, for example, why very similar stars in wide binary systems present
different planetary systems (e.g. Biazzo et al., 2015; Teske et al., 2016).
This highlights that the study of giant-giant pairs (as in the present work)
may emerge as an important complement to the study of main-sequence pairs.

##  2 Observations and data reduction

Observations of the giant-giant pair were acquired through the Gemini High-
resolution Optical SpecTrograph (GHOST), which is attached to the 8.1 m Gemini
South telescope at Cerro Pachón, Chile. GHOST is illuminated via 1.2” integral
field units that provide the input light apertures. The spectral coverage of
GHOST between 360-900 nm is appropriate for deriving stellar parameters and
chemical abundances using several features. It provides a high resolving power
R$\sim$50000 in the standard resolution
mode111https://www.gemini.edu/instrumentation/ghost. The read mode was set to
medium, as recommended for relatively bright targets. The observations were
taken on May 15, 2023, during a GHOST science verification run, using the same
spectrograph configuration for both stars. The exposure times were 3 $\times$
200 sec and 3 $\times$ 180 sec on targets A and B, obtaining a final signal-
to-noise ratio (S/N) of $\sim$400 per pixel measured at $\sim$6000 Å in the
combined spectra for both stars. The standard star 18 Sco was also observed
with the same spectrograph setup, achieving a similar S/N to use as initial
reference. The spectra were reduced using the GHOST data reduction pipeline
v1.0.0, which works under DRAGONS222https://www.gemini.edu/observing/phase-
iii/reducing-data/dragons-data-reduction-software. This is a platform for the
reduction and processing of astronomical data.

##  3 Stellar parameters and abundance analysis

The fundamental parameters (Teff, log $g$, [Fe/H], and vturb) were derived
following a similar procedure as in our previous work (Saffe et al., 2018,
2019). We measured the equivalent widths (EW) of the metallic lines using the
IRAF task splot in the stellar spectra. The line lists were taken from works
of giant stars (Jofré et al., 2015; Soto et al., 2021) with updated laboratory
data for some lines (Liu et al., 2014a; Meléndez et al., 2014; Bedell et al.,
2014). We imposed an excitation and ionization balance of Fe lines using the
differential version of the FUNDPAR program (Saffe, 2011; Saffe et al., 2018).
This code made use of ATLAS12 model atmospheres (Kurucz, 1993) together with
the MOOG program (Sneden, 1973), using specific opacities calculated for an
arbitrary composition. The stellar parameters were determined using the solar
twin 18 Sco as reference, that is, (A - 18 Sco) and (B - 18 Sco), by adopting
(5811 K, 4.42 dex, 0.04 dex, 1.06 km s-1) for 18 Sco. These are the highest-
precision parameters currently derived for this solar twin (Liu et al., 2020).
We recalculated the parameters of star A, but used B as reference, that is, (A
- B), as listed in Table 1333$\Delta$(Fe/H) $=$ log(Fe/H)∗ $-$ log(Fe/H)ref
and as shown in Appendix A. The errors on the stellar parameters were derived
following the procedure detailed in Saffe et al. (2015), which takes the
individual and mutual covariance terms of the error propagation into account.
Figure 1 shows the abundance versus excitation potential (top panel) and the
abundance versus the reduced EW (bottom panel) for the case (A - B) with an
average uncertainty of 0.02 dex.

Table 1: Stellar parameters derived for each star. (Star - Reference) |  Teff |  log $g$ |  $\Delta$(Fe/H) |  vturb
---|---|---|---|---
| [K] | [dex] | [dex] |  [km s-1]
(A - 18 Sco) |  4952 $\pm$ 49 |  2.51 $\pm$ 0.09 |  0.067 $\pm$ 0.014 |  1.82 $\pm$ 0.06
(B - 18 Sco) |  5007 $\pm$ 45 |  2.57 $\pm$ 0.08 |  -0.015 $\pm$ 0.012 |  1.72 $\pm$ 0.05
(A - B) |  4952 $\pm$ 30 |  2.52 $\pm$ 0.06 |  0.083 $\pm$ 0.011 |  1.82 $\pm$ 0.04
Figure 1: Differential abundance vs. excitation potential (upper panel) and
vs. reduced EW (lower panel) for the case (A - B). The filled and empty
circles correspond to Fe I and Fe II.

The hyperfine structure splitting (HFS) was considered for V I, Mn I, Co I,
and Cu I using the HFS constants of Kurucz & Bell (1995) and performing
spectral synthesis for these species. We also derived the Li I abundance using
spectral synthesis with the resonance line 6707.80 Å, which includes the
doublet 6707.76 Å, 6707.91 Å and HFS components. We corrected the Li I
abundance for nonlocal thermodynamic equilibrium (NLTE) effects by
interpolating in the data of Lind et al. (2009). We adopted $\Delta$LiNLTE-LTE
$\sim$ 0.18 dex for both stars, implying that NLTE effects are not significant
for the case (A - B). The C/N ratio, which is sensitive to evolutionary
effects, was derived through spectral synthesis. The C abundances were
obtained from the C I lines between 7111 - 7116 Å, while N abundances were
obtained by fixing the C content and then varying N in the CN band near
$\sim$4212 Å.

##  4 Results and discussion

The star A is more metal rich by $\sim$0.08 dex than its companion (see Table
1). The condensation temperatures of the elements were taken from the 50% Tc
values derived by Lodders (2003) for a solar system gas with [Fe/H]=0. The
differential abundances (A - B) are presented in Fig. 2 as a function of Tc.
We discarded from the fits species with evolutionary effects such as C and N,
and species that could drive the trends, such as Zn , Al  and Ba . The black
dotted line would correspond to a null metallicity difference between the
stars. We obtained slopes of 0.80$\pm$6.68 10-5 dex K-1 and -1.20$\pm$13.20
10-5 dex K-1 for all species and for the refractory species, respectively. The
abundance dispersion in Fig. 2 tends to increase the uncertainties in the
slopes, which should be taken with caution. The average abundances of the
volatiles (Tc $<$ 950 K) and refractories are 0.073$\pm$0.035 dex and
0.081$\pm$0.010 dex, respectively. Although we find no significant Tc trend
between stars A and B, most species differ by $\sim$0.08 dex in the two stars.
In the next subsections, we explore different scenarios to explain the
observed differences.

Figure 2: Differential abundances (A - B) as a function of Tc. The continuous
lines show linear fits to all species (black) and to the refractory species
(Tc $>$ 950 K, magenta). The dotted black line corresponds to a null
metallicity difference between the stars.

###  4.1 Scenario of the evolutionary state

If both giant stars underwent first dredge up (FDU) before, as is strongly
suggested by the low C/N and Li abundances (Salaris & Cassisi, 2017),
evolutionary effects ($<$0.01 dex) cannot explain the observed difference of
$\sim$0.08 dex in Fe. Even when we assume that only one star passed through
the FDU phase (which is highly unlikely), evolutionary effects ($<\sim$0.04
dex) are not enough to explain the observed difference in Fe. The calculations
are extensively discussed in Appendix B.

###  4.2 Scenario of planet ingestion

A metallicity variation due to a planet engulfment is difficult to detect in
stars with a significant convective envelope (e.g. Fischer et al., 2004;
Fischer & Valenti, 2005; Pasquini et al., 2007a, b; Spina et al., 2015, 2021).
For example, Fischer et al. (2004) and Fischer & Valenti (2005) suggested that
the higher convective envelopes of subgiant stars (compared to main-sequence
stars) should result in a much lower or null increase in metallicity due to
external pollution. Moreover, Pasquini et al. (2007a, b) estimated that the
convective envelope of a main-sequence 1 M⊙ star increases about 30-35 times
when the star evolves to the RGB, changing from $\sim$0.022 M⊙ to $\sim$0.77
M⊙. The authors claimed that a possible higher metallicity (confined to the
superficial layers) would easily decrease to the primordial values through the
deepening convective zone (CZ). In particular, they estimated that an excess
of 0.25 dex in a solar star would become lower than $\sim$1% in a giant star.
Similarly, for the case of ingestion in main-sequence stars, Spina et al.
(2015) showed that the mass of the CZ is a critical parameter for determining
the [Fe/H] enhancement (e.g., their Figure 2). More recently, Spina et al.
(2021) showed that planetary ingestion is extremely sensitive to the thickness
of the external layer (e.g., their Fig. 1), and they concluded that giant
stars (and low-mass main-sequence stars) are not expected to vary their
chemical composition because their external layers are extremely thick. In
other words, giant stars are thought to be significantly less sensitive than
main-sequence stars to engulfment events.

These arguments disfavor an engulfment event to explain the observed
metallicity difference between stars A and B. However, we estimated the amount
of planetary material that star A would need to ingest to increase its
metallicity by $\sim$0.08 dex compared to star B. A first-order approximation
is detailed in Appendix B. We estimate that star A would need to have ingested
between 11.0$-$150.0 MJup of planetary material, depending on the adopted
convective envelope mass and metallic content of the ingested planet (see
Table 4). In particular, the ingestion of planets with masses near the lower
value of 11 MJup would require extremely metallic objects, which are difficult
to explain with current planet formation models (see e.g. the discussions in
Leconte et al., 2009; Thorngren et al., 2016). In this case, a low convective
envelope mass for star A of only 35% of their total mass would also be
required. In addition, the ingestion of massive planetary bodies should
produce a significant increase in the rotational velocity of giant stars
(Carlberg et al., 2009, 2012; Privitera et al., 2016; Stephan et al., 2020).
We estimate an increase in the rotational velocity of star A between
8.72$-$37.88 km s-1 after the planet ingestion (see Table 4). However, we find
no evidence of significantly different projected rotational velocities between
stars A and B (v sini 4.73$\pm$0.44 km s-1 and 5.19$\pm$0.34 km s-1, after
quadratically subtracting vmacro from Hekker & Meléndez, 2007). Star B
presents an even slightly higher v sini than star A, in contrast to what is
expected after an ingestion by star A (although we caution that the axis
orientation could still play a role).

We also estimated the expected increase in the lithium content of star A
produced by the planet ingestion (see Table 4). After the engulfment of
11.0$-$150.0 MJup of planetary material, we estimate that the lithium
abundance of star A should increase by $\sim$1.50 to 2.10 dex. However, the Li
abundances are A(Li)${}_{A}=$0.76$\pm$0.04 dex and A(Li)${}_{B}=$1.25$\pm$0.04
dex (estimated with spectral synthesis and NLTE corrected following Lind et
al., 2009). In other words, the planet ingestion predicts a strong increase in
lithium of star A, while the observations seem to show the opposite, that is
to say, a higher lithium content in star B. We note that some works suggested
that an ingestion event could be ruled out if the same component of a binary
system presented both a higher Li content and a lower metallicity of the pair
(Ramírez et al., 2019; Spina et al., 2021), as observed in the stars of the
present work. The Li abundances of stars A and B also appear to be similar to
those of other giant stars (see Fig. 7 in Appendix B), while the expected Li
value after an ingestion is considerably higher. The higher Li abundance of
star B compared to star A might at least partially be explained by their
slightly higher Teff (see Appendix B). It is also important to note that the
lithium abundances are strongly modified by evolutionary effects such as the
FDU and other still uncertain processes. Privitera et al. (2016) suggested
using a possible increase in the rotational velocities rather than the lithium
abundances in order to detect a planetary ingestion event in giant stars.

To summarize the ingestion scenario, an engulfment that produced the
metallicity difference between stars A and B would require very high values of
ingested material together with extremely metallic planets and a very low
convective envelope of star A. This is highly unlikely. These extreme values
should also be accompanied by a significant increase in the rotational
velocity and lithium abundances, which are not detected. The iron and lithium
abundances also seem to contradict the abundances expected after an ingestion
event. In addition, no planets are detected around stars A and B. Therefore,
current evidence does not support the ingestion scenario.

###  4.3 Scenario of sequestered refractories

Meléndez et al. (2009) found that the Sun is depleted in refractory species
when compared to solar twins, suggesting that the missing refractories might
be locked in terrestrial planets and in the cores of giant planets. The
depletion pattern is explained if the combined mass of terrestrial planets is
removed from the convective zone of the Sun (Meléndez et al., 2009; Chambers,
2010; Kunitomo et al., 2018; Bitsch et al., 2018). When the star evolves off
the main-sequence, the massive convective zone in the red giant phase erases
this chemical fingerprint, as suggested by Maldonado & Villaver (2016). This
implies that the mutual chemical difference found between the giant components
in this work (where no clear Tc trend or planets are detected) can hardly be
attributed to this effect.

We also note that the massive convective envelopes of giant stars could
present an additional advantage for testing the original homogeneity of the
chemical tagging. We mentioned that giants stars are less sensitive to
diffusion and pollution effects than main-sequence stars. In addition, if
planet formation produces a possible sequestration of refractories in the most
superficial layers of main-sequence stars (as suggested by e.g. Meléndez et
al., 2009; Chambers, 2010; Kunitomo et al., 2018; Bitsch et al., 2018), this
fingerprint should be diluted by the massive envelopes of giant stars.

###  4.4 Scenario of primordial inhomogeneities

Some works suggested that the slight chemical differences found between the
components of main-sequence binary systems could be attributed to primordial
inhomogeneities (Ramírez et al., 2019; Liu et al., 2021; Behmard et al.,
2023). We suggest that the chemical differences found between stars A and B
are also possibly primordial by previously ruling out other scenarios. The
large separation of the two stars ($\sim$38575 au) also supports this idea.
However, no Tc trend is detected between stars A and B. In this way, the main
finding of this work is the detection of clear chemical differences but null
Tc trends in a giant-giant pair.

Further relevant implications of this result are listed below.
(a) In general, binaries with overall abundance differences but no clear Tc
trends are likely due to primordial inhomogeneities (many cases of chemical
anomalies in different literature works, such as e.g. Spina et al., 2021).
(b) This poses a crucial challenge to the concept of chemical tagging.
Primordial inhomogeneties very likely stem from an inhomogeneous ISM, and
therefore, the origin of stars cannot be easily tagged. We derived the 3D
velocity difference $\Delta$v between stars A and B and obtained 1.13 km/s,
which would support the binarity (i.e., the conatal nature) of this pair. For
example, Young et al. (2023) studied a sample of 125 comoving pairs, selected
by taking $\Delta$v $<$ 2.0 km/s, a cutoff chosen to avoid nonconatal pairs.
(c) Primordial inhomogeneities would place important constraints on formation
models of multiple systems (Bate, 2019; Guszejnov et al., 2021) and on
hydrodynamic simulations of ISM mixing (e.g. Feng & Krumholz, 2014; Armillotta
et al., 2018). For example, Bate (2019) showed that a lower metallicity
results in an increased fragmentation in cores, filaments, and disks because
the cooling rate of dense gas is higher.
(d) A primordial difference might also affect planet formation. This might
help to explain, for example, why very similar stars in wide binary systems
can present different planetary systems (e.g. Biazzo et al., 2015; Teske et
al., 2016).

We strongly encourage the study of giant-giant pairs. This novel approach
might help us to distinguish the origin of the slight chemical differences
observed in multiple systems.

###### Acknowledgements.

We thank the anonymous referee for constructive comments that improved the
paper. The authors thank R. Kurucz and C. Sneden for making their codes
available to us. CS acknowledge the financial support from projects PIP
11220210100048CO and CICITCA 21/E1235. E.M. acknowledges funding from FAPEMIG
under project number APQ-02493-22 and a research productivity grant number
309829/2022-4 awarded by the CNPq, Brazil. PM and JA acknowledge the financial
support from CONICET in the forms of Doctoral Fellowships. GHOST was built by
a collaboration between Australian Astronomical Optics at Macquarie
University, National Research Council Herzberg of Canada, and the Australian
National University, and funded by the International Gemini partnership. The
instrument scientist is Dr. Alan McConnachie at NRC, and the instrument team
is also led by Dr. Gordon Robertson (at AAO), and Dr. Michael Ireland (at
ANU). The authors would like to acknowledge the contributions of the GHOST
instrument build team, the Gemini GHOST instrument team, the full SV team, and
the rest of the Gemini operations team that were involved in making the SV
observations a success.

## References

  * Aguilera-Gómez et al. (2016) Aguilera-Gómez, C., Chanamé, J., et al., 2016, ApJ 829, 127
  * Armillotta et al. (2018) Armillotta, L., Krumholz, M., Fujimoto, Y., 2018, MNRAS 481, 5000
  * Asplund et al. (2009) Asplund, M., Grevesse, M., Sauval, A., Scott, P., 2009, ARA&A 47, 481
  * Basu & Hekker (2020) Basu, S., Hekker, S., 2020, FrASS 7, 44
  * Bate (2019) Bate, M., 2019, MNRAS 484, 2341
  * Behmard et al. (2023) Behmard, A., Dai, F., Brewer, J., et al., 2023, MNRAS 521, 2969
  * Bedding et al. (2011) Bedding, T. R., et al., 2011, Nature 471, 608
  * Bedell et al. (2014) Bedell, M., Meléndez, J., Bean, J., et al., 2014, AJ 795, 23
  * Biazzo et al. (2015) Biazzo, K., Gratton, R., Desidera, S., et al., 2015, A&A 583, A135
  * Bitsch et al. (2018) Bitsch, B. Forsberg, R., Liu, F., Johansen, A., 2018, MNRAS 479, 3690
  * Booth & Owen (2020) Booth, R., Owen, J., MNRAS 493, 5079
  * Bovy (2016) Bovy, J., 2016, ApJ 817, 49
  * Bovy et al. (2014) Bovy, J., Nidever, D., Rix, H.-W., et al., 2014, ApJ 790, 127
  * Carlberg et al. (2009) Carlberg, J., Majewski, S., Arras, P., 2009, ApJ 700, 832
  * Carlberg et al. (2012) Carlberg, J., Cunha, K., Smith, V., Majewski, S., 2012, ApJ 757, 109
  * Casamiquela et al. (2020) Casamiquela, L., Tarricq, Y., Soubiran, C., et al., 2020, A&A 635, A8
  * Cassisi & Salaris (1997) Cassisi S., Salaris M., 1997, MNRAS 285, 593
  * Chambers (2010) Chambers, J., 2010, AJ 724, 92
  * Charbonnel et al. (2020) Charbonnel, C., Lagarde, N., Jasniewicz, G., et al., 2020, A&A 633, A34
  * Desidera et al. (2004) Desidera, S., Gratton, R. G., Scuderi, S., et al., 2004, A&A 420, 683
  * Desidera et al. (2006) Desidera, S., Gratton, R. G., Lucatello, S., Claudi, R. U., 2006, A&A 454, 581
  * Dotter (2016) Dotter, A., 2016, ApJS, 222, 8
  * Dotter et al. (2017) Dotter, A., Conroy, C., Cargile, P., et al., 2017, ApJ 840, 99
  * El-Badry et al. (2021) El-Badry, K., Rix, H.-W., Heintz, T., 2021, MNRAS 506, 2269
  * Feng & Krumholz (2014) Feng, Y., Krumholz, M., 2014, Nature 513, 523
  * Fischer et al. (2004) Fischer, D., Valenti, J., Marcy, G., 2004, IAU Symp 219, 29
  * Fischer & Valenti (2005) Fischer, D. A., Valenti, J. 2005, ApJ 622, 1102
  * Flores et al. (2024) Flores, M., Yana Galarza, J., Miquelarena, P., et al., 2024, MNRAS 527, 10016
  * (29) Gaia Collaboration (Brown, A., et al.) 2018, A&A, 616, A1
  * Girardi et al. (1998) Girardi L., Groenewegen M. A., Weiss A., Salaris M., 1998, MNRAS 301, 149
  * Girardi (2016) Girardi, L., 2016, ARA&A 54, 95
  * Gratton et al. (2001) Gratton, R., Bonanno, G., Claudi, R., et al., 2001, A&A 377, 123
  * Guszejnov et al. (2021) Guszejnov, D., Grudic, M., Hopkins, P., et al., 2021, MNRAS 502, 3646
  * Hekker & Meléndez (2007) Hekker, S., Meléndez, J., 2007, A&A 475, 1003
  * Iben (1968) Iben, I., 1968, ApJ 154, 581
  * Jofré et al. (2015) Jofré, E., Petrucci, R., Saffe, C., et al., 2015, A&A 574, A50
  * Jofré et al. (2021) Jofré, E., Petrucci, R., Maqueo Chew, Y., et al., 2021, AJ 162, 291
  * King et al. (2012) King, R., Parker, R., Patience, J., Goodwin, S., 2012, MNRAS 421, 2025
  * Korn et al. (2007) Korn, A. J., Grundahl, F., Richard, O., et al., 2007, ApJ 671, 402
  * Kratter (2011) Kratter, K. M. 2011, in ASP Conf. Ser. 447, Evolution of Compact Binaries, ed. L. Schmidtobreick, M. Schreiber, & C. Tappert (San Francisco), 47
  * Kunitomo et al. (2018) Kunitomo, M., Guillot, T., et al., 2018, A&A 618, A132
  * Kurucz (1993) Kurucz, R. L. 1993, ATLAS9 Stellar Atmosphere Programs and 2 km s-1 grid, CD-ROM No. 13 (Cambridge, MA: Smithsonian Astrophysical Observatory)
  * Kurucz & Bell (1995) Kurucz, R., Bell, B., 1995, Atomic Line Data, Kurucz CD-ROM No. 23, Smithsonian Astrophysical Observatory, Cambridge, MA.
  * Leconte et al. (2009) Leconte, J., Baraffe, I., Chabrier, G., et al., 2009, A&A 506, 385
  * Liu et al. (2014a) Liu, F., Asplund, M., Ramírez, I., et al., 2014a, MNRASL 442, L51
  * Liu et al. (2014b) Liu, Y. J., Tan, K. F., Wang, L., et al., 2014b, ApJ 785, 94
  * Liu et al. (2016) Liu, F., Yong, D., Asplund, M., et al., 2016, MNRASL 457, 3934
  * Liu et al. (2019) Liu, F., Asplund, M., Yong, D., et al., 2019, A&A 627, A117
  * Liu et al. (2020) Liu, F., Yong, D., Asplund, M., et al., 2020, MNRAS 495, 3961
  * Liu et al. (2021) Liu, F., Bitsch, B., Asplund, M., et al., 2021, MNRAS 508, 1227
  * Lind et al. (2009) Lind, K., Asplund, M., Barklem, P., 2009, A&A 503, 541
  * Lodders (2003) Lodders, K., 2003, AJ 591, 1220
  * Lodders & Fegley (1998) Lodders, K., Fegley, B. 1998, The planetary scientist’s companion (Oxford University Press)
  * Maldonado & Villaver (2016) Maldonado, J., Villaver, E., 2016, A&A 588, A98
  * Martinet et al. (2022) Martinet, S., Meynet, G., Nandal, D., et al., 2022, A&A 664, A181
  * Meisner et al. (2023) Meisner, A., Leggett, S., Logsdon, S., et al., 2023, AJ 166, 57
  * Meléndez et al. (2009) Meléndez, J., Asplund, M., Gustafsson, B., Yong, D., 2009, AJ 704, L66
  * Meléndez et al. (2014) Meléndez, J., Ramírez, I., Karakas, A., et al., 2014, AJ 791, 14
  * Montalbán et al. (2010) Montalbán J., Miglio A., Noels A., et al., 2010, ApJL 721, L182
  * Morton (2015) Morton, T. D. 2015, Astrophysics Source Code Library [record ascl:1503.010]
  * Nagar et al. (2020) Nagar, T., Spina, L., Karakas, A., 2020, ApJL 888, 9
  * Ness et al. (2018) Ness, M., Rix, H., Hogg, D., et al., 2018, ApJ 853, 198
  * Nissen & Gustafsson (2018) Nissen, P., Gustafsson, B., A&ARv 26, 6
  * Oh et al. (2017) Oh, S., Price-Whelan, A., Hogg, D., et al., 2017, AJ 153, 257
  * Oh et al. (2018) Oh, S., Price-Whelan, A., Brewer, J., et al., 2018, ApJ 854, 138
  * Pasquini et al. (2007a) Pasquini, L., Döllinger, M., Hatzes, A., et al., 2007, IAU Symp 249, 209
  * Pasquini et al. (2007b) Pasquini, L., Döllinger, M., Weiss, A., et al., 2007, A&A 473, 979
  * Price-Jones et al. (2019) Price-Jones, N., Bovy, J., 2019, MNRAS 487, 871
  * Privitera et al. (2016) Privitera, G., Meynet, G., Eggenberger, P., et al., 2016, A&A 593, A129
  * Ramírez et al. (2011) Ramírez, I., Meléndez, J., Cornejo, D., et al., 2011, ApJ 740, 76
  * Ramírez et al. (2019) Ramírez, I., Khanal, S., Lichon, S., et al., 2019, MNRAS 490, 2448
  * Ramírez & Meléndez (2005) Ramírez, I., Meléndez, J., 2005, ApJ 626, 465
  * Reipurth et al. (2007) Reiputh, B., Guimaraes, M., Connelley, M., Bally, J., 2007, AJ 134, 2272
  * Reipurth & Mikkola (2012) Reiputh, B., Mikkola, S., 2012, Nature 492, 221
  * Saffe (2011) Saffe, C., RMxAA 47, 3
  * Saffe et al. (2015) Saffe, C., Flores, M., Buccino, A., 2015, A&A 582, 17
  * Saffe et al. (2016) Saffe, C., Flores, M., Jaque-Arancibia, M., et al., 2016, A&A 588, 81
  * Saffe et al. (2017) Saffe, C., Jofré, E., Martioli, E., et al., 2017, A&A 604, L4
  * Saffe et al. (2018) Saffe, C., Flores, M., Miquelarena, P., et al., 2018, A&A 620, 54
  * Saffe et al. (2019) Saffe, C., Jofré, E., Miquelarena, P., et al., 2019, A&A 625, 39
  * Salaris & Cassisi (2017) Salaris, M., Cassisi S., 2017, RSOS id.170192, doi:10.1098/rsos.170192
  * Schlegel et al. (1998) Schlegel, D., Finkbeiner, D. P., Davis, M. 1998, ApJ, 500, 525
  * Sneden (1973) Sneden, C., ApJ 184, 839
  * Soto et al. (2021) Soto, M., Jones, M., Jenkins, J., A&A 647, A157
  * Souto et al. (2019) Souto, D., Allende Prieto, C., Cunha, K., et al., 2019, ApJ 874, 97
  * Spina et al. (2015) Spina, L., Palla, F., Randich, S., et al., 2015, A&A 582, L6
  * Spina et al. (2018) Spina, L., Meléndez, J., Casey, A., et al., 2018, ApJ 863, 179
  * Spina et al. (2021) Spina, L., Sharma, P., Meléndez, J., et al., 2021, NatAs 5, 1163
  * Stephan et al. (2020) Stephan, A., Naoz, S., Gaudi, S., Salas, J., 2020, ApJ 889, 45
  * Teske et al. (2016) Teske, J., Schectman, S., Vogt, S., et al., 2016, AJ 152, 167
  * Thorngren et al. (2016) Thorngren, D., Fortney, J., Murray-Clay, R., Lopez, E., 2016, ApJ 831, 64
  * Torres et al. (2015) Torres, G., Claret, A., Pavlovski, K., Dotter, A., 2015, ApJ 807, 26
  * Théado & Vauclair (2012) Théado S., Vauclair S., 2012, ApJ, 744, 123
  * Vogt et al. (2012) Vogt, N., Schmidt, T., Neuhäuser, R., et al., 2012, A&A 546, A63
  * Young et al. (2023) Yong, D., Liu, F., Ting, Y.-S., et al., 2023, MNRAS 526, 2181

##  Appendix A Stellar parameters and abundances

We present in Table 2 the differential abundances [X/H] $\pm$ $\sigma_{TOT}$
obtained for the case (A-B). For each species, we show the observational error
$\sigma_{obs}$ (estimated as $\sigma/\sqrt{(n-1)}$ , where $\sigma$ is the
standard deviation of the different lines) as well as internal errors due to
uncertainties in the stellar parameters $\sigma_{par}$ (by adding
quadratically the abundance variation when modifying the stellar parameters by
their uncertainties). For chemical species with only one line, we adopted for
$\sigma$ the average standard deviation of the other elements. The total error
$\sigma_{TOT}$ was obtained by quadratically adding $\sigma_{obs}$ and
$\sigma_{par}$.

Table 2: Chemical abundances for the case (A-B). Specie |  [X/H] $\pm$ etot | $\sigma_{obs}$ | $\sigma_{par}$
---|---|---|---
[Li I/H] |  -0.490 $\pm$ 0.031 | 0.010 | 0.029
[C I/H] |  0.105 $\pm$ 0.030 | 0.007 | 0.029
[N I/H] |  0.040 $\pm$ 0.032 | 0.010 | 0.029
[O I/H] |  0.048 $\pm$ 0.058 | 0.010 | 0.057
[Na I/H] |  0.065 $\pm$ 0.033 | 0.021 | 0.026
[Mg I/H] |  0.077 $\pm$ 0.027 | 0.010 | 0.025
[Al I/H] |  -0.024 $\pm$ 0.022 | 0.010 | 0.019
[Si I/H] |  0.115 $\pm$ 0.011 | 0.010 | 0.005
[S I/H] |  0.097 $\pm$ 0.042 | 0.010 | 0.041
[Ca I/H] |  0.041 $\pm$ 0.022 | 0.012 | 0.018
[Sc II/H] |  0.105 $\pm$ 0.033 | 0.025 | 0.022
[Ti I/H] |  0.063 $\pm$ 0.013 | 0.008 | 0.010
[V I/H] |  0.035 $\pm$ 0.011 | 0.006 | 0.009
[Cr I/H] |  0.045 $\pm$ 0.013 | 0.008 | 0.010
[Mn I/H] |  0.070 $\pm$ 0.031 | 0.010 | 0.029
[Fe I/H] |  0.083 $\pm$ 0.004 | 0.003 | 0.003
[Fe II/H] |  0.083 $\pm$ 0.020 | 0.012 | 0.016
[Co I/H] |  0.077 $\pm$ 0.013 | 0.007 | 0.010
[Ni I/H] |  0.097 $\pm$ 0.008 | 0.006 | 0.004
[Cu I/H] |  0.130 $\pm$ 0.031 | 0.010 | 0.029
[Zn I/H] |  0.157 $\pm$ 0.036 | 0.010 | 0.034
[Y II/H] |  0.083 $\pm$ 0.038 | 0.010 | 0.036
[Ba II/H] |  -0.100 $\pm$ 0.031 | 0.010 | 0.029
[Ce II/H] |  0.124 $\pm$ 0.030 | 0.010 | 0.029

We also took the opportunity and estimated Teff of stars A and B by using
different photometric calibrations in order to compare them with high-
precision spectroscopic results. Ramírez & Meléndez (2005) provided the Teff
calibration as a function of (B-V) through a polynomial fit. We derived an
extinction of A${}_{v}\sim$ 0.57 mag from Gaia Collaboration DR3  and
A${}_{v}\sim$ 0.73 mag from the maps of Schlegel et al. (1998). By using Av
from Gaia, we obtain Teff(A)$=$ 4944$\pm$126 K and Teff(B)$=$ 4991$\pm$128 K,
while with Av from Schlegel et al. (1998), we obtain slighly higher values,
Teff(A)$=$ 5054$\pm$132 K and Teff(B)$=$ 5104$\pm$140 K. We note that the
spectroscopic Teff agrees well compared to the photometric Teff with Av taken
from Gaia. This indicates that the extinction values from Gaia might be more
appropriate. By using this photometric estimation of Teff, the difference
between the two stars would be Teff(B) $-$ Teff(A) $\sim$ 47 $\pm$ 179 K,
which agrees well with the spectroscopic difference of 55 $\pm$ 66 K. However,
the photometric estimation of the stellar parameters should be taken with
caution due to the significant extinction in the direction of the stars. Stars
A and B have a distance of 523$\pm$6 pc and 536$\pm$6 pc, respectively, based
on Gaia EDR3 parallaxes. These distant stars could lead to differences between
spectroscopic and photometric parameters and should be taken with caution.

We note that star B is enriched in Al and Ba compared to star A, as we shown
in Fig. 2. It would be tempting to assume that they were contributed from an
unknown AGB companion around star B. However, it is difficult to precisely
estimate the origin of these elements. Ba is mostly considered an s-process
element, that is, produced by a slow neutron-capture reaction of relatively
heavy nuclei and carried to the ISM by the winds of AGB stars. The isotope
26Al could also be produced by AGB stars, but other possible sources are winds
of massive and very massive stars and supernova explosions (see e.g. Martinet
et al., 2022, and references therein). In principle, a common origin for the
two elements therefore cannot be entirely discarded. However, this
hypothetical scenario should be taken with caution because no AGB companion is
currently detected orbiting star B.

##  Appendix B Scenario of the evolutionary state

We explore in this section whether evolutionary effects might explain the
observed chemical differences between stars A and B. RGB stars burn hydrogen
in a shell around a inert helium core (Iben, 1968), while red clump (RC) stars
are in the stage of core-helium burning (Cassisi & Salaris, 1997; Girardi et
al., 1998). RGB and RC stars overlap significantly in the Teff $-$ log g
diagram (e.g. Girardi, 2016) and it is hard to distinguish the two types of
stars. Figure 3 shows the log Teff $-$ log g diagram for stars A and B (blue
and red, respectively) and three (solar metallicity) evolutionary tracks
corresponding to 2 M⊙, 3 M⊙, and 4 M⊙, calculated using the MESA isochrones
and stellar tracks (MIST, Dotter, 2016)444https://waps.cfa.harvard.edu/MIST/
version 1.2. In Fig. 3, stars A and B are located between the tracks of 2 M⊙
and 4 M⊙. However, it is difficult to determine a precise value of the mass
(and evolutionary state), considering the mentioned overlap of RGB and RC
stars in the Teff $-$ log g diagram (e.g. Girardi, 2016).

Physical parameters such as mass, age, and evolutionary state were estimated
using the latest version of the
isochrones555https://github.com/timothydmorton/isochrones package (Morton,
2015). The package creates a model for each star and interpolates it in a grid
of MIST tracks, indicating its evolutionary state through equivalent
evolutionary points (EEPs), as described in Dotter (2016). In this scheme, the
terminal-age main sequence (TAMS), the tip of the RGB (RGBTip), the zero-age
core-helium burning (ZACHeB), and the terminal-age core-helium burning
(TACHeB) correspond to EEP values of 454, 605, 631, and 707, respectively. We
used as input for isochrones the high-precision stellar parameters (Teff, log
g, and [Fe/H]), together with the V magnitudes (9.71$\pm$0.03 and
9.79$\pm$0.02 for stars A and B) and the reddening AV. We note that the
extinction in the direction of the stars is significant: We obtained AV $\sim$
0.57 (Gaia Collaboration DR3, ) or AV $\sim$ 0.73 (Schlegel et al., 1998).
However, the physical parameters we derived (mass, age, and evolutionary
state) remain almost unchanged when the high-precision spectroscopic values
alone are used (Teff, log g, and [Fe/H]). We present in Table 3 the mass and
age of stars A and B, estimated using isochrones, considering the stars in the
RGB or RC phases. Depending on whether the stars belong to the RGB or RC
phases, their physical parameters are different and should be taken with
caution. In Fig. 4 we present the log Teff $-$ log g diagram for stars A and B
and the evolutionary tracks calculated with MIST for their corresponding
masses and metallicities. Blue and red correspond to stars A and B. The plots
also show two additional tracks for 2 M⊙ and 4 M⊙ (black lines) for reference.
The left and right panels correspond to the RGB and RC cases, respectively.

Figure 3: log Teff $-$ log g diagram for stars A and B (blue and red, respectively), and three (solar metallicity) evolutionary tracks corresponding to 2 M⊙, 3 M⊙, and 4 M⊙ calculated using MIST. Table 3: Physical parameters estimated with the isochrones package. Star | RGB | RGB | RC | RC
---|---|---|---|---
| Mass | Age | Mass | Age
| [M⊙] | [Myr] | [M⊙] | [Myr]
A | 3.18${}_{-0.36}^{+0.36}$ | 327${}_{-87}^{+118}$ | 2.87${}_{-0.29}^{+0.29}$ | 488${}_{-134}^{+184}$
B | 3.06${}_{-0.27}^{+0.27}$ | 347${}_{-73}^{+93}$ | 2.72${}_{-0.24}^{+0.24}$ | 540${}_{-133}^{+177}$

Figure 4: log Teff $-$ log g diagram for stars A and B, and the evolutionary
tracks calculated with MIST for their corresponding masses and metallicities.
Blue and red correspond to stars A and B. The plot also shows two additional
tracks for 2 M⊙ and 4 M⊙ (black lines) for reference. The left and right
panels correspond to the RGB and RC cases, respectively.

The individual ages shown in Table 3 strongly suggest that both stars belong
to the RGB or that both stars belong to the RC, and are not a mixed pair
RGB+RC. Although a number of RGB and RC stars overlap in the log Teff $-$ log
g diagram, Bovy et al. (2014) suggested a method for distinguishing them. This
method requires an accuracy better than 100 K and 0.1 dex in Teff and log g.
We present in Fig. 5 the position of stars A and B (red and blue) in the log g
- Teff diagram and the cuts suggested by Bovy et al. (2014) (dashed lines) to
separate the RGB and RC regions, which is analogous to Fig. 1 of their work.
Both stars would belong to the RC region in this diagram. However, we caution
that asteroseismic parameters for both stars could help us to distinguish
their evolutionary stage better (e.g. Montalbán et al., 2010; Bedding et al.,
2011). When we assume that both stars belong to the RGB or RC phase, we can
adopt a common (average) age of 337$\pm$175 Myr or 514$\pm$255 Myr,
respectively (while a mixed pair RGB+RC would present an intermediate age).
The common age for stars A and B presents a considerable uncertainty. In any
case, we show below that chemical evolutionary effects do not explain the
observed differences between stars A and B (for iron and other metals) for any
combination of the considered phases.

Figure 5: Position of stars A and B (red and blue) in the log g - Teff diagram
and the cuts suggested by Bovy et al. (2014) (dashed lines) to separate the
RGB and RC regions. The regions correspond to stars in the range -0.2 $<$
[Fe/H] $<$ 0.2.

During the evolution of giant stars, their extensive envelopes mix internally
processed material by fusion with unprocessed surface material (e.g. Salaris &
Cassisi, 2017). This produces a strong reduction of the superficial C/N ratio
and lithium abundances after the FDU in the RGB phase, for example. We present
in Fig. 6 the C/N ratio, the lithium abundance A(Li)666We define A(Li) $=$
log(Li/H) + 12, similar to Carlberg et al. (2012)., and the metallicity as a
function of age, estimated with MIST evolutionary tracks. The green bars show
the Li content expected in star A after ingestion of planetary material (see
next sections). The evolutionary models of stars A and B (blue and red lines)
show a significant step or jump in C/N and A(Li), which corresponds to the
strong reduction expected after the FDU. This step is also present in the
evolution of the metallicity, although the jump is considerably lower. We note
that FDU of star A occurs earlier than FDU of star B (the blue step occurs at
a younger age than the red step), which corresponds to the slightly higher
mass (and faster evolution) of star A compared to B. The low values of C/N and
A(Li) shown by stars A and B strongly suggest that both stars have already
gone through the FDU phase, (see, e.g., the right panel of Fig. 6 for the case
of A and B taken as RC stars). However, for the RGB case of star B (left
panel, red), the evolutionary model predicts that the FDU will take place in
the next few million years, while the low C/N and A(Li) values show that the
FDU already occurred in star B. This disagreement by a few million years shows
that the true age of both stars (for the RGB case) might be slightly older
than estimated, or, alternatively, that star B belongs to the RC phase rather
than the RGB phase, as suggested by Fig. 5.

Figure 6: C/N, A(Li), and metallicity as a function of age (upper, middle, and
lower panels), estimated with MIST evolutionary tracks (blue and red lines for
stars A and B, respectively). The green bars show the Li content expected in
star A after ingestion of planetary material. The values measured for stars A
and B are shown in blue and red (including the error bars on the y-axis). The
left panels correspond to the RGB phase, and the right panels correspond to
the RC phase.

The middle panels of Fig. 6 show that the lithium abundances in stars A and B
are lower than the expected values from MIST models. However, it is difficult
to reach a perfect agreement between observations and models because many
effects might modify the lithium abundances. For instance, the modeled Li
content strongly depends on the assumed value for $v/v_{crit}$, which is the
initial rotation rate (compared to the critical one) used in the MIST models.
We adopted $v/v_{crit}$ $=$ 0.0; but if we had adopted $v/v_{crit}$ $=$ 0.4,
the predicted lithium abundances would be several orders of magnitude lower
than observed. Charbonnel et al. (2020) showed that the evolution of Li
strongly depends on whether rotation is included in the models (see, e.g.,
their Fig. 11). The evolutionary tracks of MIST also assume a starting value
of A(Li) near $\sim$3.3 dex (Lodders & Fegley, 1998), while other authors
adopted a lower value (3.11 dex, Charbonnel et al., 2020). The number of still
uncertain procceses that might modify the lithium abundances led some authors
(e.g. Privitera et al., 2016) to suggest the use of an increased rotation
instead of lithium, in order to detect a possible planet ingestion (see text
above), for example.

The evolutionary effects for the case of iron were estimated using MIST tracks
(Fig. 6, lower panels). The highest variation in [Fe/H] predicted by models
during the evolution of stars A and B is $\sim$0.04 dex (for the RGB or RC
cases). This value corresponds to the increase in metallicity after the FDU,
the step in the abundances shown in the Fig. 6. However, during the evolution
after the FDU, the predicted variation in metallicity is almost null (lower
than 0.01 dex for both stars). Thus, we can consider two possiblities: First,
if both stars underwent the FDU before (as strongly suggested by their C/N and
Li abundances), evolutionary effects ($<$0.01 dex) clearly cannot explain the
observed difference of $\sim$0.08 dex. Second, if we assume that only one star
passed through the FDU (which is highly unlikely), evolutionary effects
($<\sim$0.04 dex) are not enough to explain the observed difference of
$\sim$0.08 dex. In this way, evolutionary effects cannot account for the
observed differences between stars A and B, even assuming that only one of the
stars underwent the FDU (which is highly unlikely). This is also valid
considering that both stars belong to RGB, both belong to RC, or are a
combination of RGB+RC. Other abundances such as [Si/H], [S/H], [Ca/H], and
[Ti/H] were also modeled by MIST and show a step very similar to the steps of
[Fe/H], mainly produced by a slight reduction of the superficial hydrogen
after the FDU (Dotter et al., 2017).

We also performed additional experiments by calculating hypothetical tracks of
star A. We assumed that star A was born with the same metallicity as star B,
but considered different values for its mass: the same masses previously
estimated (Table 3) for the RGB and RC cases (dotted blue lines in the Fig.
6), and also a mass of 3 M⊙ (dotted magenta line in the lower panel of Fig.
6). An increase or decrease in the mass of the stars basically corresponds to
a decrease or increase in the age when the FDU occurs (e.g., compare the
dotted blue and magenta lines in the lower panel of Fig. 6). In other words, a
modified mass of the stars would basically displace the iron lines mainly
along the x-axis in Fig. 6 (on the other hand, a modified starting [Fe/H]
would displace the lines mainly along the y-axis). Therefore, evolutionary
effects does not seem to be enough to explain a [Fe/H] difference of $\sim$
0.08 dex between stars A and B (both RGB, both RC, or a combination of
RGB+RC).

##  Appendix C First-order estimation of the ingested mass

In this section, we estimate the mass ingested by star A, if any, to explain
its higher metallicity compared to star B. We used equation (5) of Teske et
al. (2016) (which is similar to equation (1) of Ramírez et al., 2011),

$\Delta[M/H]=\mathrm{log}\bigg{[}\frac{(Z/X)_{cz}\mathcal{M}_{cz}+(Z/X)_{P}\mathcal{M}_{p}}{(Z/X)_{cz}(\mathcal{M}_{cz}+\mathcal{M}_{p})}\bigg{]},$
(1)

where $\Delta$[M/H] is the difference in metallicity, (Z/X)CZ is the ratio of
the fractional abundance of metals relative to hydrogen in the convective
zone, MCZ is the mass of the convective envelope, (Z/X)p is the metallicity of
the planet, and Mp is the mass of the planet. This model assumes an
instantaneous accretion and addition of the planet to the convective envelope
of the star, and it should be considered as a first-order approximation.
Adopting from Asplund et al. (2009) the mass fractions for the Sun, we have
(Z/X)${}^{Sun}_{CZ}$ = (0.0134/0.7381) = 0.0182. We estimated the convection
zone metallicity (Z/X)CZ by scaling the solar value with the metallicity
(similar to the procedure of Ramírez et al., 2011; Teske et al., 2016),
(Z/X)CZ $=$ 0.0182 x 10-0.015 $\sim$ 0.0176.

In equation 1, we considered two reference values for the planet metallicity,
(Z/X)p $=$ 0.10 and (Z/X)p $=$ 0.36. The first value of (Z/X)p is similar to
that of Jupiter, whose metallicity is estimated to be between 0.04-0.12
(Ramírez et al., 2011). For the second value of (Z/X)p, we considered an
extreme case of metal content inside a planet (Thorngren et al., 2016),
HAT-P-20 b includes 600 M⊕ of metals inside a 7.2 MJup ($\sim$2290 M⊕) planet.
In this last case, we roughly estimate (Z/X)p $\sim$ 600/(2290-600) $\sim$0.36
for a planet with an extreme metallic content. However, we note that these
massive (and metallic) planets are hard to explain by current planet formation
models (see e.g. Leconte et al., 2009; Thorngren et al., 2016), requiring a
migrating planet that accumulates all of the metal available in the disk.

Equation 1 also depends on the convective envelope mass MCZ adopted, which is
a function of the stellar age. Some authors estimated average MCZ values near
77% of the stellar mass (Pasquini et al., 2007b) and $\sim$65% (Figure 1 of
Girardi, 2016) for giant stars with masses between 1.0-1.3 M⊙. Other authors
assumed that the MCZ encompasses most of the giant star, making fully
convective objects, that is to say, MCZ near 100% (e.g. Basu & Hekker, 2020).
Thus, for an estimate using reference values, we considered three possible
average values for MCZ: 100%, 77%, and 35% of the stellar mass. In particular,
the lower value of MCZ (35%) would correspond to the most favorable case for
the detection of a metallicity signature of a planetary ingestion.

The next step was to estimate the mass of the planet Mp neccesary to explain
the difference in metallicity observed $\Delta$[M/H]$\sim$0.08 dex. We
estimated Mp using equation 1, which depends on the assumed values for (Z/X)p,
MCZ, and so on. As explained, we considered two possible values for (Z/X)p and
three possible values for MCZ. The combination of these values produced six
different cases with six different values for Mp (upper panel of Table 4). The
resulting values of Mp (Col. 4 of Table 4) show their strong dependence on the
planet metallicity (Z/X)p and on the convective envelope mass MCZ. In these
six cases, we assumed a mass of 2.872 M⊙ for star A, which would correspond to
the RC phase (upper panel of Table 4). However, if star A belongs to the RGB
phase, its mass would be 3.183 M⊙, resulting in six different values for Mp
(lower panel of Table 4).

In addition, we took the opportunity and estimated the expected increase in
the rotational velocity after the planet ingestion, $\Delta$vrot $=$
vrot(final) $-$ vrot(initial), using equation (1) of Carlberg et al. (2009).
We also estimated the expected increase in the lithium abundance after the
planet ingestion, $\Delta$Li $=$ A(Li)final $-$ A(Li)initial, using equation
(2) of Carlberg et al. (2012). We adopted A(Li)${}_{initial}=$-0.18$\pm$0.08
dex similar to Carlberg et al. (2012), which is the average abundance of giant
slow rotators. Both $\Delta$vrot and $\Delta$Li depend on Mp and MCZ, and they
are shown in the two last columns of Table 4. In order to estimate
$\Delta$vrot, we adopted a hot Jupiter-like initial value of the semimajor
axis (a$=$0.02 au) for the ingested planet. (For comparison, a warm Jupiter-
like planet with $\sim$0.5 au would imply a much higher reservoir of angular
momentum, resulting in a significantly higher $\Delta$vrot by several orders
of magnitude). Finally, in the estimation of $\Delta$vrot we adopted a null
eccentricity (e$=$0), as assumed by Carlberg et al. (2009) for planets with
unknown eccentricity. In this way, Table 4 summarizes the effects after a
planet ingestion, including an estimate of the required mass to ingest Mp,
together with the expected $\Delta$vrot and $\Delta$Li values after the
pollution event.

Table 4: Estimate of the required planetary mass (Mp), variation in rotation ($\Delta$vrot), and lithium content ($\Delta$Li) after a possible ingestion event. Case | MCZ | (Z/X)p | Mp |  $\Delta$vrot |  $\Delta$Li
---|---|---|---|---|---
|  |  | [MJup] | [km s-1] | [dex]
Star A in the RC phase: |  |  |  |  |
1 | 100% | 0.10 | 135.0 | 37.46 | +2.10
2 | 100% | 0.36 | 31.5 | 8.74 | +1.49
3 | 77% | 0.10 | 105.0 | 37.84 | +2.10
4 | 77% | 0.36 | 24.2 | 8.72 | +1.49
5 | 35% | 0.10 | 47.5 | 37.66 | +2.10
6 | 35% | 0.36 | 11.0 | 8.72 | +1.49
Star A in the RGB phase: |  |  |  |  |
1 | 100% | 0.10 | 150.0 | 37.88 | +2.10
2 | 100% | 0.36 | 35.0 | 8.84 | +1.49
3 | 77% | 0.10 | 115.0 | 37.71 | +2.10
4 | 77% | 0.36 | 27.0 | 8.85 | +1.49
5 | 35% | 0.10 | 52.5 | 37.88 | +2.10
6 | 35% | 0.36 | 12.2 | 8.80 | +1.49

In order to study a possible planetary ingestion, we also compared the lithium
content in stars A and B with that of other giant stars. We present in Fig. 7
the Li abundance derived for 378 G/K giant stars from Liu et al. (2014b) as a
function of Teff and log g (left and right panels). The empty circles and
crosses correspond to Li values and upper limits, respectively, measured for
the 378 giant stars. We restricted the stars shown to a metallicity range
between -0.2 dex and 0.1 dex, which is closer to the values of the stars in
this work. The measured values in this work for stars A and B are shown in
blue and red, respectively, and the predicted values after a possible
planetary ingestion in star A are shown in green. The green lines correspond
to possible $\Delta$Li values between 1.49 dex and 2.10 dex estimated for star
A (Table 4). Li abundances of Liu et al. (2014b) were corrected for NLTE
effects by interpolating in the data of Lind et al. (2009). In order to
properly compare the abundances, we also corrected for NLTE following the
corrections of Lind et al. (2009). Fig. 7 shows a considerable dispersion of
Li content for a fixed value of the parameters. The Li abundances of stars A
and B appear to be similar to those of other giant stars. Liu et al. (2014b)
suggested a trend in which giant stars with higher Teff tend to show a higher
lithium content. The lower Li in star A compared to star B might at least
partially be explained by the higher Teff of star B. On the other hand, a
planetary ingestion event would produce a significant increase in the Li
content in star A (the green values shown in Fig. 7), being considerably
higher than current A(Li) observed in both stars A and B. However, Fig. 7
shows no evidence of an increased Li content in star A (on the contrary, star
A displays a lower Li content than star B). In other words, there is no need
to invoke an ingestion event to explain the Li content in stars A and B.

Figure 7: Li abundance derived for 378 G/K giant stars from Liu et al. (2014b)
as a function of Teff and log g (left and right panels). The empty circles and
crosses correspond to Li values and upper limits, respectively, measured for
the 378 giant stars. The measured values in this work for stars A and B are
shown in blue and red, respectively, and the predicted values after a possible
planetary ingestion in star A are shown in green.

We also considered the possibility of a brown dwarf (BD) ingestion by star A.
We focused on the most favorable conditions for the detection of a chemical
difference, that is, by taking MCZ $\sim$ 35% and star A in the RC phase (mass
of 2.87 M⊙). For the metallicity of the ingested object (Z/X)p (in this case,
a brown dwarf, (Z/X)BD), we also scaled the solar value by the metallicity,
that is, (Z/X)BD $=$ 0.0182 x 10+0.3 $\sim$ 0.0363. The metallicities of known
BDs range between -1.0 to +0.3 dex (e.g. Meisner et al., 2023, and references
therein), and we adopted a metal-rich BD with [Fe/H]=+0.3 dex. In this case,
equation 1 implies that it would be necessary to ingest more than $\sim$250
MJup of material to reach a difference of $\sim$0.08 dex between stars A and
B. This is beyond the mass limits of BDs. These high mass values would also
imply a significant increase in the rotational velocities and lithium content,
which is not detected in the binary system of this work.

The question now is when the possible ingestion occurred. A number of events
might modify the superficial abundances of giant stars, such as the FDU, and
therefore, it is relevant to consider this question. However, it is difficult
to give a precise estimate. Equation 1 used in this work to estimate the
possible amount of ingested mass assumes an instantaneous engulfment, that is,
a very recent event. Similarly, equation (1) of Carlberg et al. (2009) (which
describes the angular momentum deposition of the planet) and equation (2) of
Carlberg et al. (2012) (which estimates the increase in lithium after the
planet ingestion) were derived without specific time or evolutionary
constraints. However, we can consider the following. The values of the C/N
ratio and A(Li) strongly suggest that the giant stars A and B already
underwent the FDU. The values shown in the Table 4 show that it would be easy
to detect a planet ingestion for a lower convective envelope mass ($\sim$35%)
than for a massive convective envelope ($\sim$100%). This suggests that a
planet ingestion event would be more easily detected after the FDU rather than
before the FDU. Similarly, Aguilera-Gómez et al. (2016) suggested that
ingestion events would be easily detected after the FDU and before the RGB
bump.

For a moment, we assume the following scenario: The planet ingestion occurred
after the FDU in star A, and several million years after this event, the
convective envelope mixed and erased the additional lithium that was added by
the ingestion (this lithium depletion is not considered by equation (2) of
Carlberg et al., 2012), perhaps bringing the lithium abundances to the values
currently observed in star A. However, in this case, it would be difficult to
explain why the same mixing (which easily restored the lithium abundance to
pre-ingestion values) was unable to restore other metals to their pre-
ingestion values. In other words, the massive convective envelope should
diminish the additional lithium added by the ingestion (by mixing with layers
with a a much lower lithium content, and perhaps also by reaching deeper and
hotter regions in which lithium could be destroyed). That is, to diminish the
additional lithium, significant mixing is required. However, in this case, it
would not be clear why the mixing (which was significant for lithium) was not
significant for other metals as well. Even assuming that the mixing erased the
ingested lithium but not other metals (which is highly unlikely), the values
of Table 4 for the case of convective envelopes of $\sim$35% suggest that we
would require the ingestion of massive planets ($>$ 11 MJup) with an extremely
high metallic content. As mentioned previously, these extremely metallic
planets are very difficult to explain with current planet formation models and
would require the accretion of almost all metals available in the disk at the
time of planet formation. Similarly, in this case, we still have to explain
why there is no evidence of an increased rotational velocity in star A
compared to star B, and currently, no planets are detected orbiting stars A or
B. Formally speaking, although previous arguments do not completely rule out
an ingestion event in star A, we consider that an engulfment event is highly
unlikely.