A 1D-SP-Net to Determine Early Drought Stress Status of Tomato ( Solanum lycopersicum ) with Imbalanced Vis/NIR Spectroscopy Data

: Detection of the early stages of stress is crucial in stabilizing crop yields and agricultural production. The aim of this study was to construct a nondestructive and robust method to predict the early physiological drought status of the tomato ( Solanum lycopersicum ); for this purpose, a convolutional neural network (CNN)-based model with a one-dimensional (1D) kernel for ﬁtting the visible and near infrared (Vis/NIR) spectral data was proposed. To prevent degradation and enhance the feature comprehension of the deep neural network architecture, residual and global context modules were embedded in the proposed 1D-CNN model, yielding the 1D spectrogram power net (1D-SP-Net). The 1D-SP-Net outperformed the 1D-CNN, partial least squares discriminant analysis (PLSDA), and random forest (RF) models in model testing, demonstrating an accuracy of 96.3%, precision of 98.0%, Matthew’s correlation coefﬁcient of 0.92, and an F1 score of 0.95. Furthermore, when employing various synthesized imbalanced data sets, the proposed 1D-SP-Net remained robust and consistent, outperforming the other models in terms of the prediction capabilities. These results indicate that the 1D-SP-Net is a promising model resistant to the effects of imbalanced data sets and able to determine the early drought stress status of tomato seedlings in a non-invasive manner. the LI-6800 at ambient air temperature (27.0–31.0 ◦ C), air humidity (RH = 60%), reference CO 2 concentration (400 µ mol/mol − 1 ), and stable light intensity of 1200 µ mol photons m − 2 s − 1 from an internal light emitting diode light source (red:blue ratio = 9:1). The mean values of A , E , and g s recorded from three examinations of fully expanded leaves from each individual seedling were counted as one observation. In total, 378 observations of leaf physiological parameters for individual tomato seedlings were collected. and F1 scores, both in training and in testing results. Our results indicated that the 1D-SP-Net is a promising model that can determine the early drought stress status of tomato seedlings in a noninvasive manner and is more robust and resistant to the effects of imbalanced data sets than PLSDA, RF, and 1D-CNN models.


