## 2 Background and Related Literature
### Related Literature  
A crucial approach in DIR involves leveraging textual content within the document images. The optical code reader (OCR) stands out as the prevalent technique for extracting textual information from document images [5]. As OCR programs have significantly im  
Figure 1: Examples of query images. proved accuracy and processing speed, they have become valuable tools for extracting text from document images. Nevertheless, their utility could be more constrained because they are susceptible to issues related to image noise, resolution, and language fields [6]. Furthermore, the realm of information retrieval for textual data has been extensively explored, resulting in the development of numerous text-oriented search engines [7]. [PERSON] et al. [8] introduced a multilanguage framework centered around text transformers. This framework consists of two transformer encoders designed to learn representations specific to different modalities. The initial encoder is a language encoder responsible for creating language representation features derived from textual descriptions. The second encoder is a vision encoder, tasked with extracting visual features from the associated image. In addition to these established methods, OCR-free techniques rely on extracted features from segmented words, such as measurements like word length in pixels or word shape, as well as similar features extracted from segmented characters within the document image [9]. However, it is important to note that all these approaches necessitate the segmentation of words and characters, a process that becomes challenging when characters or words overlap with one another [4]. Alternative studies have explored the use of relationships between high-level components, such as layout, within document images to calculate the similarity between them [10]. Unlike methods reliant on textual information, these approaches do not depend on textual content but may encounter challenges when document layouts are similar [7]. It is worth noting that these studies also necessitate the segmentation of components, which can be a complex task when performed unsupervised [11]. Moreover, there is the potential for different documents to exhibit highly similar layouts, as is the case with problems found in textbooks [12]. More recently, researchers have explored approaches centered on visual information to extract feature vectors, and index structures have been developed to expedite the search process [2; 13]. These index data structures employed in these studies excel at swiftly identifying document images that closely match the query image, with only a slight trade-off in terms of a small margin of error [14]. Typically, this margin of error is deemed negligible for fast search operations [15]. Based on the representation of image features, these algorithms can be categorized into two main groups. In the first group, a single feature vector is computed for the entire document image, representing the whole image [6]. Furthermore, some studies adopt graph-based representations to capture the structure of document images and compute graph-matching similarity metrics for ranking similarities [16]. These techniques prove beneficial when the number of comparisons is relatively tiny, as rankings based on pairwise comparisons tend to be less scalable for large datasets [10]. In one approach detailed in [6], run-length histograms were computed at various grid levels to represent the image for retrieval and classification purposes. On the other hand, in studies like [17; 18; 12; 19], multiple structural features were considered, including the percentages of text and non-text elements (such as graphics, images, tables, and rulings), column structures, relative font sizes, and content area density. In the second group of methods, the focus shifts to detecting local regions within the document images, and feature vectors are computed for these regions [20]. These sets of feature vectors are either aggregated or used individually to represent a single image. For instance, Ref.