Standard Identiﬁcation Certiﬁcate for Legal Legislation of a Unique Gene Pool of Thai Domestic Elephants Originating from a Male Elephant Contribution to Breeding

: Illegal wildlife trade is a major threat to global biodiversity. Asian elephants ( Elephas maximus ) are highly valued by various cultures as religious symbols and tourist attractions, which has led to a high demand for captive elephants. Owing to the unviability of captive breeding programs, several captive elephant populations are maintained by illegally obtaining wild Asian elephants. Morbidity and mortality rates among captive populations are high, whereas reproduction is low. In this study, we examined the genetic diversity among elephants using microsatellite genotyping and mitochondrial D-loop sequences of three captive elephant populations. The study results showed very low nucleotide diversity D-loop sequences and high variations in microsatellite genotyping, with an extensive variation of the gene pool estimates from different populations. This suggests that the optimal male selection during breeding could aid in maintaining the genetic diversity among captive populations. Forward genetic simulation revealed a decreasing genetic diversity in the fixed state within 50 generations. However, largely different gene pools can be effectively used to infer original elephant sources; this would facilitate the development of an identification certificate integration with machine learning and image processing to prevent illegal legislation owing to registration fraud between wild and domestic elephants. Implementing the proposed approaches and recommendations would aid in the mitigation of the illegal capture and domestic trade of wild elephants in Thailand and contribute to the success of future conservation plans in the blueprint of sustainable development goals.