Introduction
Crop growth and yield are subject to both biotic and abiotic environmental factors. Due to ongoing severe climate change, these factors frequently exceed critical levels and induce various types of plant stress [1]. The major goal of agricultural research is to overcome such adverse impacts and to enhance crop productivity under diverse conditions of stress. Present solutions for the reduction of the adverse effects caused by stress mainly rely on crop breeding and management methods. Breeding crops to exhibit certain stress tolerances or resistance characteristics requires years and also sufficient prior genetic and phenotypic knowledge [2,3]. By contrast, the implementation of proper management before the occurrence of irreversible damage and yield loss is both efficient and effective [4]. However, both solutions require deep understanding of the progression of stress induction, for which methodologies capable of detecting stress responses in the early stages are essential [5,6]. Those methodologies include the determination of specific gene expression by polymerase chain reaction technology, quantification of enzyme activity and of active compounds by zymography, spectrometry, and chromatography analysis, and the direct or indirect measurement of other physiological parameters by various technologies and methods [7][8][9][10][11]. Nevertheless, these methods are relatively invasive, time-consuming, and poorly replicable. The development of nondestructive, rapid, and high-volume remote sensing technique is a promising option for the detection of plant disease and stress [12,13].
Remote sensing technique can provide timely, cost-effective, and reliable information of the instant alteration of plant physiology. Among various type of remote sensing techniques, the visible and near infrared (Vis/NIR) spectroscopy that covers the reflectance radiation regions of electromagnetic spectrum of 400-700 nm and 700-1200 nm are significantly correlated with the physiological status, pigmentation, and cell structure [14][15][16].
To establish a prediction model that links the spectral data to certain characteristics of interest is a goal being pursued in the fields of pharmaceutical, environmental, food science, and agricultural research [17][18][19][20]. In the field of agricultural research, Vis/NIR spectral data have been used extensively to construct predictive models for the determination of plant diseases and abiotic stress [21,22]. The accurate detection of water stress in the early stage for tomato (Solanum lycopersicum), lettuce (Lactuca sativa), and grapevine (Vitis spp.) are possible through the use of Vis/NIR spectroscopy [23][24][25]. Reflectance spectral data of Vis/NIR are used to calculate vegetation indices that are capable of remotely sensing physiological responses of water and salinity stress in rice (Oryza sativa), tomato, and potato (Solanum tuberosum) [20,26,27]. Furthermore, Sanseechan et al. [28] successfully implemented a measurement method by NIR spectroscopy to estimate the solid density of cane stake in a sugarcane breeding program. The ability to provide dynamic spectra over time and space makes the Vis/NIR spectroscopy a potential real-time monitoring tool for plant growth and quality [29,30].
Among abiotic stresses, drought is one of the most stringent and can prompt a transition in physiological status from normal to under stress within days and leads to abnormal growth gradually and eventual wilting [31,32]. In the early stages of drought stress, physiological status transition is commonly revealed as invisible alterations in leaf anatomy, biochemistry composition, and activities in the photosynthesis system II (PSII) that contribute to decline in leaf stomatal conductance and transpiration rate [33]. Those early invisible alterations can be captured by the Vis/NIR spectroscopy and result in variations in the leaf reflectance spectrum [26,27]. However, before informative spectral data can be used for model construction, certain factors must be resolved. Intrinsic high dimensionality and the high correlation between neighboring wavelengths of spectral data can complicate the modeling process and must be addressed prior to initiating such a process [34]. Partial least squares regression (PLSR) and partial least squares discriminant analysis (PLSDA) are techniques capable of reducing high dimensionality and resolving the collinearity commonly applied to connect spectral data with specific plant physiological responses [14,15,20,25,35]. Although partial least squares (PLS)-based models are powerful tools for specifically addressing collinearity, potential model overfitting may occur occasionally because of the inappropriate selection of tunable latent variables (LVs) [36,37].
An alternative to PLS-based statistical methods, machine learning models such as random forests (RFs) and convolutional neural networks (CNNs) are other options for analyzing spectral data [38,39]. RF is a powerful classifier that can integrate numerous single classification and regression trees (CART) and can introduce random procedures for model training. RF retains the classification and regression capabilities of CART, exhibits greater robustness than a single CART, and also reduces the occurrence of overfitting [40]. CNNs are a class of feed-forward neural network with shared and learnable weights architectures [41]. CNNs have been applied extensively in image recognition, natural language processing, and medical diagnosis because of their outstanding capabilities in feature extraction and dimension reduction without the loss of data characteristics [42][43][44]. In addition to two-dimensional (2D) and three-dimensional (3D) structured data, CNNs have already been successfully applied to various one-dimensional (1D) structured data, including bio-signals for biomedical applications and vibration spectroscopy in agricultural research [45,46]. Acquarelli et al. [45] proposed a 1D-CNN to analyze NIR spectral data and demonstrated that the 1D-CNN was less affected by data preprocessing than PLSDA. A proper preprocessing for NIR spectral data is a key step but no formal or standardized rules have been established. These advantages indicate that CNNs are a promising option for qualitative and quantitative analysis of NIR spectroscopy [46].
In real-word classification problems, the inevitable difficulty is the occurrence of imbalanced data sets in which the sample sizes of different classes are distributed unequally, which is especially true for data sets obtained from biological trials [47]. A class-imbalance data set often causes unpredictable reductions in model performance [48]. A common approach to mitigate the effects of class-imbalance data sets on model performance is to reweight the skewed class distribution in the training data set through diverse sampling methods [47,48]. Nevertheless, the synthetic training data set may be entirely distinct from the original data set; thus, even more severely biased data distribution may be introduced [48]. Another remedy relies on the selection of an adequate and robust model that is influenced to a lesser degree by an imbalanced data set [49]. To address factors related to class imbalance, several algorithms that use CNN-based models coupled with costsensitive, output thresholding, and extremely deep neural network strategies have been proposed [50][51][52]. Khan et al. [53] reported that the cost-sensitive CNN outperformed the RF and sampling methods with class-imbalanced data sets. However, gradient exploding or vanishing and degradation problems may arise in the deep architecture of the neural network in CNN-based models, and this may impede the model training process and reduce the performance of the CNN model [54,55]. He et al. [56] proposed a residual learning module to mitigate the negative effect of gradient exploding or vanishing and degradation. Furthermore, a global context (GC) module that combines nonlocal and squeeze-and-excitation learning was demonstrated to enhance feature comprehension and to lower computation expenditure [57]. These modules can be embedded in a CNN model and relieve the adverse effects that arise from the deep architecture of neural networks.
To the best of our knowledge, CNN-based models for the discrimination of normal and stress physiological status in the tomato plant have seldom been researched. The aim of this study was to construct a nondestructive prediction method for determining the physiological drought status in its early stage for the "Rosada" tomato variety. To address the adverse effects on model performance due to imbalanced data structures, a CNN model with a 1D kernel to fit the NIR reflectance spectral data was established. In addition, residual and GC blocks were embedded in the proposed 1D-CNN to prevent degradation and to enhance feature comprehension. The 1D-CNN embedded with residual and GC blocks, the 1D spectrogram power net (1D-SP-Net) was further compared with the 1D-CNN, regular PLSDA, and RF models to evaluate its prediction performance. Moreover, various imbalanced NIR data sets were synthesized from the original data set to validate the capabilities and applicability across models.

