# PairingNet: A Learning-based Pair-searching and -matching Network for
Image Fragments

Rixin Zhou1 Ding Xia2 Yi Zhang3 Honglin Pang1 Xi Yang1,4,5,* Chuntao Li5,6,*
1School of Artificial Intelligence, Jilin University 2The University of Tokyo
3National University of Defense Technology, College of Electrionic Engineering
4Engineering Research Center of Knowledge-Driven Human-Machine Intelligence,
MoE, China
5Key Laboratory of Ancient Chinese Script, Culture Relics and Artificial
Intelligence, Jilin Province
6School of Archaeology, Jilin University

###### Abstract

In this paper, we propose a learning-based image fragment pair-searching and
-matching approach to solve the challenging restoration problem. Existing
works use rule-based methods to match similar contour shapes or textures,
which are always difficult to tune hyperparameters for extensive data and
computationally time-consuming. Therefore, we propose a neural network that
can effectively utilize neighbor textures with contour shape information to
fundamentally improve performance. First, we employ a graph-based network to
extract the local contour and texture features of fragments. Then, for the
pair-searching task, we adopt a linear transformer-based module to integrate
these local features and use contrastive loss to encode the global features of
each fragment. For the pair-matching task, we design a weighted fusion module
to dynamically fuse extracted local contour and texture features, and
formulate a similarity matrix for each pair of fragments to calculate the
matching score and infer the adjacent segment of contours. To faithfully
evaluate our proposed network, we created a new image fragment dataset through
an algorithm we designed that tears complete images into irregular fragments.
The experimental results show that our proposed network achieves excellent
pair-searching accuracy, reduces matching errors, and significantly reduces
computational time. Details, sourcecode, and data are available in our
supplementary material.

Figure 1: Our pair-searching and -matching task. Given a large number of mixed
image fragments, our proposed network can search and match pairs of fragments,
which is important for restoration problems. We also designed an algorithm to
generate a dataset of image fragments by tearing a set of complete images.

##  1 Introduction

Pair-searching and -matching of massive unorganized fragments is a critical
problem in the research fields of computer vision and computer graphics,
especially in the field of cultural relic restoration [11, 22, 1, 15].
Traditional methods achieve geometry transformation between fragments by
calculating the similarity of contour segments based on geometric invariants
such as curvature and manually designed descriptors [30, 18]. It has a common
core with the registration problem [3], which is to establish the
correspondences of local features between related image pairs of the same
scene. However, fragment assembly is more challenging because they do have
overlapping regions. Thus, existing rule-based methods are difficult to
generalize to various complex situations. Furthermore, they are time-consuming
since the computational complexity of finding matching pairs from a set of
fragments is typically $O(N^{2})$ in global search, and in practice, only a
few pairs are hidden in a large number of mixed fragments.

Solving jigsaw puzzles [14, 34, 39] is also a similar task and learning-based
approaches have been applied [33, 2]. However, there are two differences that
make these algorithms not generalizable. First, puzzle pieces usually have
regular shapes, so they are best matched based on content information rather
than contour features. Second, this problem usually studies matching all
fragments into a complete block. Their input fragments do not come from mixed
groups, and the matching results are dense and not lost. Therefore, they often
use neighbor relationships to build graphs to constrain the search for the
correct alignment of fragments. Once a fragment is lost, their closed-loop
strategy fails.

In this paper, we propose PairingNet, an end-to-end deep learning network, for
searching and matching pairs from a large number of image fragments. To
address this problem, we first explore the use of Graph Convolutional Networks
(GCNs) to extract more robust contour and texture features for our tasks.
Second, we design a feature fusion way to learn local matching features by
calculating the similarity matrix of each fragment pair. Third, we build a
module based on the linear transformer to learn the global searching features
for fragments using contrastive learning. Finally, we generate a large-scale
image fragment dataset to provide data-driven and validate the effectiveness
of our proposed network.  The main contributions of our work are as follows:

  * •

We propose a novel network to leverage the local contour and texture features
for solving the pair-searching and -matching of image fragments. It provides
an attempt to use advanced deep-learning techniques to solve this long-
standing problem.

  * •

We provide a new dataset with a carefully designed algorithm to simulate real-
world fragments. The algorithm generates various types of image fragments to
facilitate the application of subsequent learning-based methods.

  * •

We conduct extensive experiments, ablation studies, and visual analysis to
demonstrate the effectiveness of our proposed network.

##  2 Related Work

###  2.1 Fragments Assembly (Irregular Shape)

Here we focus on the pairwise matching algorithms of related representative
works, although few of them also consider fragment relationships. Methods
based on deep neural networks have been studied for object fragments; however,
we could not find representative works for image fragments or even suitable
datasets.

##### Image fragments.

Kong and Kimia [24] solved fragment matching using geometric features (partial
curve matching). Leitao and Stolfi [11] described a specific multiscale
matching method for the reassembly of 2D fragmented objects. Tsamoura and
Pitas [40] presented a color-based method to automatically reassemble image
fragments. Huang et al. [21] relied on salient curves detected inside the
different image pieces to align gapped fragments. Subsequently, both shape and
appearance information along the boundaries were utilized and extracted for
each piece for matching [29, 47]. Furthermore, Derech et al. [12] proposed to
extrapolate each fragment to address fragment abrasion. For learning-based
methods, traditional machine learning (SVM/Random Forest) was used as a
classifier to process extracted local features [35, 1]. Then Le and Li [26]
built a deep convolutional neural network to detect the compatibility of
pairwise stitching.

##### Object fragments.

Huang et al. [22] analyzed the geometry of the fracture surfaces by computing
multi-scale surface characteristics.Yang et al. [44] matched stone tools based
on contour points and their mean normals. Funkhouser et al. [15] learned a
decision tree classifier to filter the candidates. Hong et al. [20] solved the
problem of indistinguishable false matches by employing beam search to explore
multiple registration possibilities. Ye et al. [45] presented an immersive
system that can handle complex and ambiguous fragment shapes interactively
with experts. In recent years, deep learning networks have been rapidly
applied in 3D assembly. Huang et al. [46] proposed an assembly-oriented
dynamic graph learning framework to estimate the pose of 3D parts. Chen et al.
[8] proposed Neural Shape Mating (NSM) to tackle pairwise 3D geometric shape
mating. Wu et al. [43] leveraged SE(3) equivariance for such shape pose
disentanglement.

##### Datasets.

Existing image assembly works typically collect data in two ways: manual
digitalization by photographing or scanning broken fragments, or using simple
algorithms to tear complete images [32, 6, 35]. The lack of a large-scale
dataset prevents the emergence of deep learning networks for this task.
However, multiple datasets have been introduced in 3D assembly problems [23,
37, 25].

###  2.2 Jigsaw Puzzles (Regular Shape)

Solving jigsaw puzzles was first proposed in [14], and then regular pieces
became a key research object in computer vision. Many existing methods [10,
34, 16, 38, 39, 19] focused on building relationships of pieces based on
content information rather than contour-based pair-searching/-matching. And
deep learning techniques [33, 2] was also used to solve this problem.

##  3 Method

Figure 2: Pipeline of our proposed PairingNet. (a) Based on patches, we first
employ a binary encoding to describe contours and use ResGCN as the backbone
to extract the local contour and texture features of image fragments. (b) We
design self-gated fusion to fuse the extracted features in a weighted manner
to calculate the similarity matrix for each pair of fragments, and (c) a
linear transformer-based encoder for learning the global features of each
fragment. (d) We use a two-step strategy to train our proposed network. (e)
During inference, we calculate Cosine similarity to find the adjacent fragment
pairs and further process the matching similarity matrix to establish better
correspondences between a fragment pair.

###  3.1 Problem Statement

Let us consider a fragment dataset $\mathbf{F}=\\{f^{(i)}\\}_{i=1}^{N}$, which
consists of fragments $f$ torn from a certain image dataset. We define the
contour points $c_{j}^{(i)}\in\mathbf{C}^{(i)}$ for each $f^{(i)}$, where
$j={1,2,...,M^{(i)}}$, $M^{(i)}$ is the contour length and $\mathbf{C}^{(i)}$
is an ordered set that contains all contour points of $f^{(i)}$.

Regarding any two neighbor fragments sampled from a pairset $\mathbf{P}$, we
denote the pair as $f^{(m)}$ and $f^{(n)}$. The pair-searching task aims to
retrieve the pairset $\mathbf{P}$ from a given fragment dataset $\mathbf{F}$.
Meanwhile, for the contours of the paired fragments, $\mathbf{C}^{(m)}$ and
$\mathbf{C}^{(n)}$, we can always find the overlapped part
$\mathbf{C}^{(m\&n)}$. The pair-matching task is designed to find the adjacent
part from any given fragment pair.

###  3.2 Network Architecture

In the pair-matching task, a model has the capability to discern differences
between two fragments, regardless of whether these discrepancies are on a
large or minimal scale. Simultaneously, the features extracted by the model
can be used to quantify the likelihood of adjacency between any given two
fragments, assisting in the identification of matched pairs. However, the
process of comparing every two fragments is not only laborious, but also
inefficient. Therefore, utilizing the rich features the matching model
extracts, we conceived a pair-searching module. This innovative module can
adeptly convert any fragment into a unique feature vector, thereby
significantly accelerating the pair-searching process.

####  3.2.1 Feature Extraction

##### Contour encoding.

In this module, we aim to direct the model’s attention to the unique features
of contours. We design distinct contour encodings that also may be applied in
other sketch-based fields. We tested various patch sizes and all these
distinct encodings, finalizing a binary encoding and a patch size of 7x7 for
our network. Subsequently, these contour patches are processed through a
convolutional layer, followed by an average pooling layer and a fully
connected network. We then adopt ResGCN [27] to amalgamate adjacent features,
further extracting comprehensive global features. As such, for any provided
fragment input denoted as $f^{(i)}$ with its corresponding contour
$\mathbf{C}^{(i)}$, this module yields a return of
$f_{c}^{(i)}\in\mathbb{R}^{M^{(i)}\times 64}$.

##### Textural encoding.

