Conceptio › Archive › arXiv CS
arXiv CSopen access

Different Strokes for Different Folks: Writer Identification for Historical Arabic Manuscripts

2026 · arxiv_cs
arXiv CS · Papers · License: Open Access · 2026
Open Source ↗Direct PDF ↓
neural-networks
machine learning, deep learning, neural networks

International Journal on Document Analysis and Recognition (IJDAR) https://doi.org/10.1007/s10032-026-xxxxx-x

Different Strokes for Different Folks: Writer Identification for Historical Arabic Manuscripts Hamza A. Abushahla1

· Ariel Justine N. Panopio1

· Layth Al-Khairulla1

· Mohamed I. AlHajri1

arXiv:2604.22515v1 [cs.CV] 24 Apr 2026

Abstract Handwritten Arabic manuscripts preserve the Arab world’s intellectual and cultural heritage, and writer identification supports provenance, authenticity verification, and historical analysis. Using the Muharaf dataset of historical Arabic manuscripts, we evaluate writer identification from individual line images and, to the best of our knowledge, provide the first baselines reported under both line-level and page-disjoint evaluation protocols. Since the dataset is only partially labeled for writer identification, we manually verified and expanded writer labels in the public portion from 6,858 (28.00%) to 21,249 lines (86.75%) out of 24,495 line images, correcting inconsistencies and removing non-handwritten text. After further filtering, we retained 18,987 lines (77.51%). We propose a Convolutional Neural Network (CNN)-based model with attention mechanisms for closed-set writer identification, including rare two-writer lines modeled as composite writer-pair classes. We benchmark fourteen configurations and conduct ablations across different feature extractors and training regimes. To assess generalization to unseen pages, the page-disjoint protocol assigns all lines from each page to a single split. Under the line-level protocol, a fine-tuned DenseNet201 with attention achieves 99.05% Top-1 accuracy, 99.73% Top-5 accuracy, and 97.44% F1-score. Under the more challenging page-disjoint protocol, the best observed results are 78.61% Top-1 accuracy, 87.79% Top-5 accuracy, and 66.55% F1-score, thus quantifying the impact of page-level cues. By expanding the Muharaf dataset’s labeled subset and reporting both protocols, we provide a clearer benchmark and a practical resource for historians and linguists engaged with culturally and historically significant documents. The code and implementation details are available on GitHub. Keywords Writer Identification · Muharaf Dataset · Arabic Handwriting · Attention · End-to-End Pipeline 1 Introduction The Arabic language has played a vital role in preserving the intellectual and cultural heritage of the Arab world for over a millennium. Handwritten manuscripts document various subjects, including science, literature, personal letters, and religious texts [1]. These manuscripts capture the evolution of the Arabic script and provide insights into historical and cultural contexts. Identifying the authors helps researchers trace the origins of these manuscripts, verify their authenticity, and understand their historical significance. This task also Hamza A. Abushahla, Ariel Justine N. Panopio, and Layth Al-Khairulla: These authors contributed equally to this work. B

Mohamed I. AlHajri [email protected] Hamza A. Abushahla [email protected] Ariel Justine N. Panopio [email protected] Layth Al-Khairulla [email protected]

1

Department of Computer Science and Engineering, American University of Sharjah, Sharjah 26666, United Arab Emirates

Manuscript under review at IJDAR

preserves the legacy of individual authors and supports a deeper historical analysis [2]. Writer identification holds critical importance for historians, linguists, and manuscript collectors. For decades, historians have worked to attribute historical documents to their original writers, as knowing the writer’s identity helps determine the text’s era, typography, and provenance, which are often uncertain [3]. Many manuscripts lack essential metadata, such as the writer’s name or creation date, making identification especially challenging [4]. While some manuscripts include colophons, which are brief notes at the end providing the writer’s name or date, these are often damaged, lost, or deliberately removed, leaving the text disconnected from its origins [5]. As a result, experts rely heavily on comparing the writing style to that of other known works by the same writer. Furthermore, identifying writers in historical Arabic manuscripts presents unique challenges. The Arabic script is inherently cursive, connecting letters fluidly within words and creating stylistic variations that complicate analysis. Con ” textual letter shapes, diacritical marks, known as “ HA¿Qk (harakat), and diverse regional writing styles further increase this complexity. Additionally, handwriting reflects the au-

2

thor’s era, region, and personal preferences, contributing to significant variability. This identification process requires substantial time, effort, and expertise. Recent advances in deep learning (DL) can accelerate and simplify this task. DL models have shown strong performance in extracting handwriting features and supporting accurate writer identification [6], although challenges remain, particularly in handling degraded texts and varied script origins. DL methods rely on large, high-quality labeled datasets to learn robust representations. In the domain of Arabic writer identification, several datasets exist, each varying in focus, size, and availability. Muharaf [7] is currently the largest publicly available Arabic dataset, offering a larger sample size and greater diversity compared to the widely used WAHD dataset [8]. It is also publicly accessible, unlike the Balamand [4] and KHATT [9] datasets. Released in June 2024, Muharaf has so far been only used for handwriting recognition tasks [7, 10], as the dataset is only partially labeled for writer identification. In this study, we introduce the first application of the Muharaf dataset to closed-set line-level writer identification and, to the best of our knowledge, report the first benchmarks under both line-level and page-disjoint evaluation protocols. Given a line image, the goal is to assign it to one of a fixed set of writers observed during training (i.e., discrimination among known writers rather than open-set identification of unseen writers). To accomplish this, we leverage an end-toend convolutional neural network (CNN)-based DL system augmented with attention modules. In addition to the standard line-level evaluation, we evaluate a stricter page-disjoint protocol that assigns all lines from each page to a single split to assess generalization to unseen pages and reduce page-level leakage. Our contributions are summarized as follows: • We benchmark writer identification on the Muharaf dataset under both line-level and page-disjoint splits, and quantify the performance gap between the two protocols. • We substantially expand the Muharaf dataset’s publicly labeled subset by manually verifying and increasing the labeled lines from 6,858 (28.00%) to 21,249 (86.75%), improving its usability for supervised writer identification. • We propose an end-to-end DL pipeline for closed-set linelevel writer identification in historical Arabic manuscripts, combining a CNN backbone with an encoding/aggregation module and attention mechanisms for robust feature learning. • We retain instances of rare two-writer line images by modeling each observed writer-pair as a composite class under single-label classification, and we note that some composite classes lack standalone samples from both constituent writers. • We analyze various transfer learning strategies, showing that fine-tuning pre-trained feature extractors can match or surpass non-fine-tuned and from-scratch training while

significantly reducing training time, and we study the optimal number of layers to unfreeze to identify an effective fine-tuning depth. • We highlight the challenges and potential of leveraging partially annotated datasets, such as Muharaf, for writer identification, offering valuable insights for future research in writer identification and related domains. The rest of this paper is organized as follows. Section 2 presents the related works in this field. Section 3 illustrates the dataset preparation methodology. Section 4 introduces the proposed end-to-end system. Section 5 lists and discusses the empirical results. Section 6 explores the study’s limitations and outlines future work, while Section 7 concludes the paper.

2 Related Work In this section, we focus on DL-based and end-to-end approaches to writer identification that learn feature representations directly from data, unlike traditional handcrafted methods. Within this area, CNNs have proven especially effective at capturing both low-level features, such as handwriting strokes and textures, and high-level stylistic cues. Architectures like ResNet [11] and VGG-Net [12] have achieved state-of-the-art performance across various datasets [13, 14]. A more specialized advancement comes from Arandjelovic et al. [15], who introduced an end-to-end CNN-based image recognition system centered around the NetVLAD layer, a trainable version of the VLAD1 layer. NetVLAD provides an encoding pipeline that aggregates local descriptors into a global representation and can be integrated into any CNNbased architecture. This innovation has paved the way for many later works. Recently, Chammas et al. [5] proposed an end-to-end CNN system combining ResNet50 as a local feature extractor with a NetVLAD aggregation layer via the Deep-TEN framework [16], achieving 99.2% accuracy on the Balamand dataset. Moreover, Srivastava et al. [17] enhanced CNNs through multi-scale fusion, spatial attention, and patch interaction. DeepWriter [18], a multi-stream deep CNN, leveraged multilingual datasets (e.g., English and Chinese), demonstrating improved generalization. Similarly, DeepWINet [19] was evaluated across eight languages as well as mixed-language datasets (e.g., the CERUG-MIXED dataset [20] of English and Chinese). Their model achieved an accuracy of 99.27% on the IFN/ENIT Arabic dataset [21] and 94.28% on the CERUG-MIXED dataset, showcasing robustness in multilingual, mixed-script settings. Attention mechanisms [22], which enable models to focus on relevant handwriting regions while filtering out noise, are being increasingly integrated into writer identification frameworks. For instance, on word-level benchmarks (e.g., IAM [23], CVL [24], and CERUG-EN [25]), Kumar et al. [26] 1

Vector of Locally Aggregated Descriptors

3

propose a fragment-driven dual-stream CNN with an attention mechanism, Okawa [27] introduces a multistage CNN with a deformable attention module, and Majithia et al. [28] propose a hybrid convolutional–transformer encoder (CTE) that integrates VGG-style convolutional blocks with transformer layers to capture both local and longer-range handwriting dependencies. Moreover, A-VLAD [6] combines attention modules with NetVLAD for effective feature aggregation, enhancing performance on historical documents. Additionally, Koepf et al. [29] used vision transformers (ViTs) [30] for writer identification, reporting strong results on CVL and ICDAR2013 [31]. In a related effort, Fatnassi et al. [32] introduced ST-WID, a self-supervised ViT-based framework tailored for Arabic writer identification, reporting accuracies of 99.63% and 89.15% on the IFN/ENIT [21] and AHTID/MW [33] datasets, respectively. Further innovations address settings beyond standard supervised identification. For instance, Briber and Chibani [34] propose a lightweight CNN trained on text fragments and paired with a distance-based classifier, allowing the model to generalize to new writers without retraining and achieving competitive results on IFN/ENIT. Additionally, Yang et al. [35] introduce DT2F-TLNet, combining deep fuzzy-logic modeling with transfer learning to improve robustness across multilingual and Arabic-script datasets under uncertainty. Moreover, Maitra et al. [36] explore decorrelation-based self-supervised representation learning with a ResNet50 [11] encoder and evaluate on Arabic and English benchmarks, including AHAWP [37], IAM, and CVL. Finally, Khalaif et al. [38] combine corner detection with a CNN backbone, and further extend the task to writer verification by testing whether a query sample matches a claimed writer, reporting results on KHATT [9], AHAWP, and IAM. In summary, prior work has evolved from strong CNN backbones and aggregation layers toward attention-augmented CNNs and hybrid CNN–transformer designs to better capture local handwriting strokes and longer-range style cues. However, most gains are demonstrated on relatively clean, well-established benchmarks, and it remains unclear how well these gains transfer to historical Arabic manuscripts, which are typically noisier and more difficult to evaluate consistently. Moreover, while self-supervised approaches reduce dependence on labels during representation learning, reliable closed-set evaluation still requires ground truth and protocol rigor, which are precisely the bottlenecks in historical settings. Motivated by these gaps, we study closed-set writer identification on Muharaf [7] using an end-to-end attention-based architecture, and we evaluate it under two complementary protocols with extensive ablations.

3 Data Labeling and Preparation The Muharaf dataset contains fully annotated and transcribed historical Arabic manuscripts at the text-line level. It com-

prises 1,644 pages (1,216 public and 428 restricted), spanning from the early 19th to the early 21st century, with a total of 36,311 text lines. However, only 24,495 text lines are publicly available. Each line-level PNG image was generated using line-warping software to ensure consistent horizontal alignment. The dataset includes extensive metadata, such as writer tags that identify the author or scribe of each page. However, not all public samples contain this writer metadata. Figure 1 presents sample line-level images from the dataset, showcasing the wide stylistic and structural variation in handwriting across time periods and individuals. Table 1 summarizes the distribution of writer metadata within the public portion of the dataset.

Fig. 1 Sample line images from the Muharaf dataset. Table 1 Writer Status in the Muharaf Dataset (Public) Writer Status

No. Pages

% Pages

No. Lines

% Lines

Labeled Unlabeled Total

309 907 1,216

25.41% 74.59% 100%

6,858 17,637 24,495

28.0% 72.0% 100%

The dataset was originally annotated and transcribed by three of its creators, who are Arabic speakers with expertise in digital archives of Arabic manuscripts. The metadata does not include explicit information on writer gender, and, since gender cannot be reliably inferred from writer names, gender statistics are not reported.

3.1 Manual Labeling We undertook a comprehensive manual labeling effort to address a significant portion of the unlabeled data. First, we organized metadata, linking each image to the corresponding writer’s name in Arabic and English. Throughout this process, we assigned labels to the best of our ability based on explicit on-page attribution, such as names stated in the opening lines,

4

headers, addresses, or signatures, supported by available document context. However, the dataset presented some notable challenges. Among its diverse contents were 21 Ottoman Turkish pages written in Arabic script, as seen in Figure 2a, for which no writer could be identified—these were excluded from the analysis. Additionally, we encountered typewritten Arabic pages (see Figure 2b), which were treated as non-handwritten content and removed during filtering. We also observed handwritten mixed-language samples where Arabic and English appear together, sometimes on the same line (see Figure 2c) and sometimes on separate lines (see Figure 2d). Despite the apparent differences between Arabic and English scripts, we retained these cross-script handwritten samples based on empirical evidence that suggests a person’s handwriting remains recognizable across scripts [39–41]. While this decision may introduce additional complexity and potential challenges during inference, we believe it enriches the dataset and improves its overall representativeness.

(a) Ottoman Turkish.

(b) Typewritten Arabic.

(c) Arabic and English on the same line.

(d) Arabic and English on separate lines.

Fig. 2 Special cases observed in the dataset: (a) Ottoman Turkish receipt written in Perso-Arabic script, (b) typewritten Arabic letter, (c) Arabic and English on the same line, and (d) Arabic and English on separate lines. For the predominantly Arabic material, we transliterated each writer’s name into English using reliable sources and cross-referenced them with the previously labeled portion of the dataset for consistency. In some cases, direct mapping was possible when writers signed their names or addresses in English. Where explicit attribution was missing, we used

collection-level and historical context, together with coarse handwriting similarity, to support attribution where possible; nevertheless, not all such cases could be resolved, resulting in a portion of the dataset remaining unlabeled. In instances where relational identifiers were used, such as “Your nephew” or “Your son,” these were preserved without further disambiguation. Beyond ambiguous attribution, we also encountered rare pages in which two writers are explicitly indicated. Some letters include two signatures on the same page and were labeled using the observed writer pair as-is, such as Father Youssef Hanna & Father Botros Hasan and Mkhayel & Ibrahim Daher. In rarer cases, parts of the same letter or page were written by two distinct individuals; these were likewise retained and labeled as composite writer-pairs, such as Yousef Hobeiche & Angele Ellis, and treated as composite classes in our closed-set formulation. Historical and literary context also played an important role. For example, letters signed as “May” in the Amin Rihani collection were attributed to May Ziadeh, a well-known female Arab poet and author, based on historical correspondence between her and Rihani. Similarly, manuscripts in the Elias Abu Shabaki collection were confirmed via online poetry archives. Moreover, scripts in the Salah Tizani collection were labeled by matching character names from his TV and theater works. In family collections, such as the Ellis family collection, we relied on familial relationships and document context to label letters and postcards, supported by visual handwriting cues and additional family tree research. Finally, we note that, across the dataset, some pages may have been written by a scribe but signed by an author; since our labels follow the attribution present on the page, such cases may introduce intra-class variability.

3.2 Label Verification Following the manual labeling process, we undertook a careful verification process to ensure consistency. This included aligning Arabic-English transliterations between the newly labeled entries and those in the existing labeled portion. This was essential to avoid discrepancies or variations in spellings and formatting. This was followed by a rigorous refinement process to detect potential duplicate writer names. We applied fuzzy string matching using the thefuzz2 library, which relies on Levenshtein distance [42] to calculate string similarity based on the minimum number of single-character edits. Scores range from 0 (no similarity) to 100 (identical). We initially set a 90% similarity threshold to flag likely duplicates, such as “Botros Hassan” vs. “Boutros Hassan” (98%) and “Botros Hassan” vs. “Botros Hasan” (97%). Thresholds were then 2