Materials and Methods
The workflow of this study is illustrated in Figure 1. Tomato seedlings were cultivated under the condition of drought and regular irrigation treatment, followed by collection of the NIR reflectance spectra. Physiological data were collected the day after treatment (DAT). The spectral data of each measurement were labeled according to corresponding physiological data and used as the input data set to construct the PLSDA, RF, 1D-CNN, and the proposed 1D-SP-Net.

Experimental Materials and Drought Treatment
The tomato variety "Rosada" was grown in a greenhouse at the Taiwan Agricultural Research Institute (TARI; 24°03′ N, 120°69′ E). Natural sunlight was used as the light source, and the temperature and relative humidity inside the greenhouse were maintained at 26.0-36.0 °C and 75-90%, respectively. Eight young seedlings with 6-8 fully expanded leaves were planted in a pot with 6D soil substrate (BVB, De Lier, Netherlands). For each batch of the experiment, tomato seedlings were irrigated daily to achieve the water levels of regular irrigation and received water until it leaked from the bottom of the pot. For the tomato seedlings receiving the drought treatment, no irrigation was applied from the time they were potted. In total, 12 batches of the experiment were conducted.

Collection of Physiological Parameters
For each tomato seedling, three fully expanded leaves from below the top of the seedling were examined with the use of a LI-6800 Portable Photosynthesis System (LI-COR Biosciences, Lincoln, NE, USA) to collect data for key physiological status-related parameters. Measurements were taken by clamping the seedlings' leaves to the quantum sensor of the LI-6800 daily from 09:30 to 12:00. Leaf temperature, assimilation rate (A), transpiration rate (E), stomatal conductance (gs), and temperature were measured with the LI-6800 at ambient air temperature (27.0-31.0 °C), air humidity (RH = 60%), reference CO2 concentration (400 μmol/mol −1 ), and stable light intensity of 1200 μmol photons m −2 s −1 from an internal light emitting diode light source (red:blue ratio = 9:1). The mean values of A, E, and gs recorded from three examinations of fully expanded leaves from each individual seedling were counted as one observation. In total, 378 observations of leaf physiological parameters for individual tomato seedlings were collected.

Experimental Materials and Drought Treatment
The tomato variety "Rosada" was grown in a greenhouse at the Taiwan Agricultural Research Institute (TARI; 24 • 03 N, 120 • 69 E). Natural sunlight was used as the light source, and the temperature and relative humidity inside the greenhouse were maintained at 26.0-36.0 • C and 75-90%, respectively. Eight young seedlings with 6-8 fully expanded leaves were planted in a pot with 6D soil substrate (BVB, De Lier, Netherlands). For each batch of the experiment, tomato seedlings were irrigated daily to achieve the water levels of regular irrigation and received water until it leaked from the bottom of the pot. For the tomato seedlings receiving the drought treatment, no irrigation was applied from the time they were potted. In total, 12 batches of the experiment were conducted.

