Machine Learning Models with Quantitative Wood Anatomy Data Can Discriminate between Swietenia macrophylla and Swietenia mahagoni

: Illegal logging and associated trade aggravate the over-exploitation of Swietenia species, of which S. macrophylla King, S. mahagoni (L.) Jacq, and S. humilis Zucc. have been listed in Convention on International Trade in Endangered Species of Wild Fauna and Flora (CITES) Appendix II. Implementation of CITES necessitates the development of e ﬃ cient forensic tools to identify wood species accurately, and ideally ones readily deployable in wood anatomy laboratories across the world. Herein, a method using quantitative wood anatomy data in combination with machine learning models to discriminate between three Swietenia species is presented, in addition to a second model focusing only on the two historically more important species S. mahagoni and S. macrophylla . The intra-and inter-specifc variations in nine quantitative wood anatomical characters were measured and calculated based on 278 wood specimens, and four machine learning classifers—Decision Tree C5.0, Naïve Bayes (NB), Support Vector Machine (SVM), and Artifcial Neural Network (ANN)—were used to discriminate between the species. Among these species, S. macrophylla exhibited the largest intraspecifc variation, and all three species showed at least partly overlapping values for all nine characters. SVM performed the best of all the classifers, with an overall accuracy of 91.4% and a per-species correct identifcation rate of 66.7%, 95.0%, and 80.0% for S. humilis , S. macrophylla , and S. mahagoni , respectively. The two-species model discriminated between S. macrophylla and S. mahagoni with accuracies of over 90.0% using SVM. These accuracies are lower than perfect forensic certainty but nonetheless demonstrate that quantitative wood anatomy data in combination with machine learning models can be applied as an e ﬃ cient tool to discriminate anatomically between similar species in the wood anatomy laboratory. It is probable that a range of previously anatomically inseparable species may become identifable by incorporating in-depth analysis of quantitative characters and appropriate statistical classifers.