https://github.com/seatgeek/thefuzz

5

dynamically adjusted between 85–95% to capture less obvious or highly confident matches. Notably, all flagged pairs underwent careful manual review, during which we assessed context, handwriting evidence, and naming patterns to ensure the accurate consolidation of writer identities.

3.3 Error Corrections While comparing the labeled and newly labeled portions, we identified several instances of mislabeling in the original dataset. One prominent example involved a page tagged as written by “Father Youssef Baissary,” shown in Figure 3a. The Arabic title ø PñmÌ '@ (Al-Khouri), meaning “Father,” refers specifically to a Christian priest. However, the original page transcription only recorded “ ø Qå„JJ.Ë@ ø PñmÌ '@” (Al-Khouri AlBaissary), omitting the handwritten text between the title and surname. When cross-referencing other pages, we found matching handwriting and signatures. For instance, Figure 3b shows the name as “ I.J.k AJkñK ø PñmÌ '@” (Al-Khouri Youhanna Habib). At the same time, Figure 3c records the full name and title “ ø Qå„JJ.Ë@ I.J.k AJkñK ø PñmÌ '@” (Al-Khouri Youhanna Habib Al-Baissary), confirming all these pages belonged to the same individual. The label was then corrected to “Father Youhanna Habib Baissary” to guarantee consistency with the initially labeled portion of the dataset.

3.4 Dataset Preparation Afterward, the dataset’s line-level images were mapped to the identified writers. Of the 24,495 public text lines in the dataset, 21,249 lines were successfully labeled, increasing the number of identified writers from 94 to 179. These labeled lines were then filtered to remove non-handwritten content, such as stamps, page numbers, and printed text, resulting in 18,987 usable lines for the dataset. A summary of the writerlabel coverage before and after manual labeling is presented in Table 2, while Table 3 illustrates the filtered dataset. Table 2 Writer Status Before and After Manual Labeling Writer Status

No. Pages

% Pages

No. Lines

% Lines

Before manual labeling Labeled Unlabeled Total

309 907 1,216

25.41% 74.59% 100%

6,858 17,637 24,495

28.0% 72.0% 100%

21,249 3,246 24,495

86.75% 13.25% 100%

After manual labeling Labeled Unlabeled Total

1,015 201 1,216

83.5% 16.5% 100%

(a) text in Arabic that reads:  Signature  J.®Ë@ “ HAJ , †@ ð X B@ AK A«P ÐXAg ø Qå„JJ.Ë@ I.J.k AJkñK ø PñmÌ '@” (AlKhouri Youhanna Habib Al-Baissary, servant of the parishes of Al-Azwaq, Al-Qoubaiyat).

(b) Similar signature transcribed as “Al-Khouri Youhanna Habib”.

(c) Full name and title transcribed as “Al-Khouri Youhanna Habib Al-Baissary”.

Fig. 3 Examples illustrating inconsistent or partial name transcriptions for the same writer across the labeled and unlabeled portions of the dataset: (a) labeled portion with a mismatched label (“Father Youssef Baissary”), (b) unlabeled portion with a partial transcription, and (c) unlabeled portion showing the full name and title. Table 3 Filtered Dataset After Manual Labeling and Excluding Non-Handwritten Content Metric

Value

Total writers (classes) Total pages used Total pages unused % of pages used (out of the original 1,216) Maximum pages per writer Minimum pages per writer Mean pages per writer Standard deviation (pages per writer)

179 1,015 201 83.50% 68 1 5.67 10.012

Total lines used Total lines unused % of lines used (out of the original 24,495) Maximum lines per writer Minimum lines per writer Mean lines per writer Standard deviation (lines per writer)

18,987 2,262 77.51% 949 10 106.07 183.29

6

Fig. 4 Examples of training data augmentations: rotation, zoom, shear, shifts, and nearest fill mode. This manual labeling process significantly increased the usability of the Muharaf dataset for writer identification. However, the dataset remains highly imbalanced and exhibits an extreme long-tail class distribution, with a small number of writers contributing a disproportionately larger number of labeled samples compared to others. For example, the top three classes include Ameen Rihani with 949 lines, Hanna Ghayth with 934 lines, and Hanna Moussa with 876 lines. Conversely, the lowest classes include Nehme Elias Mikhail, Shibli Barakat Witnesses, and Father Elias with 12, 11, and 10 line images, respectively. A visualization of the highly skewed distribution of labeled samples is shown in Appendix A.

(a) Original Image

(b) Processed Image Fig. 5 BlockProcessor transformation: (a) Original image and (b) Processed image, resized and zero-padded, keeping the aspect ratio and avoiding information loss.

3.5 Data Preprocessing and Evaluation Protocols We adopted the BlockProcessor from [10] to preserve aspect ratios and avoid distortion common in standard resizing pipelines. As illustrated in Figure 5, the BlockProcessor

resizes each image proportionally and zero-pads it into a square block of 224×224 pixels. On average, line images were 614 pixels wide after standardizing the heights to 64 pixels. Unlike [7] and [10], we did not flip images horizontally, as the end-of-line token placement was irrelevant to our approach. Moreover, we did not binarize the images, relying instead on the preprocessing functions of the pre-trained CNNs. Closed-set identification. We evaluate writer identification under a closed-set protocol, formulated as a multi-class classification problem over a stratified fixed set of writer classes. Thus, the same writer identities appear in training, validation, and test splits, and we do not evaluate open-set identification of unseen writers (i.e., writers not present in training), which requires a different protocol and is left for future work. Protocol A: line-level random split. Using the filtered labeled set, we perform a 70–15–15 train–validation–test split at the line level. Individual line images are disjoint across splits, and the number of classes 179. However, since multiple lines originate from the same manuscript page, this protocol may place different lines from the same page across training, validation, and test sets, potentially allowing page-specific cues to influence the measured performance. Protocol B: page-disjoint split. We additionally consider a more challenging page-disjoint evaluation protocol in which each manuscript page is treated as an indivisible unit: all line images extracted from a given page appear in exactly one split. The manually labeled and filtered dataset contains writers with as few as one or two pages (see Table 3). To preserve the closed-set setting while enforcing a 70–15–15 split at the page level, we therefore restrict Protocol B to writers with at least three distinct pages, ensuring that at least one page can be allocated to each of the training, validation, and test splits. After applying this constraint, the page-disjoint subset contains 71 writer classes and 16,456 line images; a summary comparison of both protocols is provided in Table 4. A visualization of the per-writer page distribution for these 71 classes is provided in Appendix B, highlighting that the dataset remains skewed. Data augmentations. To mitigate the dataset’s severe class imbalance, we apply targeted data augmentation strategies to the training split only (see Figure 4 and Table 5).

7

Table 4 Summary of Evaluation Protocols Protocol

No. Writers

No. Pages

No. Lines

Line-level Page-disjoint

179 71

1,015 877

18,987 16,456

For both protocols, the split is performed first to prevent augmentation-induced leakage, ensuring that no augmented variants of validation or test images can appear during training. During evaluation, shuffling is disabled for validation and test loaders (training is shuffled to prevent order bias). Finally, writer labels are one-hot encoded to be compatible with categorical cross-entropy loss used during training. Table 5 Data Augmentation Parameters for Training Augmentation Parameter

Value

Rotation Range Zoom Range Shear Range Width Shift Range Height Shift Range Fill Mode

±15° ±30% ±30% ±20% of image width ±20% of image height Nearest

4 Proposed Architecture To address the writer identification problem, we designed an architecture capable of extracting both local and global features that capture the peculiar ways people write. Building upon Chammas et al.’s [5] optimized Deep-TEN framework, which is based on the original Deep-TEN architecture [16], we propose a set of modifications and refinements that make the architecture better suited to the specific challenges of this task. Figure 6 illustrates the two variants of our proposed architecture: one without attention mechanisms (our standard architecture) and one with attention mechanisms (our improved architecture). The overall pipeline comprises three main stages: feature extraction, encoding, and classification, integrated into a single end-to-end system. For a given input text-line image 𝐼 of length 𝐿 and width 𝑊, intended for writer identification, we first process 𝐼 through the BlockProcessor to produce a square RGB image 𝐼0 ∈ R224×224×3 . Writer classification then begins by extracting local, hierarchical features from 𝐼0 using a convolutional backbone. In our case, the baseline model configuration uses a ResNet50 [11] pre-trained on ImageNet [43], which outputs a deep feature map 𝐹1 ∈ R7×7×2048 . The 7 × 7 results from the standard downsampling in ResNet50, which reduces the input resolution by a factor of 32 through a series of stride-2 convolutions and pooling layers. This stage captures both low-level details, such as handwriting strokes, ligatures, and textures, and higher-level patterns, such as word shapes and

stylistic cues. Next, a 1 × 1 convolutional layer reduces the number of channels from 2048 to 64, yielding 𝐹2 ∈ R7×7×64 , focusing the network on the most salient features while reducing computational cost. An L2-normalization layer is then applied to obtain 𝐹3 , ensuring scale-invariant feature representations that are critical for the stability of later aggregation stages. Before discussing our improved attention-based architecture, we will first consider our standard architecture. Specifically, we will describe the modified Spatial Pyramid Pooling (SPP) [44] and NetVLAD [15] layers as they are used in our standard architecture, later discussing their integration in the attention-based pipeline. After L2-normalizing the backbone features 𝐹3 , we apply a modified SPP layer that performs max pooling at multiple spatial scales, using pooling sizes 𝑛 × 𝑛 where 𝑛 ∈ {1, 2, 4}. This captures coarse-to-fine contextual information from the normalized feature maps. Unlike the original SPP [44], which flattens the pooled outputs into a single feature vector, we upsample each pooled output back to the original resolution of 7 × 7 and concatenate them channel-wise, producing a multiscale feature map 𝐹4 ∈ R7×7×192 (see Figure 7). This preserves the spatial information in the feature maps and creates fixedsize outputs. More importantly, it supports the attention-based variant by maintaining aligned spatial dimensions required by the attention modules, ensuring seamless integration while retaining multi-scale context. The local descriptors in 𝐹4 are then passed to the NetVLAD module, which aggregates local features into a compact global representation. As illustrated in Figure 8, given an input feature map of size 𝑊 = 𝐻 = 7 and depth 𝐷 = 192, the resulting 𝑁 = 𝑊 × 𝐻 = 49 spatial descriptors are reshaped into a matrix 𝑅 ∈ R 𝑁 ×𝐷 , where each row corresponds to a spatial feature vector. To determine how each descriptor relates to 𝐾 = 64 learnable cluster centers, we compute similarity scores 𝑠 ∈ R 𝑁 ×𝐾 using the dot product between each L2-normalized descriptor in 𝑅 and the cluster centers 𝐶 ∈ R𝐾 ×𝐷 . This effectively computes cosine similarity between normalized descriptors 𝑅norm and cluster centers. Unlike the original NetVLAD [15], which uses a learnable 1 × 1 convolution for assignments, we adopt this fixed cosine similarity scheme—retaining only the cluster centers as trainable weights and enabling a more efficient, deployment-friendly design. These scores are then softmax-normalized across clusters to produce soft assignments 𝑎, ¯ indicating the degree to which each descriptor belongs to each cluster. Next, for each cluster, the residuals are computed as the difference between every descriptor and the corresponding cluster center. Both the residuals and their corresponding soft assignments 𝑎¯ are fed into the VLAD core block, which performs a weighted sum of the residuals across all descriptors for each cluster—producing a residual aggregation matrix 𝑉 ∈ R𝐾 ×𝐷 . This matrix captures how local descriptors deviate from their assigned cluster centers.

8

Processed Input Image

End-to-end Deep Architecture Local Feature Extraction

CNN Feature Extractor

Conv2D L2-Norm ReLU

SelfAttention Block 1

Global Descriptor Aggregation

SPP Layer

SelfAttention Block 2

NetVLAD Layer

CrossAttention Block

L2-Norm

Dense (512) ReLU

Dropout (0.5)

L2-Norm

Categorical Cross-Entropy

Output

Fig. 6 Proposed end-to-end architecture illustrating both the attention-based and no-attention variants. The dashed blocks and arrows represent the optional attention path, which is active only in the attention-based version. In this configuration, the queries (Q) for the cross-attention block are derived from the NetVLAD layer, while the keys (K) and values (V) are taken from the layer-normalized features preceding the first multi-head self-attention module. ...

shaped version of 𝐹3 ∈ R7×7×64 , which is flattened to R49×64 , enabling the different spatial locations in the output feature maps to attend to one another before reshaping back. The SPP layer then produces 𝐹4 exactly as in the standard architecture, after which Self-Attention Block 2 refines these multi-scale features (reshaped as R49×192 ) as seen in Figure 9. This forces the model to focus on the most significant patterns across different scales, like how a writer connects the letter “ È” (lām) to its adjacent letters to form a word. The NetVLAD module then encodes the refined 𝐹4 using the same procedure as before, but its resulting global descriptor 𝑉 now serves as the query Q in a Cross-Attention Block (see Figure 10). Moreover, the keys and values K = V come from the layer-normalized output of Self-Attention Block 1. Then, the dimensions of these two inputs to the multi-head cross-attention module are aligned through two small dense layers. This final attention step fuses the global NetVLAD context with the refined prior local context, generating a richer global descriptor 𝑉 that enables the system to balance capturing nuanced characteristics with understanding overarching stylistic patterns.

Input Feature Maps

MaxPooling2D (4×4×64)

MaxPooling2D (2×2×64)

MaxPooling2D (1×1×64)

Upsample to (7x7x64) Concatenate (along channels)

Fixed-size feature map (7x7x192)

...

Fig. 7 The modified SPP layer. ... Input Feature Maps

V

Input Soft-Assignment

Dot Product

Softmax

VLAD core

VLAD Vector Global L2Normalization

... Feature Map

Reshape (49xC)

Layer Normalization

Multi-Head Self-Attention

Layer Normalization

Reshape (7x7xC)

...

Q

...

Intra-Cluster L2-Normalization

Fig. 9 Self-Attention Block. Block 1 uses 𝐶 = 64 while Block 2 uses 𝐶 = 192. Both apply multi-head self-attention (6 heads, key dimension 32) with Q = K = V. Block 1’s output is reused as K, V in the cross-attention block.

Fig. 8 The modified NetVLAD layer. Finally, the matrix 𝑉 is L2-normalized first within each cluster (row-wise), then globally (across the entire matrix), and flattened into a fixed-length vector 𝑉 ∈ R𝐾 ·𝐷 , serving as the global handwriting descriptor. This representation captures both the distribution and the spatial deviations of local features relative to learned patterns, enabling a discriminative comparison across writers. In the improved attention-based architecture, three attention blocks are inserted while leaving all tensor sizes unchanged. First, Self-Attention Block 1 operates on a re-

Regardless of the path taken, each descriptor 𝑉 is compacted and regularized by a 512-unit dense layer, dropout (𝑝 = 0.5), and a second L2 normalization. All convolutional and dense layers employ ReLU activations for efficient non-linearity, and both the 1 × 1 convolution and the penultimate dense layer are penalized with L2 regularization (𝜆 = 1 × 10−4 ). The combined effect of dropout and weight decay curbs overfitting, thereby improving the generalizability of the architecture. Given that our dataset contains sparse positive pairs, we replace the triplet loss used by Chammas et al. [5] with categorical cross-entropy loss, returning to the original Deep-

9

NetVLAD Output

Reshape (64 × 192)

Dense (192) ReLU Multi-Head Cross-Attention

Layer Norm Output

Reshape (64 × 192)

Flatten

...

(12288 × 1)

Dense (192) ReLU