Collection of Physiological Parameters
For each tomato seedling, three fully expanded leaves from below the top of the seedling were examined with the use of a LI-6800 Portable Photosynthesis System (LI-COR Biosciences, Lincoln, NE, USA) to collect data for key physiological status-related parameters. Measurements were taken by clamping the seedlings' leaves to the quantum sensor of the LI-6800 daily from 09:30 to 12:00. Leaf temperature, assimilation rate (A), transpiration rate (E), stomatal conductance (g s ), and temperature were measured with the LI-6800 at ambient air temperature (27.0-31.0 • C), air humidity (RH = 60%), reference CO 2 concentration (400 µmol/mol −1 ), and stable light intensity of 1200 µmol photons m −2 s −1 from an internal light emitting diode light source (red:blue ratio = 9:1). The mean values of A, E, and g s recorded from three examinations of fully expanded leaves from each individual seedling were counted as one observation. In total, 378 observations of leaf physiological parameters for individual tomato seedlings were collected.

Physiological Status Determination
The early drought physiological stress status was only confirmed, once the A, E, and g s parameters of the tomato seedlings in the drought treatment group were all significantly lower than those in the control group (p < 0.05) before the apparent water deficit-related morphological alterations were observed. The physiological status of the seedlings was then marked as "early drought physiological status" and coded as "1". If one of the parameters A, E, or g s of the tomato seedlings in the drought treatment group was not significantly lower than those in the control group (p ≥ 0.05) before the apparent water deficit-related morphological alterations were observed, then the status of the seedlings was marked as "normal physiological status" and coded as "0". Statistically significant differences were determined by performing Student's t test. In the subsequent analysis, the physiological status of the tomato seedlings was used as the response variable for model construction.

Collection of NIR Spectral Data
Canopy reflectance within the range of 348-1052 nm was measured at 3-nm intervals by using an MS-720 portable spectroradiometer (EKO Instruments, San Jose, CA, USA). Before the reflectance signal was recorded, the spectroradiometer was calibrated to black and white calibration standard boards and placed at a fixed distance (20 cm) from the tops of the tomato seedlings. From 10:00 to 12:00, the canopy reflectance of each tomato seedling was measured three times; subsequently, the measurements were averaged and any abnormal observations outside the range of 0-1 were excluded. The resulting spectral data were processed by standardization through the following equation: where x * ij is the jth observation value of the ith wavelength after standardization, x ij is the jth original observation value of the ith wavelength, x i is the mean of the ith wavelength, and s i is the standard deviation of the ith wavelength.

Estimation of the Extent of Imbalance and Data Set Synthesis
The extent of the imbalance of the raw data was estimated by using the imbalance ratio (IR). The IR was calculated using the number of the major class (data marked as "normal physiological status") divided by the number of the minor class (data marked as "early drought physiological status"). Moreover, to evaluate the effects of different degrees of imbalance on the model performance, we simulated synthetic data sets by randomly sampling major and minor classes from the raw data set by using IR = 1 (balance), 10 and 50. The random sampling was performed using dplyr (version 1.0.7) with R (version 4.1.1) statistical software.

Model Construction
The network architecture of the 1D-CNN model was based on that employed by Acquarelli et al. [45]. As displayed in Figure 2, the 1D-CNN comprised one input layer, one feature map filtered by a 1D kernel and one fully connected layer. The softmax activation function was implemented to map the fully connected layer to a probability distribution for the output layer to conclude the classification results.