Our objective is to accentuate the distinguishing characteristics of textures
in this module. We begin by cropping the image using a patch centered on each
contour point. This is followed by filtering these patches through two
consecutive convolutional layers, coupled with a single average pooling
operation. Then, a ResGCN [27] is integrated to compile adjacent features,
thereby enhancing the receptive domain of local textural characteristics. For
any given fragment input represented as $f^{(i)}$ along with its associated
contour $\mathbf{C}^{(i)}$, this module produces an output of
$f_{t}^{(i)}\in\mathbb{R}^{M^{(i)}\times 64}$.

####  3.2.2 Pair-matching Module

##### Feature Fusion.

Regarding the decision-making process for pair-matching and -searching tasks,
the dependence on contour and textural features varies. For instance, in
scenarios where both fragments are solid colors, texture serves as the primary
identifying factor suggesting adjacency. However, texture alone cannot
identify the matched contours. In contrast, simple contours, like straight
lines, require texture features for accurate matching position determination,
as contour information alone falls short.

Given this, we propose the incorporation of a Feature Fusion module which
would be capable of adaptively fine-tuning the weights assigned to these two
features. The specific structure of this integral component is depicted in
Figure 2 (b). First, we concatenate $f_{t}^{(i)}$ and $f_{c}^{(i)}$, then the
weight $\mathbf{w}^{(i)}$ for each contour point
$c_{j}^{(i)}\in\mathbf{C}^{(i)}$ is computed by:

$\small\mathbf{w}^{(i)}=\sigma(\mathbf{W}_{g}(f_{t}^{(i)}ⓒf_{c}^{(i)})+\mathbf{b}_{g})^{(i)}$
(1)

where $\sigma$ is $sigmoid$ the activation function, $ⓒ$ means channel-wise
concatenation, and $\mathbf{w}\in\mathbb{R}^{M^{(i)}\times 64}$. Second, we
fuse features of two modalities:

$\small\mathbf{F}_{f}^{(i)}=\mathbf{w}^{(i)}\odot\mathbf{F}_{t}^{(i)}+(1-\mathbf{w}^{(i)})\odot\mathbf{F}_{c}^{(i)}$
(2)

where $\mathbf{F}_{f}^{(i)}\in\mathbb{R}^{M^{(i)}\times 64}$, and $\odot$ is
element-wise multiplication. With this module, we let the model adaptively
decide the weights between textual and contour features, which is proven
effective in later experiments.

##### Similarity Matrix.

For every pair of fragments $f^{(m)}$ and $f^{(n)}$ from the pairset
$\mathbf{P}$ with contour points $\mathbf{C}^{(m)}$ and $\mathbf{C}^{(n)}$, we
are able to formulate the similarity matrix
$\mathbf{S}^{(m\&n)}\in\mathbb{R}^{M^{(m)}\times M^{(n)}}$ [9, 36].

We first calculate the similarity matrix $\hat{\mathbf{S}}^{(m\&n)}$ by simple
matrix multiplication:

$\small\hat{\mathbf{S}}^{(m\&n)}=\frac{1}{\sqrt{D}}\mathbf{F}_{f}^{(m)}(\mathbf{F}_{f}^{(n)})^{T}$
(3)

where $D$ is the dimension of the feature, in our model, $D$ is 64. Then, each
entry in the matrix $\mathbf{S}^{(m\&n)}$ is normalized:

$\small\mathbf{S}^{(m\&n)}(i,j)=\frac{exp(\hat{\mathbf{S}}^{(m\&n)}_{i,j})}{\sum_{i}{exp(\hat{\mathbf{S}}^{(m\&n)}_{i,j})}}\frac{exp(\hat{\mathbf{S}}^{(m\&n)}_{i,j})}{\sum_{j}{exp(\hat{\mathbf{S}}^{(m\&n)}_{i,j})}}$
(4)

####  3.2.3 Pair-searching Module

We introduce a modified feature fusion module to process features extracted by
the backbone network and encode any fragment $f^{(i)}$ into a feature vector
$v_{s}^{(i)}\in\mathbb{R}^{128}$. It is based on the discovery that using
fused features in the pair-matching task will lower the performance.

To be specific, every feature branch utilizes a Linear Transformer Encoder
[41] to enhance the encoding of both contour and textural features. Subsequent
to the modified fusion module, we add a fully-connected layer to encode the
fused feature regarding per contour point. Then an average pooling layer is
applied to map the feature matrix to a singular vector. Finally, another
fully-connected layer is used to encode the feature.

For every pair of fragment $f^{(i)}$ and $f^{(j)}$ from the fragment set
$\mathbf{F}$, this module allows them to be encoded as $v_{s}^{(i)}$ and
$v_{s}^{(j)}$. By calculating their inner product, we can efficiently quantify
and contrast their similarity, thereby expediently identifying neighbor pairs.

###  3.3 Loss Function

####  3.3.1 Pair-matching Loss

Given the extreme imbalance in the ratio of positive to negative samples in
the pair-matching task, we adopt the concept of focal loss [28] to concentrate
on learning challenging correspondences.

For any paired fragments $f^{(m)}$ and $f^{(n)}$, entries in the ground truth
similarity matrix $\mathbf{S}_{gt}^{(m\&n)}$ are 1 for matched contour points
and 0 for unmatched ones. We calculate the matching loss
$\mathcal{L}_{match}^{(m\&n)}$ as follows:

$\displaystyle\mathcal{L}_{match}^{(m\&n)}$
$\displaystyle=\mathsf{SUM}(\beta_{1}(1-\mathbf{S}^{(m\&n)})^{\gamma}\log{\mathbf{S}^{(m\&n)}}\mathbf{S}^{(m\&n)}_{gt}$
(5)
$\displaystyle+\beta_{2}(\mathbf{S}^{(m\&n)})^{\gamma}\log{(1-\mathbf{S}^{(m\&n)})}(1-\mathbf{S}^{(m\&n)}_{gt}))$

where $\beta_{1}$ and $\beta_{2}$ are the balancing weights and
$\beta_{1}+\beta_{2}=1$, $\gamma$ is the decay factor, $\mathsf{SUM}$ is a
function that adds all the entries in the input matrix, and all operations
except $\mathsf{SUM}$ are element-wise. By calculating and adding the pair-
matching loss for all paired fragments $f^{(m)},f^{(n)}$ from the pairset
$\mathbf{P}$, we get $\mathcal{L}_{match}$.

####  3.3.2 Pair-searching Loss

In the pair-searching task, we employ InfoNCE loss [31] as the contrastive
loss function $\mathcal{L}_{search}$. Contrary to the scenario of self-
supervised learning [7], where data samples and noise samples are used to
construct positive sample pairs, we utilize paired samples for constructing
positive sample pairs, and unpaired samples for constructing negative sample
pairs.

###  3.4 Inference

####  3.4.1 Pair-matching

In this section, we target to retrieve matched contour from the similarity
matrix $\mathbf{S}^{(m\&n)}$.

We first apply a threshold $\epsilon=0.006$ to filter out noisy entries.
Entries with value lower than the threshold is set to 0. Because contour
pointset $\mathbf{C}^{(m)}$ and $\mathbf{C}^{(n)}$ are ordered sets, for any
ground truth similarity matrix $\mathbf{S}^{(m\&n)}_{gt}$, if the start for
contour points is the left-top corner, we can observe that the part with a
value of 1 in the matrix must be arranged in the direction from upper left to
lower right and connected into a line segment. Therefore, this inspires us to
enhance the filtered similarity matrix. We design an eroding kernel
$\mathbf{K}_{e}$ to filter out not dominant segments, which is adopted once.
Then a dilating kernel $\mathbf{K}_{d}$ is applied once to connect close but
split segments. The definitions of two kernels are as follows:

$\small\mathbf{K}_{e}=\begin{bmatrix}0&0&1\\\ 0&0&0\\\
1&0&0\end{bmatrix},\quad\mathbf{K}_{d}=\begin{bmatrix}0&0&1\\\ 0&1&0\\\
1&0&0\end{bmatrix}.$ (6)

Finally, we use RANSAC [13] to estimate the correspondences of two fragments
and obtain the transformation matrix.

####  3.4.2 Pair-searching

For N fragments $f^{(i)}\in\mathbf{F},i=1,2,...,N$, using the searching
module, we can get a feature matrix $\mathbf{V}_{s}\in\mathbb{R}^{N\times
128}$. Subsequently, we compute the cosine similarity between all global
features to form the cosine similarity matrix. This allows us to obtain the
similarity score for any pair of fragments.

##  4 Dataset

Figure 3: Dataset creation. (a) The process of generating our dataset. (b)
Illustration of Algirithm 1 for tearing a complete image.

0: List of fragments $L_{frag}=\\{\\}$, a complete image $I$; Max iterations
$t_{max}=40$, min arc length ratio $\tau=0.9$, max number of cutting points
$N_{max}=3$, min distance from cutting point to edge of fragment
$D_{min}=100$, the number of Fourier orthogonal basis $n=20$, scaling ratios
$s_{1}=0.25$, $s_{2}=0.0067$, $s_{3}=1.5$, $s_{4}=0.3$, probability of curve
type $\rho=0.5$, mini fragment size $h_{min}=150$, $w_{min}=150$.

0: Collection of fragments $L_{frag}$

1: put $I$ in $L_{frag}$

2: while $t<t_{max}$ do

3: $f\leftarrow$randomly_pick$(L_{frag})$,
$R\leftarrow$bounding_rectangle$(f)$

4: $W,H\leftarrow$width_and_height$(R)$, $C\leftarrow$circumcircle$(R)$

5: $l_{dia}\leftarrow$diameter$(C)$

6:

7: // generate the cutting points

8: repeat

9: $p_{a}$, $p_{b}$ $\leftarrow$ randomly_pick$(C)$

10: $l_{arc}\leftarrow$smaller_arc_length$(p_{a},p_{b})$

11: until $l_{arc}>\tau\cdot l_{per}$

12: $p_{start}$, $p_{end}\leftarrow$ intersection$(f,p_{a},p_{b})$

13: $m\leftarrow$randomly_pick$\\{0,\ldots,N_{max}\\}$

14: repeat

15: [$p_{1}$, $\ldots$, $p_{m}$] $\leftarrow$
random_select_inside_points$(f,m)$