Fig. 10 Cross-Attention Block. Multi-head attention (6 heads, key dimension 32) is applied. Here, Q = NetVLAD output (global features), and K = V (refined local features from the feature extractors). TEN formulation [16]. This change simplifies the training procedure by removing the need for hard triplet mining, while still achieving strong writer identification performance.

4.1 Experimental Setup We set up experiments along two main model-design axes: (1) evaluating alternative feature extractors and (2) assessing the impact of transfer learning via pre-trained weights. Each configuration is evaluated under both protocols A and B described in Section 3.5. Across protocols, we keep the same pipeline and hyperparameters; only the final classification layer is resized to match the number of writer classes. Alternative feature extractors. To assess the potential benefits of different backbone architectures beyond ResNet50 [11], we evaluated DenseNet201 [45], Xception [46], and MobileNetV3-Large [47] as interchangeable feature extractors within our pipeline. DenseNet201 leverages dense connectivity patterns to improve gradient flow and parameter efficiency, combining fine-grained stroke-level cues with broader handwriting-style features. Xception employs depthwise separable convolutions, factorizing spatial and channel-wise operations to better capture fine-grained spatial structure in a computationally efficient manner, with residual connections throughout. Similarly, MobileNetV3-Large leverages depthwise separable convolutions within inverted residual blocks, alongside squeeze-and-excitation modules [48] and hard-swish activations—balancing accuracy and computational cost, and making it particularly attractive for future applications requiring on-device deployment [49]. Notably, while the original ResNet50 backbone produces a deep feature map 𝐹1 ∈ R7×7×2048 , which is identical to Xception’s, DenseNet201 outputs 𝐹1 ∈ R7×7×1920 while MobileNetV3-Large produces 𝐹1 ∈ R7×7×960 . All other reported dimensions in the pipeline (e.g., after the 1 × 1 convolution and subsequent layers) remain constant across these architectures. Transfer learning strategies. We conducted experiments to explore the effects of pre-trained CNN backbones. As described earlier, the baseline configuration uses pre-trained ImageNet weights with frozen backbone layers. We extended this

setup by testing fully fine-tuned models, partially fine-tuned models, and models trained entirely from scratch without any pre-trained weights. These experiments clarify the impact of transfer learning on performance and convergence behavior in the writer identification task.

4.2 Model Training Setup Writer identification is approached as a closed-set multi-class classification problem with each output neuron representing the probability of a particular writer class. With the preprocessing done in Section 3.5, the specific hyperparameters used in the training process are detailed in Table 6. Additionally, we used a learning rate scheduler and an early stopping mechanism, whose parameters are summarized in Tables 7 and 8, respectively. Lastly, each model configuration was trained across three different random seeds (𝑁=3) to assess run-to-run variability. Table 6 General Training Hyperparameters Parameter

Value

Optimizer Loss Function Initial Learning Rate Batch Size Number of Clusters (NetVLAD) Maximum Number of Epochs Dropout Rate L2-Regularization

Adam Categorical Cross-Entropy 1 × 10−3 256 64 450 0.5 1 × 10−4

Table 7 Learning Rate Scheduler Parameters Parameter

Value

Learning Rate Scheduler Scheduler Reduction Factor Scheduler Patience Mode Minimum Learning Rate

ReduceLROnPlateau 0.5 10 epochs Max 1 × 10−8

Table 8 Early Stopping Parameters Parameter

Value

Early Stopping Metric Early Stopping Patience Mode

Validation Macro F1-Score 50 epochs Max

4.3 Experimental Conditions The first set of experiments was conducted on two NVIDIA A100 (SXM4) Tensor Core GPUs with 80 GB memory each: one accessed through the AUS AI Lab and one rented via

10

RunPod3 . The second set of experiments was conducted on NVIDIA A10G GPUs via the AUS high-performance computing (HPC) infrastructure, complemented by NVIDIA RTX A6000 GPUs rented via RunPod for configurations requiring additional GPU memory. 5 Experimental Results We evaluated each model configuration using standard classification metrics. Results are reported under the two closed-set evaluation protocols defined in Section 3.5. Results for Protocol A are shown in Tables 9–11, while results for Protocol B are shown in Tables 12–14. Additional results are provided in Appendix C. These results cover all experimental combinations we conducted: with and without attention, different feature extractors, and varying transfer learning setups. All tabulated results are reported as the mean and population standard deviation (computed with denominator 𝑁) across 𝑁=3 random seeds to illustrate performance variability. For clarity, below we summarize the training configurations shown in the tables: • Frozen Pre-trained Feature Extractors: The baseline configuration employs pre-trained feature extractors with their ImageNet weights fixed during training. These are denoted in the table with “Baseline.” • Fine-tuning Pre-trained Weights: This configuration involves fine-tuning the pre-trained ImageNet weights, ranging from partial to full fine-tuning, to adapt the model effectively to our handwriting domain. These are displayed in the table with either “Fine-tuned” for full fine-tuning or “Fine-tuned + Last X Layers Fine-tuned” for partial fine-tuning, where X denotes the number of unfrozen layers starting from the head of the architecture. • Training from Scratch: In this configuration, all network parameters are randomly initialized, and no pre-trained weights are used. These are shown in the table with “From Scratch.” Evaluation protocol. All reported results follow the closed-set protocol in Section 3.5, in which writers in the test set are also present during training. Therefore, the results measure discrimination among known writers, not the identification of unseen writers. We first present results under Protocol A, followed by Protocol B, which is a more challenging setting that evaluates generalization to unseen pages of the same writers. 5.1 Protocol A: Line-level evaluation 5.1.1 Overall performance Across the results reported in Tables 9–11 for all evaluated model configurations, the DenseNet201 + Fine-tuned + At3

https://www.runpod.io

tention configuration emerged as the top performer, achieving a Macro F1-score of 0.9744 ± 0.0023 despite the dataset’s severe class imbalance. This setup handled both individual and composite author classes with high accuracy—particularly the highlighted two-author class (e.g., Yousef Hobeiche & Angele Ellis), which was perfectly classified despite its scarcity (Appendix D, Table D.2). On the other hand, our strongest baseline without fine-tuning or attention (ResNet50 + Frozen + No Attention) failed to capture such fine-grained distinctions, particularly for composite classes (Appendix D, Table D.3). 5.1.2 Failure case analysis Despite the near-perfect performance of our best model configuration (DenseNet201 + Fine-tuned + Attention), the observed failure cases are dominated by the extreme long-tail class distribution (Appendix A) rather than by a systematic architectural weakness. Writers with only 1–3 test samples (75 out of 179 classes) exhibit the lowest and most volatile class-wise F1-scores (e.g., Father Elias: F1-score = 0.3333 ± 0.4714; Youssef Moussa Sadaqa: F1-score = 0.7222 ± 0.2079), since a single confusion can collapse recall and inflate variance across seeds. For classes with more test samples (at least 5), failures are comparatively rarer and tend to appear as isolated false negatives affecting a small subset of minority writers (e.g., Maurice Paul Sarrail: F1-score = 0.8329 ± 0.1177; Shukri Kanaan: F1-score = 0.9181 ± 0.0262; Mohammed Amin al-Husseini: F1-score = 0.9231 ± 0.1088). Composite two-author labels are not a dominant failure mode under our formulation, but interpretation is limited by very small test supports (i.e., few test samples per class). In particular, the writer-pair classes considered here have only 2 test samples each (Yahia Mansour & Asaad Koury; Yousef Hobeiche & Angele Ellis; Thomas & John Oussani). With this caveat, our best model configuration still classifies these composite labels reliably: it achieves perfect F1-scores for Yahia Mansour & Asaad Koury and Yousef Hobeiche & Angele Ellis, while Thomas & John Oussani remains high (F1score = 0.9333 ± 0.0943). This indicates that mixed-writer lines can be modeled effectively as composite single-label classes even without explicitly segmenting the line image into writer-specific regions (i.e., without annotating which pixels or handwriting strokes belong to the first vs. second writer). Where constituent writers are available as standalone classes, the model can separate the single-writer from mixed-writer lines: Yousef Hobeiche (F1-score = 0.9974 ± 0.0037, support = 65) and Angele Ellis (F1-score = 1.0000 ± 0.0000, support = 12) remain near-perfect alongside their composite class. For Thomas & John Oussani and Yahia Mansour & Asaad Koury, the constituent writers do not appear as standalone labels in our test split, so their individual (non-composite) performance cannot be assessed directly. In contrast, the strongest baseline (ResNet50 + Frozen + No Attention) exposes the limitations of non-adapted representations in this historical setting. Although its overall

11

Table 9 Top-1 Accuracy Test Results. The best result within Protocol A is bolded. Model Configuration

Top-1 Accuracy – Mean (Std)

Frozen + No Attention (Baseline) Frozen + Attention Fine-tuned + Last Layer + No Attention Fine-tuned + Last Layer + Attention Fine-tuned + Last 5 Layers + No Attention Fine-tuned + Last 5 Layers + Attention Fine-tuned + Last 10 Layers + No Attention Fine-tuned + Last 10 Layers + Attention Fine-tuned + Last 25 Layers + No Attention Fine-tuned + Last 25 Layers + Attention Fine-tuned + No Attention Fine-tuned + Attention From Scratch + No Attention From Scratch + Attention

ResNet50

DenseNet201

Xception

MobileNetV3-Large

0.8652 (0.0028) 0.9114 (0.0041) 0.8724 (0.0037) 0.9121 (0.0045) 0.8974 (0.0050) 0.9320 (0.0033) 0.9469 (0.0009) 0.9437 (0.0061) 0.9564 (0.0019) 0.9599 (0.0033) 0.9802 (0.0048) 0.9828 (0.0039) 0.9655 (0.0045) 0.9653 (0.0057)

0.8670 (0.0062) 0.9160 (0.0059) 0.8698 (0.0058) 0.9167 (0.0047) 0.8958 (0.0112) 0.9368 (0.0067) 0.9342 (0.0018) 0.9445 (0.0046) 0.9404 (0.0076) 0.9479 (0.0091) 0.9862 (0.0029) 0.9905 (0.0008) 0.9711 (0.0013) 0.9674 (0.0038)

0.6983 (0.0144) 0.7543 (0.0070) 0.7077 (0.0169) 0.7495 (0.0017) 0.8450 (0.0079) 0.8711 (0.0081) 0.9383 (0.0063) 0.9433 (0.0031) 0.9488 (0.0047) 0.9472 (0.0019) 0.9865 (0.0020) 0.9861 (0.0010) 0.9792 (0.0011) 0.9773 (0.0012)

0.7217 (0.0129) 0.7805 (0.0084) 0.7343 (0.0050) 0.8003 (0.0134) 0.8602 (0.0041) 0.8726 (0.0075) 0.8731 (0.0055) 0.8914 (0.0055) 0.9209 (0.0048) 0.9174 (0.0059) 0.9844 (0.0029) 0.9862 (0.0009) 0.4970 (0.3162) 0.0502 (0.0000)

Table 10 Top-5 Accuracy Test Results. The best result within Protocol A is bolded. Model Configuration

Top-5 Accuracy – Mean (Std)

Frozen + No Attention (Baseline) Frozen + Attention Fine-tuned + Last Layer + No Attention Fine-tuned + Last Layer + Attention Fine-tuned + Last 5 Layers + No Attention Fine-tuned + Last 5 Layers + Attention Fine-tuned + Last 10 Layers + No Attention Fine-tuned + Last 10 Layers + Attention Fine-tuned + Last 25 Layers + No Attention Fine-tuned + Last 25 Layers + Attention Fine-tuned + No Attention Fine-tuned + Attention From Scratch + No Attention From Scratch + Attention

ResNet50

DenseNet201

Xception

MobileNetV3-Large

0.9730 (0.0030) 0.9810 (0.0016) 0.9736 (0.0028) 0.9822 (0.0017) 0.9794 (0.0002) 0.9846 (0.0022) 0.9855 (0.0021) 0.9856 (0.0020) 0.9877 (0.0003) 0.9898 (0.0010) 0.9963 (0.0011) 0.9966 (0.0010) 0.9947 (0.0008) 0.9940 (0.0010)

0.9689 (0.0013) 0.9806 (0.0016) 0.9700 (0.0024) 0.9814 (0.0012) 0.9792 (0.0009) 0.9842 (0.0017) 0.9851 (0.0012) 0.9864 (0.0007) 0.9846 (0.0000) 0.9854 (0.0018) 0.9970 (0.0007) 0.9973 (0.0002) 0.9946 (0.0007) 0.9951 (0.0008)

0.8843 (0.0139) 0.9170 (0.0066) 0.8945 (0.0103) 0.9138 (0.0023) 0.9471 (0.0006) 0.9547 (0.0040) 0.9777 (0.0029) 0.9785 (0.0020) 0.9812 (0.0022) 0.9826 (0.0018) 0.9966 (0.0009) 0.9972 (0.0006) 0.9959 (0.0004) 0.9945 (0.0006)

0.9120 (0.0052) 0.9375 (0.0050) 0.9229 (0.0036) 0.9440 (0.0062) 0.9651 (0.0010) 0.9689 (0.0018) 0.9651 (0.0021) 0.9698 (0.0010) 0.9681 (0.0030) 0.9704 (0.0042) 0.9960 (0.0007) 0.9960 (0.0004) 0.6495 (0.2954) 0.2186 (0.0086)

Table 11 Macro F1-Score Test Results. The best result within Protocol A is bolded. Model Configuration

Frozen + No Attention (Baseline) Frozen + Attention Fine-tuned + Last Layer + No Attention Fine-tuned + Last Layer + Attention Fine-tuned + Last 5 Layers + No Attention Fine-tuned + Last 5 Layers + Attention Fine-tuned + Last 10 Layers + No Attention Fine-tuned + Last 10 Layers + Attention Fine-tuned + Last 25 Layers + No Attention Fine-tuned + Last 25 Layers + Attention Fine-tuned + No Attention Fine-tuned + Attention From Scratch + No Attention From Scratch + Attention

F1-score – Mean (Std) ResNet50

DenseNet201

Xception

MobileNetV3-Large

0.6772 (0.0132) 0.7795 (0.0138) 0.6757 (0.0260) 0.7999 (0.0068) 0.7413 (0.0193) 0.8499 (0.0100) 0.8719 (0.0076) 0.8765 (0.0170) 0.9042 (0.0039) 0.9152 (0.0107) 0.9302 (0.0275) 0.9413 (0.0210) 0.8821 (0.0336) 0.8859 (0.0332)

0.6587 (0.0280) 0.7878 (0.0218) 0.6719 (0.0132) 0.7968 (0.0115) 0.7204 (0.0329) 0.8538 (0.0127) 0.8096 (0.0168) 0.8474 (0.0046) 0.8353 (0.0188) 0.8659 (0.0222) 0.9557 (0.0185) 0.9744 (0.0023) 0.9052 (0.0124) 0.9060 (0.0196)

0.3158 (0.0256) 0.4517 (0.0241) 0.3525 (0.0442) 0.4465 (0.0387) 0.6448 (0.0117) 0.7205 (0.0156) 0.8496 (0.0135) 0.8688 (0.0135) 0.8659 (0.0244) 0.8708 (0.0183) 0.9693 (0.0038) 0.9701 (0.0029) 0.9344 (0.0050) 0.9451 (0.0017)

0.3704 (0.0378) 0.5086 (0.0034) 0.3970 (0.0112) 0.5439 (0.0225) 0.6488 (0.0149) 0.7115 (0.0074) 0.6760 (0.0396) 0.7573 (0.0150) 0.8255 (0.0134) 0.8185 (0.0054) 0.9573 (0.0096) 0.9690 (0.0046) 0.1187 (0.0839) 0.0005 (0.0000)

12