One Dimension Spectrogram Power Net (1D-SP-Net)
We proposed a new architecture for a 1D-CNN model, the 1D-SP-Net, for the sequencing of spectrogram power classification. In addition, a new network block, named residual-GC block, was embedded in the 1D-SP-Net. The overall structure of the residual-GC block and 1D-SP-Net model is displayed in Figure 3. The residual-GC block is composed of two modules: a residual learning module and a GC module. The residual learning and GC modules were constructed with reference to ResNet [56] and global context networks [57], respectively. The residual learning module utilizes skip connections to jump over some layers that could avoid the problem of vanishing gradients and to mitigate the degradation problem. The GC module combines the advantages of both non-local networks [58] and squeeze-and-excitation networks [59] that not only exploits the global context modeling capabilities, but also requires less computation. The filter number of all 1D convolutional layers in the residual-GC block was 32. Except for the softmax and sigmoid activation functions, the swish activation function that was proven to achieve higher test accuracy than ReLU was implemented in the 1D-SP-Net as well [60]. To facilitate training processes and to reduce the gradient vanishing and overfitting, the batch normalization and dropout layers were included in the architecture. The dropout in the 1D-SP-Net was set at 0.5 according to Srivastava et al. [61], which indicated that 0.5 of dropout was close to optimal for an extensive range of networks. In addition to the residual-GC block, a channel-based attention technology that multiplies the global-max 1D-pooling layer by the global-average 1D-pooling layer was used in the 1D-SP-Net. The code of the proposed 1D-SP-Net is publicly available at https://github.com/tariyktu/1D-SP-Net (last accessed date: 09 February 2022). We proposed a new architecture for a 1D-CNN model, the 1D-SP-Net, for the sequencing of spectrogram power classification. In addition, a new network block, named residual-GC block, was embedded in the 1D-SP-Net. The overall structure of the residual-GC block and 1D-SP-Net model is displayed in Figure 3. The residual-GC block is composed of two modules: a residual learning module and a GC module. The residual learning and GC modules were constructed with reference to ResNet [56] and global context networks [57], respectively. The residual learning module utilizes skip connections to jump over some layers that could avoid the problem of vanishing gradients and to mitigate the degradation problem. The GC module combines the advantages of both non-local networks [58] and squeeze-and-excitation networks [59] that not only exploits the global context modeling capabilities, but also requires less computation. The filter number of all 1D convolutional layers in the residual-GC block was 32. Except for the softmax and sigmoid activation functions, the swish activation function that was proven to achieve higher test accuracy than ReLU was implemented in the 1D-SP-Net as well [60]. To facilitate training processes and to reduce the gradient vanishing and overfitting, the batch normalization and dropout layers were included in the architecture. The dropout in the 1D-SP-Net was set at 0.5 according to Srivastava et al. [61], which indicated that 0.5 of dropout was close to optimal for an extensive range of networks. In addition to the residual-GC block, a channel-based attention technology that multiplies the global-max 1D-pooling layer by the global-average 1D-pooling layer was used in the 1D-SP-Net. The code of the proposed 1D-SP-Net is publicly available at https://github.com/tariyktu/1D-SP-Net (last accessed date: 9 February 2022).  PLS is a multivariate method that involves constructing a linear relationship between a set of response variables x and a set of predictor variables y. Let X (dimension I×J) be a matrix of predictive variables of the training data set, and Y the response matrix, with I rows (samples) and G columns (the class information). Each entry of Y represents the membership of the ith sample to the gth class expressed as a binary code (1 or 0). For a given number of dimensions K, the PLS scores denoted T and dimension I×K represent a set of LVs, which are linear combinations of the original variables in X. The coefficients of the linear combinations are gathered in the matrix of loadings P, as shown in Equations (2) and (3).

=
(2) As in Equation (3), the regression model associated with K dimensions yields a prediction of Y gathered in the matrix and a matrix of estimated regression coefficients B. = For the prediction of new observations, PLSDA returns estimated values ( ) for each ith sample and for each gth class. To assign a class, the probability that a sample belongs to a specific class can be calculated and the classification of samples is performed by selecting the class that has the highest probability [62]. In this study, the PLSDA algorithm was implemented using the mdatools package (version 0.12.0) in R (version 4.1.1) statistical software.

Partial Least Squares Discriminant Analysis (PLSDA)
PLS is a multivariate method that involves constructing a linear relationship between a set of response variables x and a set of predictor variables y. Let X (dimension I × J) be a matrix of predictive variables of the training data set, and Y the response matrix, with I rows (samples) and G columns (the class information). Each entry y ig of Y represents the membership of the ith sample to the gth class expressed as a binary code (1 or 0). For a given number of dimensions K, the PLS scores denoted T and dimension I × K represent a set of LVs, which are linear combinations of the original variables in X. The coefficients of the linear combinations are gathered in the matrix of loadings P, as shown in Equations (2) and (3).
As in Equation (3), the regression model associated with K dimensions yields a prediction of Y gathered in the matrixŶ and a matrix of estimated regression coefficients B.
For the prediction of new observations, PLSDA returns estimated values (y e ig ) for each ith sample and for each gth class. To assign a class, the probability that a sample belongs to a specific class can be calculated and the classification of samples is performed by selecting the class that has the highest probability [62]. In this study, the PLSDA algorithm was implemented using the mdatools package (version 0.12.0) in R (version 4.1.1) statistical software. The RF model in this study employed the bootstrap strategy to generate several different training data sets with the same proposition of the original data for the purpose of creating many individual CARTs as a tree. Each tree contained nodes that included a certain number of predictive variables (spectral bands). The optimal split and number of the predictive variables in each node was determined according to the minimum Gini index. The RF algorithm was executed using the random forest package (version 4.6-14) in R (version 4.1.1); the parameter ntree, the number of trees to grow, and the parameter mtry, the number of different predictors per node, were set to default values.