In addition to illegal capture, inbreeding has caused a reduction in elephant numbers in Thailand; low birth weight, high mortality rate at birth, and low fertility at puberty are prevalent among elephants [28,29]. The proportion of relatively old elephants in captive populations is high, while the rate of reproduction is increasingly dropping [12]. Toin et al. [30] found that the reproductive rates of captive elephants in Northern Thailand range between <1 and 3.5 elephants per year, and observed a high mortality rate, particularly among male elephants [12]. Many elephants from captive camps are sub-fertile and only a few are used for mating in each camp and are occasionally transferred to other camps for mating and reproduction [12,31]. This is postulated to increase the probability of inbreeding. However, a high genetic diversity, with significant transfer rates among tourist camps, was observed among captive elephants [28,32,33]. This implies the frequent transfer of elephants among tourist camps and indicates the significance of the frequent assessment of the genetic diversity for the evaluation of breeding programs and to support legal legislation [28,[34][35][36]. Genetic research and the development of techniques for conservation and camp management are urgently required to develop a practical action plan for preventing registration fraud and to allow for image processing and deep learning. To investigate the genetic variability in captive populations, the monitoring of captive elephant populations in several camps was addressed by screening genetic variations, using a combination of microsatellite genotyping and mitochondrial D-loop (mt D-loop) sequencing. We tested the following hypotheses: (1) high genetic variables are observed among captive elephant populations in tourist camps, owing to the significant rate of elephant transfers among camps and (2) effective parental stocks distributed across camps result in a low genetic variation among captive individuals. High inbreeding coefficients should be derived from the second hypothesis. Diversity, population structure, historic demography, forward genetic simulation, and paternity testing were investigated to provide references for future management activity. Individual identification, using genetic tools and ML was then implemented as the pilot model to create identification certificates with legal legislation for more optimized comparison of different elephant individuals.

Specimen Collection and DNA Extraction
A total of 158 individual elephant were sampled in three captive camps. The detailed information on the sampled individuals is presented in Table S1. Blood samples were collected from the jugular vein of the captive elephants registered by the National Elephant Institute of Thailand (NEI, Lampang; 18 • 53 38.7 E) between October 2020 and November 2021, using an 18-gauge needle attached to a 5 mL disposable syringe containing 10 mM ethylenediaminetetraacetic acid. MEP and BCEP are tourist camps with large numbers of elephants. The owners determined the number of specimens that could be obtained from each camp. Total genomic DNA was extracted from the blood following the standard phenol-chloroform-isoamylalcohol protocol, described by Srikulnath et al. [37], and used as the template for microsatellite genotyping and mt D-loop sequencing. The sex of each individual was identified by morphological observation [38]. Permission was granted by Kasetsart University, NEI (approval no. 1400/476), MEP (no. 6501.0901/3349), and BCEP (no. 6501.0901/3968). Animal care and all experimental procedures were approved by the Animal Experiment Committee, Kasetsart University (Bangkok, Thailand; Approval No. ACKU63-SCI-017), and conducted in accordance with the Regulations on Animal Experiments at Kasetsart University.

Microsatellite Genotyping
Eighteen microsatellite primer sets were sourced from the studies conducted by Comstock et al. [39] and Archie et al. [40], having been originally developed from Loxodonta africana africana (Table S2). The cross-species amplification of microsatellite primers is frequently performed in conservation and in genetic and biodiversity research [40][41][42][43][44][45][46][47]. The 5 -end of the forward primer of each set of primers was labeled with a fluorescent dye (6-FAM or HEX; Macrogen Inc., Seoul, Korea). The polymerase chain reaction (PCR) amplification was performed using 15 µL of 1× ThermoPol buffer containing 1.5 mM MgCl 2 , 0.2 mM dNTPs, 5.0 µM primers, 0.5 U Taq polymerase (Apsalagen Co., Ltd., Bangkok, Thailand), and 25 ng genomic DNA. The PCR protocol was as follows: initial denaturation at 94 • C for 3 min, followed by 35 cycles of 94 • C for 30 s, 52-61 • C for 30 s, and 72 • C for 30 s, with a final extension at 72 • C for 10 min (Table S2). The PCR products were detected by electrophoresis in 1% agarose gel. To decrease the influence of false alleles, the PCR amplification was performed at least three times for each sample. The absence of PCR products was also checked, using 1% agarose gel electrophoresis after the PCR. The fluorescent DNA fragment length analysis was subsequently performed using an ABI 3730XL automatic sequencer (Applied Biosystems, Foster City, CA, USA) at the DNA sequencing service of Macrogen Inc. The allelic size was determined using Peak Scanner software version 1.0 (Applied Biosystems). The genotypic data generated in this study were deposited in the Dryad Digital Repository Dataset: https: //datadryad.org/stash/share/dg2SMl_JQlGgjz6pOWuCRiaOr2C29QZanghBB0t5iBc (accessed on 10 August 2022).

Microsatellite Data Analysis
We followed the same approaches as those used in our previous study on other animals [40,[44][45][46][47]. The allelic frequency, the number of alleles (A), the effective number of alleles (N a ), the observed heterozygosity (H o ), the expected heterozygosity (H e ), the linkage equilibrium, the deviations from the Hardy-Weinberg equilibrium, Welch's t-test, the allelic richness (AR), the mean number of the effective alleles, the identified null allelic markers, the polymorphic information content (PIC), Shannon's information index (I), and the fixation index (F) were calculated for each locus of the population. The effective population size (N e ) was estimated as the number of breeding individuals that contributed to the population, using the linkage disequilibrium method. The details were previously described by Jangtarwan et al. [45]. To consider the possibility of siblings or parentoffspring pairs in the captive population, we determined whether the Asian elephants were more related than random unrelated individuals. The relatedness values (r) were calculated for all pairs (comprising female-female, male-male, and male-female pairs), and mean pairwise r values, based on the allelic frequencies in the population, were calculated in captivity using GenAlEx version 6.5 [48]. The distributions of the pairwise r values between all pairs from the sampled captivities were compared by a bootstrap version of the Kolmogorov-Smirnov test to provide relationships [49], using the "ks.test" function in the package stats of R version 4.1.2 [50]. The same approach was adopted for the comparison of the inbreeding coefficients (F IS ) among captivities and the individual and overall F IS, with 95% confidence intervals (CIs). The parentage analysis determined the probability of two individuals sharing the same genotype. Individuals who shared alleles from their putative parents at all loci, were considered actual offspring of the pair. Cases in which the pairing failed to match any of the two alleles of the putative parents at two or more loci, were considered new wild individuals. The details of the methods used were previously described by Jangtarwan et al. [45].
The pairwise genetic distances among populations were calculated, based on the infinite allele model (IAM), using F ST in Arlequin version 3.5.2.2. with the corrected p values, and the stepwise mutation model (SMM) using R ST in FSTAT version 2.9.3 [51]. To consider the possible influences of null alleles on the genetic differentiation estimates, the Free NA program [52]  correction for the null alleles. To elucidate the group structure, an analysis of molecular variance (AMOVA) was performed using Arlequin 3.5.2.2. Unlike F ST , this algorithm identifies the subgroup hierarchical structure and does not require a priori assumption of the Hardy-Weinberg equilibrium. Nei's genetic distances between the groups were then examined using GenAlEx version 6.5 [53]. The state of heterozygosity excess and the shift in the allelic frequency distributions in the genetically bottlenecked populations were tested using Bottleneck version 1.2.02 [54]. The Wilcoxon signed-rank test, with a two-phased model of mutation (TPM) and SMM, was used to obtain the probabilities for the excess levels of heterozygosity, owing to the small sample sizes of the loci. The TPM was carried out with 95% single-step mutations and 5% multistep mutations, with a variance among the multiple steps set at 12. This test detects the relatively short-term bottleneck events.
To test for the relatively long-term bottleneck events, the M ratio test [55] was performed using Arlequin version 3.5.2.2. The M ratio is the mean number of alleles in a population divided by the allelic size range, and indicates the reductions in both recent and historical population sizes. The principal coordinates analysis (PCoA) was performed to assess the overall relationship across individuals in the captive population, using GenAlEx version 6.5. The analysis of the principal components (DAPC) was performed using the package ADEGENET 2.0 [56] in R 4.1.2 [50]. The DAPC makes no assumptions about the population models [56]. It defines the synthetic variables where the genetic variation is maximized between clusters of individuals (K) and minimized within the clusters. The details of the model-based clustering method implemented in STRUCTURE, were described by Jangtarwan et al. [45]. To simulate the future genetic and demographic scenarios of the population, we performed individual-based forward genetic simulations in the simulation program quantiNEMO [57], using individual-based genotypic data input. The simulation presented the fitness of the captive population by estimating the future genetic variation and diversity [58]. This study used twelve scenarios, including a combination of three scenarios from the carrying capacity (50% decreased population size, fixed at the current population size, and 100% increased population size), and four scenarios from the proportion of polygyny (0.2, 0.4, 0.8, and 1.0), owing to the captive selection practice in the breeding population) with one mating male [59]. Each simulation was run for 100 generations for 1000 replications, assuming a substitution rate of 3.5% per million years [5].

Mitochondrial D-Loop Sequencing
The mt D-loop sequences were selected as a suitable region for estimating the genetic variability of the elephants [60] using primers MDL3 (5 -CCCACAATTAATGGGCCCGGAGCG-3 ) and MDL5 (5 -TTACATGAATTGGCAGCCAACCAG-3 ). Each PCR amplification was performed using 15 µL of 1 × ThermoPol ® buffer that contained 1.5 mM MgCl 2 , 0.2 mM dNTPs, 5.0 µM primers, 0.5 U Taq polymerase (Apsalagen Co., Ltd., Bangkok, Thailand), and 25 ng genomic DNA. The PCR conditions were as follows: the initial denaturation at 94 • C for 4 min, followed by 35 cycles of 94 • C for 30 s, 63 • C for 45 s, 72 • C for 30 s, and a final extension at 72 • C for 10 min. The PCR products were purified using the FavorPrep GEL/PCR Purification Mini Kit (Favorgen Biotech Corp., Ping-Tung, Taiwan). The nucleotide sequences of the DNA fragments were determined by the DNA sequencing service of First Base Laboratories Sdn Bhd (Seri Kembangan, Selangor, Malaysia). The BLASTn and BLASTx programs (http://blast.ncbi.nlm.nih.gov/Blast.cgi (accessed on 15 February 2022)) were used to search the nucleotide sequences in the National Center for Biotechnology Information database to confirm the identity of the amplified DNA fragments. The sequences generated were deposited in the DNA Data Bank of Japan (DDBJ) (Table S1).

Mitochondrial D-Loop Data Analysis
The multiple sequence alignment was performed for 94 sequences for each of the mt D-loop datasets, all unalignable, gap-containing sites, estimates of haplotype (h) and nucleotide (π) diversity, number of haplotypes, and average number of nucleotide dif- ferences were performed using the previous study method, as previously described by Wongtienchai et al., 2021 [47].
A statistical parsimony network of the consensus sequences and demographic history was determined, using the statistical test of neutrality, described by Wongtienchai et al. (2021) [47]. The Bayesian coalescent-based methods were then performed to evaluate the historical demographic fluctuations, using the extended Bayesian skyline plot (EBSP) method implemented in BEAUTi version 2.0.2 (part of the BEAST version 2.0.2 package) [61,62], by applying the HKY model, strict clock, and coalescent Bayesian skyline model with a prior Gamma distribution. For the mean substitution rate, the prior was set as a log normal distribution with a mean of 6.700%/million years and a standard deviation of 0.900%/million years to match the rate estimated from the fossil data [63,64]. TRACER (version 1.7.1. http: //beast.community/tracer (accessed on 15 March 2022)) was used to assess the burn-in and the effective sample sizes (ESSs) of the parameters. The EBSP can fit different demographic scenarios by allowing changes in the population size over time.

Convolutional Neural Networks
The image processing and deep learning were used to study the potential of using an automated system to identify individuals. Simple convolutional neural networks (CNNs) were employed as an image classification system, and were observed to perform well in the image recognition [68]. Because only the images of each elephant in the NEI were available, an image dataset was developed. The dataset contained images of 64 individual elephants, each with 10-111 pictures. For each elephant, ten pictures were manually selected to cover various postures to reduce any testing redundancy and bias. The number of pictures in the experimental dataset was 640; the number of classes was 64, and each class had ten samples. As shown in Figure S1, the images for each elephant were obtained using various cameras, lighting, angles, rotations, backgrounds, distances, and postures. The elephants appeared to be similar to each other from a layperson's perspective and identifying individuals was considered to be challenging. A five-fold experimental setup was conducted where, for each fold and class, eight images were used for training; one was used for validation and the other for testing. The experiment was repeated with rotation, five times ( Figure S2). High resolution images (2656 × 3984 pixels) were reduced to 128 × 128 pixels to cut down on the image dimensions. The number of training samples per class was limited and simple image processing techniques, such as rotation and scaling (zoom range), were used to generate additional image samples [69].
Simple CNNs were used as a classification engine where a batch of 128 × 128-pixel images was used to determine 64 classes, as shown in Figure S3. Four convolutional and max-pooling layers were used before flattening, and a fully convolutional layer before outputting the probability of each class. The first N highest probability values were then used to declare the top-N prediction. The top-N accuracy was commonly used to evaluate this type of classification, where it was acceptable to visualize a few images for the user to consider the first group of the most probable class labels, instead of just the top one, such as a mobile application for finding missing pets. Five hundred epochs and the L1 function were used for regularization.

Genetic Variability of the Elephant Captive Population, Based on the Microsatellite Data
All captive individuals were genotyped and 487 alleles were observed among all loci, with the mean number of alleles, per locus, being 12.407 ± 1.029 (Table 1). All allelic frequencies showed significant departures from the Hardy-Weinberg equilibrium of the captive population, with multiple lines of evidence for a linkage disequilibrium (Tables S3-S5). The ability to detect significant departures from the Hardy-Weinberg equilibrium was limited, due to the small sample sizes; however, consistent patterns of deviation from the Hardy-Weinberg equilibrium or linkage equilibrium were not detected across sites. Consequently, the genetic analyses were performed, based on all microsatellite loci. Null alleles were frequently observed for 16 loci (LaT06, LaT08, LaT16, LaT13, LaT17, LaT24, LaT18, LaT25, LaT26, FH19, FH48, FH65, FH67, FH94, FH102, and FH103), and all markers listed were similarly treated. The MEP population exhibited negative F values but the NEI and BCEP populations exhibited positive ones. The PIC of all captive populations ranged from 0.410 to 0.949 and I ranged from 0.475 to 3.256 (Table S6). The  Table 2). The AR value of the population was 12.407 ± 7.381. The standard genetic diversity indices are summarized in Tables 1 and S4.    Table  S10). The mean F IS was 0.501 ± 0.176 (Table 3), with individual values of F IS ranging from −0.061 to 1.000 (Tables S11-S13). However, distributions of F IS from the NEI, MEP, and BCEP populations were significantly different from each other, while the F IS of the MEP population was mostly lower than zero ( Figure 1, Table S10). The N e for individuals that contributed genetically to the NEI population was 38.6 (95% CI: 33.8-199.1), 153.7 (95% CI: 95.2-245.6) for the MEP population, and 103.6 (95% CI: 73.0-217.3) for the BCEP population (Table 3). Simultaneously, the parentage analysis of the captive population individuals revealed approximately one-fifth of all elephants, at least 29 of the total number. No genetic evidence of extra-pair paternity was found (Tables S14-S17). All paternities were assigned unequivocally. No parent-offspring pairs among the different populations were observed. The combined likelihood of rejection for the microsatellites utilized, was evaluated at 0.95. The probability of two elephants conveying an indistinguishable genotype was calculated to be 0.1051 (Tables S18-S20). Estimates were calculated using NeEstimator version 2.1 [70], COANCESTRY version 1.0.1.9 [71], and GenAlEx version 6.5 [48]. Detailed information for all elephant individuals is presented in Table  S1. Sample size (N); inbreeding coefficient (FIS); effective population size (Ne). 1   Following 110 permutations, the estimates of FST showed significant differences (p < 0.05) between the captive populations; however, the estimates of FST ENA between the captive populations were not different (Table S21). The AMOVA results showed that the distribution of genetic variations was 46% among individuals within a population and 10% among populations (Table S22). Nei's genetic distances and RST showed that the MEP and BCEP populations were closer than the NEI with others (Tables S21 and S23). The Wilcoxon signed-rank tests for recent population bottlenecks yielded SMM and TPM values Following 110 permutations, the estimates of F ST showed significant differences (p < 0.05) between the captive populations; however, the estimates of F ST ENA between the captive populations were not different (Table S21). The AMOVA results showed that the distribution of genetic variations was 46% among individuals within a population and 10% among populations (Table S22). Nei's genetic distances and R ST showed that the MEP and BCEP populations were closer than the NEI with others (Tables S21 and S23). The Wilcoxon signed-rank tests for recent population bottlenecks yielded SMM and TPM values of 1.000 in all populations (normal L-shaped mode shift). The M ratios of the NEI and MEP populations exceeded 0.68, whereas that of the BCEP was 0.366 ± 0.305, indicating the presence of a historical reduction in population size (Tables 3 and S24). The PCoA revealed that the first, second, and third principal components accounted for 6.99%, 4.25%, and 3.21% of the total variation, respectively, and supported three tentatively differentiated elephant groups (NEI, MEP, and BCEP) ( Figure 2). This was consistent with the results of DAPC (Figure 2). The model-based Bayesian clustering algorithms implemented in STRUCTURE generated different population patterns with an increasing K-value from 2, 3, 4, 10, and 21; however, the optimized population structure patterns were assigned to three clusters (K = 3), based on Evanno's ∆K (Figures 3 and S4).
populations exceeded 0.68, whereas that of the BCEP was 0.366 ± 0.305, indicating the presence of a historical reduction in population size (Table 3 and Table S24). The PCoA revealed that the first, second, and third principal components accounted for 6.99%, 4.25%, and 3.21% of the total variation, respectively, and supported three tentatively differentiated elephant groups (NEI, MEP, and BCEP) (Figure 2). This was consistent with the results of DAPC (Figure 2). The model-based Bayesian clustering algorithms implemented in STRUCTURE generated different population patterns with an increasing Kvalue from 2, 3, 4, 10, and 21; however, the optimized population structure patterns were assigned to three clusters (K = 3), based on Evanno's ΔK (Figure 3 and Figure S4).    Table S1, (b) discriminant analysis of principal components (DAPC) results. Scatter plot, based on the DAPC output for three assigned genetic clusters, each indicated by different colors. Dots represent different individuals. of 1.000 in all populations (normal L-shaped mode shift). The M ratios of the NEI and MEP populations exceeded 0.68, whereas that of the BCEP was 0.366 ± 0.305, indicating the presence of a historical reduction in population size (Table 3 and Table S24). The PCoA revealed that the first, second, and third principal components accounted for 6.99%, 4.25%, and 3.21% of the total variation, respectively, and supported three tentatively differentiated elephant groups (NEI, MEP, and BCEP) (Figure 2). This was consistent with the results of DAPC (Figure 2). The model-based Bayesian clustering algorithms implemented in STRUCTURE generated different population patterns with an increasing Kvalue from 2, 3, 4, 10, and 21; however, the optimized population structure patterns were assigned to three clusters (K = 3), based on Evanno's ΔK (Figure 3 and Figure S4).    Table S1.
The forward genetic simulations were performed for 12 scenarios of the varied carrying capacity and the proportion of polygyny, to estimate the loss of genetic diversity across three captive populations. The genetic diversity was represented by the number of alleles, heterozygosity, and allelic diversity (Figure 4). The results from 100 simulated generations showed that all loci of the population with restricted one-male polygyny mating were fixed by approximately 50 generations (Figure 4). All simulations showed a decrease in the genetic diversity. The decline in genetic diversity is relatively slow when captive populations have a relatively large carrying capacity.
the plot, with black vertical lines indicating the boundaries. Asterisks indicate the wild-born individuals. Detailed information for all Asian elephant individuals is presented in Table S1.
The forward genetic simulations were performed for 12 scenarios of the varied carrying capacity and the proportion of polygyny, to estimate the loss of genetic diversity across three captive populations. The genetic diversity was represented by the number of alleles, heterozygosity, and allelic diversity (Figure 4). The results from 100 simulated generations showed that all loci of the population with restricted one-male polygyny mating were fixed by approximately 50 generations (Figure 4). All simulations showed a decrease in the genetic diversity. The decline in genetic diversity is relatively slow when captive populations have a relatively large carrying capacity.

Genetic Variability of the Captive Population, Based on the Mitochondrial Haplotype Analysis
The amplicon length and alignment length of the mt D-loop sequences were 640 and 380 bp, respectively, with 49 haplotypes. Overall, the haplotype and nucleotide diversities were 0.920 ± 0.010 and 0.061 ± 0.030 in the mt D-loop sequences (Table 4). A complex haplotype network was constructed from the large number of detected polymorphic sites and haplotypes ( Figure 5). The most common haplotype of all populations was haplotype EM18. Fifteen haplotypes (EM18, EM22, EM24, EM25, EM27, EM29, EM37, EM38, EM39, EM44, EM51, EM52, EM53, EM55, and EM57) were shared in the NEI, MEP, and BCEP

Genetic Variability of the Captive Population, Based on the Mitochondrial Haplotype Analysis
The amplicon length and alignment length of the mt D-loop sequences were 640 and 380 bp, respectively, with 49 haplotypes. Overall, the haplotype and nucleotide diversities were 0.920 ± 0.010 and 0.061 ± 0.030 in the mt D-loop sequences (Table 4). A complex haplotype network was constructed from the large number of detected polymorphic sites and haplotypes ( Figure 5). The most common haplotype of all populations was haplotype EM18. Fifteen haplotypes (EM18, EM22, EM24, EM25, EM27, EM29, EM37, EM38, EM39, EM44, EM51, EM52, EM53, EM55, and EM57) were shared in the NEI, MEP, and BCEP population. Multiple sequence alignments of 158 elephant mt D-loop sequences were grouped in both α and β haplogroups ( Figure S5). To examine the genetic differentiation among the three populations, we calculated F ST , G ST , Φ ST , D xy , D a , and N m . The F ST values ranged from 0.032 to 0.082, the G ST values ranged from 0.003 to 0.015, and the Φ ST values ranged from 0.029 to 0.050 for the mt D-loop sequences ( Table 5). The N m values ranged from 5.535 to 15.110, the D xy values ranged from 0.021 to 0.065, and the D a values ranged from 0.001 to 0.007 for the mt D-loop sequences ( Table 5). The gene flow estimates were often obtained among the MEP and BCEP populations.  Five different tests of neutrality were used to examine the historical population expansion for the mt D-loop sequences of the wild population. Tajima's D values were not significant and ranged from −0.212 (p = 0.466) to 0.991 (p = 0.869). Fu and Li's F* values ranged from −1.348 (p = 1.000) to 0.155 (p = 1.000) and were not significant. Fu and Li's D* values ranged from −1.462 (p = 1.000) to 0.435 (p = 1.000) and were not significant. Ramos-Onsins and Rozas's R 2 values ranged from 0.108 to 0.149 ( Table 6). The mismatch distribution analysis indicated a multimodal distribution ( Figure S6). The raggedness index values ranged from 0.019 to 0.045 without any statistical significance. The EBSPs, based on the mt D-loop sequences detected a tentative constant in all populations ( Figure 6).

Classification of the Individual Elephants by the Convolutional Neural Networks
The preliminary results for the simple image processing and CNNs tended to be valid. For each test, the probability values from the output layer were used to provide the

Classification of the Individual Elephants by the Convolutional Neural Networks
The preliminary results for the simple image processing and CNNs tended to be valid. For each test, the probability values from the output layer were used to provide the ranking of each class prediction. The random selection from a set of image data was performed ( Figure S7). Overall, the model yielded an acceptable prediction, as the third prediction was the most accurate. The prediction results for five cases were averaged in Table 7. The Top-1 accuracy was 41.6% on average, far better than the random classification at 1/64 or 0.015%. The Top-3, Top-5, and Top-7 accuracies were 64.1%, 72.8%, and 78.8%, respectively. The average ranking was 5.6 out of 64, making it potentially practical in real applications as the accurate prediction would rank at 5.6 on average. The top-5 prediction, generally used in most applications, was 72.8%.

Discussion
The current global captive population of Asian elephants is estimated at 14,000-15,000 individuals or approximately one-third of the global Asian elephant population [7,72]. The captive elephant population in Thailand partially depends on capturing wild elephants, resulting in the rapidly declining number of elephants in the wild. Domesticated elephants in captive camps are therefore required to compensate for the demands for captive elephants and tourist camps, sustainably. Thai captive elephants are currently frequently transferred across different regions throughout the country, either under governmental or private ownership and held in 153 places in 56 provinces [73], with each elephant camp containing between 1 and 195 elephants [74]. Currently, six camps have been certified by the Department of Tourism and nine by the Department of Livestock Development, out of approximately 250 camps in Thailand [16]. To supplement the transfer of elephants between camps, the reproduction percentage of female captive elephants needs to be increased. However, inbreeding and its effects on lowering the genetic diversity have negatively impacted successive generations of captive elephants and other animals [29]. Previous studies on the genetic diversity among Thai captive elephants in Northern Thailand, revealed a high H e (more than 0.5) in the tourist camps [28,29]. This was consistent with the present study where H e and AR values were high, which were likely suitable conditions for adaptation. The AR value is important for the population size adaptation, while heterozygosity is important for immediate adaptation [75]. However, the comparison of H e and H o revealed that H e was significantly higher than H o in the elephant populations at the NEI and BCEP, suggesting inbreeding. This result was similar to the inbreeding coefficient of the two captive populations, which tended to exceed zero. We found at least 39 individuals to be effective for transferring genetic components to the subsequent generation in the NEI, suggesting that the captive population is composed of related individuals. The NEI population has grown by rapid proliferation of individuals with small N e or N e /N, in contrast with those of the MEP population. The NEI provides research and education on elephants with the aim of conserving, in a sustainable way, and preserving local traditions for future generations. This is the reason underlying the lack of an action plan for the transfer of elephants between camps. Multiple breeding generations of the captive population have reduced the population size and increased the degree of inbreeding [76]. The arrangement of inbreeding, according to differences in the genetic group, should be considered further to reduce the inbreeding risk of captive elephants in the NEI. It is not possible to capture wild elephants to add to the captive herds in Thailand and there is no exchange population between captive and wild elephants. Therefore, maintaining a long-term captive elephant population, particularly increasing the birth rate in the population, is challenging [77]. By contrast, the N e and N e /N of the BCEP population were high, despite the high inbreeding coefficient. This might result from a possible subpopulation within the BCEP population, as indicated by the positive F values and Bayesian structural analysis; demographically, the historic population reduction was observed in the BCEP population. The genetic partition within the population is a consequence of the possible mixed origin of captive populations, with founding individuals from historically distinct lineages in the camps. This likely agreed with the first hypothesis.
The results of the mean maternal lineage analyses, based on the mt D-loop sequences, showed a low nucleotide diversity (π) but a high haplotype diversity (h) in all populations. The π value offers a more reliable reflection of the mtDNA diversity in a population than the h value, which reflects the recent changes in a population [41,78]. This suggests that a few maternal lineages were observed in the population. However, the NEI population showed a higher nucleotide diversity than the MEP and BCEP populations, possibly caused by the elephant society structure of the MEP and BCEP populations with a few maternal lineages. Furthermore, many males might contribute to the population size, according to the routine transfer between camps [79][80][81]. The decline in the genetic diversity is relatively slow when captive populations have a relatively large carrying capacity. The present demographic analyses identified no recent bottlenecks in the captive population, according to the haplotype network and the demographic history of both mt D-loop sequences and the microsatellite genotyping (except for the BCEP population), although only the nonsignificant raggedness index was observed. The population became constant. Our forward genetic simulation analyses showed that the number of mating males was the primary factor influencing the genetic diversity of the captive elephant populations; even a small population can maintain a higher genetic diversity than a larger patch capacity, with a high degree of polygyny. This suggests that the optimal male selection for breeding could help maintain the genetic diversity in the captive populations. Microsatellite data also show that all loci of the population with restricted one-male polygyny mating, exhibited a fixed reduction in the genetic diversity over the subsequent 50 generations (approximately 1750 years, assuming an Asian elephant generation of 50 years).

Genetic Diversity of the Elephants in Camps Reflects the Different Historic Origins
The genetic differentiation is the accumulation of the differences in allelic frequencies between completely or partially isolated populations, owing to evolutionary forces. This is important for understanding the selection or genetic drift [29]. Here, the pairwise F ST value was statistically significant among the three populations, in relation to the PCoA and DAPC information, implying the genetic differentiation among the camps. Interestingly, the Bayesian structural analyses with many K levels showed large different allelic patterns or gene pools among the three populations, suggesting that the elephants in each camp were derived from distinct original lineages. Similarly, no parent-offspring pairs among different populations were observed from the parentage analysis of the combined three captive populations. Historically, Asian elephants are a geographically widespread species and this may help to the maintain genetic variation [79][80][81]. The current captive populations from the MEP and BCEP might reflect scenarios of large original sources of Asian elephants in Thailand brought into the camps and possibly the fairly routine transfer of elephants between camps [79][80][81].
In this study, the private haplotypes were observed in Asian elephants; 15 of the 49 haplotypes were novel. Only nine haplotypes were shared by the three populations, and 40 haplotypes were private to one of them. The genetic differentiation of the NEI population differed significantly from that of the MEP/BCEP populations; however, those of the MEP and BCEP populations were not significantly different. Many elephant camps allow for the sufficient gene flow within their region, as observed between the MEP and BCEP populations, because of the male elephants distributed for mating and the resulting offspring in several camps. Our 158 control region sequences (380 bp) yielded 49 different haplotypes, based on 10 variable sites. Although all observed 'Sundaland' haplotypes were mostly the β clade, the median-joining network revealed that all haplotypes in this study were grouped into the α or β haplogroups [6,34,82], supporting the large variation in the Asian elephant lineage in Thailand. The finding of many different haplotypes within the camps suggests a remarkable breeding management and suggests that camps in different clusters cooperated and transferred the genetic value for breeding. This can influence the adaptability and distribution of a species in diverse habitats. The results of this study provide the baseline information on the genetic status of elephants between tourist camps in Thailand that will be important for future conservation and breeding programs of the species.

Legal Legislation and Identification Certificates
Corruption, ineffective laws, weak judicial systems, lack of enforcement of wildlife law, and light sentences for offenders, allow criminal networks to keep plundering wildlife with little regard for the consequences [83][84][85]. These factors make the illegal elephant trade a low-risk business with high returns. It takes well over 10 years for newborn elephants to serve as draft animals; therefore, calves do not generate income for the elephant tourist camps. The growing demand for captive elephants as draft animals is addressed by the illegal capture of elephants from the wild. A 20-year National Elephant Conservation Action Plan of Thailand (2018-2037) was therefore developed. This includes four major strategies: (1) policy and regulations pertaining to elephants, (2) understanding the socio-politics and culture, related to elephants, (3) wild elephant conservation and habitat management, and (4) elephant welfare and health care. This study proposes the enactment of a national policy on captive elephants that introduces a scientific and transparent process, regarding the registration and renewal of licenses to hold captive elephants following the first strategy. The frame of DNA fingerprinting, including the allelic frequency and probability, and the mt D-loop, were innovated for the identification certificate. The gene pool estimates from the different populations can be used to infer the origin of the DNA samples. These could be obtained from individuals of unknown origin to prevent illegal legislation owing to registration fraud. This should limit the use of captive elephants for cultural, religious, and tourism purposes, and allow for the adoption of the standardized captive elephant registration protocols and best practices, proposed by the Seventeenth Conference of Parties of CITES in 2016 and the second Asian Elephant Range States' meeting in 2017. In addition, the CNN with multiple elephant pictures was simply performed to incorporate the historic records and DNA fingerprints. The accuracy and precision of the CNN image recognition were approximately 41.6% and 44.63%, respectively, and the top-5 classification accuracy is 72.8%. However, there were only eight samples, which is considered to be low, in light of the data that can be collected [86,87]. The sample size should be significantly bigger to ensure that the data are representative, compared to those in this preliminary experiment. The study and the ultimate application of the appropriate techniques and parameters for the image features and learning models should significantly improve the prediction performance.
This study presents an assessment of the population status of captive elephants in Thailand and provides guidelines for their management. This will promote the long-term preservation of captive elephant populations in Thailand, based on legal legislation. This study presents the blueprint for a more optimized and sustainable future for all and addresses the global challenges we face, including those related to poverty, inequality, climate change, environmental degradation, peace, and justice with the Sustainable Development Goals (SDG) 8 (promote sustained, inclusive, and sustainable economic growth, full and productive employment, and decent work for all), 15 (protect, restore, and promote the sustainable use of terrestrial ecosystems, sustainably manage forests, combat desertification, and halt and reverse the land degradation and halt the biodiversity loss), 16 (promote peaceful and inclusive societies for a sustainable development, provide access to justice for all, and build effective, accountable, and inclusive institutions at all levels), and 17 (strengthen the means of implementation and revitalize the Global Partnership for Sustainable Development). A science-based set of standards or guidelines, as well as enforceable regulations for tourist elephants in Thailand are needed and will aid in this effort. Further studies on the genetic variation and differentiation of Asian elephants should be performed with a greater number of individuals and in other areas of the country. Collaboration with camps, tourist agencies, and governmental agencies will also promote the maintenance of healthy, sustainable populations of captive elephants throughout Thailand and other Asian range countries.

Conclusions
Captive elephant populations in this study revealed two scenarios of high genetic variation, in the MEP and BCEP populations, as the representatives of tourist camps, and a low genetic variation in the NEI population, as representing the government sector. The genetic variation must be carefully controlled, to maintain an adequate genetic diversity in the camps. Male elephants are the main contributors of the genetic diversity of captive elephant populations. Considering the three camps, the diverse origins of elephants were observed, suggesting various historic origins. This leads us to apply the DNA fingerprint with ML for the development of identification certificates for legal legislation. The continuous monitoring of captive populations is required because demographic processes are crucial in small populations to set the foundation for DNA fingerprinting of Thai elephants. This comprehensive system will document the pedigree and demographic history of the captive elephant population, as one way of ensuring that tourism does not negatively impact wild counterparts. It is essential that the implementation be synergistically accompanied by research that examines the impacts and numerous adverse effects of climate change and the loss of biodiversity. Results can be used to modify and improve the implementation of effective measures.