F1-score (0.6772 ± 0.0132) remains moderate, the performance is disproportionately inflated by frequent writers. At the same time, the long tail degrades sharply—the baseline yields 14 classes with zero-mean recall (and zero-mean F1-score). Interestingly, this weakness is not only confined to ultra-rare writers. Even among classes with at least 5 test samples, several remain poorly separated (e.g., Maurice Paul Sarrail: F1-score = 0 across seeds; Youhanna Sfeir: F1-score = 0.2286 ± 0.1682; Father Tobia al-Issa: F1-score = 0.3368 ± 0.1102). This is consistent with the expectation that a frozen backbone cannot adapt to the script variability and degradation patterns of historical manuscripts. The composite two-writer labels further highlight this brittleness, but in distinct ways. First, the baseline collapses on Yahia Mansour & Asaad Koury (F1-score = 0 across seeds) even though in our test split, the constituent writer names do not appear as standalone labels. This indicates that frozen representations can fail to model mixed-writer lines even in the absence of an explicit constituent-vs-composite writer ambiguity. Second, for Yousef Hobeiche & Angele Ellis, where both constituent writers are present as standalone classes, the baseline attains reasonable single-writer performance (Yousef Hobeiche: F1-score = 0.8787 ± 0.0290; Angele Ellis: F1-score = 0.6799 ± 0.0462) but only partially recovers on the composite label (F1-score = 0.1667 ± 0.2357). This gap is consistent with a more challenging decision boundary when the model must distinguish three closely related labels (writer A vs writer B vs writers A & B), making it easier for composite examples to be absorbed into a constituent class under a frozen backbone. Finally, the composite label of Thomas & John Oussani achieves a non-trivial F1-score of 0.7778 ± 0.1571, but its interpretation is constrained by having only two test samples, making the estimate highly seed-sensitive. Moreover, since its constituent writers do not appear as standalone labels, no conclusions can be drawn about constituent-vs-composite writer separation.

5.2 Protocol B: Page-disjoint evaluation 5.2.1 Overall performance Under this stricter page-disjoint setting, performance decreases substantially across all backbones as seen in Tables 12–14. Relative to Protocol A, for example, the bestperforming line-level configuration (DenseNet201 + Finetuned + Attention) drops from a 0.9744 ± 0.0023 to a 0.6516 ± 0.0234 F1-score. This sharp degradation indicates that the near-perfect line-level results are partially benefiting from within-page shared cues (e.g., scan artifacts, background texture, and other page-specific characteristics) in addition to writer-invariant handwriting features. Nonetheless, page-disjoint Top-5 accuracy remains relatively high for multiple configurations: ResNet50 + Fine-tuned + Last Layer + Attention achieves the highest Top-5 accuracy at

0.8779 ± 0.0154, while DenseNet201 + Fine-tuned + Attention achieves 0.8723 ± 0.0148. This suggests that the learned representations still capture writer-related information, but exhibit greater ambiguity when generalizing to unseen pages, primarily impacting strict Top-1 decisions. Across all evaluated configurations in Protocol B, MobileNetV3-Large becomes the strongest model under F1score: the Fine-tuned + Attention setting achieves 0.6655 ± 0.0069 with comparatively low variance. Interestingly, the best Top-1 accuracy is attained by a different MobileNetV3Large configuration (Fine-tuned + No Attention) at 0.7861 ± 0.0260 (see Table 12), further highlighting the competitiveness of lightweight backbones under stricter page-disjoint generalization. Finally, unlike Protocol A, where the best-performing setup is consistently aligned across metrics, Protocol B exhibits a clearer decoupling of metrics, with the best Top-1, Top-5, and F1 scores achieved under different configurations. This suggests that, under page-disjoint evaluation, architectural/training choices trade off between strict top-1 correctness and broader top-k separability, and reinforces that conclusions should be drawn using multiple complementary metrics rather than a single best configuration. 5.2.2 Failure case analysis Inspecting the classification report of the best-performing Protocol B configuration (MobileNetV3-Large + Fine-tuned + Attention) clarifies why performance is substantially lower than in the line-level split (see Appendix D, Table D.11). When a writer has a sufficiently large number of pages (see Appendix B), the model typically achieves strong per-class performance, indicating that it can learn a stable writing style and correctly identify the writer even from lines originating from a single unseen test page. Representative examples include Emily Nasrallah (48 pages; F1-score: 1.0000 ± 0.0000), Salah Tizani (48 pages; F1-score: 0.9937 ± 0.0067), Hanna Moussa (41 pages; F1-score: 0.9989 ± 0.0016), and even Hanna Ghayth, which attains an F1-score of 0.9096 ± 0.0108. By contrast, many of the weakest classes (including nearzero F1-scores) correspond to writers with only 3–4 pages in total, for whom the training split provides too little page diversity to reliably capture writer-invariant features. However, low page count is not the only driver. There are notable exceptions where writers with only 3–4 pages still achieve high scores, such as Botros Feghaly (3 pages; F1-score: 0.9626 ± 0.0207), Elie Maroun Khalil (4 pages; F1-score: 0.9608 ± 0.0075), and Murshid Habashi (4 pages; F1-score: 0.9139 ± 0.0639). In these cases, the pages originate from the same document (or letter), yielding highly consistent page-level characteristics (paper tone, ink density, and overall writing appearance), which makes the class comparatively easy to recognize even under page-disjoint splitting. Composite two-author labels are even more constrained under Protocol B. Since our page-disjoint splitting requires

13

Table 12 Top-1 Accuracy Test Results. The best result within Protocol B is bolded. Model Configuration

Top-1 Accuracy – Mean (Std)

Frozen + No Attention (Baseline) Frozen + Attention Fine-tuned + Last Layer + No Attention Fine-tuned + Last Layer + Attention Fine-tuned + Last 5 Layers + No Attention Fine-tuned + Last 5 Layers + Attention Fine-tuned + Last 10 Layers + No Attention Fine-tuned + Last 10 Layers + Attention Fine-tuned + Last 25 Layers + No Attention Fine-tuned + Last 25 Layers + Attention Fine-tuned + No Attention Fine-tuned + Attention From Scratch + No Attention From Scratch + Attention

ResNet50

DenseNet201

Xception

MobileNetV3-Large

0.6988 (0.0089) 0.7036 (0.0189) 0.6808 (0.0223) 0.7162 (0.0176) 0.7121 (0.0215) 0.7237 (0.0156) 0.7317 (0.0273) 0.7293 (0.0289) 0.7587 (0.0228) 0.7566 (0.0282) 0.7517 (0.0299) 0.7442 (0.0180) 0.6592 (0.0271) 0.6766 (0.0294)

0.6725 (0.0182) 0.7246 (0.0111) 0.6729 (0.0309) 0.7202 (0.0150) 0.6488 (0.0265) 0.6378 (0.1316) 0.7034 (0.0248) 0.6949 (0.0598) 0.7380 (0.0161) 0.7230 (0.0320) 0.7370 (0.0158) 0.7700 (0.0220) 0.6674 (0.0136) 0.6615 (0.0255)

0.4974 (0.0065) 0.5527 (0.0177) 0.4930 (0.0159) 0.5444 (0.0246) 0.6356 (0.0203) 0.6333 (0.0481) 0.7319 (0.0218) 0.7060 (0.0322) 0.7590 (0.0295) 0.7583 (0.0229) 0.7675 (0.0063) 0.7706 (0.0171) 0.6913 (0.0514) 0.6812 (0.0533)

0.6091 (0.0342) 0.6413 (0.0181) 0.6136 (0.0103) 0.6417 (0.0152) 0.6751 (0.0135) 0.6687 (0.0437) 0.6550 (0.0285) 0.6579 (0.0425) 0.7206 (0.0155) 0.7347 (0.0233) 0.7861 (0.0260) 0.7707 (0.0111) 0.0534 (0.0475) 0.0156 (0.0078)

Table 13 Top-5 Accuracy Test Results. The best result within Protocol B is bolded. Model Configuration

Top-5 Accuracy – Mean (Std)

Frozen + No Attention (Baseline) Frozen + Attention Fine-tuned + Last Layer + No Attention Fine-tuned + Last Layer + Attention Fine-tuned + Last 5 Layers + No Attention Fine-tuned + Last 5 Layers + Attention Fine-tuned + Last 10 Layers + No Attention Fine-tuned + Last 10 Layers + Attention Fine-tuned + Last 25 Layers + No Attention Fine-tuned + Last 25 Layers + Attention Fine-tuned + No Attention Fine-tuned + Attention From Scratch + No Attention From Scratch + Attention

ResNet50

DenseNet201

Xception

MobileNetV3-Large

0.8735 (0.0147) 0.8736 (0.0131) 0.8665 (0.0094) 0.8779 (0.0154) 0.8721 (0.0191) 0.8778 (0.0144) 0.8547 (0.0192) 0.8646 (0.0174) 0.8574 (0.0184) 0.8677 (0.0114) 0.8705 (0.0080) 0.8682 (0.0108) 0.8166 (0.0243) 0.8262 (0.0182)

0.8553 (0.0106) 0.8579 (0.0052) 0.8585 (0.0147) 0.8523 (0.0032) 0.8430 (0.0081) 0.8244 (0.0509) 0.8556 (0.0029) 0.8415 (0.0286) 0.8583 (0.0080) 0.8543 (0.0088) 0.8657 (0.0069) 0.8723 (0.0148) 0.8174 (0.0202) 0.8210 (0.0262)

0.7411 (0.0032) 0.7722 (0.0104) 0.7299 (0.0115) 0.7560 (0.0137) 0.8105 (0.0060) 0.8026 (0.0285) 0.8404 (0.0157) 0.8375 (0.0060) 0.8520 (0.0137) 0.8585 (0.0165) 0.8523 (0.0060) 0.8681 (0.0098) 0.8337 (0.0334) 0.8159 (0.0369)

0.8102 (0.0184) 0.8224 (0.0021) 0.8080 (0.0027) 0.8209 (0.0018) 0.8489 (0.0122) 0.8120 (0.0210) 0.8143 (0.0058) 0.8140 (0.0164) 0.8328 (0.0204) 0.8375 (0.0169) 0.8688 (0.0033) 0.8584 (0.0057) 0.0885 (0.0461) 0.0890 (0.0487)

Table 14 Macro F1-Score Test Results. The best result within Protocol B is bolded. Model Configuration

Frozen + No Attention (Baseline) Frozen + Attention Fine-tuned + Last Layer + No Attention Fine-tuned + Last Layer + Attention Fine-tuned + Last 5 Layers + No Attention Fine-tuned + Last 5 Layers + Attention Fine-tuned + Last 10 Layers + No Attention Fine-tuned + Last 10 Layers + Attention Fine-tuned + Last 25 Layers + No Attention Fine-tuned + Last 25 Layers + Attention Fine-tuned + No Attention Fine-tuned + Attention From Scratch + No Attention From Scratch + Attention

F1-score – Mean (Std) ResNet50

DenseNet201

Xception

MobileNetV3-Large

0.5706 (0.0254) 0.5868 (0.0298) 0.5462 (0.0282) 0.6018 (0.0300) 0.5937 (0.0225) 0.6003 (0.0323) 0.6082 (0.0305) 0.6073 (0.0228) 0.6502 (0.0137) 0.6626 (0.0104) 0.6072 (0.0278) 0.6009 (0.0458) 0.4719 (0.0626) 0.5116 (0.0574)

0.5324 (0.0306) 0.5988 (0.0308) 0.5363 (0.0130) 0.5885 (0.0516) 0.5073 (0.0912) 0.5123 (0.1760) 0.5785 (0.0681) 0.5442 (0.1193) 0.6053 (0.0564) 0.5874 (0.0863) 0.5991 (0.0288) 0.6516 (0.0234) 0.4895 (0.0266) 0.4851 (0.0410)

0.3575 (0.0244) 0.4266 (0.0398) 0.3524 (0.0443) 0.3968 (0.0330) 0.5056 (0.0428) 0.4968 (0.0891) 0.6289 (0.0149) 0.5882 (0.0617) 0.6596 (0.0051) 0.6504 (0.0041) 0.6572 (0.0203) 0.6444 (0.0164) 0.5342 (0.1019) 0.5070 (0.1185)

0.4715 (0.0116) 0.5100 (0.0387) 0.4624 (0.0440) 0.5125 (0.0442) 0.5322 (0.0317) 0.5298 (0.1034) 0.5115 (0.0882) 0.5077 (0.0908) 0.5910 (0.0386) 0.6203 (0.0198) 0.6544 (0.0209) 0.6655 (0.0069) 0.0014 (0.0012) 0.0004 (0.0002)

14

(a) Prof. Ign. Kratchkovsky – Page 1

(b) Prof. Ign. Kratchkovsky – Page 2

(c) Prof. Ign. Kratchkovsky – Page 3

(d) Asaad Koury Attallah – Page 1

(e) Asaad Koury Attallah – Page 2

(f) Asaad Koury Attallah – Page 3

(g) May Ziadeh – Page 1

(h) May Ziadeh – Page 2

(i) May Ziadeh – Page 3

Fig. 11 Intra-writer page variability under Protocol B for Prof. Ign. Kratchkovsky (a–c), Asaad Koury Tobia Attallah (d–f), and May Ziadeh (g–i). Across pages, noticeable changes in paper tone, ink density, and handwriting appearance highlight a key source of error under page-disjoint evaluation.

15

at least 3 pages per class, this form of evaluation includes fewer writer classes than Protocol A, thereby removing many ultra-rare writers (see Appendix B). Most composite classes fall below this page threshold and are therefore absent from this protocol. The main exception is Father Youssef Hanna & Father Botros Hasan with 3 pages in total, where the single test page exhibits noticeably different page appearance from the training pages, leading to a low and highly seed-sensitive F1-score of 0.2821 ± 0.3989. Moreover, among its constituent writers, only Father Botros Hasan appears as a standalone class under Protocol B. Despite having 6 pages overall, it still attains a low F1-score of 0.3416 ± 0.2150, consistent with moderate-to-high intra-writer variability across pages. Given these small supports, we avoid over-interpreting per-class fluctuations for composite labels and treat them as illustrative rather than definitive. Conversely, the most severe failures often arise when a writer’s pages exhibit pronounced intra-writer variability in handwriting appearance, ink, and page tone (see Figure 11). This is particularly evident for Prof. Ign. Kratchkovsky (6 pages), where the pages are largely single-page letters written in different years and the line images differ substantially (Figures 11a–11c); consequently, the test-page lines deviate sharply from the writer representation learned from the training pages, causing the class to collapse to an F1-score = 0 across seeds. A similar pattern appears for Asaad Koury Tobia Attallah (3 pages), where all pages are visually distinct (Figures 11d–11f) and performance again drops to an F1-score = 0 across seeds. Another illustrative case is May Ziadeh, with 12 pages in total. While some pages come from the same letter (consistent with the intermediate F1-score of 0.3591 ± 0.2549), other pages differ noticeably across letters in page tone and ink properties and even in handwriting style (e.g., faster writing and less consistent letter shaping; Figures 11g–11i), which increases confusion under page-disjoint evaluation. Furthermore, the strongest baseline under Protocol B (ResNet50 + Frozen + No Attention) exposes the limitations of non-adapted representations when generalizing across unseen pages. While its Top-5 accuracy remains relatively high (0.8735 ± 0.0147), its F1-score drops to 0.5706 ± 0.0254, indicating that many writers remain only weakly separable once page-specific cues change. Overall, Protocol B exposes substantial within-writer variability across pages, and this effect is amplified for minority writers. While fewer pages generally correlate with lower performance (with the exceptions noted above), the dominant failure mode is the combination of limited page coverage and high intra-writer variation. This confirms that page-disjoint evaluation is markedly more challenging and highlights that Muharaf remains a non-trivial dataset under realistic generalization constraints.