Model Performance Metrics
Common performance metrics, namely accuracy, precision, Matthew's correlation coefficient (MCC), and F1 scores, which are widely used to evaluate the capability of the models to distinguish between classes, were calculated according to Equations (4)-(7), respectively (Table 1) F1 score = 2TP (2TP + FP + FN) Negative False negative (FN) c True negative (TN) d a True physiological status of the tomato seedling is "1" and the model classifies it as "1"; b True physiological status of the tomato seedling is "0" but the model classifies it as "1"; c True physiological status of the tomato seedling is "1" but the model classifies it as "0"; d True physiological status of the tomato seedling is "0" and the model classifies it as "0".
The NIR spectral data were randomly shuffled and split into 80% and 20% of each class of the original data set or synthetic data set as training and testing data sets, respectively. To tune the training model parameters, 10-fold cross-validation was conducted to optimize the training models. The optimized training models were further evaluated using the testing data set and the listed metrics.

Morphological and Physiological Alteration under Drought Treatment
The morphological alterations after the regular irrigation and drought treatment are illustrated in Figure 4. Compared with the regular irrigation treatment group, most tomato seedlings in the drought treatment group exhibited apparent water deficit-related morphological alterations, including stalled growth, yellowing and senescence of most leaves on 11 DAT through visual inspection, and continued to develop irreversible damage and eventually wilt. Figure 5 indicates that the g s and E of the tomato seedlings in the drought treatment group were significantly lower than those in the regular irrigation treatment group at 8 DAT (p < 0.05). From 10 DAT, the A of the tomato seedlings drought group differed significantly from that of the regular irrigation treatment group (p < 0.05). The development of early invisible and late visible morphological alterations in the water-deficit tomato seedlings under the drought conditions was in accordance with the report by Susič et al. [63] that indicated the water deficit led to an initial reduction in g s and E to prevent the advance of water loss, and lower g s subsequently constrained the photosynthesis and decreased A. Finally, because of the relocation of nutrients from developed leaves to young leaves to survive under the drought stress, visible leaf senescence occurred [9]. After removing the physiological observations with missing or abnormal value of g s , E, and A, a total of 378 physiological observations for individual tomato plants were collected. Among the 378 observations, 246 were labeled as "normal physiological status" and 132 observations were labeled as "early physiological drought status". leaves on 11 DAT through visual inspection, and continued to develop irreversible damage and eventually wilt. Figure 5 indicates that the gs and E of the tomato seedlings in the drought treatment group were significantly lower than those in the regular irrigation treatment group at 8 DAT (p < 0.05). From 10 DAT, the A of the tomato seedlings drought group differed significantly from that of the regular irrigation treatment group (p < 0.05). The development of early invisible and late visible morphological alterations in the waterdeficit tomato seedlings under the drought conditions was in accordance with the report by Susič et al. [63] that indicated the water deficit led to an initial reduction in gs and E to prevent the advance of water loss, and lower gs subsequently constrained the photosynthesis and decreased A. Finally, because of the relocation of nutrients from developed leaves to young leaves to survive under the drought stress, visible leaf senescence occurred [9]. After removing the physiological observations with missing or abnormal value of gs, E, and A, a total of 378 physiological observations for individual tomato plants were collected. Among the 378 observations, 246 were labeled as "normal physiological status" and 132 observations were labeled as "early physiological drought status".  Stomata closure is an early response observed under drought conditions, and g s reduction results in a series of subsequent physiological and biochemical adjustments. The early stages of drought stress are characterized by a notable decline in g s and E [31,33]. However, the order of alteration in g s and E under physiological drought status may vary because of individual differences in the genetic backgrounds among individuals of the same species. Furthermore, depending on crop type, divergent definitions of early drought indicators are employed. Mohd Asaari et al. [6] utilized the shrinkage of plant architecture as an indication of the early stages of drought stress for maize (Zea mays). Moreover, in a study of barley (Hordeum vulgare), leaf senescence was a sign for the detection of early drought response [64]. Deviations in responses have even been observed among close relatives; among legume species under drought conditions, stomatal closure was observed for snap beans (Phaseolus vulgaris), whereas cowpeas (Vigna unguiculata) remained partially open [65]. Additionally, some other biotic stresses can induce the indiscriminate physiological alterations resulting from the drought stress. The alterations in the stomatal conductivity, transpiration, and net photosynthesis induced by the nematode (Meloidogyne ethiopica) infection were reported to be similar to the drought stress in tomatoes [66]. Hence, a more stringent definition is necessary to determine the early stages of the drought stress. In this study, the early stages of the physiological drought status were defined as the values of g s , E, and A simultaneously lower than those of well-watered tomatoes before apparent water deficit-related morphological alterations were visible. Based on the above definition, 246 and 132 observations were labeled as "normal physiological status" and "early physiological drought status", respectively. The NIR spectra that corresponded to "normal physiological status" and "early physiological drought status" for tomato plants are shown as Figure 6. Stomata closure is an early response observed under drought conditions, and gs reduction results in a series of subsequent physiological and biochemical adjustments. The early stages of drought stress are characterized by a notable decline in gs and E [31,33]. However, the order of alteration in gs and E under physiological drought status may vary because of individual differences in the genetic backgrounds among individuals of the same species. Furthermore, depending on crop type, divergent definitions of early drought indicators are employed. Mohd Asaari et al. [6] utilized the shrinkage of plant