16: $d\leftarrow$min_distance_to_edge($f,p_{1}$, $\ldots$, $p_{m}$)

17: until $d>D_{min}$

18: put $p_{start}$, $p_{end}$ in [$p_{1}$, $\ldots$, $p_{m}$]

19:

20: // generate the cutting segments

21: for each $p_{i}\in$ [$p_{start}$, $p_{1}$, $\ldots$, $p_{m}$, $p_{end}$]
do

22: irregular line $l_{irr}=\\{\\}$, phase $\phi\sim\mathcal{U}(-\pi,\pi)$,
amplitude $A\sim\mathcal{N}(s_{1}H,s_{2}H)$, period
$T\sim\mathcal{N}(s_{3}W,s_{4}W)$

23: for each $x$-coordinate between $(p_{i},p_{i+1})$ do

24: $y\leftarrow\sum_{i=0}^{n}\frac{A}{1+i}sin(\frac{2\pi
i}{T}x+\phi)+\frac{H}{2}$

25: put $\\{x,y\\}$ in $l_{irr}$

26: end for

27: $l_{str}\leftarrow$ straight_line$(p_{i},p_{i+1})$

28: $l_{cut}\leftarrow$ select_and_connect$(l_{irr},l_{str},\rho,l_{cut})$

29: end for

30: $f_{1}$, $f_{2}\leftarrow$ cut_fragment$(f,l_{cut})$

31: if size$(f_{1})>h_{min},w_{min}$ and size$(f_{2})>h_{min},w_{min}$ then

32: put $f_{1}$, $f_{2}$ in $L_{frag}$

33: end if

34: end while

Algorithm 1 Generate fragments of an image

We design Algorithm 1 to tear a series of complete images and create a new
image fragment dataset with data close to the real world. The process is also
shown in Figure 3. To control the shape and area of the fragments, we first
find the circumscribed circle of a fragment and take two points at an
appropriate distance on the circle to determine the starting and ending points
of the segmentation. Then, to simulate a more realistic fragment contour, we
randomly divide the cutting line into several segments, each segment randomly
choosing a straight line or an irregular curve. The irregular curve is
synthesized by a series of Fourier orthogonal bases to make the shape of the
fragments more abundant and closer to the edge of a real torn paper. We set a
minimum threshold for the fragments, and the fragment is re-segmented if a
very small fragment appears.

Figure 4: Dataset statistics. (a) Image area distribution of the generated
fragments. (b) Proportional distribution of overlapping contour segments.
Table 1: Dataset division. We divide the entire test set into three difficulty
levels according to the contour overlapping proportion of fragment pairs.

| Total | Train | Validation | Test
---|---|---|---|---
Full | High | Medium | Low
Fragments | 8196 | 4098 | 819 | 3279 | 1071 | 1671 | 1090
Pairs | 14951 | 3654 | 137 | 2370 | 663 | 1103 | 604

To create our dataset, we collect $390$ images of ten themes from Pexels [4]
and empirically set the generation parameters shown in Algorithm 1 to obtain
fragments. We calculate the distributions of our generated data, as shown in
Figure 4. The distribution of fragment areas exhibits a long-tail pattern,
which is consistent with the distribution of fragment areas observed when
tearing large amounts of paper in real-life scenarios. The contour overlapping
proportion of fragment pairs is closer to a uniform distribution over most
ranges, indicating that our algorithm generates various types of fragment
pairs. Then, we divide the dataset into training set, validation set, and test
set in 5:1:4. We further divide the full test set into three difficulty levels
based on the overlapping proportion of contour segments between fragment
pairs. Low difficulty means that the pair of fragments has larger overlapping
contour segments, and vice versa. The details are shown in Table 1.

##  5 Experiments

###  5.1 Comparison Methods

Finding comparison methods is not easy. Because rule-based methods have been
around for quite some time, lack source code, and tend to exhibit lower
performance compared to advanced deep learning methods. However, most existing
deep learning methods require extensive modifications if applied to our task.
Therefore, we employ Jigsawnet [26] (without loop consistency) and a rule-
based method [47] (Step 1) as our comparison methods.

###  5.2 Implementation Details

Our PairingNet was implemented by PyTorch, and conducted on a server with 4
RTX A40 GPUs and Intel$\circledR$ Xeon$\circledR$ Gold 5220 CPUs (72 cores).
We used the Adam optimizer with an initial learning rate of $0.001$, which was
adjusted using a cosine annealing strategy. For training pair-matching module,
the batch size was set to $20$, and for the pair-searching module, the batch
size was set to $175$.

For comparison methods, we used the official sourcecode (implemented by
TensorFlow) of Jigsawnet and conducted experiments on a server with 4 Quadro
RTX 6000 GPUs and Intel$\circledR$ Xeon$\circledR$ Gold 5220 CPUs (144 cores).
We reproduced the rule-based method by Python and conducted experiments on a
node of a Supercomputing platform with Intel$\circledR$ Xeon$\circledR$ Gold
6258R CPUs (128 cores).

For evaluation metrics, we employ Recall@k and NDCG@k [5] for the pair-
searching task, and Registration recall (RR), Hausdorff distance (HD), Radians
Error (RE) and Normalized Translation Error (NTE) for the pair-matching task.
Here, we normalize Translation Error (TE) by the sum of the areas of fragment
pairs to obtain the NTE, considering the large difference in area between
fragments.

###  5.3 Results

Table 2: Comparison Results of various metrics. The best results in our full
dataset are highlighted in bold font, and the best results for each difficulty
are marked in different colors.

Method | Difficulty | Recall@5 | Recall@10 | Recall@20 | NDCG@5 | NDCG@10 | NDCG@20 |  RR $\uparrow$ |  HD $\downarrow$ |  RE $\downarrow$ |  NTE $\downarrow$
---|---|---|---|---|---|---|---|---|---|---|---
| High | 0.261 | 0.354 | 0.443 | 0.185 | 0.218 | 0.241 | 0.107 | 212.003 | 1.289 |  37.100$\times 10^{-4}$
| Medium | 0.329 | 0.427 | 0.529 | 0.242 | 0.275 | 0.302 | 0.153 | 205.463 | 1.249 |  33.742$\times 10^{-4}$
| Low | 0.358 | 0.464 | 0.555 | 0.261 | 0.296 | 0.32 | 0.188 | 210.274 | 1.231 |  32.692$\times 10^{-4}$
Rule-based | All | 0.317 | 0.416 | 0.511 | 0.248 | 0.284 | 0.311 | 0.149 | 208.519 | 1.256 |  34.414$\times 10^{-4}$
| High | 0.305 | 0.394 | 0.478 | 0.231 | 0.261 | 0.284 | 0.117 | 226.026 | 1.306 |  37.011$\times 10^{-4}$
| Medium | 0.383 | 0.478 | 0.565 | 0.309 | 0.34 | 0.364 | 0.213 | 206.040 | 1.155 |  31.467$\times 10^{-4}$
| Low | 0.459 | 0.548 | 0.631 | 0.368 | 0.397 | 0.419 | 0.241 | 202.942 | 1.186 |  30.500$\times 10^{-4}$
Jigsawnet | All | 0.38 | 0.472 | 0.557 | 0.326 | 0.359 | 0.383 | 0.194 | 210.842 | 1.205 |  32.772$\times 10^{-4}$
| High | 0.276 | 0.413 | 0.535 | 0.189 | 0.234 | 0.268 | 0.606 | 92.229 | 0.807 | 18.335$\times 10^{-4}$
| Medium | 0.501 | 0.619 | 0.732 | 0.382 | 0.423 | 0.454 | 0.879 | 35.617 | 0.236 | 5.685$\times 10^{-4}$
| Low | 0.717 | 0.805 | 0.879 | 0.581 | 0.61 | 0.629 | 0.961 | 12.336 | 0.09 | 1.936$\times 10^{-4}$
Ours | All | 0.493 | 0.608 | 0.714 | 0.417 | 0.458 | 0.487 | 0.835 | 43.116 | 0.352 | 7.735$\times 10^{-4}$

##### Performance.

As shown in Table 2, our network outperforms the comparison methods on both
the full test set and on every set of difficulty levels. Jigsawnet shows a
certain superiority in pair-searching on the high-difficulty set, probably
because it treats the problem as a simple binary classification task; however,
their pair-matching results are very unsatisfactory. It should be noted that
we did not evaluate $\mathrm{Recall@1}$ and $\mathrm{NDCG@1}$ here due to the
many-to-many pairings in our dataset, making it unreasonable to search only
for the fragment with the highest similarity of searching. We can also observe
that the performance of our proposed network shows reasonable variation with
the difficulty of the data. This shows that our proposed network learns useful
information and has more potential in complex situations. However, Jigsawnet
and the rule-based method show relatively identical performance on test sets
of different difficulty levels. Furthermore, we also plot the distributions of
HD, RE, and NTE for each method for a more intuitive comparison, as shown in
Figure 5.

Figure 5: Violin plots of the matching results of our method and the
comparison method: (a) RE, NTE, and HD on the test set. (b) HD on the test
sets of different difficulties. Figure 6: Total inference time for different
methods on the pair-searching task. This comparison is numerically unfair
because the experiments were performed on different devices; however, it is
useful in practice.

##### Inference time.

We test the inference time of different methods on the pair-searching task on
our generated test set. As shown in Figure 6, our network is significantly
faster than the comparative methods. Our network retrieves all fragment pairs
in $73$ seconds, while the rule-based method takes $223$ hours, and Jigsawnet
takes $10$ hours. For ease of presentation, we have plotted the logarithm of
the inference time for the pair-searching task.

##### Visualization.

We show the top five search results of different methods for the examples of
fragment pairs in Figure 7. Given a source fragment, our model can accurately
identify the corresponding target fragment (marked with a green box).
Furthermore, in situations where a source fragment can be paired with multiple
target fragments, our method identifies all matching fragments within the top
five search results. We also show examples of matching results for three
difficulty levels in Figure 8. Our method produces matching results that are
consistent with the Ground Truth (GT), while the comparison methods yield
numerous incorrect results.