5.3 Cross-protocol analysis 5.3.1 Impact of attention mechanisms Across both protocols, attention generally improves performance, but the gain is not uniform and depends on the quality of the underlying feature representation. Under the line-level split, attention mechanisms consistently boosted performance across architectures (see Tables 9–11 and Appendix C). However, attention alone was insufficient when paired with weak or frozen feature representations. In particular, attention improved results on fine-tuned backbones but offered marginal benefit or even harm when representations lacked discriminative power, especially for two-author classes (see Appendix D). Overall, attention was most effective when applied to refined embeddings adapted to the handwriting domain. This indicates that the combination of deeper fine-tuning and attention is critical for robust performance in Protocol A, as neither component alone reliably captured both local and global handwriting cues. Additional evidence is provided by the DenseNet201 classification reports in Tables D.1–D.2 and D.7–D.10 of Appendix D, particularly for composite author classes. In contrast, under the page-disjoint split, the effect of attention becomes more configuration-dependent (see Tables 12–14). With frozen backbones, attention yields consistent gains in F1-score across all architectures, suggesting that attention can partially compensate for non-adapted features in this harder setting. However, under full fine-tuning, the trend is mixed: attention improves DenseNet201 (0.5991 → 0.6516) and MobileNetV3-Large (0.6544 → 0.6655), but slightly degrades ResNet50 (0.6072 → 0.6009) and Xception (0.6572 → 0.6444). This inconsistency also appears in Top-1 and Top-5, where the best entries come from different configurations (e.g., Top-5 peaks at ResNet50 with last-layer fine-tuning + attention). Overall, unlike Protocol A, where attention is reliably beneficial once the backbone is sufficiently adapted, Protocol B shows that attention is not uniformly advantageous and should be carefully considered alongside the fine-tuning depth and metric. 5.3.2 Effect of fine-tuning depth Deeper fine-tuning is a key driver of performance in both evaluation protocols, but it behaves more predictably in Protocol A than in Protocol B. Under Protocol A, progressively unfreezing layers yields clear gains: unfreezing only the last layer already improved MobileNetV3-Large ’s F1-score to 0.5439 ± 0.0225. Unfreezing the last 25 layers in DenseNet201 with attention yielded 0.8659 ± 0.0222—significant, but still inferior to full fine-tuning. Interestingly, when limited finetuning was combined with attention, performance sometimes declined, suggesting that suboptimal representations may misguide attention modules. Ultimately, fully fine-tuning all layers led to the best results across all models.

16

Under Protocol B, the same general pattern holds—finetuning deeper tends to help—but the improvements are less monotonic and sometimes accompanied by higher variability, reflecting the added difficulty of page-level domain shift. This indicates that partial adaptation may be insufficient to learn page-invariant handwriting cues, and that stronger domain adaptation is typically required to generalize to unseen pages. Meanwhile, training from scratch consistently underperformed in both protocols even with attention, reinforcing the advantage of transfer learning from ImageNet initialization. These weights provided essential feature-detection capabilities, accelerating convergence and enabling the extraction of nuanced handwriting features, especially in limited-data scenarios such as ours. 5.3.3 Lightweight model behavior MobileNetV3-Large exhibited highly variable performance across training strategies. Under Protocol A, when fine-tuned with attention, it achieved an F1-score of 0.9690 ± 0.0046— surpassing ResNet50 under the same conditions and approaching DenseNet201. However, MobileNetV3-Large collapsed when trained from scratch, yielding the worst overall scores (0.0005 ± 0.0000 with attention; 0.1187 ± 0.0839 without attention). This discrepancy can be attributed to the shared training settings with the heavier models and the absence of meaningful initial weights, which likely caused convergence to a poor solution or triggered early stopping before learning useful representations. The same sensitivity to initialization is even more apparent under Protocol B. When fine-tuned from ImageNet weights, MobileNetV3-Large remains competitive with heavier backbones and achieves the highest F1-score across all page-disjoint configurations (Fine-tuned + Attention: 0.6655 ± 0.0069), while also attaining the best Top-1 accuracy in Protocol B (Fine-tuned + No Attention: 0.7861 ± 0.0260). In contrast, training from scratch again collapses (F1-score of 0.0014 ± 0.0012 without attention and 0.0004 ± 0.0002 with attention), confirming that, in this setting, lightweight models rely critically on transferable pre-trained features and are unlikely to be trainable reliably under the same training settings used for the heavier architectures. 5.3.4 Architectural considerations Lastly, the channel dimensionality of each backbone’s output tensors provides useful architectural context but does not reliably predict downstream performance. DenseNet201 produces a R7×7×1920 tensor, ResNet50 and Xception a R7×7×2048 tensor, and MobileNetV3-Large a more compact R7×7×960 tensor. Although a higher number of channels is often associated with richer feature representations, our results show that channel count alone is not a dependable indicator of writer identification performance.

Under Protocol A, DenseNet201 achieves the strongest results when fully fine-tuned with attention, despite having fewer channels than ResNet50 and Xception. However, under Protocol B, the strongest backbone is not unanimous across the metrics. While different MobileNetV3-Large configurations attain the best Top-1 accuracy and F1-score, the peak Top-5 accuracy arises from a different feature extractor (ResNet50 with last-layer fine-tuning + attention). This divisive result indicates that the most effective inductive biases can change once the model is forced to predict the author of a page not seen in the training set from that particular writer. Conversely, under training-from-scratch conditions, Xception tends to be the most resilient among the larger models, whereas both DenseNet201 and ResNet50 exhibit noticeable drops. The extreme sensitivity of MobileNetV3-Large to initialization—collapsing entirely without pre-training— further emphasizes that success may not simply be a matter of channel depth. Instead, these outcomes highlight the importance of architectural design choices, such as Xception’s depth-wise separable filters, the presence of transferable pretrained features, and the integration of attention mechanisms— all of which interact to enhance representation quality and ultimately enable more effective writer identification.

6 Limitations and Future Work Our data-driven approach to writer identification highlights the importance of high-quality, diverse handwriting data. While our system achieved strong results, several limitations present opportunities for future research.

6.1 Dataset Limitations Manual Labeling Challenges. The ambiguities in authorship attribution due to the lack of distinctive features or metadata of some handwritten samples significantly affected further labeling efforts. For instance, some that could be labeled were either too difficult to do so, like the Ottoman Turkish texts (see Figure 2a), while others were not handwritten (see Figure 2b). Dataset Imbalance. The significant class imbalance across both protocols (see Appendices A and B) posed difficulties in model training and generalization by favoring overrepresented writers and, under Protocol B, pages that are more similar to those observed during training. Moreover, not all composite writer classes have individual handwritten text for each author. This limitation further restricts the model’s ability to effectively distinguish between certain writers, especially when their handwriting samples are found on the same page or manuscript.

17

6.2 Future Research Directions Dataset Refinement and Augmentation. Extending manual labeling, possibly using historical metadata, would enhance data quality. Furthermore, given the difficulty of collecting large numbers of authentic samples, synthetic data generation using generative models [50] could help improve minorityclass performance and support few-shot learning scenarios. In light of the performance gap under page-disjoint evaluation, a practical next step is to refine preprocessing to better normalize page appearance and emphasize ink strokes, for example, via binarization (e.g., Otsu thresholding) and contrast normalization. Complementarily, stronger augmentation tailored to historical documents (background/texture perturbations, illumination shifts, stain/noise simulation) could improve robustness to page-specific variations. Finally, semi- and selfsupervised learning strategies, including pseudo-labeling and iterative refinement, offer promising avenues for leveraging unlabeled data more effectively in this context. Architectural Improvements and Deployment Studies. Architectural improvements that explicitly de-emphasize background and reinforce stroke-driven discrimination are warranted, for example, through gating or improved attention mechanisms that suppress background noise and prioritize handwriting strokes. Moreover, exploring alternative models (e.g., transformer-based architectures like ViTs [30]) with positional encodings may further enhance performance, particularly for mixed-script handwriting. Overall, closing the gap between the near-perfect line-level results and the pagedisjoint setting remains an important future goal. Finally, these advances can be paired with quantization and lightweight design choices [49] to enable practical, real-time on-device writer identification. Open-set and Out-of-distribution Generalization. Since this work uses a closed-set protocol, an important next step is to evaluate open-set identification with writer-disjoint splits and protocols that allow an unknown-writer outcome. Alongside this direction, out-of-distribution (OOD) robustness can be studied via cross-collection testing (e.g., different archives, acquisition conditions, or script mixtures) under distribution shifts. Both directions naturally motivate embedding-based verification/retrieval (query–gallery matching), where samples are compared by distances in a learned embedding space, and unseen writers can be supported by enrolling new gallery examples. Recent work on open writer identification via distance-based matching provides a valuable starting point for designing such open-set protocols and exploring crossdomain generalization trends [34].

lines via manual verification and retaining 18,987 (77.51%) lines after filtering. Building on this refined data, we developed an end-to-end CNN-based system augmented with attention mechanisms to classify handwritten text-line images from historical Arabic manuscripts and evaluated it across fourteen model configurations under two complementary protocols: (i) a line-level split and (ii) a stricter page-disjoint split that assigns all lines from each page to a single split. To the best of our knowledge, this is the first study to report writer-identification baselines on Muharaf under both protocols. Under the line-level protocol, DenseNet201 + Attention achieves the best results (Top-1 accuracy: 99.05%, Top-5 accuracy: 99.73%, F1-score: 97.44%). In contrast, the stricter page-disjoint evaluation yields lower performance (Top-1 accuracy: 78.61%, Top-5 accuracy: 87.79%, F1-score: 66.55%), thus quantifying the influence of page-level cues and the difficulty of generalizing to unseen pages. These findings reinforce the practical value of transfer learning and layer-wise fine-tuning for writer identification when labeled data are limited, while also showing that nearceiling line-level performance does not directly translate to page-level generalization. Accordingly, by pairing our expanded labeled subset with benchmarks reported under both line-level and page-disjoint protocols, we provide a clearer and more realistic reference point for future work on pageinvariant modeling, robustness to acquisition artifacts, and broader evaluation settings (e.g., open-set identification). This study not only contributes to a stronger experimental foundation for Arabic writer identification but also emphasizes the potential of combining refined datasets with DL techniques. By leveraging these methods, we can better utilize the vast amounts of remaining unlabeled data, thereby advancing the field of writer identification in Arabic manuscripts even further and unlocking the hidden narratives preserved within these timeless documents.

Author Contributions Hamza A. Abushahla: Conceptualization, Data curation, Investigation, Writing – original draft, Writing – review & editing, Validation, Visualization. Ariel Justine N. Panopio: Conceptualization, Methodology, Investigation, Software, Writing – original draft, Writing – review & editing, Validation. Layth Al-Khairulla: Data curation, Investigation, Writing – review & editing, Validation. Mohamed I. AlHajri: Supervision, Resources, Writing – review & editing.

Declaration of competing interest 7 Conclusion This work strengthens the Muharaf dataset as a benchmark for closed-set writer identification by substantially expanding its labeled subset from 6,858 (28.00%) to 21,249 (86.75%)

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

18

Data availability The data, code, and supplementary materials for this study are available at: https://github.com/7abushahla/Muhara f-Writer-Identification. The original public Muharaf dataset is available at: https://doi.org/10.5281/zeno do.11492215.

References 1. Boyi, A.M., Yusuf, M.B., Isa, M.M.: The evolution and history of the arabic language. Journal of African Resilience and Advancement Research (2024) 2. Asi, A., Abdalhaleem, A., Fecker, D., Märgner, V., et al.: On writer identification for arabic historical manuscripts. International Journal on Document Analysis and Recognition (IJDAR), 20, 173 (2017) 3. Rehman, A., Naz, S., Razzak, M.I.: Writer identification using machine learning approaches: a comprehensive review. Multimedia Tools and Applications, 78, 10889 (2019) 4. Chammas, M., Makhoul, A., Demerjian, J.: Writer identification for historical handwritten documents using a single feature extraction method. In: 2020 19th IEEE International Conference on Machine Learning and Applications (ICMLA) (IEEE, 2020), pp. 1–6 5. Chammas, M., Makhoul, A., Demerjian, J., Dannaoui, E.: An end-to-end deep learning system for writer identification in handwritten arabic manuscripts. Multimedia Tools and Applications, 83(18), 54569 (2024) 6. Ngo, T.T., Nguyen, H.T., Nakagawa, M.: A-vlad: An endto-end attention-based neural network for writer identification in historical documents. In: International Conference on Document Analysis and Recognition (Springer, 2021), pp. 396–409 7. Saeed, M., Chan, A., Mijar, A., Habchi, G., et al.: Muharaf: Manuscripts of handwritten arabic dataset for cursive text recognition. Advances in Neural Information Processing Systems, 37, 58525 (2024) 8. Abdelhaleem, A., Droby, A., Asi, A., Kassis, M., et al.: Wahd: a database for writer identification of arabic historical documents. In: 2017 1st International workshop on arabic script analysis and recognition (ASAR) (IEEE, 2017), pp. 64–68 9. Mahmoud, S.A., Ahmad, I., Al-Khatib, W.G., Alshayeb, M., et al.: Khatt: An open arabic offline handwritten text database. Pattern Recognition, 47(3), 1096 (2014) 10. Chan, A., Mijar, A., Saeed, M., Wong, C.W., et al.: Hatformer: Historic handwritten arabic text recognition with transformers. arXiv preprint arXiv:2410.02179 (2024) 11. He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In: Proceedings of the IEEE conference on computer vision and pattern recognition (2016), pp. 770–778

12. Simonyan, K., Zisserman, A.: Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556 (2014) 13. Cilia, N.D., De Stefano, C., Fontanella, F., Marrocco, C., et al.: An end-to-end deep learning system for medieval writer identification. Pattern Recognition Letters, 129, 137 (2020) 14. Cilia, N.D., De Stefano, C., Fontanella, F., Marrocco, C., et al.: An experimental comparison between deep learning and classical machine learning approaches for writer identification in medieval documents. Journal of Imaging, 6(9), 89 (2020) 15. Arandjelovic, R., Gronat, P., Torii, A., Pajdla, T., et al.: Netvlad: Cnn architecture for weakly supervised place recognition. In: Proceedings of the IEEE conference on computer vision and pattern recognition (2016), pp. 5297–5307 16. Zhang, H., Xue, J., Dana, K.: Deep ten: Texture encoding network. In: Proceedings of the IEEE conference on computer vision and pattern recognition (2017), pp. 708– 717 17. Srivastava, A., Chanda, S., Pal, U.: Exploiting multi-scale fusion, spatial attention and patch interaction techniques for text-independent writer identification. In: Asian Conference on Pattern Recognition (Springer, 2021), pp. 203–217 18. Xing, L., Qiao, Y.: Deepwriter: A multi-stream deep cnn for text-independent writer identification. In: 2016 15th international conference on frontiers in handwriting recognition (ICFHR) (IEEE, 2016), pp. 584–589 19. Chahi, A., El-Merabet, Y., Ruichek, Y., Touahni, R.: An effective deepwinet cnn model for off-line textindependent writer identification. Pattern Analysis and Applications, 26(3), 1539 (2023) 20. He, S., Schomaker, L.: Writer identification using curvature-free features. Pattern Recognition, 63, 451 (2017) 21. Pechwitz, M., Maddouri, S.S., Märgner, V., Ellouze, N., et al.: Ifn/enit-database of handwritten arabic words. In: Proc. of CIFED, vol. 2 (Citeseer, 2002), vol. 2, pp. 127–136 22. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., et al.: Attention is all you need. Advances in neural information processing systems, 30 (2017) 23. Marti, U.V., Bunke, H.: The iam-database: an english sentence database for offline handwriting recognition. International journal on document analysis and recognition, 5, 39 (2002) 24. Kleber, F., Fiel, S., Diem, M., Sablatnig, R.: Cvl-database: An off-line database for writer retrieval, writer identification and word spotting. In: 2013 12th international conference on document analysis and recognition (IEEE, 2013), pp. 560–564

19