Comparison of Model Performance
The prediction performances of the models were evaluated through several metrics, namely accuracy, precision, MCC, and F1 scores (Table 2). Overall, the 1D-SP-Net outperformed the PLSDA, RF, and 1D-CNN models according to the training and testing results. The PLSDA and 1D-CNN models exhibited mutually comparable performance, and the RF model recorded the lowest values for accuracy, precision, MCC, and F1 score, both in the results for training and for testing. Furthermore, the accuracy, precision, MCC, and F1 scores of the PLSDA, RF, and 1D-CNN models were lower in the testing results than in the training results (Figure 7). By contrast, the 1D-SP-Net exhibited relatively stable and even slightly increased values for all the evaluation metrics in the testing results compared with those of the training results.

Comparison of Model Performance
The prediction performances of the models were evaluated through several metrics, namely accuracy, precision, MCC, and F1 scores (Table 2). Overall, the 1D-SP-Net outperformed the PLSDA, RF, and 1D-CNN models according to the training and testing results. The PLSDA and 1D-CNN models exhibited mutually comparable performance, and the RF model recorded the lowest values for accuracy, precision, MCC, and F1 score, both in the results for training and for testing. Furthermore, the accuracy, precision, MCC, and F1 scores of the PLSDA, RF, and 1D-CNN models were lower in the testing results than in the training results (Figure 7). By contrast, the 1D-SP-Net exhibited relatively stable and even slightly increased values for all the evaluation metrics in the testing results compared with those of the training results.  In this study, the most favorable model performance was observed in the proposed 1D-SP-Net model which reached accuracy of 96.3%, precision of 98.0%, MCC of 0.92, and F1 score of 0.95. (Table 2). Residual learning was able to mitigate the training error and the computational complexity as the depth of the neural network increased [56], and the In this study, the most favorable model performance was observed in the proposed 1D-SP-Net model which reached accuracy of 96.3%, precision of 98.0%, MCC of 0.92, and F1 score of 0.95. (Table 2). Residual learning was able to mitigate the training error and the computational complexity as the depth of the neural network increased [56], and the GC module, which employs self-attention learning, enabled the model to discern the key relationships between global and local features [57]. The residual and GC modules were embedded in the proposed 1D-SP-Net, thus contributing to the prediction performance. Our results are consistent with those of Zhao et al. [67], who reported improvements in a CNN model after the embedding of residual blocks and GC modules; that model subsequently achieved an average accuracy above 96% in identifying tomato leaf diseases. Furthermore, compared to training results, the PLSDA, RF, and 1D-CNN models revealed non-negligible reductions ranging from 4.8% to 17.6% to the accuracy, precision, MCC, and F1 scores in testing results (Figure 7). The lower model performance observed in the testing results indicated the occurrence of overfitting. By contrast, the proposed 1D-SP-Net exhibited relatively consistent accuracy (0.3% increment), MCC (1.1%) increment F1 scores (1.1% increment), and slightly increased precision (5.4% increment) in the testing results, indicating that the proposed 1D-SP-Net is more robust to overfitting than the other models ( Figure 7).