Figure 7: Examples of pair-searching results. Our network is able to
accurately identify the corresponding target fragment (highlighted with a
green box). Figure 8: Examples of pair-matching results for three difficulty
levels. Our proposed network achieves satisfactory matching results. However,
for low-difficulty cases, Jigsawnet and the Rule-based method find approximate
matching positions, while the matchings are not accurate enough. For medium-
and high-difficulty cases, both comparison methods are difficult to obtain
correct matching results. Figure 9: Visual analysis of Texture/Contour. (a) We
visualize the weights of texture and contour features in our network, with
colors closer to red representing more use of texture features and closer to
green representing more use of contour features. We can see that on edges with
rich texture or close to straight lines, the weights of the extracted texture
features are greater, while on edges with single texture, the weights of the
contour features are greater. (b) Examples of Textur/Contour ablation study.
When the local contour shapes are similar, our network has difficulty matching
them correctly using only contour features, and vice versa. However, these
cases can be solved when the two features are fused.

We also visualize the normalized self-gated weights to analyze their changes
under different situations. As shown in Figure 9 (a), we map the normalized
weights to the edges of the fragments to show the influence of the
texture/contour features. We classify the local parts of fragments into four
types based on the information contained in texture and contour: those with
rich texture and contour information (first quadrant), those with rich texture
information (second quadrant), those with little texture and contour
information (third quadrant), and those with rich contour information but with
little texture information (fourth quadrant). The red color indicates that the
weights of the texture features are relatively large, while the green
indicates that the contour feature weights are relatively large. The results
show that our proposed network learned varying weights of the features for
fragments with different characteristics.

###  5.4 Ablation Study

Table 3: Results of ablation studies. Comparison of the impact of different
feature fusion ways, feature modalities, and network layers employed in our
proposed network on the performance of pair-searching and pair-matching tasks.

| Recall@5 | Recall@10 | NDCG@5 | NDCG@10 | RR
---|---|---|---|---|---
Fusion Way | Early fusion | 0.448 | 0.559 | 0.376 | 0.413 | 0.658
Concat | 0.489 | 0.605 | 0.418 | 0.458 | 0.824
Weighted | 0.493 | 0.608 | 0.417 | 0.458 | 0.835
ResGCN | 10 | - | - | - | - | 0.680
14 | - | - | - | - | 0.835
18 | - | - | - | - | 0.759
Transformer Encoder | 3 | 0.488 | 0.600 | 0.410 | 0.450 | -
4 | 0.488 | 0.606 | 0.411 | 0.452 | -
5 | 0.493 | 0.608 | 0.417 | 0.458 | -
Feature Modality | Contour-only | 0.016 | 0.025 | 0.013 | 0.016 | 0.584
Texture-only | 0.479 | 0.597 | 0.394 | 0.436 | 0.657
Contour + Texture | 0.493 | 0.608 | 0.417 | 0.458 | 0.835

##### Network structures.

We explore the performance of our network under different structures, as shown
in Table 3. First, we test three feature fusion ways. In early fusion, instead
of using two separate GCNs for feature extraction, we concatenate the two
modalities and use only one GCN to learn the features. We also test using a
simple concatenation to replace the self-gated fusion module. The results show
that the performance of both pair-searching and -matching decreases.
Additionally, we explore the impact of different numbers of layers on our
network.

##### Texture/Contour.

To study the impact of contour and texture features on the performance of our
network, we conducted experiments using only one modality (either contour or
texture) and compared the final results. As shown in Table 3, the comparison
results indicate that both modalities perform slightly worse when used
independently. When both modalities are used in conjunction, our network
achieves the best performance. We also show examples of failed pair-matching
when the two modalities are used individually in Figure 9 (b).

Besides, as shown in Figure 9 (a), it can be seen numerically that our network
tends to assign more weight to the texture features. This is reasonable
because textures usually contain richer information than the contours of image
fragments, enabling the network to learn more discriminative features.

##### Others.

We report the results of ablation studies on patch size, contour encoding, and
hyperparameters in our supplementary material.

##  6 Conclusions and Further Work

In this paper, to tackle the image fragment pair-searching and -matching
tasks, we propose a novel network, PairingNet, to deduce the adjacent segments
of fragments and encode the global features of each fragment. In PairingNet,
ResGCN is employed as the backbone to extract the local contour and texture
features of fragments. For pair-searching, a linear transformer-based module
processes these local features leveraging the contrast of paired fragments and
unpaired fragments. For pair-matching, we design a weighted fusion module to
dynamically fuse the extracted local contour and texture features.
Furthermore, to provide a foundation for learning-based methods, we design a
cutting algorithm to generate a dataset by simulating real image fragments.
Comprehensive experiments are conducted on our generated dataset, the results
of which demonstrate the effectiveness of our PairingNet in comparison to
existing methods. In further work, we will continue to explore the application
of our PairingNet in real scenarios, such as archaeological fragments.

##  Appendix A Generated Dataset Examples

The cutting algorithm we designed is implemented in Python and takes an
average of $11$ seconds to tear a complete image into the required fragments.
We show more cutting results generated in our dataset, as shown in Figure 10.
The fragments we generate are rich in shapes and patterns and have a similar
effect to shredding by hand.

Figure 10: Cutting examples in our generated dataset, which are rich in shapes
and patterns. Figure 11: Coutour encodings. (a) Three contour encodings: (1)
Edge-only, (2) Inside-Outside, (3) Edge + Inside-Outside. (b) Example of Edge-
only encoding we used.

##  Appendix B Contour Encoding Details

We design three contour encodings as shown in Figure 11: (1) Edge-only; (2)
Inside-Outside; (3) Edge + Inside-Outside. Encoding (1) describes where the
contour is located. Encoding (2) describes which positions are fragmented
parts and which are not. Encoding (3) combines the above two encodings. We
also test the impact of different patch sizes on performance in the ablation
studies.

Table 4: Detailed results of ablation studies.

| Recall@5 | Recall@10 | Recall@20 | NDCG@5 | NDCG@10 | NDCG@20 | RR $\uparrow$ | HD $\downarrow$ | RE $\downarrow$ | NTE $\downarrow$
---|---|---|---|---|---|---|---|---|---|---
Contour Encoding | (1) | - | - | - | - | - | - | 0.835 | 43.180 | 0.352 | 7.735$\times 10^{-4}$
(2) | - | - | - | - | - | - | 0.695 | 75.423 | 0.576 | 13.716$\times 10^{-4}$
(3) | - | - | - | - | - | - | 0.671 | 84.982 | 0.641 | 15.078$\times 10^{-4}$
Patch Size | 3$\times$3 | - | - | - | - | - | - | 0.714 | 72.477 | 0.566 | 13.291$\times 10^{-4}$
7$\times$7 | - | - | - | - | - | - | 0.835 | 43.180 | 0.352 | 7.735$\times 10^{-4}$
11$\times$11 | - | - | - | - | - | - | 0.663 | 84.751 | 0.649 | 15.306$\times 10^{-4}$
ResGCN Layer | 10 | - | - | - | - | - | - | 0.68 | 81.163 | 0.610 | 14.847$\times 10^{-4}$
14 | - | - | - | - | - | - | 0.835 | 43.180 | 0.352 | 7.735$\times 10^{-4}$
18 | - | - | - | - | - | - | 0.759 | 62.51 | 0.484 | 11.165$\times 10^{-4}$
Transformer Encoder Layer | 3 | 0.488 | 0.600 | 0.697 | 0.410 | 0.450 | 0.476 | - | - | - | -
4 | 0.488 | 0.606 | 0.711 | 0.411 | 0.452 | 0.481 | - | - | - | -
5 | 0.493 | 0.608 | 0.714 | 0.417 | 0.458 | 0.487 | - | - | - | -
Fusion Way | Early fusion | 0.448 | 0.559 | 0.672 | 0.376 | 0.413 | 0.446 | 0.658 | 85.558 | 0.636 | 15.547$\times 10^{-4}$
Concat | 0.489 | 0.605 | 0.706 | 0.418 | 0.458 | 0.486 | 0.824 | 45.521 | 0.359 | 8.269$\times 10^{-4}$
Weighted | 0.493 | 0.608 | 0.714 | 0.417 | 0.458 | 0.487 | 0.835 | 43.180 | 0.352 | 7.735$\times 10^{-4}$
Feature Fusion in Pair-searching Module | Element-wise Addition | 0.489 | 0.605 | 0.706 | 0.418 | 0.459 | 0.486 | - | - | - | -
Channel-wise Concatenation | 0.493 | 0.608 | 0.714 | 0.417 | 0.458 | 0.487 | - | - | - | -
Focal Loss Paramaters |  ${\beta}_{1}$=0.25, $\gamma$=4 | - | - | - | - | - | - | 0.514 | 124.88 | 0.886 | 21.972$\times 10^{-4}$
${\beta}_{1}$=0.4, $\gamma$=6 | - | - | - | - | - | - | 0.752 | 65.181 | 0.505 | 11.631$\times 10^{-4}$
${\beta}_{1}$=0.55, $\gamma$=8 | - | - | - | - | - | - | 0.835 | 43.180 | 0.352 | 7.735$\times 10^{-4}$
InfoNCE Temperature | 0.07 | 0.485 | 0.593 | 0.692 | 0.413 | 0.451 | 0.478 | - | - | - | -
0.12 | 0.493 | 0.608 | 0.714 | 0.417 | 0.458 | 0.487 | - | - | - | -
0.2 | 0.474 | 0.579 | 0.679 | 0.394 | 0.430 | 0.457 | - | - | - | -
Feature Modality | RGB | Contour-only | 0.016 | 0.025 | 0.049 | 0.013 | 0.016 | 0.023 | 0.584 | 122.953 | 0.846 | 19.806$\times 10^{-4}$
Texture-only | 0.479 | 0.597 | 0.705 | 0.394 | 0.436 | 0.466 | 0.657 | 85.438 | 0.684 | 15.872$\times 10^{-4}$
Contour+Texture | 0.493 | 0.608 | 0.714 | 0.417 | 0.458 | 0.487 | 0.835 | 43.180 | 0.352 | 7.735$\times 10^{-4}$
Grayscale | Contour-only | 0.018 | 0.032 | 0.053 | 0.013 | 0.019 | 0.025 | 0.535 | 138.238 | 0.942 | 22.314$\times 10^{-4}$
Texture-only | 0.258 | 0.355 | 0.470 | 0.205 | 0.24 | 0.271 | 0.633 | 94.706 | 0.700 | 17.147$\times 10^{-4}$
Contour+Texture | 0.281 | 0.379 | 0.487 | 0.226 | 0.261 | 0.291 | 0.833 | 44.917 | 0.365 | 7.738$\times 10^{-4}$
Binarized | Contour-only | 0.086 | 0.124 | 0.184 | 0.069 | 0.083 | 0.100 | 0.562 | 126.609 | 0.857 | 20.459$\times 10^{-4}$
Texture-only | 0.027 | 0.048 | 0.082 | 0.019 | 0.027 | 0.037 | 0.000 | 232.263 | 1.562 | 42.034$\times 10^{-4}$
Contour+Texture | 0.036 | 0.051 | 0.083 | 0.029 | 0.034 | 0.043 | 0.553 | 127.997 | 0.888 | 21.072$\times 10^{-4}$
Use Graph U-Nets as Backbone | - | - | - | - | - | - | 0.629 | 97.111 | 0.744 | 17.001$\times 10^{-4}$
| Train Pair-searching module using Pair-matching Features
---
0.434 | 0.535 | 0.632 | 0.358 | 0.392 | 0.419 | - | - | - | -

