Patch-TS: A Fast and Accurate PatchMixer-Based Model for Medium- and Long-Term Sap Flow Prediction with Environmental Factors
Abstract
:1. Introduction
- This paper proposes a prediction model for predicting sap flow based on environmental factors in the medium and long term, which can better estimate the water consumption of tree transpiration and thus assess the transpiration of regional vegetation.
- In this paper, we improve PatchMixer and propose a faster linear algorithm, Patch-TS, which uses a novel patch design to partition the data into multiple segments and extracts the information in the time series via depth-separable convolution.
- In this work, the feature screening method, the Pearson correlation coefficient method, is considered. The screened features can better reflect the relationship with the predicted values, enhance the prediction accuracy, and improve the performance of the model.
- This paper includes comparison and analysis of two methods to solve the data drift problem: RevIn and Dish-TS. This effectively mitigates the impact of data drift caused by the inconsistent distribution of data, which improved the accuracy of prediction results.
2. Materials and Methods
2.1. Data Sources and Data Processing
2.2. Methods
- (1)
- Data normalization: The general framework for recent time series forecasting is shown in Figure 3. It consists of three main core components: a reversible normalization layer; a temporal feature extractor, such as an attention layer, an MLP layer, or a convolutional layer; and a linear projection layer for mapping the final forecast.
- Data distribution drift mainly refers to the statistical properties of the time series, such as the mean variance, which changes over time. In the time series prediction task, the training set and the test set are often divided according to time, which naturally introduces the problem of inconsistency between the data distributions of the training set and the test set, which leads to inaccurate time series prediction. RevIn and Dish-TS is a data normalization method that can be easily applied to a variety of time series models and can be divided into two parts, normalization and denormalization, to solve data drift problems [35].
- In this paper, we introduce two normalization methods, RevIn (Reversible Instance Normalization) and Dish-TS, to address the problem of data drift. RevIn is a normalization method proposed by Kim [35], which is specifically used for time series forecasting tasks. The core idea is to remove the mean and variance of the data at the model input stage and restore the original distribution of the data after the model forecast output. In this way, the distributional drift of the time series is reduced, allowing the model to focus on learning the patterns in the data rather than being affected by the overall size of the data. Dish-TS is a recently proposed time series normalization method that is mainly used for long-term time series forecasting [36]. Dish-TS mainly uses multiscale normalization to address features of different temporal granularity and de-trending in order to remove the long-term trend disturbances.
- (2)
- Patch embedding layer: the structure is shown in Figure 4, and this layer can be divided into two parts: patch and embedding.
- The patching method uses the sliding window method, which unfolds each input univariate time series X1D through a sliding window of length P and step size S. The overlap length between neighbouring chunks is P − S, so that the final number of patches N = (L − P)/S + 2 for a one-dimensional time series of length L.
- Since the CNN structure itself has alignment variance, there is no need to use positional embedding in the model. Therefore, our embedding can be represented by Equation (2), where only a single linear layer is used to accomplish the embedding operation. In the formula VE denotes value embedding, N × S denotes the input dimension of the variable, and N × D denotes the output dimension after embedding.
- (3)
- Feature-mixing layer: The structure is shown in Figure 5, borrowed from the mixer layers in the TS-Mixer model, which can be divided into two main parts: time-mixing MLP and feature-mixing MLP. The MLP is applied alternately in the time and feature domains to better utilize the cross-variate information. To make the model more effective in learning the deep architecture, we also add residual connections to it. After repeated tests, we found that the time-mixing MLP does not perform well in predicting sap flow, so we discarded the time-mixing MLP and retained only the feature-mixing MLP.
- (4)
- Depthwise separable convolutional layer: In Figure 6, a specific type of grouped convolution is used in depthwise convolution, where the number of groups is equal to the number of patches, denoted as N. In order to expand the receptive domain, we use a larger kernel size equal to the default patch step S, so K = 8. In this process, each of the N patches in the input feature maps are individually convolved. This operation generates N feature maps, each corresponding to a specific patch. These feature maps are then sequentially concatenated to obtain an output feature map with N channels. Depthwise convolution effectively uses group convolution kernels that are identical for patches sharing the same spatial location. This allows the model to capture potential periodic patterns in the patches.
- Pointwise convolution is shown in Figure 7. Since depthwise convolution operations may not effectively capture feature correlations between patches, temporal interactions between patches are implemented using pointwise convolution after depthwise convolution. In pointwise convolution, the convolution kernel size K = 1, pointwise convolution acts only on the channel dimension without affecting the temporal dimension, and residual connectivity is also used to enhance the gradient mobility of the model, making the training more stable.
2.3. Performance Assessment Indices
3. Results
3.1. Sap Flow Analysis and Data Dimensionality Reduction
3.2. Performance Comparison of Sap Flow Prediction Models
3.3. Analysis of Data Drift
3.4. Ablation Study
3.5. Effect of Feature Selection on Sap Flow Prediction Models
3.6. Performance for Different Prediction Window Lengths
4. Discussion
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Makanda, K.; Nzama, S.; Kanyerere, T. Assessing the Role of Water Resources Protection Practice for Sustainable Water Resources Management: A Review. Water 2022, 14, 3153. [Google Scholar] [CrossRef]
- Dhakal, N.; Salinas-Rodriguez, S.G.; Hamdani, J.; Abushaban, A.; Sawalha, H.; Schippers, J.C.; Kennedy, M.D. Is Desalination a Solution to Freshwater Scarcity in Developing Countries? Membranes 2022, 12, 381. [Google Scholar] [CrossRef] [PubMed]
- McColl, K.A.; Rigden, A.J. Emergent Simplicity of Continental Evapotranspiration. Geophys. Res. Lett. 2020, 47, e2020GL087101. [Google Scholar] [CrossRef]
- Jasechko, S.; Sharp, Z.D.; Gibson, J.J.; Birks, S.J.; Yi, Y.; Fawcett, P.J. Terrestrial Water Fluxes Dominated by Transpiration. Nature 2013, 496, 347–350. [Google Scholar] [CrossRef] [PubMed]
- Liu, Y.; Gui, D.; Chen, X.; Liu, Q.; Zeng, F. Sap Flow Characteristics and Water Demand Prediction of Cash Crop in Hyper-Arid Areas. Agric. Water Manag. 2024, 295, 108767. [Google Scholar] [CrossRef]
- Chang, X.; Zhao, W.; He, Z. Radial Pattern of Sap Flow and Response to Microclimate and Soil Moisture in Qinghai Spruce (Picea crassifolia) in the Upper Heihe River Basin of Arid Northwestern China. Agric. For. Meteorol. 2014, 187, 14–21. [Google Scholar] [CrossRef]
- Chen, X.; Zhao, P.; Hu, Y.; Zhao, X.; Ouyang, L.; Zhu, L.; Ni, G. The Sap Flow-Based Assessment of Atmospheric Trace Gas Uptake by Three Forest Types in Subtropical China on Different Timescales. Environ. Sci. Pollut. Res. 2018, 25, 28431–28444. [Google Scholar] [CrossRef]
- Hayat, M.; Zha, T.; Jia, X.; Iqbal, S.; Qian, D.; Bourque, C.P.-A.; Khan, A.; Tian, Y.; Bai, Y.; Liu, P.; et al. A Multiple-Temporal Scale Analysis of Biophysical Control of Sap Flow in Salix psammophila Growing in a Semiarid Shrubland Ecosystem of Northwest China. Agric. For. Meteorol. 2020, 288–289, 107985. [Google Scholar] [CrossRef]
- De Blécourt, M.; Gröngröft, A.; Thomsen, S.; Eschenbach, A. Temporal Variation and Controlling Factors of Tree Water Consumption in the Thornbush Savanna. J. Arid Environ. 2021, 189, 104500. [Google Scholar] [CrossRef]
- Lin, M.; Guan, D.; Wang, A.; Jin, C.; Wu, J.; Yuan, F.; Lin, M.; Guan, D.; Wang, A.; Jin, C.; et al. Impact of Leaf Retained Water on Tree Transpiration. Can. J. For. Res. 2015, 45, 1351–1357. [Google Scholar] [CrossRef]
- Rita, A.; Cherubini, P.; Leonardi, S.; Todaro, L.; Borghetti, M. Functional Adjustments of Xylem Anatomy to Climatic Variability: Insights from Long-Term Ilex aquifolium Tree-Ring Series. Tree Physiol. 2015, 35, 817–828. [Google Scholar] [CrossRef] [PubMed]
- Amir, A.; Butt, M.; Van Kooten, O. Using Machine Learning Algorithms to Forecast the Sap Flow of Cherry Tomatoes in a Greenhouse. IEEE Access 2021, 9, 154183–154193. [Google Scholar] [CrossRef]
- López-Olivari, R.; Ortega-Farías, S.; Poblete-Echeverría, C. Partitioning of Net Radiation and Evapotranspiration over a Superintensive Drip-Irrigated Olive Orchard. Irrig. Sci. 2016, 34, 17–31. [Google Scholar] [CrossRef]
- Stubblefield, A.P.; Reddy, K. Measurement and Prediction of Water Consumption by Douglas-Fir, Northern California, USA. Ecohydrology 2022, 15, e2388. [Google Scholar] [CrossRef]
- Rahman, M.A.; Hartmann, C.; Moser-Reischl, A.; von Strachwitz, M.F.; Paeth, H.; Pretzsch, H.; Pauleit, S.; Roetzer, T. Tree Cooling Effects and Human Thermal Comfort under Contrasting Species and Sites. Agric. For. Meteorol. 2020, 287, 107947. [Google Scholar] [CrossRef]
- Jiao, L.; Lu, N.; Fu, B.; Gao, G.; Wang, S.; Jin, T.; Zhang, L.; Liu, J.; Zhang, D. Comparison of Transpiration between Different Aged Black Locust (Robinia pseudoacacia) Trees on the Semi-Arid Loess Plateau, China. J. Arid Land 2016, 8, 604–617. [Google Scholar] [CrossRef]
- Wang, H.; Tetzlaff, D.; Soulsby, C. Hysteretic Response of Sap Flow in Scots Pine (Pinus sylvestris) to Meteorological Forcing in a Humid Low-Energy Headwater Catchment. Ecohydrology 2019, 12, e2125. [Google Scholar] [CrossRef]
- Ford, C.R.; Goranson, C.E.; Mitchell, R.J.; Will, R.E.; Teskey, R.O. Diurnal and Seasonal Variability in the Radial Distribution of Sap Flow: Predicting Total Stem Flow in Pinus taeda Trees. Tree Physiol. 2004, 24, 951–960. [Google Scholar] [CrossRef]
- Tu, J.; Wei, X.; Huang, B.; Fan, H.; Jian, M.; Li, W. Improvement of Sap Flow Estimation by Including Phenological Index and Time-Lag Effect in Back-Propagation Neural Network Models. Agric. For. Meteorol. 2019, 276–277, 107608. [Google Scholar] [CrossRef]
- Suárez, J.C.; Casanoves, F.; Bieng, M.A.N.; Melgarejo, L.M.; Di Rienzo, J.A.; Armas, C. Prediction Model for Sap Flow in Cacao Trees under Different Radiation Intensities in the Western Colombian Amazon. Sci. Rep. 2021, 11, 10512. [Google Scholar] [CrossRef]
- Li, Y.; Chen, Q.; He, K.; Wang, Z. The Accuracy Improvement of Sap Flow Prediction in Picea crassifolia Kom. Based on the Back-Propagation Neural Network Model. Hydrol. Process. 2022, 36, e14490. [Google Scholar] [CrossRef]
- Ouyang, Y.; Sun, C. A Copula Approach for Predicting Tree Sap Flow Based on Vapor Pressure Deficit. Forests 2024, 15, 695. [Google Scholar] [CrossRef]
- Nalevanková, P.; Fleischer, P.; Mukarram, M.; Sitková, Z.; Střelcová, K. Comparative Assessment of Sap Flow Modeling Techniques in European Beech Trees: Can Linear Models Compete with Random Forest, Extreme Gradient Boosting, and Neural Networks? Water 2023, 15, 2525. [Google Scholar] [CrossRef]
- Zhao, X.; Zhao, P.; Zhu, L.; Zhang, G. A Comparison of Multivariate and Univariate Time Series Models Applied in Tree Sap Flux Analyses. For. Sci. 2022, 68, 473–486. [Google Scholar] [CrossRef]
- Peng, X.; Hu, X.; Chen, D.; Zhou, Z.; Guo, Y.; Deng, X.; Zhang, X.; Yu, T. Prediction of Grape Sap Flow in a Greenhouse Based on Random Forest and Partial Least Squares Models. Water 2021, 13, 3078. [Google Scholar] [CrossRef]
- Liu, X. Simulation of Artificial Neural Network Model for Trunk Sap Flow of Pyrus pyrifolia and Its Comparison with Multiple-Linear Regression. Agric. Water Manag. 2009, 96, 939–945. [Google Scholar] [CrossRef]
- Li, Z.; Qi, S.; Li, Y.; Xu, Z. Revisiting Long-Term Time Series Forecasting: An Investigation on Linear Mapping. arXiv 2023, arXiv:2305.10721. [Google Scholar]
- Zeng, A.; Chen, M.; Zhang, L.; Xu, Q. Are Transformers Effective for Time Series Forecasting? Proc. AAAI Conf. Artif. Intell. 2022, 37, 11121–11128. [Google Scholar] [CrossRef]
- Li, Y.; Ye, J.; Xu, D.; Zhou, G.; Feng, H. Prediction of Sap Flow with Historical Environmental Factors Based on Deep Learning Technology. Comput. Electron. Agric. 2022, 202, 107400. [Google Scholar] [CrossRef]
- Li, Y.; Guo, L.; Wang, J.; Wang, Y.; Xu, D.; Wen, J. An Improved Sap Flow Prediction Model Based on CNN-GRU-BiLSTM and Factor Analysis of Historical Environmental Variables. Forests 2023, 14, 1310. [Google Scholar] [CrossRef]
- Li, B.; Li, Y.; Feng, H.; Wu, B.; Zhu, Q.; Weng, X.; Ruan, Y. An Improved Model for Sap Flow Prediction Based on Linear Trend Decomposition. In Proceedings of the 19th EAI International Conference, QShine 2023, Shenzhen, China, 8–9 October 2023; pp. 179–196. [Google Scholar]
- Poyatos, R.; Granda, V.; Flo, V.; Adams, M.A.; Adorján, B.; Aguadé, D.; Aidar, M.P.M.; Allen, S.; Alvarado-Barrientos, M.S.; Anderson-Teixeira, K.J.; et al. Global Transpiration Data from Sap Flow Measurements: The SAPFLUXNET Database. Earth Syst. Sci. Data 2021, 13, 2607–2649. [Google Scholar] [CrossRef]
- Macinnis-Ng, C.; Schwendenmann, L.; Clearwater, M.J. Radial variation of sap flow of kauri (Agathis australis) during wet and dry summers. Acta Hortic. 2013, 991, 205–213. [Google Scholar] [CrossRef]
- Gong, Z.; Tang, Y.; Liang, J. PatchMixer: A Patch-Mixing Architecture for Long-Term Time Series Forecasting. arXiv 2024, arXiv:2310.00655. [Google Scholar]
- Kim, T.; Kim, J.; Tae, Y.; Park, C.; Choi, J.-H.; Choo, J. Reversible Instance Normalization for Accurate Time-Series Forecasting against Distribution Shift. In Proceedings of the International Conference on Learning Representations, Vienna, Austria, 4 May 2021. [Google Scholar]
- Fan, W.; Wang, P.; Wang, D.; Wang, D.; Zhou, Y.; Fu, Y. Dish-TS: A General Paradigm for Alleviating Distribution Shift in Time Series Forecasting. Proc. AAAI Conf. Artif. Intell. 2023, 37, 7522–7529. [Google Scholar] [CrossRef]
- Benesty, J.; Chen, J.; Huang, Y.; Cohen, I. Pearson Correlation Coefficient. In Noise Reduction in Speech Processing; Springer Topics in Signal Processing; Springer: Berlin/Heidelberg, Germany, 2009; Volume 2, pp. 1–4. ISBN 978-3-642-00295-3. [Google Scholar]
Parameter | Method or Value |
---|---|
Sequence length | 96 |
Predicted length | 720 |
Factors | 10 |
Learning rate | 0.001 |
Optimization iteration algorithm | Adam |
Loss function | MSE |
Activation function | gelu |
Epochs | 100 |
Models | MSE | MAE | R2 |
---|---|---|---|
Patch-TS | 0.00824 | 0.0497 | 0.921 |
PatchMixer | 0.00961 | 0.0543 | 0.907 |
DLinear | 0.01039 | 0.0649 | 0.900 |
Autoformer | 0.01214 | 0.0699 | 0.883 |
Informer | 0.01483 | 0.0843 | 0.857 |
LSTM | 0.0138 | 0.0761 | 0.755 |
GRU | 0.01646 | 0.0747 | 0.709 |
Models | MSE | MAE | R2 |
---|---|---|---|
Patch- | 0.00910 | 0.0523 | 0.912 |
Patch-TS + RevIn | 0.00909 | 0.0520 | 0.913 |
Patch-TS + Dish-TS | 0.00824 | 0.0497 | 0.921 |
PatchMixer | 0.00961 | 0.0543 | 0.907 |
PatchMixer + RevIn | 0.00922 | 0.0522 | 0.910 |
PatchMixer + Dish-TS | 0.00909 | 0.0496 | 0.912 |
Models | MSE | MAE | R2 |
---|---|---|---|
PatchMixer | 0.00970 | 0.0518 | 0.907 |
Dish-TS (A) | 0.00936 | 0.0531 | 0.910 |
Sequence decomposition (B) | 0.00799 | 0.0486 | 0.917 |
Mixer (C) | 0.00914 | 0.0521 | 0.912 |
A + B + C | 0.00824 | 0.0497 | 0.921 |
Models | MSE | MAE | R2 | |
---|---|---|---|---|
Patch-TS | 7 selected factors | 0.00672 | 0.0430 | 0.929 |
All 10 factors | 0.00824 | 0.0497 | 0.921 | |
PatchMixer | 7 selected factors | 0.00817 | 0.0470 | 0.913 |
All 10 factors | 0.00961 | 0.0543 | 0.907 | |
DLinear | 7 selected factors | 0.00916 | 0.0606 | 0.903 |
All 10 factors | 0.01039 | 0.0649 | 0.900 | |
Autoformer | 7 selected factors | 0.01038 | 0.0651 | 0.890 |
All 10 factors | 0.01214 | 0.0699 | 0.883 | |
Informer | 7 selected factors | 0.01288 | 0.0719 | 0.863 |
All 10 factors | 0.01483 | 0.0843 | 0.857 |
Models | Metrics | 96 | 192 | 336 | 720 |
---|---|---|---|---|---|
Patch-TS | MSE | 0.00513 | 0.00630 | 0.00647 | 0.00824 |
MAE | 0.0357 | 0.0403 | 0.0435 | 0.0497 | |
R2 | 0.951 | 0.940 | 0.938 | 0.921 | |
PatchMixer | MSE | 0.00555 | 0.00712 | 0.00792 | 0.00961 |
MAE | 0.0386 | 0.0438 | 0.0479 | 0.0543 | |
R2 | 0.947 | 0.932 | 0.923 | 0.907 | |
DLinear | MSE | 0.00690 | 0.00820 | 0.00902 | 0.01039 |
MAE | 0.0507 | 0.0555 | 0.0601 | 0.0649 | |
R2 | 0.933 | 0.921 | 0.913 | 0.900 | |
Autoformer | MSE | 0.00801 | 0.00935 | 0.01000 | 0.01214 |
MAE | 0.0549 | 0.0600 | 0.0633 | 0.0699 | |
R2 | 0.923 | 0.910 | 0.903 | 0.883 | |
Informer | MSE | 0.00925 | 0.01127 | 0.01406 | 0.01483 |
MAE | 0.0666 | 0.0723 | 0.0815 | 0.0843 | |
R2 | 0.911 | 0.892 | 0.865 | 0.857 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Li, Y.; Hu, Y.; Wang, W.; Ren, Z.; Weng, X.; Feng, H. Patch-TS: A Fast and Accurate PatchMixer-Based Model for Medium- and Long-Term Sap Flow Prediction with Environmental Factors. Forests 2025, 16, 606. https://doi.org/10.3390/f16040606
Li Y, Hu Y, Wang W, Ren Z, Weng X, Feng H. Patch-TS: A Fast and Accurate PatchMixer-Based Model for Medium- and Long-Term Sap Flow Prediction with Environmental Factors. Forests. 2025; 16(4):606. https://doi.org/10.3390/f16040606
Chicago/Turabian StyleLi, Yane, Yunhao Hu, Weibo Wang, Zhen Ren, Xiang Weng, and Hailin Feng. 2025. "Patch-TS: A Fast and Accurate PatchMixer-Based Model for Medium- and Long-Term Sap Flow Prediction with Environmental Factors" Forests 16, no. 4: 606. https://doi.org/10.3390/f16040606
APA StyleLi, Y., Hu, Y., Wang, W., Ren, Z., Weng, X., & Feng, H. (2025). Patch-TS: A Fast and Accurate PatchMixer-Based Model for Medium- and Long-Term Sap Flow Prediction with Environmental Factors. Forests, 16(4), 606. https://doi.org/10.3390/f16040606