Effects of the Extent of Imbalance on Model Performance
The IR of the data set in this study was approximately 2, which represented slight imbalance (Table 3). Therefore, with the aim of evaluating the influence of imbalance on the models, we fixed the sample size and simulated a balanced data set with IR equal to one. Additionally, we subjected the models to more severely imbalanced data sets with IRs equal to 10 and 50 through random sampling from the original data set (IR2). For a classification problem, using suitable metrics that can reflect the real distinguishing capacity of the model is essential. The accuracy paradox indicates that the use of the metric accuracy is impractical because of its poor perception of the imbalance of class distribution [68]. Instead, the MCC has been reported to be a suitable metric for measuring classification performance, especially for models constructed through the use of imbalanced data sets [69]. The metric F1 score has been widely used for binary and multiclass scenarios and is less influenced by factors related to class imbalance [70]. In the present study, to comprehensively evaluate the prediction performance of the PLSDA, RF, 1D-CNN, and 1D-SP-Net models when fitting data sets with various degrees of imbalance, metrics commonly used in machine learning, namely precision, accuracy, MCC, and F1 scores were used to measure model performance (Figure 8).   Figure 8 reveals the training and testing results for all the models using different IR data sets. The proposed 1D-SP-Net exhibited the most consistent and the highest accuracy, precision, MCC, and F1 scores. Notably, accuracy remained relatively unaffected or even increased slightly in the training and testing results as the extent of the imbalance became greater, indicating that the accuracy metric was unable to reflect the effects of class imbalance and represented overoptimistic evaluation results. The values for precision exhibited a similar tendency as those for accuracy in the training results but revealed small decreases as the extent of imbalance got higher in the testing results. The metrics of accuracy and precision were not suitable for evaluating models with class-imbalance problems. The training and testing results for the MCC and F1 scores revealed that the prediction performances for PLSDA and RF had a decreasing tendency as the extent of the imbalance increased. The larger the extent of the imbalance of the data set was, the more substantial was its influence on model performance. Regarding the CNN-based model, as the extent of imbalance in the data set increased, the 1D-CNN displayed comparable MCC and higher F1 scores compared with those of the PLSDA and RF models. The proposed 1D-SP-Net not only revealed more favorable MCC and F1 scores than those of the 1D-CNN but also exhibited consistently higher MCC and F1 scores both in training and testing results. These results indicated that the proposed 1D-SP-Net outperformed other models in overall prediction performance and robustness.

Conclusions
The establishment of a reliable and nondestructive method for determining the occurrence of stress in its early stages is of great significance for agricultural research and for the development of agricultural applications. In the context of machine learning, most research has successfully addressed the class-imbalance problem by employing CNN architecture, yet studies have seldom applied CNNs to the field of agricultural research. In this study, we proposed the 1D-SP-Net embedded with residual blocks and GC blocks to predict the early physiological drought status of tomato seedlings. In the testing results, the 1D-SP-Net exhibited an accuracy of 96.3%, precision of 98.0%, an MCC of 0.92, and an F1 score of 0.95. All these performance values of the 1D-SP-Net exceeded those of the PLSDA, RF, and 1D-CNN models. Furthermore, when fitting data sets with varying degrees of imbalance, the proposed 1D-SP-Net revealed the highest values for MCC and F1 scores, both in training and in testing results. Our results indicated that the 1D-SP-Net is a promising model that can determine the early drought stress status of tomato seedlings in a noninvasive manner and is more robust and resistant to the effects of imbalanced data sets than PLSDA, RF, and 1D-CNN models.