##  Appendix C Ablation Study

We provide detailed ablation study results as shown in Table 4.

###  C.1 Network Details

##### Contour Encoding Methods.

We tested the impact of three contour encodings on the pair-matching task.
Experimental results show that Encoding (1) Egde-only achieves the best
matching performance.

##### Patch Size.

We use a patch size of $7\times 7$ to encode contours in our proposed network.
We also tested the impact of patch sizes $3\times 3$ and $11\times 11$ on the
pair-matching task: however, they did not achieve better performance.

##### ResGCN Layer.

The ResGCN encoder in both branches of our network contains $14$ GCN layers,
with each node connecting $8$ nodes on both sides of its vicinity. The length
of the contour points is unified to the maximum length $2900$, and zero-
padding is used. We tested the impact of the $10$ and $18$ layers on the pair-
matching task. When using more or fewer GCN layers, the pair-matching
performance of our model decreases. This shows that simply increasing the
capacity of the encoder does not always lead to better performance.

##### Transformer Encoder Layer.

The linear transformer encoder in our network contains $5$ layers, and the
input length is truncated to $1408$. We tested the impact of $3$ and $4$
layers on pair-searching performance. When using more layers of Transformer
Encoder, the network has better searching performance. Due to computational
resource constraints, we did not further test higher capacities.

##### Fusion way.

In addition to the shortened table, we also provide all results of the three
feature fusion methods to show the impact on our proposed network.

##### Feature Fusion in Pair-searching Module.

Due to better performance, we replaced the element-wise addition operation of
the feature fusion in the pair-searching module with channel-wise
concatenation.

##### Parameters in Loss Functions.

For the two-step training strategy, we first train the feature extraction
network and the pair-matching module by our pair-matching loss. Freeze them
and then train the pair-searching module by our pair-searching loss. In the
Focal loss, the balancing weights ${\beta}_{1}$ was set to $0.55$ and the
decay factor $\gamma$ was set to $8$. We also tested two other sets of
parameter combinations, ${\beta}_{1}=0.25$, $\gamma=4$ and $\beta_{1}=0.4$,
$\gamma=6$, respectively. In the InfoNCE loss, we set the temperature to
$0.12$. We also tested the impact of setting the temperature to $0.07$ and
$0.2$. We chose the parameters that achieved optimal performance.

###  C.2 Reduce Texture Information

Figure 12: Examples of the RGB, grayscale, and binarized fragments.

In the ablation study of feature modality, we can see that texture features
contribute more performance compared to contour features. To further verify
the necessity of extracting contour features, we processed the original RGB
fragments into grayscale and binarized them using the Canny edge detector
(Figure 12) to reduce the texture information and show the impact on our
tasks.

The evaluation results got worse, since the texture information is lost in
grayscale fragments and binarized ones have almost no texture features. Then,
when we input binarized fragments, the contour-only modality achieved the best
performance, showing the effectiveness of contour features.

###  C.3 Others

##### Backbone.

We tested another commonly used graph-based network, Graph U-Nets [17], as our
backbone; however, the performance decreased.

##### Train Pair-searching module using Pair-matching Features.

We also tested using the features fused by the pair-matching module to train
the pair-searching module; however, the performance declined. This shows that
the features required for pair-searching and -matching tasks are not exactly
the same.

###  C.4 Visualization

Figure 13: Pair-matching correspondences. Lines show the correspondences
predicted by our network between fragment pairs. Green is used to indicate
correctly paired points, while red is used to indicate incorrectly paired
points. Figure 14: Visualization of the features extracted by our pair-
searching module. The paired fragments are represented by the same color.
Figure 15: Examples of pair-searching results. Our network is able to
accurately identify the corresponding target fragment (highlighted with a
green box). Figure 16: Examples of pair-matching results for three difficulty
levels. Our proposed network achieves satisfactory matching results.

We visualize pair-matching correspondences between the fragments predicted by
our network, as shown in Figure 13. The correct matching points are connected
by green lines, while incorrectly predicted matching points are connected by
red lines. For any two fragments, in addition to the optimal matching points,
there are also suboptimal matching points that may interfere with the network
performance. For example, the locations connected by the red lines in Figure
13 also exhibit matchable local contours or textures. Only a sufficiently
high-performance network can predict as many correct matching points as
possible and minimize the interference of sub-optimal matching points on the
results.

We perform dimensionality reduction visualization on the features extracted by
our network to show the effectiveness of contrastive loss in the pair-
searching task. Compared with Principal Component Analysis (PCA), which
prefers to maintain the global structure of feature space, and t-SNE, which
focuses on maintaining the local structure, we select PaCMAP [42], a
dimensionality reduction technique that preserves both global and local
structures of the feature space, to reduce the features extracted by the pair-
searching module to three dimensions. Subsequently, we normalize the features
of each fragment and map them onto the surface of the unit sphere. We show
examples in Figure 14. We can see that the features of fragment pairs
represented by the same color points are close to each other, while the
features of different pairs are pushed further apart.

###  C.5 More Comparison Results

We present more results of our network and comparison methods on pair-
searching and -matching tasks, as shown in Figures 15 and 16. It can be
intuitively seen that in the pair-matching task, the results obtained by our
method are closer to GT, while the comparison method produces many inaccurate
results. In the pair-searching task, whether it is one-to-one matching or one-
to-many matching, our method can find the target fragments in the Top 5 search
results. The comparison method can only find a part of the matching target
fragments, and sometimes it cannot even find correct target fragments in the
Top 5 search results. In the pair-searching task, our network finds the paired
fragments in the Top 5 search results, whether it is one-to-one matching or
one-to-many matching. However, the comparison methods can only find a part of
the matching target fragments, and even cannot find correct target fragments
in the Top 5. In the pair-matching task, the results obtained by our network
are closer to GT, while the comparison methods produce inaccurate results.