25. He, S., Wiering, M., Schomaker, L.: Junction detection in handwritten documents and its application to writer identification. Pattern Recognition, 48(12), 4036 (2015) 26. Kumar, V., Sundaram, S.: Attention based end to end network for offline writer identification on word level data. arXiv preprint arXiv:2404.07602 (2024) 27. Okawa, M.: Multistage convolutional neural network with deformable attention for word-level offline textindependent writer identification. IEEE Access (2025) 28. Majithia, A., Pedersen, A.P., Grossberg, M.: An integrated convolutional and transformer architecture for word-based handwriter identification. In: IFIP International Conference on Artificial Intelligence Applications and Innovations (Springer, 2025), pp. 44–59 29. Koepf, M., Kleber, F., Sablatnig, R.: Writer identification and writer retrieval using vision transformer for forensic documents. In: International Workshop on Document Analysis Systems (Springer, 2022), pp. 352–366 30. Dosovitskiy, A.: An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929 (2020) 31. Louloudis, G., Gatos, B., Stamatopoulos, N., Papandreou, A.: Icdar 2013 competition on writer identification. In: 2013 12th International conference on document analysis and recognition (IEEE, 2013), pp. 1397–1401 32. Fatnassi, I., Khamekhem Jemni, S., Ammar, S., Kessentini, Y.: St-wid: Self-supervised transformer for writer identification in arabic handwritten scripts: I. fatnassi et al. Signal, Image and Video Processing, 19(14), 1190 (2025) 33. Mezghani, A., Kanoun, S., Khemakhem, M., El Abed, H.: A database for arabic handwritten text image recognition and writer identification. In: 2012 international conference on frontiers in handwriting recognition (IEEE, 2012), pp. 399–402 34. Briber, A., Chibani, Y.: Open writer identification from handwritten text fragments using lite convolutional neural network. International Journal on Document Analysis and Recognition (IJDAR), 27(4), 529 (2024) 35. Yang, J., Shokouhifar, M., Yee, L., Khan, A.A., et al.: Dt2f-tlnet: A novel text-independent writer identification and verification model using a combination of deep type2 fuzzy architecture and transfer learning networks based on handwriting data. Expert Systems with Applications, 242, 122704 (2024) 36. Maitra, A., Mitra, S., Manna, S., Bhattacharya, S., et al.: Decorrelation-based self-supervised visual representation learning for writer identification. ACM Transactions on Asian and Low-Resource Language Information Processing, 24(7), 1 (2025) 37. Khan, M.A.: Arabic handwritten alphabets, words and paragraphs per user (ahawp) dataset. Data in Brief, 41, 107947 (2022) 38. Khalaif, M.Z., Younis, M.T.: An enhanced deep learning approach for writer identification and verification using

corner detection. In: International Conference on Cybersecurity and Artificial Intelligence Strategies (Springer, 2025), pp. 232–245 39. Srihari, S.N., Cha, S.H., Arora, H., Lee, S.: Individuality of handwriting. Journal of Forensic Sciences, 47(4), 856 (2002) 40. Djeddi, C., Siddiqi, I., Souici-Meslati, L., Ennaji, A.: Text-independent writer recognition using multi-script handwritten texts. Pattern Recognition Letters, 34(10), 1196 (2013) 41. Bertolini, D., Oliveira, L.S., Sabourin, R.: Multi-script writer identification using dissimilarity. In: 2016 23rd International Conference on Pattern Recognition (ICPR) (IEEE, 2016), pp. 3025–3030 42. Levenshtein, V.: Binary codes capable of correcting deletions, insertions, and reversals. Proceedings of the Soviet physics doklady (1966) 43. Deng, J., Dong, W., Socher, R., Li, L.J., et al.: Imagenet: A large-scale hierarchical image database. In: 2009 IEEE conference on computer vision and pattern recognition (Ieee, 2009), pp. 248–255 44. He, K., Zhang, X., Ren, S., Sun, J.: Spatial pyramid pooling in deep convolutional networks for visual recognition. IEEE transactions on pattern analysis and machine intelligence, 37(9), 1904 (2015) 45. Huang, G., Liu, Z., Van Der Maaten, L., Weinberger, K.Q.: Densely connected convolutional networks. In: Proceedings of the IEEE conference on computer vision and pattern recognition (2017), pp. 4700–4708 46. Chollet, F.: Xception: Deep learning with depthwise separable convolutions. In: Proceedings of the IEEE conference on computer vision and pattern recognition (2017), pp. 1251–1258 47. Howard, A., Sandler, M., Chen, B., Wang, W., et al.: Searching for mobilenetv3. In: 2019 IEEE/CVF International Conference on Computer Vision (ICCV) (2019), pp. 1314–1324. DOI 10.1109/ICCV.2019.00140 48. Hu, J., Shen, L., Sun, G.: Squeeze-and-excitation networks. In: Proceedings of the IEEE conference on computer vision and pattern recognition (2018), pp. 7132– 7141 49. Abushahla, H.A., Varam, D., Panopio, A.J.N., AlHajri, M.I.: Neural network quantization for microcontrollers: A comprehensive survey of methods, platforms, and applications. arXiv preprint arXiv:2508.15008 (2025) 50. Mayr, M., Dreier, M., Kordon, F., Seuret, M., et al.: Zeroshot paragraph-level handwriting imitation with latent diffusion models. International Journal of Computer Vision, pp. 1–22 (2025)

20

Appendix A Dataset Distribution Under Protocol A

Writers

Number of Lines Per Writer (All 179 Writers) Ameen Rihani Hanna Ghayth (Juan Gait) Hanna Moussa Salah Tizani Sohayl Tohmeh Michel Saykali Emily Nasrallah Jean Philipp Kmeid Zaghloul Felix Faris Khalil Yossuf Nader Raad Yousef Hobeiche Mayor of Kfarshima Michel Kahwaji Krouger Tobia Attallah Joseph Oussani Youssef Hanna El-Sawda Elias Sarkis Mansour Eid Abdulaziz bin Abdul Rahman Al Faisal Al Saud Shibli N. Damus Fouad Chehab May Ziadeh Father Mkhayel Zreiby Youssef Fadlallah Salemeh Father Youhanna Habib Baysari Father Boulos El-Mender Bishop Aghnathios Mbarak Bishop Youssef Darian Toufiq Wehbeh Your son George Shukri Kanaan Elias Abu Shabaki Father Botros Hasan Eissa alKhouri Mkhayel Meneem Toufic El Bacha George Saad Bechara El Khoury Girgi Dimitri Sursock Habib Massoud Murshid Habashi Ghnatyos Mbarak Assad Darouich Zacharias Bishop Mkhayel Akhrass Prof. Ign. Kratchkovsky Constantine Elias Daoud Mujaes Angele Ellis Mkhayel Daher Fathallah Khoury Youssef Ibrahim Yazbek Father Mikhael Hanna Elie Maroun Khalil Patriarch Elias Hoayek Your nephew Maroun Catherine Yazbek Al-Badawi Maurice Gemayel Botros Feghaly Amin Farhat Father Youssef Hanna & Father Botros Hasan Father Youssef Hajj Ibrahim Mejahid Al-Jaza'eri Naoum Mokarzel Sister Victor N. Khoury Abd al-Khaliq Farid Elias Asaf Estephan Adib Salloum Father Elias Najm Father Elias Bassil Mohammed Amin al-Husseini Bishop Boulos Akl Aziz Khoury Father Youssef Hanna Halim Khoury Saadeh Asaad Koury Tobia Attallah Bishara Mar'i Mansour Hassan Khalil Najib Ayoub Margaret El Haddad Maronite Bishop of Sidon Father Tobia al-Issa Maroun Al-Khoury Maroun Maurice Paul Sarrail Youssef Ibrahim Mkhayel & Ibrahim Daher Elia Abu Madi Youhanna Sfeir Lebanese immigrants Joseph Hanna Estphan Elias Karbaj Muhammad Hussain Najafi Father Youhanna El Khoury Shukri Kordahi Talaat Youssef Abdullah Maroun Jerji Nicola Khattar al-Chuayri Jamil Youssef Noah Brother of Joseph Oussani Abd al-Hajj Father Elias Abi Khair Nadim Attallah Jirjis alKsus Antoine Richa Father Botros Dib Negib Aboussouan Adib Shiha Peter the Patriarch of Antioch Dani Al-Sibaqa Father Youssef Iskandar Sally Aad Bishop Youseef El Khazen Youssef Nakad Habib Abdallah al-Khoury Dr. Abdo Harb Francis Hcheme Youssef Serhal Maroun 'Tiyyeh Habib Abi Rached Wadih Salim Karam Bishop Antoun Jbeir Malvina Choieree Tanos Youssef Harfouche Hanna Younes Abboud Habib Boulos Nasr Francis Lahoud Father Jerjes El Alam Elias Abdallah Assad Al-Khoury Abdallah Sfeir Daud Barkaat Father Yaacoub Awad Jebrayel Sa'd al 'Alam Antonios Elias Zaghloul ad-Damour Slayman al-Farkh Habib Nehad Warda El Khoury Toubia Hanna Rizk & Touma Chidiac Father Yousef Nassar Tanios Al Samarani Jirjis Yuhanna Basil Abdo Fares Magistrate of Batroun Jarhas Hanna Al-Shabtini Serhal Ounaissy Tawfiq Botros El Kfouny Salim Maalouf Muhawwel Harouh Father Youssef Nassar Youssef Moussa Sadaqa Tannous Semaan Ahmed Shakir alKarmi K. John Brother Ibrahim Georges Jarjoura People of Rablah Youssef Bey Al-Helou Yahia Mansour & Asaad Koury Mary Khoury Adham Al Jundi Keserwan Finance Officer Rahma Raad Nassif Mansour Tanios Zakhia Elias Basil Thomas & John Oussani Mousssa Farhat Farah Father Boutros Chidiac JerJi Ass'ad Nader Abdallah Daher Victor Shemil Yousef Hobeiche & Angele Ellis Maronite children of Akkar district Nehme Elias Mikhail Shibli Barakat witnesses Father Elias

0

202 200 199 198 171 163 163 157 135 134 132 128 127 123 118 111 107 100 100 96 95 94 93 89 84 76 75 73 73 72 71 69 68 68 67 67 66 66 63 63 62 58 57 53 53 53 53 50 49 47 47 46 44 42 42 40 40 40 38 37 37 37 37 36 35 35 35 34 34 32 32 32 32 30 30 29 28 28 27 26 26 26 25 25 24 24 24 24 23 23 22 22 22 22 21 21 21 21 21 21 20 20 20 20 20 20 20 20 20 19 19 19 19 19 18 18 18 18 17 17 17 17 17 17 17 17 17 16 16 16 16 16 16 15 15 15 15 15 15 15 15 15 14 14 14 14 14 14 14 14 13 12 12 12 12 11 10

200

271 270 266 264

339 325

532 505 480 453 432 426 412 401 400

400

602

600

Number of Lines

791

876 875 848

949 934

800

Fig. A.1 Number of labeled line images per writer under Protocol A, illustrating the long-tail imbalance of the filtered training set.

21

Appendix B Dataset Distribution Under Protocol B

Writers

Number of Pages Per Writer (71 Writers) Hanna Ghayth (Juan Gait) Emily Nasrallah Salah Tizani Michel Saykali Ameen Rihani Hanna Moussa Sohayl Tohmeh Zaghloul Felix Faris Michel Kahwaji Jean Philipp Kmeid Yousef Hobeiche Khalil Yossuf Nader Raad Fouad Chehab Abdulaziz bin Abdul Rahman Al Faisal Al Saud Elias Sarkis Youssef Hanna El-Sawda Joseph Oussani Krouger Tobia Attallah Mayor of Kfarshima Shibli N. Damus Youssef Fadlallah Salemeh Mansour Eid May Ziadeh Your son George Father Boulos El-Mender Father Mkhayel Zreiby Bishop Youssef Darian Bishop Aghnathios Mbarak Father Youhanna Habib Baysari Elias Abu Shabaki Toufiq Wehbeh Girgi Dimitri Sursock George Saad Prof. Ign. Kratchkovsky Toufic El Bacha Father Botros Hasan Bechara El Khoury Maurice Gemayel Eissa alKhouri Ghnatyos Mbarak Assad Darouich Zacharias Habib Massoud Bishop Mkhayel Akhrass Mkhayel Meneem Constantine Elias Your nephew Maroun Catherine Yazbek Al-Badawi Angele Ellis Murshid Habashi Fathallah Khoury Father Mikhael Hanna Daoud Mujaes Elie Maroun Khalil Patriarch Elias Hoayek Shukri Kanaan Father Tobia al-Issa Father Elias Bassil Bishop Boulos Akl Amin Farhat Sister Victor N. Khoury Asaad Koury Tobia Attallah Aziz Khoury Youssef Ibrahim Yazbek Ibrahim Mejahid Al-Jaza'eri Botros Feghaly Father Youssef Hajj Father Youssef Hanna & Father Botros Hasan Mkhayel Daher Mohammed Amin al-Husseini Naoum Mokarzel

45 43 41

28 28 27 25 24 23 22 21 20 18 17 16 14 13 13 12 12 12 11 10 9 9 9 9 8 8 8 7 6 6 6 6 6 6 5 5 5 5 5 5 4 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3

0

10

20

30

40

68

48 48

50

Number of Pages

60

70

Fig. B.1 Number of manuscript pages per writer under Protocol B, illustrating skewed per-writer supports.

22

Appendix C Additional Results

Table C.1 Recall Test Results. The best result within Protocol A is bolded. Model Configuration

Recall – Mean (Std)

Frozen + No Attention (Baseline) Frozen + Attention Fine-tuned + Last Layer + No Attention Fine-tuned + Last Layer + Attention Fine-tuned + Last 5 Layers + No Attention Fine-tuned + Last 5 Layers + Attention Fine-tuned + Last 10 Layers + No Attention Fine-tuned + Last 10 Layers + Attention Fine-tuned + Last 25 Layers + No Attention Fine-tuned + Last 25 Layers + Attention Fine-tuned + No Attention Fine-tuned + Attention From Scratch + No Attention From Scratch + Attention

ResNet50

DenseNet201

Xception

MobileNetV3-Large

0.6648 (0.0137) 0.7792 (0.0140) 0.6658 (0.0280) 0.7966 (0.0072) 0.7371 (0.0177) 0.8472 (0.0085) 0.8740 (0.0069) 0.8757 (0.0200) 0.9069 (0.0070) 0.9178 (0.0100) 0.9348 (0.0232) 0.9448 (0.0190) 0.8828 (0.0345) 0.8848 (0.0310)

0.6489 (0.0291) 0.7880 (0.0192) 0.6605 (0.0141) 0.7957 (0.0155) 0.7090 (0.0335) 0.8557 (0.0113) 0.8101 (0.0152) 0.8511 (0.0057) 0.8362 (0.0240) 0.8703 (0.0217) 0.9561 (0.0175) 0.9730 (0.0033) 0.9042 (0.0121) 0.9030 (0.0231)

0.3147 (0.0232) 0.4463 (0.0219) 0.3492 (0.0407) 0.4422 (0.0345) 0.6328 (0.0146) 0.7195 (0.0157) 0.8453 (0.0129) 0.8691 (0.0147) 0.8665 (0.0204) 0.8738 (0.0146) 0.9727 (0.0039) 0.9697 (0.0041) 0.9322 (0.0040) 0.9438 (0.0015)

0.3595 (0.0325) 0.4978 (0.0028) 0.3855 (0.0121) 0.5327 (0.0228) 0.6366 (0.0147) 0.7064 (0.0089) 0.6670 (0.0393) 0.7524 (0.0181) 0.8305 (0.0108) 0.8292 (0.0004) 0.9595 (0.0094) 0.9703 (0.0051) 0.1418 (0.0967) 0.0056 (0.0000)

Table C.2 Precision Test Results. The best result within Protocol A is bolded. Model Configuration

Precision – Mean (Std)

Frozen + No Attention (Baseline) Frozen + Attention Fine-tuned + Last Layer + No Attention Fine-tuned + Last Layer + Attention Fine-tuned + Last 5 Layers + No Attention Fine-tuned + Last 5 Layers + Attention Fine-tuned + Last 10 Layers + No Attention Fine-tuned + Last 10 Layers + Attention Fine-tuned + Last 25 Layers + No Attention Fine-tuned + Last 25 Layers + Attention Fine-tuned + No Attention Fine-tuned + Attention From Scratch + No Attention From Scratch + Attention

ResNet50

DenseNet201

Xception

MobileNetV3-Large