Introduction
In recent decades, international efforts to prohibit or limit the trade of endangered species have been made to combat illegal logging and associated trade [1][2][3][4][5], usually emphasizing the Convention on International Trade in Endangered Species of Wild Fauna and Flora (CITES), which lists species in an identifcation and provide forensically reliable results [13], but they depend on knowledge of the breadth of variability in a given species and typically require years or decades to develop that expertise. One way to investigate subtle wood anatomical divergences between species is to collect quantitative data relating to key characters and subject these data to multivariate statistical classifcation [36,37]. Broadly, these statistical methodologies fall into two categories, namely, unsupervised and supervised. Unsupervised methods draw inferences from datasets consisting of input data without labels, and some types of cluster analysis are used for exploratory data analysis to fnd hidden patterns or groupings in data [38], but this approach is virtually absent in the wood anatomical literature, perhaps in part because unsupervised methods perform most reliably with large amounts of data which are difficult to generate in wood anatomy. Supervised classifcation is the data mining task of inferring a function from labeled training data, and includes Naïve Bayes (NB), Support Vector Machine (SVM), Artifcial Neural Network (ANN) and Decision Tree C5.0 (DT) methods, among others, each of which is widely used for classifcation tasks [39]. Such statistical analysis in wood discrimination has been recently applied to data from non-traditional wood identifcation methods [22,29,32,[40][41][42], but not for quantitative wood anatomy.
In his 1933 paper, Panshin wrote that "the woods of the Swietenia species cannot be separated anatomically with any degree of certainty" and no publications since that time have overturned this judgment [10]. The aim of this study was to test Panshin's claim using quantitative wood anatomy data in combination with machine learning models to establish an identifcation method that could discriminate between three Swietenia species, namely, S. marcophylla, S. mahagoni, and S. humilis, based on a large number of specimens from wood collections. This was approached using three steps: (1) investigating the intra-and inter-specifc variations of the three species, (2) testing multivariate supervised classifers (DT, NB, SVM, and ANN) on all characters for their discrimination ability regarding the three species, and (3) investigating a two-species model to separate the historically more important S. macrophylla and S. mahagoni given the relative paucity of Swietenia humilis specimens available for study.

Reference Specimens
Mature wood of 278 Swietenia specimens (198 Swietenia macrophylla, 65 Swietenia mahagoni, and 15 Swietenia humilis) from the Samuel J. Record Collection (SJRw), the USDA Forest Products Laboratory Wood Collection (MADw) of Madison, Wisconsin, and the wood collection (RBw) of the Botanic Garden of Rio de Janeiro in Brazil was selected. Wood microscopy and microtomy were performed as in [43] and images of three planes of sections of S. macrophylla, S. mahagoni, and S. humilis are shown in Figure 1.

Quantitative Characters
Measured and calculated quantitative character defnitions are listed in Table 1 and generally correspond to the IAWA list [44]. Vessel element length (VEL) and fber length (FL) are reported as the average of 25 and 50 measurements, respectively. The ratio of fber length to vessel length (F/V) was calculated. Mean tangential vessel diameter (TVD) was calculated from measurements taken at the widest point of 50 vessels using ImageJ version 1.47 (National Institute of Health, Bethesda, MD, USA) [45]. Frequency of vessels (FOV) was measured by dividing the total number of vessels in one picture by its area of 11.2 mm 2 (4612 microns in width and 2432 microns in height), allowing for more than the IAWA-recommended use of 10 felds of view with 1 mm 2 each. Rays per linear mm (RPMM) was measured by counting the number of rays transected by a 2 mm reference line in fve different felds of view. Ray height (RHEIGHT) and ray width (RWIDTH) were also measured in microns using ImageJ. Rays of every width category (determined as the number of cells at maximum width) were measured in random felds of view until at least fve rays per width category (whenever possible) were obtained, and were indexed according to the area of the feld of view to provide a rays per mm 2 value. Ray area index (RAI) was calculated as described in [43]. As rays are fusiform in shape to varying degrees, the RAI is, by virtue of being a rectangular metric, an overestimate of total ray area. Mean tangential diameter of vessels (n = 50); measured at the widest point of a vessel and including the vessel wall. To select which vessels would be measured we used a grid (a single diagonal line). 2 Mean number of vessels found in 1 mm Table 1. Cont.

Wood Features Abbreviation Defnitions
The count of all rays in fve felds of view crossed by a 2 Rays per linear mm RPMM mm line seen through an ocular micrometer (10 mm total, as described in the IAWA list of microscopic features). Only rays entirely in the feld of view were measured.
Ray height RHEIGHT Mean ray height in µm.

Ray width RWIDTH Mean ray width in µm
Sum of the product of mean ray height × mean ray width Ray area index RAI × mean number of rays per mm of each ray width 2 category, divided by 100,000 µm

Statistical Analysis
All statistical work was performed in R version 3.4.4. Intra-and inter-specifc quantitative variations were examined using descriptive statistical data analysis with Bonferroni corrections in all t-tests to account for multiple comparisons.
To implement supervised machine learning algorithms, we used a 10-fold cross-validation at the specimen level for both the three-species and two-species models. We tested the performance of four classifers, namely, DT, NB, SVM, and ANN, which were implemented with R packages C50, e1071, kernlab, and nnet, respectively [46][47][48][49]. Decision Tree is a branching model similar to a traditional identifcation key that separates classes by splitting data at decision nodes and ending at the separated classes [50]. Naïve Bayes employs Bayes' theorem, assuming independence between features among the classes, to calculate a class membership probability [51]. An SVM model maps the input data into a higher dimensional space and then determines optimal class-separating hyperplanes [52]. ANN is an information processing system with interconnected "neurons" that receive, process, and transmit input signals using feature weights, the reticulated structure of which is inspired by the biological processes of the human brain [53]. Table 2 presents mean values and standard deviations for each of the characters measured in the three Swietenia species, as well as the results of t-tests of the mean values. The results of t-tests indicated that there were signifcant differences among three Swietenia species in the mean values of FL, FOV, and RHEIGHT. Nevertheless, the calculated RAI failed to show any divergence across the three species. Smoothed data density histograms of the nine characters are presented in Figure 2. Not surprisingly, none of the three Swietenia species could be separated by any single quantitative character because the data distribution within and between species showed overlap for all characters.

Machine Learning Classifers for Discrimination between the Three Swietenia Species
Confusion matrices reporting performance metrics for the four supervised classifers, namely, DT, NB, SVM, and ANN are presented in Figure 3. The true species are reported on the left and the predicted species are given in the columns, such that on-diagonal predictions are correct and all other predictions are incorrect. The value in each cell is the proportion of the total predictions, and each row always sums to 1.0. Of the four supervised classifers, SVM showed the best overall performance (91.4%), followed by ANN (83.8%), NB (79.5%), and DT (78.4%). Using the SVM classifer, the three Swietenia species could be separated with a relatively higher accuracy, i.e., 66.7% for S. humilis, 95.0% for S. macrophylla, and 80.0% for S. mahagoni. However, the DT and ANN classifers failed to predict S. humilis correctly.  Figure 4 presents the confusion matrices for the two-species model discriminating between Swietenia mahagoni and Swietenia macrophylla. The four supervised classifers exhibited overall accuracy values of over 80%, being i.e., 93.9% (SVM), 85.2% (ANN), 81.7% (NB), and 81.4% (DT). SVM was able to discriminate between S. macrophylla and S. mahagoni with thresholds of 94.9% and 90.8%, respectively. The results indicated that the two-species model performed slightly better than the three-species model.

Intra-and Inter-Species Variations of the Three Swietenia Species
In traditional wood identifcation, species-level resolution is often impossible because intra-species variation is as large as inter-species variation within a genus [54][55][56]. All characters showed overlap in intra-and inter-species variation for the three Swietenia species, and, therefore, no single character was sufficient to separate them. Swietenia macrophylla showed relatively higher within-species variation across all characters, which could be related to the wider geographic range it spans and thus the greater likelihood of genetic diversity, or this could be due to the larger number of specimens of this taxon included in this study [14]. Comparing the variance in each of the nine characters across the three species, VEL, TVD, and RHEIGHT showed the largest variance for S. macrophylla (Table 2), which also had the most specimens in this study. Four characters, namely, F/V, RPMM, RWIDTH, and RAI, were nearly invariant between species. As variance is independent of sample size, we conclude that the wider geographic range of S. macrophylla and not the larger number of specimens likely accounts for the larger variations within this species [57,58].
It is not surprising that no single character was sufficient to separate the three species-traditional wood identifcation employs combinations of many characters sequentially in written, diagnostic keys [15,36]. However, for quantitative wood anatomy data, the complexity of the data distributions within and between species when combining characters can confound human ability to visualize important patterns that might be sufficient to discriminate between species [59]. To overcome this, we fed all the data into supervised machine learning classifers to separate these species.

Discrimination between the Three Swietenia Species
According to the confusion matrices generated by the four supervised classifers, S. macrophylla was always correctly classifed with the highest accuracy (85.4%-95.0%), followed by S. mahagoni (60.0%-80.0%), and S. humilis (0-66.7%, Figure 3). Misclassifed specimens of S. humilis and S. mahagoni were typically predicted as S. macrophylla, although never in proportion with the abundance of S. macrophylla in the dataset, indicating that class imbalance in the dataset was not the proximate cause of any inaccuracy. The high wood anatomical variability within S. macrophylla encompasses much of the variability in the other two species, and even machine learning methods did not suffice to provide full forensic certainty [22,60] but did greatly exceed prior reported accuracy [10]. When separating similar species using quantitative wood anatomy data, it is recommended that a sufficiently large number of specimens be studied to ensure that the full range of variation across the species is incorporated [56].
Although all three Swietenia are listed in CITES Appendix II, there remain historical and cultural demands to separate S. mahagoni and S. macrophylla, without reference to S. humilis, which by virtue of its more inland and Pacifc distribution is presumed not to appear in older Western cultural property. In this study, SVM exhibited the highest accuracy of all the supervised classifers with a correct threshold of over 90.0% when separating the two species (Figure 4). Machine learning models have shown considerably better performance than expert wood anatomists when separating S. macrophylla and S. mahagoni [10,11,61]. The results demonstrated in this study provide a pathway to discriminate between similar woods, including CITES species, using quantitative wood anatomy data in combination with machine learning models [36,55].

Evaluation of Machine Learning Methods for Wood Identifcation
Historically, traditional wood identifcation relies on wood anatomists who spend decades to gain their expertise and experience, and such identifcations typically only reach the genus level. The main challenge for traditional wood identifcation around the world is the paucity of trained wood anatomists [15], especially for large-scale challenges like combating illegal logging and associated trade. This study has demonstrated the feasibility of using quantitative wood anatomy data with machine learning models to discriminate between CITES-listed species. To use these models, the only requirement is to collect quantitative wood anatomy data and input them to the machine learning models using free software. The machine learning models then output the classifcation results and show better discrimination ability than wood anatomists.
In previous studies, ANN and NB have been widely reported to identify species using quantitative wood anatomy data coupled with principle components analysis [62,63]. In this study, SVM outperformed ANN and NB in discrimination ability for both the three-species and two-species models. This is consistent with results from other works in which a supervised SVM classifer was used for wood species classifcation with images [64,65] and DNA data [32,42,66,67].

Conclusions
Traditional wood identifcation relying on qualitative wood anatomy is typically accurate only to the genus level. Non-anatomical technologies capable of species-level identifcation are quite expensive and also require comprehensive reference data libraries, and, in some cases, specialized technical expertise. By contrast, preparation and measurement of microscope slides is a familiar task in a wood anatomy laboratory. By analyzing wood anatomy data collected using standard tools, we have presented a highly effective machine-learning-based classifer able to separate the three Swietenia species, as well as discriminate between S. macrophylla and S. mahagoni. This study shows that quantitative traditional wood anatomy data can discriminate between anatomically similar species, shown here with CITES-listed species, and thus provide an easily-implemented technique for wood anatomy laboratories to aid in efforts to eliminate illegal logging.