## References

  * [1] Roy Abitbol, Ilan Shimshoni, and Jonathan Ben-Dov.  Machine learning based assembly of fragments of ancient papyrus.  Journal on Computing and Cultural Heritage (JOCCH), 14(3):1–21, 2021.
  * [2] Dov Bridger, Dov Danon, and Ayellet Tal.  Solving jigsaw puzzles with eroded boundaries.  In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3526–3535, 2020.
  * [3] Lisa Gottesfeld Brown.  A survey of image registration techniques.  ACM computing surveys (CSUR), 24(4):325–376, 1992.
  * [4] Ingo Joseph Bruno Joseph and Daniel Frese.  Pexels.  https://www.pexels.com/, 2023.
  * [5] Róbert Busa-Fekete, György Szarvas, Tamás Elteto, and Balázs Kégl.  An apple-to-apple comparison of learning-to-rank algorithms in terms of normalized discounted cumulative gain.  In ECAI 2012-20th European Conference on Artificial Intelligence: Preference Learning: Problems and Applications in AI Workshop, volume 242. Ios Press, 2012.
  * [6] J. Chen, M. Tian, X. Qi, W. Wang, and Y. Liu.  A solution to reconstruct cross-cut shredded text documents based on constrained seed k-means algorithm and ant colony algorithm.  Expert Systems with Applications, 127(AUG.):35–46, 2019.
  * [7] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton.  Simclr: A simple framework for contrastive learning of visual representations.  In International Conference on Learning Representations, volume 2, 2020.
  * [8] Yun-Chun Chen, Haoda Li, Dylan Turpin, Alec Jacobson, and Animesh Garg.  Neural shape mating: Self-supervised object assembly with adversarial shape priors.  In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12724–12733, 2022.
  * [9] Xing Cheng, Hezheng Lin, Xiangyu Wu, Fan Yang, and Dong Shen.  Improving video-text retrieval by multi-stream corpus alignment and dual softmax loss.  arXiv preprint arXiv:2109.04290, 2021.
  * [10] Taeg Sang Cho, Shai Avidan, and William T Freeman.  A probabilistic image jigsaw puzzle solver.  In 2010 IEEE Computer society conference on computer vision and pattern recognition, pages 183–190. IEEE, 2010.
  * [11] Helena Cristina da Gama Leitao and Jorge Stolfi.  A multiscale method for the reassembly of two-dimensional fragmented objects.  IEEE Transactions on Pattern Analysis and Machine Intelligence, 24(9):1239–1251, 2002.
  * [12] Niv Derech, Ayellet Tal, and Ilan Shimshoni.  Solving archaeological puzzles.  Pattern Recognition, 119:108065, 2021.
  * [13] Martin A Fischler and Robert C Bolles.  Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography.  Communications of the ACM, 24(6):381–395, 1981.
  * [14] Herbert Freeman and L Garder.  Apictorial jigsaw puzzles: The computer solution of a problem in pattern recognition.  IEEE Transactions on Electronic Computers, (2):118–127, 1964.
  * [15] Thomas Funkhouser, Hijung Shin, Corey Toler-Franklin, Antonio García Castañeda, Benedict Brown, David Dobkin, Szymon Rusinkiewicz, and Tim Weyrich.  Learning how to match fresco fragments.  Journal on Computing and Cultural Heritage (JOCCH), 4(2):1–13, 2011\.
  * [16] Andrew C Gallagher.  Jigsaw puzzles with pieces of unknown orientation.  In 2012 IEEE Conference on computer vision and pattern recognition, pages 382–389. IEEE, 2012.
  * [17] Hongyang Gao and Shuiwang Ji.  Graph u-nets.  In international conference on machine learning, pages 2083–2092. PMLR, 2019.
  * [18] Yulan Guo, Mohammed Bennamoun, Ferdous Sohel, Min Lu, Jianwei Wan, and Ngai Ming Kwok.  A comprehensive performance evaluation of 3d local feature descriptors.  International Journal of Computer Vision, 116:66–89, 2016.
  * [19] Shir Gur and Ohad Ben-Shahar.  From square pieces to brick walls: The next challenge in solving jigsaw puzzles.  In Proceedings of the IEEE International Conference on Computer Vision, pages 4029–4037, 2017.
  * [20] Je Hyeong Hong, Seong Jong Yoo, Muhammad Arshad Zeeshan, Young Min Kim, and Jinwook Kim.  Structure-from-sherds: Incremental 3d reassembly of axially symmetric pots from unordered and mixed fragment collections.  In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 5443–5451, 2021.
  * [21] Hui Huang, Kangxue Yin, Minglun Gong, Dani Lischinski, Daniel Cohen-Or, Uri M Ascher, and Baoquan Chen.  ” mind the gap”: tele-registration for structure-driven image completion.  ACM Trans. Graph., 32(6):174–1, 2013.
  * [22] Qi-Xing Huang, Simon Flöry, Natasha Gelfand, Michael Hofer, and Helmut Pottmann.  Reassembling fractured objects by geometric matching.  In ACM SIGGRAPH 2006 Papers, pages 569–578. 2006.
  * [23] Benjamin Jones, Dalton Hildreth, Duowen Chen, Ilya Baran, Vladimir G Kim, and Adriana Schulz.  Automate: A dataset and learning approach for automatic mating of cad assemblies.  ACM Transactions on Graphics (TOG), 40(6):1–18, 2021.
  * [24] Weixin Kong and Benjamin B Kimia.  On solving 2d and 3d puzzles using curve matching.  In Proceedings of the 2001 IEEE Computer Society Conference on Computer Vision and Pattern Recognition. CVPR 2001, volume 2, pages II–II. IEEE, 2001.
  * [25] Nikolas Lamb, Cameron Palmer, Benjamin Molloy, Sean Banerjee, and Natasha Kholgade Banerjee.  Fantastic breaks: A dataset of paired 3d scans of real-world broken objects and their complete counterparts.  In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4681–4691, 2023.
  * [26] Canyu Le and Xin Li.  Jigsawnet: Shredded image reassembly using convolutional neural network and loop-based composition.  IEEE Transactions on Image Processing, 28(8):4000–4015, 2019.
  * [27] Guohao Li, Matthias Muller, Ali Thabet, and Bernard Ghanem.  Deepgcns: Can gcns go as deep as cnns?  In Proceedings of the IEEE/CVF international conference on computer vision, pages 9267–9276, 2019.
  * [28] Yang Li and Tatsuya Harada.  Lepard: Learning partial point cloud matching in rigid and deformable scenes.  In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5554–5564, 2022.
  * [29] Hairong Liu, Shengjiao Cao, and Shuicheng Yan.  Automated assembly of shredded pieces from multiple photos.  IEEE transactions on multimedia, 13(5):1154–1162, 2011.
  * [30] Krystian Mikolajczyk and Cordelia Schmid.  A performance evaluation of local descriptors.  IEEE transactions on pattern analysis and machine intelligence, 27(10):1615–1630, 2005.
  * [31] Aaron van den Oord, Yazhe Li, and Oriol Vinyals.  Representation learning with contrastive predictive coding.  arXiv preprint arXiv:1807.03748, 2018.
  * [32] Thiago M. Paixao, Mcs Boeres, Coa Freitas, and T. Oliveira-Santos.  Exploring character shapes for unsupervised reconstruction of strip-shredded text documents.  IEEE Transactions on Information Forensics and Security, pages 1–1, 2018.
  * [33] Marie-Morgane Paumard, David Picard, and Hedi Tabia.  Image reassembly combining deep learning and shortest path problem.  In Proceedings of the European conference on computer vision (ECCV), pages 153–167, 2018.
  * [34] Dolev Pomeranz, Michal Shemesh, and Ohad Ben-Shahar.  A fully automated greedy square jigsaw puzzle solver.  In CVPR 2011, pages 9–16. IEEE, 2011.
  * [35] F Richter, C. X Ries, N Cebron, and R Lienhart.  Learning to reassemble shredded documents.  IEEE Transactions on Multimedia, 15(3):582–593, 2013.
  * [36] Ignacio Rocco, Mircea Cimpoi, Relja Arandjelović, Akihiko Torii, Tomas Pajdla, and Josef Sivic.  Neighbourhood consensus networks.  Advances in neural information processing systems, 31, 2018.
  * [37] Silvia Sellán, Yun-Chun Chen, Ziyi Wu, Animesh Garg, and Alec Jacobson.  Breaking bad: A dataset for geometric fracture and reassembly.  Advances in Neural Information Processing Systems, 35:38885–38898, 2022.
  * [38] Kilho Son, James Hays, and David B Cooper.  Solving square jigsaw puzzles with loop constraints.  In European conference on computer vision, pages 32–46. Springer, 2014.
  * [39] Kilho Son, James Hays, and David B Cooper.  Solving square jigsaw puzzle by hierarchical loop constraints.  IEEE transactions on pattern analysis and machine intelligence, 41(9):2222–2235, 2018.
  * [40] Efthymia Tsamoura and Ioannis Pitas.  Automatic color based reassembly of fragmented images and paintings.  IEEE Transactions on Image Processing, 19(3):680–690, 2009.
  * [41] Sinong Wang, Belinda Z Li, Madian Khabsa, Han Fang, and Hao Ma.  Linformer: Self-attention with linear complexity.  arXiv preprint arXiv:2006.04768, 2020.
  * [42] Yingfan Wang, Haiyang Huang, Cynthia Rudin, and Yaron Shaposhnik.  Understanding how dimension reduction tools work: an empirical approach to deciphering t-sne, umap, trimap, and pacmap for data visualization.  The Journal of Machine Learning Research, 22(1):9129–9201, 2021\.
  * [43] Ruihai Wu, Chenrui Tie, Yushi Du, Yan Zhao, and Hao Dong.  Leveraging se (3) equivariance for learning 3d geometric shape assembly.  In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 14311–14320, 2023.
  * [44] Xi Yang, Katsutsugu Matsuyama, and Kouichi Konno.  Pairwise matching of stone tools based on flake-surface contour points and normals.  In Proceedings of the Eurographics Workshop on Graphics and Cultural Heritage, pages 125–129, 2017.
  * [45] Shuainan Ye, Zhutian Chen, Xiangtong Chu, Kang Li, Juntong Luo, Yi Li, Guohua Geng, and Yingcai Wu.  Puzzlefixer: A visual reassembly system for immersive fragments restoration.  IEEE transactions on visualization and computer graphics, 29(1):429–439, 2022.
  * [46] Guanqi Zhan, Qingnan Fan, Kaichun Mo, Lin Shao, Baoquan Chen, Leonidas J Guibas, Hao Dong, et al.  Generative 3d part assembly via dynamic graph learning.  Advances in Neural Information Processing Systems, 33:6315–6326, 2020.
  * [47] Kang Zhang and Xin Li.  A graph-based optimization algorithm for fragmented image reassembly.  Graphical Models, 76(5):484–495, 2014.


Proceedings of the Fifth Annual LHCP LHCb-PROC-2017-035

Measurement of heavy flavor production in $pp$ collisions at LHCb

Yanxi ZHANG

On behalf of the LHCb Collaboration,
LAL, Université Paris-Sud, CNRS/IN2P3 Orsay, 91898, France

> ABSTRACT
>
>
>
>
> Heavy flavor productions are important tests of QCD. In proton-proton
> collisions collected at LHCb, a long list of measurements for charm and
> bottom productions have been made. This talk focuses on the studies of
> fragmentation functions and production asymmetries for bottom hadrons. They
> provide inputs for absolute branching fraction measurements and CP violation
> studies at LHCb respectively.

> PRESENTED AT
>
>
>
>
> The Fifth Annual Conference
>
> on Large Hadron Collider Physics
>
> Shanghai Jiao Tong University, Shanghai, China
>
> May 15-20, 2017

##  1 Introduction

The hadronic production of heavy flavor hadrons involves heavy quark
production from partonic interactions and then the hadronization, both
described in the framework of QCD. A wide range of measurements has been
performed by the LHCb experiment including the charm and bottom hadron
production cross-sections, the quarkonium productions and polarizations,
associated productions and production correlations. The measurements are
important to understand the QCD theory in both the perturbative and non
perturbative parts. Currently QCD is not fully understood, especially the non-
perturbative part: there is no universal model that could describe all heavy
flavor productions. In the talk, I summarized the LHCb measurements on
$b$-hadron fragmentation functions and production asymmetries. Fragmentation
functions stand for the relative production rates of different $b$-hadrons,
$f_{q}$ for the $B_{q}$ hadron. The production asymmetries measure the
difference of production rates between a $b$-hadron and its charge conjugate.
These processes involve non-perturbative effects, and thus reply on
experimental data to fix model parameters. The fragmentation fractions
determine the total production yield for each $b$ hadron species, providing
inputs to calculate absolute branching fractions. The $b$ hadron production
asymmetries are essential inputs for measurements of CP asymmetries at LHCb.

##  2 Measurements of $b$-hadron fragmentation functions