0.7387 (0.0155) 0.8146 (0.0183) 0.7265 (0.0254) 0.8350 (0.0086) 0.7867 (0.0281) 0.8811 (0.0159) 0.8984 (0.0104) 0.9025 (0.0093) 0.9233 (0.0027) 0.9352 (0.0087) 0.9378 (0.0294) 0.9500 (0.0213) 0.9006 (0.0323) 0.9058 (0.0327)

0.7128 (0.0236) 0.8199 (0.0257) 0.7293 (0.0106) 0.8352 (0.0085) 0.7759 (0.0264) 0.8819 (0.0131) 0.8400 (0.0207) 0.8753 (0.0029) 0.8659 (0.0135) 0.8897 (0.0193) 0.9638 (0.0168) 0.9819 (0.0032) 0.9242 (0.0120) 0.9298 (0.0125)

0.3645 (0.0251) 0.5017 (0.0236) 0.4017 (0.0464) 0.5025 (0.0449) 0.7032 (0.0072) 0.7602 (0.0152) 0.8781 (0.0151) 0.8977 (0.0099) 0.8948 (0.0274) 0.8990 (0.0205) 0.9739 (0.0036) 0.9803 (0.0010) 0.9503 (0.0053) 0.9606 (0.0041)

0.4479 (0.0453) 0.5850 (0.0068) 0.4800 (0.0068) 0.6166 (0.0192) 0.7107 (0.0179) 0.7661 (0.0051) 0.7339 (0.0428) 0.8129 (0.0166) 0.8526 (0.0189) 0.8463 (0.0040) 0.9631 (0.0094) 0.9765 (0.0038) 0.1141 (0.0808) 0.0003 (0.0000)

Table C.3 Test Loss Results. The best result within Protocol A is bolded. Model Configuration

Frozen + No Attention (Baseline) Frozen + Attention Fine-tuned + Last Layer + No Attention Fine-tuned + Last Layer + Attention Fine-tuned + Last 5 Layers + No Attention Fine-tuned + Last 5 Layers + Attention Fine-tuned + Last 10 Layers + No Attention Fine-tuned + Last 10 Layers + Attention Fine-tuned + Last 25 Layers + No Attention Fine-tuned + Last 25 Layers + Attention Fine-tuned + No Attention Fine-tuned + Attention From Scratch + No Attention From Scratch + Attention

Test Loss – Mean (Std) ResNet50

DenseNet201

Xception

MobileNetV3-Large

0.5517 (0.0088) 0.3995 (0.0145) 0.5230 (0.0072) 0.3998 (0.0178) 0.4553 (0.0024) 0.3364 (0.0196) 0.3037 (0.0072) 0.3377 (0.0294) 0.2779 (0.0063) 0.2489 (0.0288) 0.1161 (0.0147) 0.1052 (0.0226) 0.1597 (0.0132) 0.1613 (0.0231)

0.5415 (0.0235) 0.3747 (0.0138) 0.5379 (0.0225) 0.3735 (0.0155) 0.4321 (0.0246) 0.3125 (0.0309) 0.3056 (0.0097) 0.2786 (0.0150) 0.3093 (0.0227) 0.2784 (0.0264) 0.0876 (0.0135) 0.0694 (0.0061) 0.1455 (0.0056) 0.1600 (0.0123)

1.2822 (0.0502) 1.0810 (0.0227) 1.2475 (0.0528) 1.1140 (0.0109) 0.7992 (0.0418) 0.7460 (0.0176) 0.3988 (0.0433) 0.3691 (0.0195) 0.3443 (0.0130) 0.3497 (0.0163) 0.0958 (0.0134) 0.0902 (0.0035) 0.1119 (0.0093) 0.1386 (0.0068)

1.1310 (0.0181) 0.9310 (0.0429) 1.0789 (0.0143) 0.8551 (0.0403) 0.6212 (0.0149) 0.5684 (0.0215) 0.5769 (0.0171) 0.5454 (0.0218) 0.5018 (0.0452) 0.5051 (0.0342) 0.1046 (0.0186) 0.0947 (0.0067) 2.2607 (1.5662) 4.6212 (0.1239)

23

Table C.4 Recall Test Results. The best result within Protocol B is bolded. Model Configuration

Recall – Mean (Std)

Frozen + No Attention (Baseline) Frozen + Attention Fine-tuned + Last Layer + No Attention Fine-tuned + Last Layer + Attention Fine-tuned + Last 5 Layers + No Attention Fine-tuned + Last 5 Layers + Attention Fine-tuned + Last 10 Layers + No Attention Fine-tuned + Last 10 Layers + Attention Fine-tuned + Last 25 Layers + No Attention Fine-tuned + Last 25 Layers + Attention Fine-tuned + No Attention Fine-tuned + Attention From Scratch + No Attention From Scratch + Attention

ResNet50

DenseNet201

Xception

MobileNetV3-Large

0.5949 (0.0183) 0.6046 (0.0289) 0.5679 (0.0164) 0.6180 (0.0251) 0.6128 (0.0193) 0.6235 (0.0275) 0.6345 (0.0278) 0.6388 (0.0196) 0.6783 (0.0155) 0.6787 (0.0144) 0.6438 (0.0138) 0.6333 (0.0294) 0.5381 (0.0435) 0.5567 (0.0381)

0.5530 (0.0199) 0.6194 (0.0388) 0.5578 (0.0181) 0.6089 (0.0510) 0.5273 (0.0809) 0.5420 (0.1681) 0.6034 (0.0667) 0.5794 (0.1089) 0.6383 (0.0486) 0.6170 (0.0758) 0.6333 (0.0102) 0.6832 (0.0089) 0.5438 (0.0224) 0.5376 (0.0290)

0.3827 (0.0295) 0.4456 (0.0471) 0.3752 (0.0407) 0.4265 (0.0373) 0.5334 (0.0433) 0.5248 (0.0877) 0.6438 (0.0181) 0.6164 (0.0549) 0.6780 (0.0031) 0.6688 (0.0107) 0.6816 (0.0282) 0.6777 (0.0125) 0.5780 (0.0926) 0.5627 (0.0954)

0.4839 (0.0078) 0.5228 (0.0401) 0.4782 (0.0409) 0.5234 (0.0417) 0.5592 (0.0325) 0.5611 (0.1007) 0.5412 (0.0829) 0.5381 (0.0889) 0.6179 (0.0311) 0.6445 (0.0266) 0.6885 (0.0108) 0.6865 (0.0135) 0.0141 (0.0000) 0.0141 (0.0000)

Table C.5 Precision Test Results. The best result within Protocol B is bolded. Model Configuration

Precision – Mean (Std)

Frozen + No Attention (Baseline) Frozen + Attention Fine-tuned + Last Layer + No Attention Fine-tuned + Last Layer + Attention Fine-tuned + Last 5 Layers + No Attention Fine-tuned + Last 5 Layers + Attention Fine-tuned + Last 10 Layers + No Attention Fine-tuned + Last 10 Layers + Attention Fine-tuned + Last 25 Layers + No Attention Fine-tuned + Last 25 Layers + Attention Fine-tuned + No Attention Fine-tuned + Attention From Scratch + No Attention From Scratch + Attention

ResNet50

DenseNet201

Xception

MobileNetV3-Large

0.5484 (0.0312) 0.5700 (0.0307) 0.5267 (0.0387) 0.5867 (0.0355) 0.5761 (0.0281) 0.5789 (0.0364) 0.5841 (0.0330) 0.5788 (0.0256) 0.6244 (0.0124) 0.6474 (0.0105) 0.5754 (0.0402) 0.5726 (0.0590) 0.4218 (0.0719) 0.4747 (0.0705)

0.5139 (0.0403) 0.5796 (0.0238) 0.5165 (0.0089) 0.5695 (0.0521) 0.4895 (0.0994) 0.4870 (0.1801) 0.5558 (0.0698) 0.5140 (0.1259) 0.5759 (0.0623) 0.5611 (0.0941) 0.5694 (0.0432) 0.6235 (0.0358) 0.4452 (0.0290) 0.4425 (0.0484)

0.3355 (0.0205) 0.4094 (0.0334) 0.3325 (0.0476) 0.3720 (0.0344) 0.4812 (0.0459) 0.4719 (0.0900) 0.6148 (0.0124) 0.5627 (0.0670) 0.6422 (0.0076) 0.6332 (0.0070) 0.6347 (0.0145) 0.6142 (0.0198) 0.4974 (0.1076) 0.4644 (0.1298)

0.4606 (0.0239) 0.4984 (0.0421) 0.4482 (0.0492) 0.5021 (0.0465) 0.5077 (0.0322) 0.5024 (0.1058) 0.4855 (0.0924) 0.4808 (0.0917) 0.5670 (0.0470) 0.5979 (0.0142) 0.6238 (0.0291) 0.6460 (0.0065) 0.0008 (0.0007) 0.0002 (0.0001)

Table C.6 Test Loss Results. The best result within Protocol B is bolded. Model Configuration

Frozen + No Attention (Baseline) Frozen + Attention Fine-tuned + Last Layer + No Attention Fine-tuned + Last Layer + Attention Fine-tuned + Last 5 Layers + No Attention Fine-tuned + Last 5 Layers + Attention Fine-tuned + Last 10 Layers + No Attention Fine-tuned + Last 10 Layers + Attention Fine-tuned + Last 25 Layers + No Attention Fine-tuned + Last 25 Layers + Attention Fine-tuned + No Attention Fine-tuned + Attention From Scratch + No Attention From Scratch + Attention

Test Loss – Mean (Std) ResNet50

DenseNet201

Xception

MobileNetV3-Large

1.5836 (0.0897) 1.6172 (0.1343) 1.6338 (0.0890) 1.6498 (0.1410) 1.7123 (0.1504) 1.6055 (0.0387) 1.8789 (0.1659) 1.7746 (0.1674) 1.9069 (0.2826) 1.7816 (0.1589) 1.7742 (0.0613) 1.7843 (0.1066) 1.9663 (0.1899) 2.1376 (0.2081)

1.6863 (0.0748) 1.7234 (0.0900) 1.6851 (0.1179) 1.6924 (0.0744) 1.7525 (0.0914) 1.9828 (0.3119) 1.7603 (0.1170) 1.8089 (0.1878) 1.6937 (0.1449) 1.7279 (0.1172) 1.7317 (0.1221) 1.7852 (0.1248) 1.9407 (0.1358) 2.0616 (0.1529)

2.4914 (0.0505) 2.4198 (0.0357) 2.5855 (0.0939) 2.4164 (0.0172) 2.2157 (0.0450) 2.2562 (0.0729) 2.1344 (0.2775) 2.0095 (0.1133) 2.0380 (0.2488) 1.9592 (0.1395) 2.0275 (0.0528) 1.9128 (0.2054) 1.9831 (0.1813) 2.2160 (0.0523)

2.0683 (0.1450) 2.1090 (0.1062) 2.0822 (0.1324) 2.0582 (0.1078) 1.9285 (0.1250) 2.1362 (0.0703) 2.1522 (0.2272) 2.0209 (0.0517) 2.1044 (0.3570) 2.2494 (0.2569) 1.5808 (0.1075) 1.7630 (0.0797) 4.3754 (0.0656) 4.4023 (0.1125)

24

Appendix D Classification Reports Tables D.1–D.10 present partial classification reports for selected configurations under Protocol A, including the best-performing model (DenseNet201 + Fine-tuned + Attention) and the best baseline model (ResNet50 + Frozen + No Attention). We additionally include Table D.11, which presents a partial classification report for the best-performing model under Protocol B (MobileNetV3-Large + Fine-tuned + Attention). Across all tables, we bold specific rows to emphasize key results, with ellipses (. . . ) indicating that additional rows exist before and after the displayed subset.

Table D.1 Classification Report for DenseNet201 + Fine-tuned + No Attention (Protocol A) Class Name

Mean (Std) Precision

Recall

F1-Score

Support

.. .

.. .

.. .

.. .

Yousef Hobeiche

1.0000 (0.0000)

0.9949 (0.0089)

0.9974 (0.0045)

65.0000 (0.0000)

Angele Ellis

0.9744 (0.0444)

1.0000 (0.0000)

0.9867 (0.0231)

12.0000 (0.0000)

Yousef Hobeiche & Angele Ellis .. .

0.6667 (0.5774) .. .

0.6667 (0.5774) .. .

0.6667 (0.5774) .. .

2.0000 (0.0000) .. .

Elias Abdallah

1.0000 (0.0000)

1.0000 (0.0000)

1.0000 (0.0000)

3.0000 (0.0000)

Youssef Bey Al-Helou

1.0000 (0.0000)

0.8333 (0.2887)

0.8889 (0.1925)

2.0000 (0.0000)

Father Elias

0.6667 (0.5774)

0.6667 (0.5774)

0.6667 (0.5774)

1.0000 (0.0000)

Magistrate of Batroun .. .

1.0000 (0.0000) .. .

1.0000 (0.0000) .. .

1.0000 (0.0000) .. .

2.0000 (0.0000) .. .

accuracy

0.9862 (0.0035)

0.9862 (0.0035)

0.9862 (0.0035)

0.9862 (0.0035)

macro avg

0.9638 (0.0205)

0.9561 (0.0215)

0.9557 (0.0226)

2849.0000 (0.0000)

weighted avg

0.9863 (0.0041)

0.9862 (0.0035)

0.9852 (0.0041)

2849.0000 (0.0000)

.. .

Table D.2 Classification Report for the Best Model (DenseNet201 + Fine-tuned + Attention) (Protocol A) Class Name

Mean (Std) Precision

Recall

F1-Score

Support

.. .

.. .

.. .

.. .

Yousef Hobeiche

1.0000 (0.0000)

0.9949 (0.0089)

0.9974 (0.0045)

65.0000 (0.0000)

Angele Ellis

1.0000 (0.0000)

1.0000 (0.0000)

1.0000 (0.0000)

12.0000 (0.0000)

Yousef Hobeiche & Angele Ellis .. .

1.0000 (0.0000) .. .

1.0000 (0.0000) .. .

1.0000 (0.0000) .. .

2.0000 (0.0000) .. .

Elias Abdallah

0.9167 (0.1443)

1.0000 (0.0000)

0.9524 (0.0825)

3.0000 (0.0000)

Youssef Bey Al-Helou

1.0000 (0.0000)

0.8333 (0.2887)

0.8889 (0.1925)

2.0000 (0.0000)

Father Elias

0.3333 (0.5774)

0.3333 (0.5774)

0.3333 (0.5774)

1.0000 (0.0000)

Magistrate of Batroun .. .

1.0000 (0.0000) .. .

1.0000 (0.0000) .. .

1.0000 (0.0000) .. .

2.0000 (0.0000) .. .

accuracy

0.9905 (0.0009)

0.9905 (0.0009)

0.9905 (0.0009)

0.9905 (0.0009)

macro avg

0.9819 (0.0039)

0.9730 (0.0040)

0.9744 (0.0028)

2849.0000 (0.0000)

weighted avg

0.9912 (0.0006)

0.9905 (0.0009)

0.9902 (0.0007)

2849.0000 (0.0000)

.. .

25

Table D.3 Classification Report for the Best Baseline Model (ResNet50 + Frozen + No Attention) (Protocol A) Class Name

Mean (Std) Precision

Recall

F1-Score

Support

.. .

.. .

.. .

.. .

Yousef Hobeiche

0.8490 (0.0410)

0.9128 (0.0622)

0.8787 (0.0355)

65.0000 (0.0000)

Angele Ellis

0.5541 (0.0495)

0.8889 (0.1273)

0.6799 (0.0565)

12.0000 (0.0000)

Yousef Hobeiche & Angele Ellis .. .

0.1667 (0.2887) .. .

0.1667 (0.2887) .. .

0.1667 (0.2887) .. .

2.0000 (0.0000) .. .

Elias Abdallah

0.3333 (0.5774)

0.1111 (0.1925)

0.1667 (0.2887)

3.0000 (0.0000)

Youssef Bey Al-Helou

0.0000 (0.0000)

0.0000 (0.0000)

0.0000 (0.0000)

2.0000 (0.0000)

Father Elias

0.3333 (0.5774)