LHCb measured the relative fragmentations between $B_{s}^{0}$ and $B_{0}$,
$f_{s}/f_{d}$, using the decays $B_{s}^{0}\to D_{s}^{-}\pi^{+}$ and $B^{0}\to
D^{-}K^{+}$ [1] in $pp$ collisions at $\sqrt{s}=7$ TeV. Experimentally
$f_{s}/f_{d}$ is determined as $\frac{f_{s}}{f_{d}}=\frac{\mathcal{B}(B^{0}\to
D^{-}K^{+})}{\mathcal{B}(B_{s}^{0}\to
D_{s}^{-}\pi^{+})}\frac{\epsilon_{D^{-}K^{+}}}{\epsilon_{D_{s}^{-}\pi^{+}}}\frac{N_{D_{s}^{-}\pi^{+}}}{N_{D^{-}K^{+}}}$.
The two decay modes both receive only contributions of color-allowed tree-
diagram and are connected by U-spin symmetry. The branching fraction ration
$\frac{\mathcal{B}(B^{0}\to D^{-}K^{+})}{\mathcal{B}(B_{s}^{0}\to
D_{s}^{-}\pi^{+})}$ was calculated using phenomenological model assuming
factorization, including small non-factorizable U-spin-breaking corrections.
The $D^{-}$ and $D_{s}^{-}$ mesons are reconstructed in the $D^{-}\to
K^{+}\pi^{-}\pi^{-}$ and $D_{s}^{-}\to K^{+}K^{-}\pi^{-}$ decays respectively.
The same event selection criteria were applied to the two channels, including
the trigger requirement that selects a high transverse momentum track
displaced from the primary vertices, the particle identification requirements
on the final state tracks and a multivariate selector trained using kinematic
and geometrical variables. The signal yields $N_{D_{s}^{-}\pi^{+}}$ and
$N_{D^{-}K^{+}}$ are obtained from the fit to the invariant mass
distributions, as shown in Figure 1.

Figure 1:  Invariant mass distributions of (left) $m(D^{-}K^{+})$ and (right)
$m(D_{s}^{-}\pi^{+})$.

The two decay modes have similar decay topology, largely cancelling the
systematic uncertainties on the efficiencies. The systematic uncertainty on
the $f_{s}/f_{d}$ measurement consists of that on signal yields and those on
trigger and offline selection efficiencies, giving a total value of 3.4%.
Another uncertainty comes from the branching fraction ratio of $D_{s}^{+}$ and
$D^{-}$ decays. Averaged over LHCb acceptance, $f_{s}/f_{d}$ is measured to be
$0.238\pm 0.004\pm 0.015\pm 0.021$, where the uncertainties are statistical,
systematic uncertainties excluding that of $\frac{\mathcal{B}(B^{0}\to
D^{-}K^{+})}{\mathcal{B}(B_{s}^{0}\to D_{s}^{-}\pi^{+})}$ and that of
$\frac{\mathcal{B}(B^{0}\to D^{-}K^{+})}{\mathcal{B}(B_{s}^{0}\to
D_{s}^{-}\pi^{+})}$. The $B^{0}\to D^{-}\pi^{+}$ channel, which has ten times
more yields compared to $B_{0}\to D^{-}K^{+}$, is used to measure kinematic
dependent $f_{s}/f_{d}$, for which the result is displayed in Figure 2 as
functions of the $b$-hadron $p_{\mathrm{T}}$ and $\eta$. Fits using linear
functions are performed giving

$\displaystyle f_{s}/f_{d}(p_{\mathrm{T}})$ $\displaystyle=$
$\displaystyle(0.256\pm 0.020)+(-2.0\pm 0.6)\times
10^{-3}/(\mathrm{GeV}\\!/c)\times(p_{\mathrm{T}}-10.4\,\mathrm{GeV}\\!/c)$
$\displaystyle f_{s}/f_{d}(\eta)$ $\displaystyle=$ $\displaystyle(0.256\pm
0.020)+(0.005\pm 0.006)\times(\eta-3.28).$

The $f_{s}/f_{d}$ slightly depends on $p_{\mathrm{T}}$ with a significance of
three standard deviations, while no indication of a dependence on $\eta(B)$ is
found. The measurement concludes that the production rate of $B_{s}^{0}$ meson
is approximately $25\%$ of that of $B^{0}$ at LHCb. The result provides the
inputs for branching fraction measurements for $B_{s}^{0}$ using $B^{0}$
decays as references.

Figure 2:  Ratio of fragmentation fractions $f_{s}/f_{d}$ as functions of
(left) $p_{\mathrm{T}}$ and (right) $\eta$ of the $b$-hadrons. The solid blue
line represents the linear fit, while the dashed red line corresponds to the
average.

Figure 3:  Dependence of $f_{\Lambda_{b}^{0}}/f_{d}$ on the (left)
$p_{\mathrm{T}}$ and (right) $\eta$ of the beauty hadron. The solid line
represents the fit with exponential and linear function respectively, while
the dashed lines corresponds to one standard deviations on the scale of
$f_{\Lambda_{b}^{0}}/f_{d}$ extrapolated from semileptonic analysis.

Figure 4:  Ratio $f_{\Lambda_{b}^{0}}/f_{d}$ multiplied by the branching
fraction ratio as a function of (left) $p_{\mathrm{T}}$ and (right) $y$ in
$pp$ collisions at 7 and 8 TeV respectively, measured in the $b\to J\\!/\psi
X$ decay.

The $\Lambda_{b}^{0}$ over $B^{0}$ production ratio
$f_{\Lambda_{b}^{0}}/f_{d}$ in $pp$ collisions at $\sqrt{s}=7$ TeV is measured
with decays $\Lambda_{b}^{0}\to\Lambda_{c}^{+}\pi^{-},\Lambda_{c}^{+}\to
pK^{-}\pi^{+}$ and $\overline{B}^{0}\to D^{+}\pi^{-},D^{+}\to
K^{-}\pi^{+}\pi^{+}$ [3]. Experimentally $f_{\Lambda_{b}^{0}}/f_{d}$ is
calculated as $R_{\mathcal{B}}\times R_{Y}$, where $R_{\mathcal{B}}$ is the
overall branching fraction ratio and $R_{Y}$ is the ratio of efficiency
corrected yields. However the branching fraction for
$\Lambda_{b}^{0}\to\Lambda_{c}^{+}\pi^{-}$ is poorly known, so the analysis
measured the kinematic dependence of $f_{\Lambda_{b}^{0}}/f_{d}$ and used
external input of $f_{\Lambda_{b}^{0}}/f_{d}$, which is measured with
semileptonic decays [4], to determine
$\mathcal{B}(\Lambda_{b}^{0}\to\Lambda_{c}^{+}\pi^{-})$. The event selection
strategy is similar to the analysis for $f_{s}/f_{d}$ and fits to the
invariant mass distributions are used to obtain the signal yields. The ratio
of selection efficiencies is evaluated using simulated events and validated
using real data. The efficiency corrected yield ratio scaled to match that in
semileptonic decays is shown in Figure 3. The scale factor provides a
measurement of $\mathcal{B}(\Lambda_{b}^{0}\to\Lambda_{c}^{+}\pi^{-})$, with
external inputs of branching fractions for other decays, resulting in
$\mathcal{B}(\Lambda_{b}^{0}\to\Lambda_{c}^{+}\pi^{-})=(4.30\pm
0.03^{+0.12}_{-0.11}\pm 0.26\pm 0.21)\times 10^{-3}$. Here the uncertainties
are statistical, systematic, that from semileptonic analysis and that on the
knowledge of $\mathcal{B}(\overline{B}^{0}\to D^{+}\pi^{-})$. From Figure 3,
it can be seen that $f_{\Lambda_{b}^{0}}/f_{d}$ decreases with the increase of
$p_{\mathrm{T}}$ following approximately an exponential distribution, and it
increases linearly with $b$-hadron $\eta$ within LHCb acceptance.

The kinematic dependence of $f_{\Lambda_{b}^{0}}/f_{d}$ is as a function of
$p_{\mathrm{T}}$ and rapidity is also studied using $\Lambda_{b}^{0}\to
J\\!/\psi K^{-}p$ and $\overline{B}^{0}\to J\\!/\psi K^{-}\pi^{+}$ decay modes
[5], as shown in Figure 4. The shape of the $p_{\mathrm{T}}$-dependence is
consistent with the measurement using open charm decay modes. The absolute
scale provides measurement of the $\Lambda_{b}^{0}\to J\\!/\psi K^{-}p$
branching fraction calculated to be $\mathcal{B}(\Lambda_{b}^{0}\to J\\!/\psi
K^{-}p)=(3.17\pm 0.04\pm 0.07\pm 0.34^{+0.45}_{-0.28})\times 10^{-4}$, where
the uncertainties are statistical, systematic, that on
$\mathcal{B}(\overline{B}^{0}\to J\\!/\psi K^{-}\pi^{+})$ and the knowledge of
$f_{\Lambda_{b}^{0}}/f_{d}$ respectively.

Table 1 summarizes LHCb measurements of $b$-hadron fragmentation functions in
semileptonic and hadronic decay modes. Compiling these numbers, about 75% of
$b$ quarks produced at LHCb fragment into $B^{+}$ or $B^{0}$, approximately
$10\%$ go into $B_{s}^{0}$ and 15% result in $\Lambda_{b}^{0}$ baryons.

Variables | Decay modes | Results | Comments
---|---|---|---
$f_{s}/f_{d}$ [4] | $D\mu\nu X$ | $0.268^{+0.023}_{-0.021}$ | Independent of $D\mu\,\,p_{\mathrm{T}},y$
$2f_{\Lambda_{b}^{0}}/(f_{u}+f_{d})$ [4] | $\Lambda_{c}^{+}/D\mu\nu X$ | $\sim 40\%$ | Dependent on $D\mu\,\,p_{\mathrm{T}},y$
$f_{s}/f_{d}$ [1] | $D_{s}^{-}\pi^{+}\,/\,D^{-}K^{+}$ | $0.238\pm 0.026$ | Slightly dependent on $b$ $p_{\mathrm{T}}$
$f_{\Lambda_{b}^{0}}/f_{d}$ [3] | $\Lambda_{c}^{+}\pi^{-}\,/\,D^{+}\pi^{-}$ | Fixed for $\mathcal{B}(\Lambda_{b}^{0}\to\Lambda_{c}^{+}\pi^{-})$ |  $f_{\Lambda_{b}^{0}}/f_{d}$ depends on $b$ $p_{\mathrm{T}},\eta$
$f_{\Lambda_{b}^{0}}/f_{d}$ [5] | $J\\!/\psi K^{-}p\,/\,J\\!/\psi K^{-}\pi^{+}$ | Fixed for $\mathcal{B}(\Lambda_{b}^{0}\to J\\!/\psi K^{-}p)$ |  $f_{\Lambda_{b}^{0}}/f_{d}$ depends on $b$ $p_{\mathrm{T}}$
Table 1:  LHCb measurements of fragmentation functions in $pp$ collisions.

##  3 Measurements of $b$-hadron production asymmetries

Although $b$ and $\overline{b}$ quarks are produced simultaneously, the
production rate of a particular $b$-hadron species is not expected to be
strictly identical to that of its charge conjugate. Since the initial
colliding proton-proton is matter rather than anti-matter, the collision
favours the production of $B^{+},\,B^{0},\,B_{s}^{0}$ and $\Lambda_{b}^{0}$
instead of their anti-particles, especially at large rapidity where this
process happens closer to the beam remnants. However as $b$ and $\overline{b}$
quarks are produced predominately in pairs, the asymmetries of $b$-hadrons
should compensate among each other to make overall zero asymmetry.

For the LHCb analysis [6], the production asymmetries for $B^{+},\,B^{0}$ and
$B_{s}^{0}$ are measured using decays $B^{+}\to J\\!/\psi K^{+}$, $B^{0}\to
J\\!/\psi K^{*0}$ and $B_{s}^{0}\to D_{s}^{-}\pi^{+}$ for $pp$ collisions at 7
and 8 TeV. Here the production asymmetry is defined as
$A_{\mathrm{p}}(x)\equiv\frac{\sigma(\overline{x})-\sigma(x)}{\sigma(\overline{x})+\sigma(x)}$
for $x=B^{+},\,B^{0},\,B_{s}^{0},\,\overline{\Lambda}_{b}^{0}$, where
$\sigma(x)$ stands for the production cross-section. Neglecting $B_{c}^{+}$
and other $b$ baryons, $A_{\mathrm{p}}(\Lambda_{b}^{0})$ is determined from
$A_{\mathrm{p}}(B^{+}),\,A_{\mathrm{p}}(B^{0})$ and
$A_{\mathrm{p}}(B_{s}^{0})$ as

$A_{\mathrm{p}}(\Lambda_{b}^{0})\approx-\left[\frac{f_{u}}{f_{\Lambda_{b}^{0}}}A_{\mathrm{p}}(B^{+})+\frac{f_{d}}{f_{\Lambda_{b}^{0}}}A_{\mathrm{p}}(B^{0})+\frac{f_{s}}{f_{\Lambda_{b}^{0}}}A_{\mathrm{p}}(B_{s}^{0})\right].$
(1)

The raw asymmetry, $A_{\mathrm{raw}}$, for $B^{+}$ hadron is obtained by
counting the number of $B^{+}$ and $B^{-}$ signal yields as obtained from the
fit to the invariant mass distribution. To determine the production asymmetry,
the CP asymmetry $A_{\mathrm{CP}}$ and detection asymmetry $A_{D}$ are
subtracted from the raw asymmetry. The CP asymmetry for $B^{+}$ was measured
by LHCb to be $A_{\mathrm{CP}}(B^{+})=(0.09\pm 0.27(\mathrm{stat})\pm
0.07(\mathrm{syst}))\times 10^{-2}$ [7]. The kaon detection asymmetry is
measured using $D$-meson decays produced directly in $pp$ collisions following
the method in reference [8], while kaon particle identification efficiencies
are measured using control samples. Due to flavor oscillations between $B^{0}$
and $\overline{B}^{0}$, and between $B_{s}^{0}$ and $\overline{B}_{s}^{0}$, a
time-dependent analysis for $B^{0}$ and $B_{s}^{0}$ is required to measure
$A_{\mathrm{p}}(B_{d,s})$. Summing over the two initial flavors, the observed
time-dependent production rate reads

$\displaystyle
S(t,\psi)\propto[1-\psi(A_{\mathrm{CP}})]\\{e^{-\Gamma_{d(s)}}[\Lambda_{+}\cosh(\Delta\Gamma_{d(s)}t/2)+\psi\Lambda_{-}\cos(\Delta
m_{d(s)}t)]\otimes R(t)\\}\epsilon(t),$
$\displaystyle\mathrm{with}\,\,\Lambda_{\pm}\equiv(1-A_{\mathrm{p}})|q/p|^{1-\psi}\pm(1+A_{\mathrm{p}})|q/p|^{-1-\psi},$

where $R(t)$ and $\epsilon(t)$ describe detection resolution and efficiency,
$\Gamma$, $\Delta\Gamma$, $\Delta m$ and $|q/p|$ are the oscillation
parameters taken as external inputs, and $\psi=\pm 1$ tags the $B_{d,s}$
flavor at decay using the final states. From the above equation, it can be
seen that the production asymmetry is measured from the asymmetric patterns of
the decay time distributions between $B_{d,s}$ and $\overline{B}_{d,s}$, and
$A_{\mathrm{CP}}$ and $A_{D}$ factor out in the measurement.

The measurements of production asymmetries for $B^{+}$, $B^{0}$ and
$B_{s}^{0}$ are then used obtain $A_{\mathrm{p}}(\Lambda_{b}^{0})$ using
Equation 1. For the results on $A_{\mathrm{p}}$, the systematic uncertainties
for $A_{\mathrm{p}}(B^{+})$ and $A_{\mathrm{p}}(B^{0})$ are dominated by
external inputs of $A_{\mathrm{CP}}(B^{+})$ and the oscillation parameter
respectively, and that for $A_{\mathrm{p}}(B_{s}^{0})$ is dominated by
invariant mass and decay time fits. The uncertainties on
$A_{\mathrm{p}}(B^{+})$, $A_{\mathrm{p}}(B^{0})$ and
$A_{\mathrm{p}}(B_{s}^{0})$ propagate to $A_{\mathrm{p}}(\Lambda_{b}^{0})$
measurement in addition to the uncertainty of $\Lambda_{b}^{0}$ fragmentation
function and uncertainty due to neglecting other $b$-hadrons. The results
suggest that production asymmetries for all the four $b$-hadrons are
consistent with zero within 2.5 standard deviations. The $A_{\mathrm{p}}$
distributions as functions of $p_{\mathrm{T}}$ and $y$ are displayed in Figure
5 for the 8 TeV dataset, showing kinematic dependences consistent with zero
within uncertainties. There is a hint that $A_{\mathrm{p}}(\Lambda_{b}^{0})$
slightly depends on the rapidity.

Figure 5:  The measured production asymmetries of $B^{+}$, $B^{0}$,
$B_{s}^{0}$ and $\Lambda_{b}^{0}$ as functions of (top row) $b$-hadron
$p_{\mathrm{T}}$ and (bottom row) $y$ in $pp$ collisions at 8 TeV.

The $\Lambda_{b}^{0}$ production asymmetry is also measured directly using the
$\Lambda_{b}^{0}\to J\\!/\psi K^{-}p$ decay mode [5]. For the measurement the
CP asymmetry $A_{\mathrm{d}}$ in the decay is not disentangled due to the lack
of external input. The result is shown in Figure 6 as a function of
$p_{\mathrm{T}}$ and $y$ respectively. While the overall asymmetry is
consistent with zero, there is an strong evidence of dependence on
$\Lambda_{b}^{0}$ rapidity, which is measured to be
$A_{p+\mathrm{d}}=(-0.001\pm 0.007)+(0.058\pm 0.014)\times(y-3.1)$ by fitting
the $A_{p+\mathrm{d}}$ distribution with a linear function.

Figure 6:  The production plus CP asymmetry of $\Lambda_{b}^{0}$ measured
using $\Lambda_{b}^{0}\to J\\!/\psi K^{-}p$ decay as a function of (left)
$p_{\mathrm{T}}$ and (right) $y$ respectively.

##  4 Conclusions

The LHCb experiment has made significant contributions to heavy flavor
production measurements, including the fragmentation functions for $B^{+}$,
$B^{0}$, $B_{s}^{0}$ and $\Lambda_{b}^{0}$ hadrons, and their production
asymmetries in $pp$ collisions. The results provide inputs for measurements of
absolute branching fractions and CP violation in $b$-hadron decays
respectively. With LHCb run 2 data, many new measurements concerning heavy
flavor productions at 13 TeV are expected.

ACKNOWLEDGEMENTS

The corresponding author acknowledges support from the European Research
Council (ERC) through the project EXPLORINGMATTER, funded by the ERC through a
ERC-Consolidator-Grant.

## References

  * [1] R. Aaij et al. [LHCb Collaboration], JHEP 1304, 001 (2013) [arXiv:1301.5286 [hep-ex]].
  * [2] R. Fleischer, N. Serra and N. Tuning, Phys. Rev. D82, 034038 (2010) [arXiv:1004.3982 [hep-ex]].
  * [3] R. Aaij et al. [LHCb Collaboration], JHEP 08, 143 (2014) [arXiv:1405.6842 [hep-ex]].
  * [4] R. Aaij et al. [LHCb Collaboration], Phys. Rev. D85, 032008 (2012) [arXiv:1111.2357 [hep-ex]].
  * [5] R. Aaij et al. [LHCb Collaboration], Chin. Phy. C40 1 011001 (3016) [arXiv:1509.00292 [hep-ex]].
  * [6] R. Aaij et al. [LHCb Collaboration], Phys. Lett. B774 139 (2017) [arXiv:1703.08464 [hep-ex]].
  * [7] R. Aaij et al. [LHCb Collaboration], Phys. Rev. D95, 052005 (2017) [arXiv:1701.05501 [hep-ex]].
  * [8] R. Aaij et al. [LHCb Collaboration], JHEP 07, 041 (2014) [arXiv:1405.2797 [hep-ex]].