0.3333 (0.5774)

0.3333 (0.5774)

1.0000 (0.0000)

Magistrate of Batroun .. .

0.0000 (0.0000) .. .

0.0000 (0.0000) .. .

0.0000 (0.0000) .. .

2.0000 (0.0000) .. .

accuracy

0.8652 (0.0035)

0.8652 (0.0035)

0.8652 (0.0035)

0.8652 (0.0035)

macro avg

0.7387 (0.0190)

0.6648 (0.0168)

0.6772 (0.0162)

2849.0000 (0.0000)

weighted avg

0.8701 (0.0079)

0.8652 (0.0035)

0.8572 (0.0052)

2849.0000 (0.0000)

.. .

The classification report for the best baseline model shows that the model struggles with classes having few samples, yielding very low precision, recall, and F1-scores. For example, “Youssef Bey Al-Helou,” “Father Elias,” “Magistrate of Batroun,” and “Elias Abdallah” suffer from limited samples and sparse training representation. This data scarcity likely prevents the model from learning meaningful writer-specific patterns, resulting in poor generalization and misidentification during evaluation.

Table D.4 Classification Report for ResNet50 + Frozen + Attention (Protocol A) Class Name

Mean (Std) Precision

Recall

F1-Score

Support

.. .

.. .

.. .

.. .

Yousef Hobeiche

0.9393 (0.0266)

0.9538 (0.0533)

0.9462 (0.0363)

65.0000 (0.0000)

Angele Ellis

0.7075 (0.0417)

1.0000 (0.0000)

0.8282 (0.0286)

12.0000 (0.0000)

Yousef Hobeiche & Angele Ellis .. .

0.0000 (0.0000) .. .

0.0000 (0.0000) .. .

0.0000 (0.0000) .. .

2.0000 (0.0000) .. .

Elias Abdallah

1.0000 (0.0000)

1.0000 (0.0000)

1.0000 (0.0000)

3.0000 (0.0000)

Youssef Bey Al-Helou

0.3333 (0.5774)

0.3333 (0.5774)

0.3333 (0.5774)

2.0000 (0.0000)

Father Elias

0.3333 (0.5774)

0.3333 (0.5774)

0.3333 (0.5774)

1.0000 (0.0000)

Magistrate of Batroun .. .

0.0000 (0.0000) .. .

0.0000 (0.0000) .. .

0.0000 (0.0000) .. .

2.0000 (0.0000) .. .

accuracy

0.9114 (0.0050)

0.9114 (0.0050)

0.9114 (0.0050)

0.9114 (0.0050)

macro avg

0.8146 (0.0225)

0.7792 (0.0171)

0.7795 (0.0169)

2849.0000 (0.0000)

weighted avg

0.9135 (0.0066)

0.9114 (0.0050)

0.9069 (0.0043)

2849.0000 (0.0000)

.. .

26

Table D.5 Classification Report for DenseNet201 Fine-tuned + Last 25 Layers + No Attention (Protocol A) Class Name

Mean (Std) Precision

Recall

F1-Score

Support

.. .

.. .

.. .

.. .

Yousef Hobeiche

0.9800 (0.0228)

0.9846 (0.0154)

0.9821 (0.0115)

65.0000 (0.0000)

Angele Ellis

0.8654 (0.0449)

0.8889 (0.0481)

0.8767 (0.0418)

12.0000 (0.0000)

Yousef Hobeiche & Angele Ellis .. .

0.6667 (0.5774) .. .

0.3333 (0.2887) .. .

0.4444 (0.3849) .. .

2.0000 (0.0000) .. .

Elias Abdallah

1.0000 (0.0000)

0.4444 (0.1925)

0.6000 (0.1732)

3.0000 (0.0000)

Youssef Bey Al-Helou

0.6667 (0.5774)

0.6667 (0.5774)

0.6667 (0.5774)

2.0000 (0.0000)

Father Elias

0.0000 (0.0000)

0.0000 (0.0000)

0.0000 (0.0000)

1.0000 (0.0000)

Magistrate of Batroun .. .

0.3333 (0.5774) .. .

0.3333 (0.5774) .. .

0.3333 (0.5774) .. .

2.0000 (0.0000) .. .

accuracy

0.9404 (0.0093)

0.9404 (0.0093)

0.9404 (0.0093)

0.9404 (0.0093)

macro avg

0.8659 (0.0165)

0.8362 (0.0293)

0.8353 (0.0230)

2849.0000 (0.0000)

weighted avg

0.9430 (0.0085)

0.9404 (0.0093)

0.9375 (0.0096)

2849.0000 (0.0000)

.. .

Table D.6 Classification Report for DenseNet201 Fine-tuned + Last 25 Layers + Attention (Protocol A) Class Name

Mean (Std) Precision

Recall

F1-Score

Support

.. .

.. .

.. .

.. .

Yousef Hobeiche

0.9750 (0.0228)

0.9897 (0.0089)

0.9823 (0.0158)

65.0000 (0.0000)

Angele Ellis

0.7951 (0.0776)

0.9167 (0.0833)

0.8470 (0.0287)

12.0000 (0.0000)

Yousef Hobeiche & Angele Ellis .. .

0.5000 (0.5000) .. .

0.3333 (0.2887) .. .

0.3889 (0.3469) .. .

2.0000 (0.0000) .. .

Elias Abdallah

0.8000 (0.3464)

0.6667 (0.0000)

0.7000 (0.1732)

3.0000 (0.0000)

Youssef Bey Al-Helou

0.6667 (0.3333)

0.6667 (0.2887)

0.6222 (0.2037)

2.0000 (0.0000)

Father Elias

0.3333 (0.5774)

0.3333 (0.5774)

0.3333 (0.5774)

1.0000 (0.0000)

Magistrate of Batroun .. .

0.0000 (0.0000) .. .

0.0000 (0.0000) .. .

0.0000 (0.0000) .. .

2.0000 (0.0000) .. .

accuracy

0.9479 (0.0112)

0.9479 (0.0112)

0.9479 (0.0112)

0.9479 (0.0112)

macro avg

0.8897 (0.0237)

0.8703 (0.0266)

0.8659 (0.0272)

2849.0000 (0.0000)

weighted avg

0.9520 (0.0106)

0.9479 (0.0112)

0.9462 (0.0116)

2849.0000 (0.0000)

.. .

27

Table D.7 Classification Report for DenseNet201 + Frozen + No Attention (Protocol A) Class Name

Mean (Std) Precision

Recall

F1-Score

Support

.. .

.. .

.. .

.. .

Yousef Hobeiche

0.9233 (0.0281)

0.9795 (0.0178)

0.9503 (0.0150)

65.0000 (0.0000)

Angele Ellis

0.6825 (0.1689)

0.7222 (0.1925)

0.7009 (0.1769)

12.0000 (0.0000)

Yousef Hobeiche & Angele Ellis .. .

0.0000 (0.0000) .. .

0.0000 (0.0000) .. .

0.0000 (0.0000) .. .

2.0000 (0.0000) .. .

Elias Abdallah

1.0000 (0.0000)

0.5556 (0.1925)

0.7000 (0.1732)

3.0000 (0.0000)

Youssef Bey Al-Helou

0.3333 (0.5774)

0.3333 (0.5774)

0.3333 (0.5774)

2.0000 (0.0000)

Father Elias

0.0000 (0.0000)

0.0000 (0.0000)

0.0000 (0.0000)

1.0000 (0.0000)

Magistrate of Batroun .. .

0.0000 (0.0000) .. .

0.0000 (0.0000) .. .

0.0000 (0.0000) .. .

2.0000 (0.0000) .. .

accuracy

0.8705 (0.0043)

0.8705 (0.0043)

0.8705 (0.0043)

0.8705 (0.0043)

macro avg

0.6346 (0.1136)

0.6179 (0.1043)

0.6092 (0.1060)

2849.0000 (0.0000)

weighted avg

0.8660 (0.0062)

0.8705 (0.0043)

0.8644 (0.0064)

2849.0000 (0.0000)

.. .

Table D.8 Classification Report for DenseNet201 + Frozen + Attention (Protocol A) Class Name

Mean (Std) Precision

Recall

F1-Score

Support

.. .

.. .

.. .

.. .

Yousef Hobeiche

0.9919 (0.0045)

0.9851 (0.0076)

0.9884 (0.0033)

65.0000 (0.0000)

Angele Ellis

0.9111 (0.0244)

0.9444 (0.0824)

0.9222 (0.0434)

12.0000 (0.0000)

Yousef Hobeiche & Angele Ellis .. .

1.0000 (0.0000) .. .

0.6667 (0.2887) .. .

0.7778 (0.1925) .. .

2.0000 (0.0000) .. .

Elias Abdallah

0.9167 (0.1443)

0.7778 (0.1925)

0.8190 (0.0330)

3.0000 (0.0000)

Youssef Bey Al-Helou

0.8889 (0.1925)

0.6667 (0.2887)

0.7111 (0.0770)

2.0000 (0.0000)

Father Elias

0.3333 (0.5774)

0.3333 (0.5774)

0.3333 (0.5774)

1.0000 (0.0000)

Magistrate of Batroun .. .

1.0000 (0.0000) .. .

0.6667 (0.2887) .. .

0.7778 (0.1925) .. .

2.0000 (0.0000) .. .

accuracy

0.9686 (0.0041)

0.9686 (0.0041)

0.9686 (0.0041)

0.9686 (0.0041)

macro avg

0.9251 (0.0297)

0.8920 (0.0364)

0.9013 (0.0327)

2849.0000 (0.0000)

weighted avg

0.9683 (0.0044)

0.9686 (0.0041)

0.9662 (0.0049)

2849.0000 (0.0000)

.. .

28

Table D.9 Classification Report for DenseNet201 + From Scratch + No Attention (Protocol A) Class Name

Mean (Std) Precision

Recall

F1-Score

Support

.. .

.. .

.. .

.. .

Yousef Hobeiche

0.9850 (0.0149)

0.9949 (0.0089)

0.9898 (0.0043)

65.0000 (0.0000)

Angele Ellis

0.8990 (0.0364)

0.9722 (0.0481)

0.9332 (0.0234)

12.0000 (0.0000)

Yousef Hobeiche & Angele Ellis .. .

0.6667 (0.5774) .. .

0.5000 (0.5000) .. .

0.5556 (0.5092) .. .

2.0000 (0.0000) .. .

Elias Abdallah

1.0000 (0.0000)

0.6667 (0.3333)

0.7667 (0.2517)

3.0000 (0.0000)

Youssef Bey Al-Helou

0.6667 (0.5774)

0.5000 (0.5000)

0.5556 (0.5092)

2.0000 (0.0000)

Father Elias

0.3333 (0.5774)

0.3333 (0.5774)

0.3333 (0.5774)

1.0000 (0.0000)

Magistrate of Batroun .. .

1.0000 (0.0000) .. .

0.6667 (0.2887) .. .

0.7778 (0.1925) .. .

2.0000 (0.0000) .. .

accuracy

0.9711 (0.0016)

0.9711 (0.0016)

0.9711 (0.0016)

0.9711 (0.0016)

macro avg

0.9242 (0.0147)

0.9042 (0.0149)

0.9052 (0.0152)

2849.0000 (0.0000)

weighted avg

0.9702 (0.0033)

0.9711 (0.0016)

0.9687 (0.0026)

2849.0000 (0.0000)

.. .

Table D.10 Classification Report for DenseNet201 + From Scratch + Attention (Protocol A) Class Name

Mean (Std) Precision

Recall

F1-Score

Support

.. .

.. .

.. .

.. .

Yousef Hobeiche

0.9949 (0.0087)

0.9897 (0.0089)

0.9923 (0.0001)

65.0000 (0.0000)

Angele Ellis

0.9209 (0.0037)

0.9722 (0.0481)

0.9456 (0.0250)

12.0000 (0.0000)

Yousef Hobeiche & Angele Ellis .. .

1.0000 (0.0000) .. .

0.6667 (0.2887) .. .

0.7778 (0.1925) .. .

2.0000 (0.0000) .. .

Elias Abdallah

0.9167 (0.1443)

0.7778 (0.1925)

0.8190 (0.0330)

3.0000 (0.0000)

Youssef Bey Al-Helou

0.8889 (0.1925)

0.6667 (0.2887)

0.7111 (0.0770)

2.0000 (0.0000)

Father Elias

0.3333 (0.5774)

0.3333 (0.5774)

0.3333 (0.5774)

1.0000 (0.0000)

Magistrate of Batroun .. .

1.0000 (0.0000) .. .

0.6667 (0.2887) .. .

0.7778 (0.1925) .. .

2.0000 (0.0000) .. .

accuracy

0.9674 (0.0046)

0.9674 (0.0046)

0.9674 (0.0046)

0.9674 (0.0046)

macro avg

0.9298 (0.0153)

0.9030 (0.0283)

0.9060 (0.0240)

2849.0000 (0.0000)

weighted avg

0.9679 (0.0049)

0.9674 (0.0046)

0.9653 (0.0052)

2849.0000 (0.0000)

.. .

29

Table D.11 Classification Report for MobileNetV3-Large + Fine-tuned + Attention (Protocol B) Class Name

Mean (Std) Precision

Recall

F1-Score

Support

.. .

.. .

.. .

.. .

Emily Nasrallah

1.0000 (0.0000)

1.0000 (0.0000)

1.0000 (0.0000)

11.0000 (0.0000)

Jean Philipp Kmeid

0.9982 (0.0025)

1.0000 (0.0000)

0.9991 (0.0013)

27.0000 (0.0000)

Hanna Moussa

1.0000 (0.0000)

0.9978 (0.0031)

0.9989 (0.0016)

25.0000 (0.0000)

Salah Tizani

0.9876 (0.0131)

1.0000 (0.0000)

0.9937 (0.0067)

297.0000 (0.0000)

Hanna Ghayth (Juan Gait) .. .

0.8343 (0.0182) .. .

1.0000 (0.0000) .. .

0.9096 (0.0108) .. .

13.0000 (0.0000) .. .

Botros Feghaly

0.9583 (0.0589)

0.9702 (0.0212)

0.9626 (0.0207)

24.0000 (0.0000)

Elie Maroun Khalil

0.9247 (0.0140)

1.0000 (0.0000)

0.9608 (0.0075)

22.0000 (0.0000)

Murshid Habashi .. .

0.8674 (0.1030) .. .

0.9720 (0.0200) .. .

0.9139 (0.0639) .. .

26.0000 (0.0000) .. .

Father Botros Hasan

0.2428 (0.1358)

0.6667 (0.4423)

0.3416 (0.2150)

19.0000 (0.0000)

Father Youssef Hanna & Father Botros Hasan .. .

0.2529 (0.3576) .. .

0.3188 (0.4509) .. .

0.2821 (0.3989) .. .

23.0000 (0.0000) .. .

May Ziadeh .. .

0.2480 (0.1763) .. .

0.6515 (0.4611) .. .

0.3591 (0.2549) .. .

22.0000 (0.0000) .. .

Prof. Ign. Kratchkovsky

0.0000 (0.0000)

0.0000 (0.0000)

0.0000 (0.0000)

13.0000 (0.0000)

Asaad Koury Tobia Attallah

0.0000 (0.0000)

0.0000 (0.0000)

0.0000 (0.0000)

10.0000 (0.0000)

Amin Farhat .. .

0.0000 (0.0000) .. .

0.0000 (0.0000) .. .

0.0000 (0.0000) .. .

21.0000 (0.0000) .. .

accuracy

0.7707 (0.0111)

0.7707 (0.0111)

0.7707 (0.0111)

0.7788 (0.0000)

macro avg

0.6460 (0.0065)

0.6865 (0.0135)

0.6317 (0.0141)

2473.0000 (0.0000)

weighted avg

0.7712 (0.0180)

0.7707 (0.0111)

0.7468 (0.0136)

2473.0000 (0.0000)

.. .

Record · ID 134554 · SHA-256 dd6c32754dab6746
Retrieved via Conceptio — every document is proof-bundled with source, license, and retrieval metadata.