Sea wave height prediction modeling method based on time-frequency multi-branch cooperation
By employing a time-frequency multi-branch collaborative wave height prediction modeling method, which utilizes learnable wavelet decomposition and transvariable KAN layers, the shortcomings of existing wave prediction methods in multi-scale wave characteristic modeling are addressed. This method achieves high-precision prediction under different sea conditions and improves the engineering applicability of the prediction results.
Patent Information
- Application Number
- CN202611674588.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-28
- Publication Date
- 2026-11-24
AI Technical Summary
Existing wave prediction methods have shortcomings in modeling multi-scale wave characteristics, making it difficult to adapt to sudden weather changes, unable to achieve refined modeling of multi-scale wave characteristics, and failing to fully explore the nonlinear causal relationships between multiple variables, resulting in problems such as phase error accumulation and underestimated wave peak amplitude in long-term time domain prediction.
A wave height prediction modeling method based on time-frequency multi-branch collaboration is adopted. Wave data is decomposed by a learnable multi-layer wavelet decomposition module, and nonlinear mixing is performed by combining cross-variable KAN layer and B-spline KAN layer. Three dedicated branches are set for trend, seasonal and frequency domain, and a loss function is constructed to optimize model parameters through sample-level adaptive weighted fusion.
It achieves excellent prediction accuracy under calm, moderate and stormy sea conditions, significantly alleviates the problems of phase drift and wave peak amplitude underestimation in the long time domain, and enhances the engineering practical value of the prediction results.
Smart Images

Figure CN123158147A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of the intersection of marine engineering and artificial intelligence, specifically to a wave height prediction modeling method based on time-frequency multi-branch collaboration. Background Technology
[0002] Accurate prediction of wave height (especially significant wave height) has significant engineering application value in fields such as marine engineering construction, shipping safety assurance, coastal protection and management, offshore wind power operation and maintenance, and wave energy resource assessment. Traditional wave prediction mainly relies on numerical weather prediction and ocean hydrodynamic models based on physical equations. Although these methods have clear physical mechanisms, they suffer from high computational complexity, slow response speed, and poor adaptability to sudden weather changes, making them unsuitable for prediction scenarios with high real-time requirements.
[0003] With the development of ocean buoy observation, satellite remote sensing technology, and high-resolution numerical simulation, multi-dimensional marine environmental time-series data, including wave height, water depth, wind speed components, temperature, and pressure, can be continuously acquired, providing a data foundation for data-driven wave prediction methods. However, existing data-driven methods still have many limitations: wave time series data simultaneously include long-term trend components that evolve slowly with sea conditions, as well as multi-scale high-frequency fluctuation components driven by wind fields, swell propagation, typhoons, etc. Existing methods mostly use fixed-window moving averages or fixed basis function decomposition methods to separate trend and fluctuation components. The decomposition scale cannot be dynamically and adaptively adjusted with sea conditions, and the adaptability to wave processes where the dominant time scale changes significantly with wind conditions and storm events is insufficient, making it difficult to achieve refined modeling of multi-scale fluctuation characteristics.
[0004] Meanwhile, the formation and evolution of ocean waves are the result of nonlinear coupling of multiple environmental variables such as wind speed, air pressure, water depth, wave period, and wave height. Most existing prediction models adopt channel-independent modeling methods or only realize weak linear mixing between variables, failing to fully explore the nonlinear causal relationship between multiple variables. Moreover, conventional backbone networks mostly use fixed-form node-by-node activation functions, which have limited ability to express the complex nonlinear oscillation modes in ocean wave signals. They are difficult to fit both slowly changing trends and violent fluctuation processes under a limited parameter scale, thus restricting further improvement in prediction accuracy.
[0005] Furthermore, most existing models only model from a single time domain or frequency domain perspective, making it difficult to simultaneously consider the coordinated characterization of low-frequency evolution trends, multi-scale high-frequency bands, and frequency domain periodic characteristics. In long prediction time domains, they are prone to phase error accumulation and underestimation of wave peak amplitude. Their ability to track wave peak evolution is particularly insufficient under extreme sea conditions such as typhoons, resulting in a significant decrease in long-term prediction accuracy. At the model training level, existing methods generally employ point-by-point distance loss functions such as mean square error, focusing only on the numerical deviation between predicted and actual values at each time step. They neglect the similarity between the two in waveform structure characteristics such as local variation trends, fluctuation amplitude, and overall level. This leads to a situation where, although the predicted sequences have similar numerical values, the waveform morphology exhibits a systematic deviation from the actual ocean waves, making it difficult to accurately characterize the local structure of wave peaks and troughs under extreme sea conditions and reducing the engineering practical value of the prediction results. Summary of the Invention
[0006] This invention provides a wave height prediction modeling method based on time-frequency multi-branch collaboration to solve the aforementioned technical problems, specifically adopting the following technical solution: A wave height prediction modeling method based on time-frequency multi-branch collaboration includes the following steps: Acquire a multivariate time-series ocean wave dataset and perform preprocessing; The preprocessed dataset is input into the learnable multi-level wavelet decomposition module after being normalized by reversible instances, and decomposed into low-frequency approximate components and multiple high-frequency detail components. The processing steps of the learnable multi-level wavelet decomposition module include: Using the normalized dataset as the initial approximate component, a multi-level recursive decomposition is performed. Each decomposition applies a learnable low-pass filter and an orthogonal mirror high-pass filter to the current approximate component, and downsamples the filtered result by a factor of 2 to obtain the low-frequency approximate component and high-frequency detail component of this layer. The coefficients of the low-pass filter are updated during training through gradient backpropagation, while the high-pass filter is constructed by flipping and alternating the signs of the coefficients of the low-pass filter in this layer. The low-frequency approximation components and high-frequency detail components obtained from each layer decomposition are linearly interpolated along the time dimension to restore the original playback length. The low-frequency approximate component is input into the trend prediction branch, and after nonlinear mixing between variables through a cross-variable KAN layer, it is further processed by block embedding and gated recurrent unit encoding through a B-spline KAN layer to obtain the trend term prediction result, including: A transvariable KAN layer is applied to the low-frequency approximation component along the variable dimension. The transvariable KAN layer maps the input along the variable dimension with learnable univariate basis functions, and the mapping result is superimposed on the input in a residual manner. The superimposed features are divided into multiple overlapping time blocks along the time dimension with a preset block length and block step size; By using the B-spline KAN layer, multiple overlapping time blocks are mapped to the latent space to obtain a block latent vector sequence. The output of the B-spline KAN layer is the sum of the weighted sum of the B-spline basis functions and the sum of the SiLU basis residual paths. The block latent vector sequence is input into the gated recurrent unit for temporal encoding. The last hidden state is then sequentially processed by B-spline KAN projection, layer normalized residual, random deactivation, and linear prediction head mapping to obtain the trend term prediction result. Multiple high-frequency detail components are input into the seasonal prediction branch, and after band-by-band modeling and adaptive weighted fusion according to the energy of each band, the seasonal prediction results are obtained. The normalized full signal is input into the frequency domain prediction branch, and after real-number fast Fourier transform and cross-variable KAN processing, the frequency domain prediction result is obtained. By performing sample-level adaptive weighted fusion of the trend, seasonal, and frequency domain prediction results through a fusion gate, and then performing inverse instance normalization, a preliminary prediction of the wave height is obtained. A loss function is constructed based on the preliminary predicted values and the corresponding actual wave height values, and the model parameters are optimized using the loss function.
[0007] Further, preprocessing includes: Perform time series linear interpolation on each variable in a multivariate ocean wave time series dataset; Based on the statistics of the training set, each variable is standardized to zero mean and unit variance; Based on the direction and magnitude of the original wind speed, the original wind speed is decomposed into mutually orthogonal wind speed vector components. Based on timestamps, variables are aligned to a unified time grid.
[0008] Furthermore, reversible instance normalization includes: Within each review window, calculate the mean and standard deviation for each variable; Based on the mean and standard deviation, zero-mean unit variance transformation is performed on the data of each preprocessed variable in the current review window; After obtaining the initial prediction of wave height, the initial prediction is inversely transformed using the mean and standard deviation of the statistics within the same review window to restore it to its original dimensions.
[0009] Furthermore, multiple high-frequency detail components are input into the seasonal prediction branch, and after band-by-band modeling and adaptive weighted fusion according to the energy of each band, the seasonal prediction results are obtained, including: Channel-independent linear projection is performed on multiple high-frequency detail components to map each high-frequency detail component to the latent space; The mapped high-frequency detail components are modeled for nonlinear characteristics within the frequency band using residual KAN blocks, and then mapped by a linear prediction head to obtain the seasonal prediction results for each frequency band. The average energy of each high-frequency detail component within the current playback window is calculated, and the amplitude weight of each frequency band is obtained by mapping using the Softmax function. Based on amplitude weights, the seasonal prediction results for each frequency band are weighted and summed to obtain the seasonal prediction results.
[0010] Furthermore, the normalized full signal is input into the frequency domain prediction branch, and after real-number fast Fourier transform and transvariable KAN processing, the frequency domain prediction result is obtained, including: Perform a real-valued fast Fourier transform along the time dimension on the normalized full signal to obtain a one-sided complex spectrum; By splicing the real and imaginary parts of a single-sided complex spectrum and projecting it onto the latent space through a linear layer, the frequency domain feature tensor is obtained. A transvariable KAN layer is applied along the variable dimension of the frequency domain feature tensor to model the resonance relationship of each variable in the frequency domain; The frequency domain feature tensor output by the transvariable KAN layer is processed by the residual block of a multilayer perceptron and mapped by a linear prediction head to obtain the frequency domain prediction result.
[0011] Furthermore, by performing sample-level adaptive weighted fusion of the trend term prediction results, seasonal term prediction results, and frequency domain term prediction results through a fusion gate, and then performing inverse instance normalization, a preliminary prediction value of the wave height is obtained, including: The trend prediction results, seasonal prediction results and frequency domain prediction results are flattened and concatenated to obtain a joint feature vector. The joint feature vector is mapped through a multilayer perceptron and then transformed by the Softmax function to obtain the sample-level weights of the three prediction results. The three prediction results are weighted and summed according to the sample-level weights to obtain the fused prediction result. The fusion prediction results are inversely transformed using the mean and standard deviation of the statistics within the same review window to obtain a preliminary prediction of the wave height.
[0012] Furthermore, during the model training phase, a random depth is applied to the outputs of the trend branch, seasonal branch, and frequency domain branch. The outputs of the entire branch are set to zero according to the samples with a preset probability, and the retained branches are scaled accordingly.
[0013] Furthermore, the loss function can be constructed in the following ways: The basic loss is calculated based on the preliminary forecast and the actual wave height. The dominant frequency is extracted by performing a fast Fourier transform on the true value of the wave height, and the block length is adaptively determined based on the dominant frequency. Based on the block length, the preliminary predicted value and the actual wave height value are divided into multiple time blocks respectively; Calculate the correlation loss, variance loss, and mean loss between the preliminary predicted values and the actual wave height values within each time block; In each training iteration, the gradient norms of the three sub-losses with respect to the output layer parameters are calculated respectively. Based on the relative magnitudes of the three gradient norms, the weight coefficients of the three sub-losses are dynamically determined according to the reciprocal principle. The block structure loss is obtained by summing the three sub-losses after dynamic weighting. The basic loss and the block structure loss are weighted and summed, and the physical soft constraints are added to obtain the total loss. The model parameters are then optimized using the total loss.
[0014] Furthermore, the basic loss is constructed using a sea state-adaptive weighted loss method, including: The sea state adaptive weight for each sample is determined based on the amplitude of the true wave height. The sea state adaptive weighted loss is obtained by weighting the squared prediction errors of each prediction point with sea state adaptive weights. The sea state adaptive weighted loss can be used as the base loss, or it can be used as the base loss after being weighted and summed with the mean square error.
[0015] Furthermore, the basic loss is constructed using the amplitude-weighted Huber loss method, including: Calculate the point-by-point loss for each prediction point based on the Huber loss function; The amplitude weight of each prediction point is determined based on the amplitude of the actual wave height. The Huber loss at each prediction point is weighted by amplitude weight to obtain the amplitude-weighted Huber loss, which is then used as the base loss.
[0016] The advantages of this invention lie in its use of learnable multi-level wavelet decomposition instead of fixed moving average decomposition. The decomposition filter is adaptively updated during training, enabling dynamic adjustment of the time-frequency separation scale according to wind conditions and storm events, which better suits the variable time scale of the dominant wave process. Transvariable KANs are introduced into the trend and frequency domain branches to explicitly model the nonlinear causal relationships between multiple marine environmental variables, compensating for the shortcomings of independent channel backbones in utilizing multivariate coupling. Three dedicated branches—trend, seasonal, and frequency domain—are set up and fused with sample-level gating to achieve collaborative modeling of low-frequency trends, multiple high-frequency bands, and frequency domain periodic components, significantly alleviating phase drift and wave peak amplitude underestimation problems in long prediction time domains. Learnable basis functions replace the fixed activation function of the MLP, enhancing the ability to express nonlinear wave oscillation modes. Combined with stochastic depth regularization and block structure loss, this further improves training stability and the structural similarity of the predicted waveform. Therefore, this scheme exhibits excellent prediction accuracy under calm, moderate, and stormy sea states, and performs exceptionally well in extreme sea states and long prediction time domains, combining accuracy advantages with practical engineering value. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the wave height prediction modeling method based on time-frequency multi-branch collaboration of the present invention; Detailed Implementation
[0019] Embodiments of the present invention are described in detail below. Examples of these embodiments are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0020] like Figure 1 The method for predicting ocean wave height based on time-frequency multi-branch collaboration according to this application is shown, and includes the following steps: Step 1: Obtain a multivariate wave time series dataset and perform preprocessing; Step 2: After reversible instance normalization, the preprocessed dataset is input into the learnable multi-level wavelet decomposition module to decompose low-frequency approximate components and multiple high-frequency detail components. Step 3: Input the low-frequency approximate component into the trend prediction branch, perform nonlinear mixing between variables through the cross-variable KAN layer, and then perform block embedding and gated cyclic unit encoding through the B-spline KAN layer to obtain the trend prediction result. Step 4: Input multiple high-frequency detail components into the seasonal prediction branch, perform band-by-band modeling and adaptive weighted fusion according to the energy of each band to obtain the seasonal prediction result; Step 5: Input the normalized full signal into the frequency domain prediction branch, and obtain the frequency domain prediction result by real number fast Fourier transform and cross-variable KAN processing. Step 6: Perform sample-level adaptive weighted fusion of the trend term prediction results, seasonal term prediction results and frequency domain term prediction results through a fusion gate, and then perform inverse instance normalization to obtain the preliminary prediction value of the wave height. Step 7: Construct a loss function based on the preliminary predicted values and the corresponding actual wave height values, and use the loss function to optimize the model parameters.
[0021] This invention provides a wave height prediction modeling method based on time-frequency multi-branch collaboration. The overall approach uses multivariate ocean time-series data as input and learnable time-frequency decomposition and multi-branch collaborative modeling as its core architecture. It addresses technical problems in existing wave prediction methods, such as insufficient adaptability of fixed time-frequency decomposition to varying sea states, inadequate utilization of multivariate nonlinear coupling relationships, easy phase drift and amplitude underestimation in long prediction time domains, and difficulty in characterizing waveform structure features through point-by-point loss. The method achieves sea state-adaptive time-frequency scale separation through learnable wavelet filters, enhances the fitting ability of multivariate causal coupling and nonlinear wave oscillations through intervariate KAN and B-spline KAN, achieves complementary modeling of multi-scale wave dynamics through three dedicated branches (trend, seasonal, and frequency domain), and simultaneously improves the numerical accuracy and waveform structure similarity of the prediction by combining block structure loss and physical soft constraints. The steps described above are detailed below.
[0022] The steps in step 1 above, including obtaining and preprocessing the multivariate wave time series dataset, include: performing time series linear interpolation on each variable in the multivariate wave time series dataset; standardizing each variable to zero mean and unit variance based on training set statistics; decomposing the original wind speed into mutually orthogonal wind speed vector components according to the wind direction and magnitude; and aligning each variable to a unified time grid based on timestamps.
[0023] Specifically, the time-series dataset is composed of multivariate wave time-series data collected from ocean observation stations, buoys, and numerical simulations. This data includes ocean environmental variables such as wave height, water depth, wind speed, temperature, and pressure, collectively forming a complete description of the ocean environment and providing an information foundation for subsequent prediction models. Let the input data be X, with dimensions T×M, where T is the total number of time steps and M is the number of variables. Due to factors such as observation equipment malfunctions and differences in sampling frequency, the raw data generally suffers from missing values, inconsistent dimensions, and time-series misalignments. Therefore, four preprocessing operations need to be performed sequentially: missing value imputation, data standardization, wind speed vector decomposition, and time series alignment. This provides clean, well-organized, and physically meaningful input data for subsequent multi-branch predictions.
[0024] The missing value imputation preprocessing operation described above is as follows: Missing value imputation is performed independently on the time series of each variable. A linear time series interpolation method is used. For the nth variable, if the observation at time point t is missing, the observation X corresponding to the two nearest non-missing time points t1 and t2 is taken. t1,n With X t2,n The fill value X at time point t is calculated according to the linear variation law. t,n : , This linear interpolation can fill in data gaps while preserving the overall trend of the sequence. It has low computational complexity and does not introduce false high-frequency oscillation components, thus avoiding boundary distortion caused by data breaks during subsequent wavelet decomposition and ensuring the physical continuity of the time series.
[0025] The above data standardization preprocessing operation specifically involves: after imputing missing values, performing zero-mean, unit-variance standardization on the entire dataset based on the mean and standard deviation of each variable calculated from the training set samples. The training set is obtained by partitioning the multivariate wave time-series dataset chronologically to ensure that subsequent model evaluation is not influenced by future information. For the nth variable, the transformation formula is: , Among them, X ′ t,n m represents the standardized value of the nth variable at time point t. n Let S be the mean of the nth variable on the training set. n Let be the standard deviation of the nth variable on the training set. This transformation maps variables with different physical dimensions to similar numerical ranges, eliminating the bias effect of magnitude differences on model weight updates. This allows subsequent cross-variable KAN layers to learn the nonlinear coupling relationship between various environmental variables and wave height in a balanced manner. At the same time, the statistics are calculated only based on the training set, avoiding future information leakage, conforming to the modeling specifications for time series prediction tasks, and ensuring the objectivity of the model's generalization ability evaluation.
[0026] The aforementioned wind speed vector decomposition preprocessing operation specifically involves: for the wind field driving elements, decomposing the original scalar wind speed into orthogonal vector components based on wind direction information. Let the original wind speed magnitude be v and the wind direction angle be θ, the decomposition yields the eastward wind speed component u and the northward wind speed component w: , Vector-based wind field representation can explicitly reflect the differentiated driving effect of wind direction changes on wave generation and propagation. Especially in scenarios with rapid wind direction changes such as typhoon passage and seasonal wind transitions, it can completely convey the directional evolution information of the wind field, enabling the model to more accurately capture the nonlinear laws of wind-wave coupling and make up for the limitations of the single scalar wind speed in utilizing directional features.
[0027] Finally, the time series alignment preprocessing operation is as follows: All variables are uniformly aligned to a time grid based on their timestamps. Linear resampling synchronizes variables with different sampling frequencies to a regular grid with the same time resolution, ensuring a strict one-to-one correspondence between the multivariate observations at each time step. The aligned multivariate data forms a dimensionally regular time series tensor, providing a unified time reference for subsequent reversible instance normalization, learnable wavelet decomposition, and cross-variable hybrid computation, avoiding learning biases in the coupling relationships between variables caused by time series misalignment.
[0028] This preprocessing step standardizes the raw data from four dimensions: data integrity, dimensional consistency, physical characteristics, and temporal alignment. This not only adapts to multi-source heterogeneous ocean observation data and expands the applicability of the model in different observation scenarios, but also provides basic data support for the subsequent time-frequency separation accuracy of learnable wavelet decomposition and the modeling quality of cross-variable KAN coupling relationships. From the input side, this ensures the reliability and physical rationality of the model's prediction results.
[0029] In step 2 above, the preprocessed dataset is input into the learnable multi-level wavelet decomposition module after reversible instance normalization, decomposing it into low-frequency approximate components and multiple high-frequency detail components. The reversible instance normalization includes: calculating the mean and standard deviation of each variable in each review window; performing zero-mean unit variance transformation on the data of each preprocessed variable in the current review window based on the mean and standard deviation; after obtaining the preliminary predicted value of the wave height, performing an inverse transformation on the preliminary predicted value using the mean and standard deviation calculated in the same review window to restore it to its original dimensions.
[0030] Furthermore, the processing of the learnable multi-level wavelet decomposition module includes: using the normalized dataset as the initial approximate component, performing multi-level recursive decomposition, wherein each decomposition applies a learnable low-pass filter and an orthogonal mirror high-pass filter to the current approximate component, and downsamples the filtered result by a factor of 2 to obtain the low-frequency approximate component and high-frequency detail component of this layer; the coefficients of the low-pass filter are updated through gradient backpropagation during training, and the high-pass filter is constructed by flipping and alternating the signs of the coefficients of the low-pass filter of this layer; the low-frequency approximate component and high-frequency detail component obtained from each decomposition are linearly interpolated along the time dimension to restore the original lookback length.
[0031] Specifically, the preprocessed dataset first enters the reversible instance normalization stage. This stage uses a single lookback window as the basic statistical unit, adapting to the non-stationary nature of wave time series data and the significant differences in data distribution under different sea states, completing the closed-loop processing of forward normalization and the corresponding inverse transformation. In the forward calculation stage, the mean and standard deviation of each variable within each lookback window are independently calculated, and a zero-mean unit variance transformation is performed point by point. The normalization calculation formula for the c-th variable within the current lookback window is: , in, Let X be the value of the c-th variable at time t after normalization. t,c μ is the original input value of the c-th variable at time t in the current playback window. c Let σ be the mean of the c-th variable within the current window. c Let be the standard deviation of the c-th variable within the current window, and ε be a small constant to prevent division by zero. Compared to global standardization based on statistics of the entire training set, instance normalization of the look-back window can dynamically match the data distribution characteristics of sea states at different time periods, effectively alleviating the distribution drift problem caused by non-stationary wave sequences. This allows subsequent learnable multi-layer wavelet decomposition modules and branch modeling to be executed within the distributionally stable normalization domain, improving the model's generalization and adaptation capabilities among calm, moderate, and stormy sea states.
[0032] After the model outputs the initial predicted wave height, the mean and standard deviation obtained within the same review window are reused to perform an inverse transformation, mapping the prediction results in the normalized domain back to the original dimensions: , in, Let c be the predicted value of the c-th variable at time t after inverse transformation to its original dimensions. This represents the preliminary predicted value of the c-th variable at time t within the normalization domain. The forward and inverse transformations share the same set of lookback window statistics, which strictly ensures the consistency of dimensional restoration, avoids systematic biases introduced by normalization operations, and allows the physical soft constraint terms in the subsequent loss function to be calculated under true physical dimensions, ensuring the physical validity of the constraints.
[0033] After reversible instance normalization, the normalized dataset is input into a learnable multi-level wavelet decomposition module and used as the initial approximate component to initiate multi-level recursive decomposition, separating the low-frequency trend components and high-frequency fluctuation components in different frequency bands of the signal layer by layer. During the layer decomposition process, for the first The approximate components of each layer undergo one-dimensional convolution along the time dimension, and are then sequentially passed through a learnable low-pass filter and an orthogonal mirror high-pass filter to extract their corresponding frequency band components. The filtered results are then downsampled by a factor of 2 to obtain the first... Low-frequency approximate components of the layer With high-frequency detail components The calculation process can be expressed as follows: , in, For the first The low-frequency approximate components of the layer, ↓2 represents downsampling by a factor of 2. Let K be a learnable low-pass filter. L is a high-pass filter constructed from low-pass coefficients using the quadrature mirror filter (QMF) relation. W The total number of learnable multi-layer wavelet decomposition layers is represented by '*', where '*' represents the convolution operation along the time dimension. During the decomposition process, each variable independently undergoes convolution and downsampling operations, ensuring that the variable dimensions remain independent and ordered during the decomposition process, thus reserving a clear feature dimension structure for subsequent cross-variable KAN layer hybrid operations.
[0034] The coefficients of the learnable low-pass filter are trainable parameters, initialized using a Haar-like averaging kernel and updated during training via gradient backpropagation, allowing the decomposed frequency band boundaries to adaptively adjust to the spectral characteristics of the training data. The orthogonal mirror high-pass filter does not require separate trainable parameters; it is constructed by sequentially flipping and alternating the signs of the coefficients of the low-pass filter in this layer. For a low-pass filter coefficient of length K... k=0,1,...,K-1, high-pass filter coefficients satisfy: , This orthogonal mirror construction method ensures that the low-pass and high-pass channels are approximately orthogonal, enabling the decomposition process to have reversible reconstruction capabilities. At the same time, it significantly reduces the size of trainable parameters, improving the decomposition's adaptive capability while taking into account the model's training efficiency and numerical stability, and avoiding the risk of overfitting due to parameter redundancy.
[0035] Because downsampling by a factor of 2 at each level halves the time dimension length layer by layer, the time lengths of components at different levels are inconsistent after multi-level recursive decomposition, making it impossible to directly input them into downstream branches for parallel processing. Therefore, the low-frequency approximate components and high-frequency detail components obtained from each level of decomposition are linearly interpolated along the time dimension to unify the time length of all components and restore them to the original lookback length. The multi-scale components with unified lengths can be directly input into the corresponding trend prediction branch and seasonal prediction branch, providing dimensionally consistent input features for subsequent frequency band fine-grained modeling.
[0036] The combined processing of reversible instance normalization and learnable multi-level wavelet decomposition, on the one hand, eliminates the distribution differences caused by sea state changes through adaptive normalization of the look-back window, providing a stable input signal for wavelet decomposition and improving the reliability of time-frequency separation; on the other hand, it breaks through the scale limitations of traditional fixed wavelet basis and moving average decomposition, enabling the time-frequency separation scale to be adaptively optimized with the dominant period of the wave data, which is more in line with the characteristics of the dominant time scale of the wave process dynamically changing with wind conditions and storm events, providing a precise multi-scale feature foundation for the subsequent differentiated modeling and feature fusion of the three branches of trend, season, and frequency domain.
[0037] In step 3 above, the low-frequency approximation component is input into the trend prediction branch, and after nonlinear mixing between variables by the intervariable KAN layer, it is further processed by block embedding of the B-spline KAN layer and encoding by the gated recurrent unit to obtain the trend prediction result. This includes: applying the intervariable KAN layer along the variable dimension to the low-frequency approximation component; the intervariable KAN layer maps the input along the variable dimension with learnable univariate basis functions, and superimposing the mapping result with the input in a residual manner; dividing the superimposed feature along the time dimension into multiple overlapping time blocks with a preset block length and block step size; mapping the multiple overlapping time blocks to the latent space through the B-spline KAN layer to obtain the block latent vector sequence, wherein the output of the B-spline KAN layer is the sum of the weighted sum of the B-spline basis functions and the sum of the SiLU basis residual paths; inputting the block latent vector sequence into the gated recurrent unit for temporal encoding, taking the last hidden state and sequentially passing it through B-spline KAN projection, layer normalized residual, random deactivation and linear prediction head mapping to obtain the trend prediction result.
[0038] Specifically, the trend prediction branch takes the low-frequency approximate component obtained by wavelet decomposition as input, models the long-term slow-varying characteristics of the wave signal, and fully extracts the wave height evolution law driven by multiple marine environmental variables. The overall processing flow proceeds sequentially from cross-variable nonlinear mixing, time segmentation, segment embedding, time-series coding, projection and prediction output.
[0039] First, a transvariable KAN layer is applied along the variable dimension to the low-frequency approximation component, explicitly modeling the nonlinear coupling relationship between various environmental variables such as wind speed, air pressure, water depth, and wave period and wave height. This allows each environmental variable to provide nonlinear causal signals for wave height prediction. Simultaneously, a residual method is used to superimpose the mapping results with the original input, improving feature representation while ensuring the stability of the training process. The calculation expression for this step is: , Among them, Z trend The output features after residual fusion For the deepest low-frequency approximation component of the input, KAN C→C For a cross-variable KAN layer acting along the variable dimension, a nonlinear mapping along the variable dimension is achieved using learnable univariate basis functions. c This is a layer normalization operation along the variable dimension, used to unify the feature distribution scale of each variable, eliminate modeling bias caused by differences in units, and improve training convergence speed and stability. The structure of residual connections ensures smooth gradient propagation in the network, avoiding the gradient vanishing problem during deep feature mapping.
[0040] After completing the cross-variable feature fusion, the superimposed features are segmented along the time dimension, generating multiple overlapping time blocks with a preset block length P and block step size S, compressing the long time series sequence into an ordered sequence of block tokens. This processing method can preserve the local waveform morphology details within a single block, compress the sequence length, reduce the computational overhead of subsequent time series coding, and avoid the information dilution problem caused by directly modeling long sequences. The i-th time block P i The range of values for can be expressed as: , Where L is the duration of the original playback window. To round down. In this embodiment, the preferred block length is 12 and the block step size is 6, forming a block sequence with an overlap ratio of 50%, which achieves a balance between preserving temporal continuity and controlling computational load.
[0041] Subsequently, a B-spline KAN layer is used to perform feature mapping on each overlapping time block, transforming the features of each block into a d-dimensional latent space to obtain a block latent vector sequence, thus enabling the block-level features to also possess fine-grained nonlinear expressive capabilities. For the i-th block Pi The mapping result is: , Among them, z i Let R be the block latent vector obtained by B-spline KAN mapping of the i-th block. d Let be a d-dimensional real latent space.
[0042] The output of the B-spline KAN layer consists of two parts: the weighted sum of the B-spline basis functions and the sum of the SiLU basis residual paths. For a scalar input u, the output φ(u) of a single edge is calculated as follows: , Where G is the grid size, s is the spline order, b is the index variable of the B-spline basis function, and c b The learnable weight coefficients corresponding to the B-spline basis functions can be updated via gradient backpropagation and are used to fit complex nonlinear mapping relationships. b (u) represents the B-spline basis function defined on a fixed grid, and w represents the learnable weights of the SiLU basis residual path. The SiLU residual path ensures gradient propagation stability in the early stages of training and provides a basic linear component for nonlinear mapping, achieving accurate nonlinear fitting in conjunction with the B-spline basis function. Compared to the fixed activation function used in traditional fully connected layers, this learnable nonlinear structure better suits the nonlinear oscillation characteristics of ocean wave signals, achieving stronger feature representation capabilities with fewer parameters.
[0043] After obtaining the block-specific latent vector sequence, it is input into a gated recurrent unit for temporal encoding to capture the temporal dependencies between blocks and aggregate the temporal evolution information of the entire lookback window. This embodiment adopts a two-layer stacked gated recurrent unit structure to enhance the modeling capability of higher-order temporal dependencies. The gated recurrent unit completes iterative updates through three core components: a reset gate, an update gate, and candidate hidden states.
[0044] First, calculate the reset gate output r. i : , Among them, h i-1 W is the hidden state of the previous time step. r σ(*) is the learnable weight matrix of the reset gate, and σ(*) is the Sigmoid activation function, which can compress the output value to the (0,1) interval. The reset gate is used to control the degree of ignoring historical information. The smaller its value, the more historical information is forgotten, thereby adjusting the generation process of candidate hidden states.
[0045] Based on the calculation of the reset gate output, calculate the update gate output u. i : , Among them, W u The learnable weight matrix of the update gate is used to control the retention ratio of historical states. The larger the value, the more historical information is retained in the current time, thus achieving a smooth transition between the old state and the new information.
[0046] Then, the candidate hidden states are calculated by combining the results of the reset gate with the current input. Candidate hidden states are used to represent new candidate information at the current time, i.e. , Among them, W h Let be the learnable weight matrix for the candidate states, tanh(*) be the hyperbolic tangent activation function that restricts the values of the candidate states to the interval (-1, 1), and ⊙ denotes element-wise multiplication. The final hidden state h at the current time step... i It is obtained by weighted fusion of historical hidden states and candidate hidden states according to the update gate weights, that is... , A larger update gate value results in a higher proportion of new candidate information, while a smaller value results in a higher proportion of historical information. Unlike methods that directly convolve the entire long sequence and only extract the last hidden state, this approach first divides the long sequence into block token sequences before inputting them into the gated recurrent unit. This effectively avoids the loss of intermediate information during the transmission of the long sequence, more completely preserving the temporal evolution patterns of the waves within the review window. Finally, the last hidden state at the last moment of the gated recurrent unit is used as the global temporal feature representation of the entire review window.
[0047] After completing the temporal encoding, the last hidden state of the gated recurrent unit output is projected and predicted. This is then sequentially processed through B-spline KAN projection, layer-normalized residual processing, and random deactivation regularization. Finally, it is mapped to the prediction dimension via a linear prediction head to obtain the trend term prediction result. The calculation expression for this process is: , Among them, h n The final hidden state output by the gated recurrent unit is represented by a B-spline KAN projection layer, which performs a nonlinear transformation on the temporal global features to further uncover deeper patterns within the features. Layer normalization, combined with residual connections, further stabilizes the distribution of deep features, mitigating distribution shift issues during training. A random deactivation layer randomly deactivates some neurons with a preset probability to suppress overfitting and improve the model's generalization ability under different sea conditions. The linear prediction head maps the features to the target prediction dimension. The final output trend prediction result has a dimension of H×C, where H is the prediction time domain length and C is the number of output variables.
[0048] The aforementioned trend prediction branch effectively models the nonlinear coupling relationship between multiple marine environmental variables and wave height through residual nonlinear mixing of cross-variable KAN layers, making up for the shortcomings of traditional independent channel modeling in terms of insufficient utilization of variable interaction. Combining block embedding and B-spline KAN feature mapping, it enhances the nonlinear expressive power of block-level features while preserving local waveform morphology. Furthermore, by using gated cyclic unit encoding of block token sequences, it avoids information loss in long sequence transmission, accurately captures the temporal evolution law of wave trends, and finally outputs trend prediction results with higher fitting accuracy and temporal coherence, providing reliable low-frequency trend component support for subsequent multi-branch fusion.
[0049] In step 4 above, multiple high-frequency detail components are input into the seasonal prediction branch. After band-by-band modeling and adaptive weighted fusion based on the energy of each band, the seasonal prediction result is obtained. This includes: performing channel-independent linear projection on each of the multiple high-frequency detail components to map each high-frequency detail component to the latent space; modeling the nonlinear features within the band of each mapped high-frequency detail component using residual KAN blocks, and then mapping it through a linear prediction head to obtain the seasonal prediction result for each band; calculating the average energy of each high-frequency detail component within the current lookback window, and mapping it using the Softmax function to obtain the amplitude weight of each band; and weighting and summing the seasonal prediction results of each band based on the amplitude weight to obtain the seasonal prediction result.
[0050] The seasonal prediction branch in this scheme uses the L-type output of a learnable multi-level wavelet decomposition. W The input consists of several high-frequency detail components, each corresponding to a different frequency scale of high-frequency wave oscillations. These components exhibit significant differences in their fluctuation periods and evolution patterns. Therefore, this step employs a frequency-band-by-band independent modeling combined with energy adaptive fusion to accurately characterize the multi-scale wave wave characteristics. Specifically, for the first... High-frequency detail components First, channel-independent linear projection is used to encode the feature into a latent feature space of uniform dimension. The projection process is performed by dedicated linear transformation weights. Completed, the projection parameters of each frequency band are independent, allowing for dedicated optimization based on the wave characteristics of the corresponding frequency band. This avoids interference between features from different frequency bands, ensuring the independence and specificity of modeling for each band. The features after linear projection are input into the residual KAN block of the corresponding frequency band for nonlinear feature modeling within the band. Specifically, the residual KAN block sequentially performs linear dimensionality increase, KAN nonlinear transformation, residual connection, and layer normalization operations. Linear dimensionality increase expands the feature representation space; the KAN nonlinear transformation fits the nonlinear evolution of wave fluctuations in this frequency band using learnable univariate basis functions; and residual connection and layer normalization stabilize gradient propagation during training, mitigating gradient vanishing and distribution shift problems in deep network training. After extracting deep nonlinear features through the residual KAN block, these features are mapped to the target prediction dimension via a dedicated linear prediction head, yielding the seasonal prediction result for that frequency band. : , Among them, Head l (*) represents the first A linear prediction head for each frequency band, KANBlock(*) is the residual KAN feature extraction module. For the first High-frequency detail components The weights are linear transformations.
[0051] Based on this, energy adaptive fusion is performed, dynamically allocating fusion weights by quantifying the activity level of each frequency band. First, the average energy of each high-frequency detail component within the current lookback window is calculated, serving as a measure of the activity level of that frequency band under the current sea state. Average energy of each high-frequency detail component The calculation method is as follows: , The average energy is obtained by averaging the absolute values of the high-frequency detail components over time. Higher energy values indicate greater wave intensity in that frequency band and a more significant contribution to the overall wave height. The average energy of each frequency band is input into a Softmax function for normalization mapping, resulting in amplitude weights for each band ranging from 0 to 1. The sum of the amplitude weights for all frequency bands is 1. Amplitude weight of each frequency band for: , Among them, e j Let be the average energy value corresponding to the j-th high-frequency detail component. This completes the conversion from frequency band activity to fusion weights. Finally, based on the obtained amplitude weights of each frequency band, the seasonal prediction results corresponding to each frequency band are weighted and summed, integrating the independent prediction results of multiple frequency bands into a unified seasonal prediction result. : , Through this energy-driven adaptive weighting mechanism, when a certain frequency band is energy dominant in the current window, its seasonal prediction results will receive a greater fusion weight, thereby achieving amplitude-adaptive multi-band fusion. This overcomes the limitations of single-band modeling in sea states with rich frequencies, making the final output seasonal prediction results more in line with the actual fluctuation characteristics of the current sea state. It can automatically adapt to the spectral differences under different sea states without the need for manual preset of the weights of each frequency band, effectively improving the prediction accuracy of seasonal components and the scene generalization ability.
[0052] The aforementioned seasonal prediction branch adopts an architecture of independent modeling per frequency band and adaptive energy fusion. It accurately fits the nonlinear wave characteristics of ocean waves in different frequency bands through residual KAN blocks, and then dynamically allocates fusion weights based on the real-time energy ratio of each frequency band. It can adaptively match the spectral differences under different sea conditions, effectively overcome the limitations of single-frequency band modeling in sea conditions with rich frequencies, and significantly improve the prediction accuracy and scene generalization ability of high-frequency wave components.
[0053] In step 5 above, the normalized full signal is input into the frequency domain prediction branch, and after real-number fast Fourier transform and cross-variable KAN processing, the frequency domain prediction result is obtained. This includes: performing real-number fast Fourier transform on the normalized full signal along the time dimension to obtain a one-sided complex spectrum; concatenating the real and imaginary parts of the one-sided complex spectrum and projecting it onto the latent space through a linear layer to obtain a frequency domain feature tensor; applying a cross-variable KAN layer along the variable dimension of the frequency domain feature tensor to model the resonance relationship of each variable in the frequency domain; and processing the frequency domain feature tensor output by the cross-variable KAN layer through a multilayer perceptron residual block and mapping it with a linear prediction head to obtain the frequency domain prediction result.
[0054] Specifically, the frequency domain prediction branch explores the periodic and quasi-periodic patterns of ocean wave signals from a frequency domain perspective, complementing the trend prediction branch and seasonal prediction branch in the time domain dimension. This alleviates the problems of phase error accumulation and wave peak amplitude underestimation in the long prediction time domain, and improves the structural similarity between the predicted waveform and the real waveform.
[0055] First, a real-number fast Fourier transform is performed along the time dimension on the normalized full signal. Since the input wave time series signal is a real-valued sequence, the real-number fast Fourier transform can output only the one-sided complex spectrum of the positive frequency part, reducing computational redundancy while fully preserving the spectral information. The transformed one-sided complex spectrum contains real and imaginary components, which correspond to the cosine and sine phase components of each frequency component, respectively, and together characterize the amplitude and phase characteristics of the signal at different frequencies.
[0056] Next, to adapt to the processing requirements of subsequent real-valued neural networks, the real and imaginary parts of the one-sided complex spectrum are concatenated along the feature dimension to form real-valued frequency domain features. Then, a linear projection layer maps the concatenated features to a latent feature space with uniform dimensions, obtaining a regularized frequency domain feature tensor F. This provides standardized input for subsequent cross-variable frequency domain coupling modeling. This process can be represented as: , in, The input is a normalized full signal. rFFT(*) is a real-valued fast Fourier transform used to calculate the one-sided complex spectrum of the real-valued input signal. Re(*) is to take the real part of the complex spectrum, Im(*) is to take the imaginary part of the complex spectrum, and concat(*) is the feature concatenation function.
[0057] After obtaining the frequency domain feature tensor, a transvariable KAN layer is applied along the variable dimension of the feature to model the resonance relationship of different marine environmental variables in the frequency domain. Since the generation and evolution of ocean waves are driven by multiple variables such as wind field, air pressure, and water depth, there are nonlinear coupling and resonance effects between the frequency domain components of different variables. For example, wind field disturbances at a specific frequency can excite wave energy growth in the corresponding frequency band. The transvariable KAN layer, with learnable univariate basis functions as its core, performs nonlinear mapping of frequency domain features along the variable dimension. This accurately fits the nonlinear coupling patterns of multiple variables in the frequency dimension, uncovers frequency domain resonance patterns between variables, and overcomes the shortcomings of traditional channel-independent modeling in its insufficient utilization of frequency domain correlations between variables.
[0058] After frequency domain cross-variable feature fusion is completed through the cross-variable KAN layer, the output frequency domain feature tensor is then input into the residual block of a multilayer perceptron for higher-order feature extraction. The multilayer perceptron residual block consists of multiple fully connected layers and residual connections, which can further integrate feature information from different frequencies and extract more discriminative higher-order frequency domain patterns. The residual connection structure ensures effective gradient propagation, avoiding the gradient vanishing problem during deep network training and improving training stability. Finally, the processed frequency domain features are input into the linear prediction head, mapped to the target prediction dimension, to obtain the final frequency domain prediction result. : , Wherein, Linear(*) is the linear projection layer, CrossVarKAN(*) is the frequency domain cross-variable KAN layer, and MLP(*) is the multilayer perceptron residual block.
[0059] The aforementioned frequency domain prediction branch supplements the limitations of time domain modeling from a frequency domain perspective. It extracts the periodic features of the signal through real-number fast Fourier transform and combines it with cross-variable KAN to mine the frequency domain resonance relationship of multiple marine environmental variables. This can effectively capture the quasi-periodic oscillation characteristics of ocean waves, alleviate the problems of phase drift and underestimated wave peak amplitude in long prediction time domains, and form a multi-perspective complement with the trend and seasonal branches in the time domain, further improving the structural matching degree between the overall predicted waveform and the real waveform.
[0060] In step 6 above, the trend prediction result, seasonal prediction result, and frequency domain prediction result are fused using a fusion gate at the sample level with adaptive weighted fusion, followed by inverse instance normalization, to obtain a preliminary prediction value for the wave height. This includes: flattening and concatenating the trend prediction result, seasonal prediction result, and frequency domain prediction result to obtain a joint feature vector; mapping the joint feature vector through a multilayer perceptron and then transforming it using the Softmax function to obtain the sample-level weights of the three prediction results; weighting and summing the three prediction results according to the sample-level weights to obtain the fused prediction result; and performing an inverse transformation on the fused prediction result using the mean and standard deviation statistically analyzed within the same review window to obtain a preliminary prediction value for the wave height.
[0061] Specifically, the fusion gate takes the prediction results of the three branches as input, and completes adaptive fusion through three steps: feature concatenation, weight generation, and weighted fusion, and finally outputs the preliminary prediction results under the original scale.
[0062] First, a joint feature vector is generated. The trend, seasonal, and frequency domain prediction results are vectorized and flattened respectively, and then concatenated along the feature dimensions to obtain a joint feature vector q that can completely represent all the prediction information of the current sample. The calculation formula is as follows: , Here, vec(*) represents the vectorization operation that flattens the two-dimensional prediction tensor into a one-dimensional vector.
[0063] Based on this, sample-level branch weights are generated. The joint feature vector q is input into the multilayer perceptron Γ for nonlinear feature transformation to uncover the intrinsic mapping relationship between the predicted features and the optimal fusion weights. Then, the transformation result is normalized by applying a softmax function, resulting in three sample-level branch weights g with values ranging from 0 to 1 and summing to 1. , Since the weights are dynamically calculated from the predicted features of a single sample, samples with different sea conditions will correspond to different combinations of branch weights, eliminating the need to manually preset a fixed branch fusion ratio and achieving adaptive weighted fusion for each sample.
[0064] Subsequently, based on the generated sample-level branch weights, the three prediction results are summed element-wise to merge the outputs of the three branches into a unified prediction result. The calculation formula is: , Where g1, g2, and g3 are the weight coefficients of the trend term, seasonal term, and frequency domain term in the weight vector g, respectively. When the input is calm sea conditions, the waves mainly exhibit low-frequency trend changes, and the trend term prediction results will automatically receive higher weights. When the input is extreme sea conditions such as storms, the high-frequency fluctuations and periodic oscillations of the waves are significantly enhanced, and the weights of the seasonal and frequency domain term prediction results will be increased accordingly.
[0065] During the model training phase, a random depth is applied to the outputs of the trend branch, seasonal branch, and frequency domain branch. This involves setting the output of the entire branch to zero based on a preset probability and scaling the retained branches accordingly. Specifically, the output of the entire branch is set to zero based on a probability p, and the output of the branch retained with probability 1-p is numerically scaled by 1 / (1-p). In this embodiment, p=0.1. This strategy, by randomly deactivating the entire branch during training, forces each branch to have independent predictive capabilities, avoiding excessive co-adaptation between branches, effectively suppressing model overfitting, and improving the model's generalization performance under different sea conditions.
[0066] After the fusion calculation is completed, the mean and standard deviation obtained from the forward reversible instance normalization stage within the same review window are reused to perform an inverse instance normalization transformation on the fusion prediction results. This maps the predicted values in the normalization domain back to the original physical dimensions, ultimately yielding a preliminary prediction of the wave height. The use of the same set of window statistics for both forward and inverse transformations strictly ensures the accuracy and consistency of dimensional restoration, avoiding systematic biases introduced by the normalization operation.
[0067] This invention achieves sample-level adaptive weighted fusion through a fusion gate, which can dynamically allocate the contribution ratio of trend, season and frequency domain branches according to the spectral characteristics of wave signals under different sea conditions. It fully leverages the complementary advantages of multi-view modeling and is more suitable for diverse scenarios such as calm sea conditions and stormy sea conditions compared to fixed-weight fusion. During the training phase, a random depth regularization strategy is introduced to force each branch to have independent prediction capabilities, effectively suppressing collaborative overfitting between branches and improving the model's generalization performance. Combined with the consistent design of positive and inverse statistics of reversible instance normalization, the physical dimensions of the prediction results can be accurately restored, ensuring the effectiveness of subsequent physical constraint calculations. Finally, it outputs high-precision and physically consistent preliminary prediction results of wave height.
[0068] In step 7 above, a loss function is constructed based on the preliminary predicted values and the corresponding actual wave height values, and the model parameters are optimized using the loss function. The construction of the loss function includes: calculating the basic loss based on the preliminary predicted values and the actual wave height values; performing a Fast Fourier Transform on the actual wave height values to extract the dominant frequency, and adaptively determining the block length based on the dominant frequency; dividing the preliminary predicted values and the actual wave height values into multiple time blocks according to the block length; calculating the correlation loss, variance loss, and mean loss between the preliminary predicted values and the actual wave height values within each time block; calculating the gradient norm of the three sub-losses with respect to the output layer parameters in each training iteration, and dynamically determining the weight coefficients of the three sub-losses according to the reciprocal principle based on the relative magnitude of the three gradient norms; summing the dynamically weighted three sub-losses to obtain the block structure loss; weighting and summing the basic loss and the block structure loss, and superimposing the physical soft constraints to obtain the total loss, and optimizing the model parameters using the total loss.
[0069] Furthermore, the base loss is constructed using a sea state-adaptive weighted loss method, including: determining the sea state-adaptive weight for each sample based on the amplitude of the true wave height; weighting the squared prediction errors of each prediction point with the sea state-adaptive weight to obtain the sea state-adaptive weighted loss; and using the sea state-adaptive weighted loss as the base loss, or weighting it together with the mean squared error as the base loss. The base loss is constructed using an amplitude-weighted Huber loss method, including: calculating the point-by-point loss for each prediction point based on the Huber loss function; determining the amplitude weight for each prediction point based on the amplitude of the true wave height; weighting the Huber loss of each prediction point with the amplitude weight to obtain the amplitude-weighted Huber loss, and using the amplitude-weighted Huber loss as the base loss.
[0070] Specifically, a loss function is constructed based on the preliminary predicted values and the corresponding actual wave height values, and the model parameters are iteratively optimized through backpropagation using this loss function. The overall loss function consists of a weighted combination of three parts: the base loss, the block structure loss PSLoss, and the physical soft constraint loss. Building upon the point-by-point numerical fitting accuracy, the model further imposes constraints on the prediction results from the dimensions of local waveform structure consistency and physical rationality, thereby comprehensively improving the prediction quality of the model in various scenarios such as calm sea states, moderate sea states, and stormy sea states.
[0071] The base loss measures the fitting error between predicted and actual values at a point-by-point scale. One of three options can be used: mean squared error (MSE), sea state adaptive weighted loss, or amplitude-weighted Huber loss. The latter two assign higher weights to wave samples with larger amplitudes, guiding the model to strengthen its fitting ability for extreme scenarios such as stormy sea states. The mean squared error is the most basic point-by-point mean of the squared errors, calculated as the squared mean of the prediction errors for all samples. It has a simple form and stable gradient optimization, making it suitable for regular fitting in stable sea states.
[0072] The core of the adaptive weighted loss method for sea state is to dynamically determine the loss weight of each sample based on the actual wave height amplitude, with high-amplitude extreme samples corresponding to a higher weight ratio. First, the amplitude reference value y is determined. max The calculation formula is: , Among them, y i Let |y| be the actual wave height value at the i-th predicted location. i | represents the absolute value of the true wave height at the i-th predicted location. Based on this, the adaptive sea state weight w for each sample is calculated. i sea : , Where, α s ≥0 is used to control the weighting magnitude of high-wave samples, β s The value >0 controls the non-linearity of the weight's increase with wave amplitude. This formula uses 1 as the baseline weight; the larger the wave amplitude, the higher the weight of the corresponding sample. When the actual amplitude reaches the reference maximum amplitude, the weight reaches 1 + α. s In this embodiment, α is preferred. s =2.0, β s =2.0, at this point the maximum weight is 3; α s and β s It can also be flexibly adjusted based on validation set error, the proportion of extreme sea state samples, and wave height distribution in the target sea area. The final sea state adaptive weighted loss L... sea The weighted mean square error is calculated using the following formula: , Where N is the total number of sample points, Let L be the predicted wave height at position i. The adaptive weighted loss for sea state has two uses: it can be used directly as the base loss, or it can be used as the base loss after being weighted and summed with the base mean square error. When using the weighted summation form, the base loss L... base It can be expressed as a weighted sum of the basic mean square error and the weighted loss, i.e., L base =L MSE +λ ad ·L sea , where λ ad The weighting coefficient for the sea state adaptive term is preferably 0.5.
[0073] Amplitude-weighted Huber loss combines the robustness of Huber loss with the amplitude-weighting mechanism. It maintains the high-precision fitting characteristics of quadratic penalty under small errors, and transforms into linear penalty under large errors to suppress excessive interference from outliers. It can be directly used as the base loss. First, we define the point-by-point prediction error e.i The calculation formula is: , Based on this, define the Huber loss function. It is a piecewise function, and its calculation formula is: , Where, δ H The Huber threshold is used to delineate the boundary between quadratic and linear penalties. When the absolute value of the prediction error is less than or equal to the threshold, the squared error form is used, consistent with the mean squared error, to ensure fitting accuracy under small errors. When the absolute value of the prediction error exceeds the threshold, linear penalties are applied to avoid excessive gradients caused by large error samples and to reduce the interference of outliers on the optimization process. Huber threshold δ H The δ value can be determined based on a robust metric of the absolute value of the training set error or through a grid search on the validation set. In this embodiment, δ is preferred when the target prediction has been standardized to zero mean and unit variance. H =1.0.
[0074] Then, an amplitude weight was introduced, using the 95th percentile q of the true target wave amplitude. 95 As a reference amplitude, q 95 Ideally, the weights should be pre-calculated based on the training set to ensure consistency in weight scale across different training batches. If not pre-set, they can also be calculated based on the actual amplitude values of the current training batch. Amplitude weight w i amp The calculation formula is: , Where, β H To control the amplitude weighting slope, β is preferred in this embodiment. H =0.5, clip(*,0,3) is a cutoff function that limits the value within the parentheses to between 0 and 3 to avoid excessive weighting. When the true wave height amplitude equals q 95 When the actual wave height amplitude reaches 3q, the corresponding weight is 1.5; 95 At this point, the weight is capped at 2.5, which both increases the weight of high-amplitude samples and avoids extreme weighting. The final amplitude-weighted Huber loss L... AWH The calculation formula is: , When using the amplitude-weighted Huber scheme, the base loss is directly taken as this value, i.e., L. base =L AWH .
[0075] A block-structured loss, PSLoss, is superimposed on the base loss to constrain the predicted waveform from the perspective of local waveform structure similarity, compensating for the shortcomings of point-by-point loss in constraining waveform morphology and periodic characteristics. Its calculation involves extracting the dominant frequency of the wave signal through Fourier transform and adaptively determining the block scale matching the signal period. The specific scheme is as follows: First, perform a Fast Fourier Transform on the true value sequence to calculate the average amplitude of each frequency component. The calculation formula is as follows: , Where A(k) is the average amplitude corresponding to the k-th frequency point, Mean b,c This indicates averaging along the batch and variable dimensions. FFT(*) is the Fast Fourier Transform operation, Y is the input real wave height sequence, and b and c are the indices of the batch and variable dimensions, respectively. During calculation, the DC component is set to zero, i.e., A(0)=0, to eliminate interference from the zero-frequency component on the extraction of the dominant frequency.
[0076] Subsequently, the non-zero frequency index with the largest amplitude was selected as the dominant frequency index f. * The calculation formula is: , The dominant period is calculated based on the dominant frequency, and then the final block parameters are determined by combining this with the upper limit of the block length. Specifically: Calculate the dominant period P dom : , Among them, L y Let P be the time length of the sequence of true and predicted values. When no valid non-zero dominant frequency exists, let the dominant period P be... dom =L y That is, the entire sequence length is taken as the period reference.
[0077] Based on this, determine the block length p: , Where, p max As the upper limit of the block length, p is preferably taken in this embodiment. max =12, the block length is half of the dominant period, which can cover half of the complete fluctuation period, ensuring the integrity of local waveform features, and the upper limit control avoids the increase in computation caused by excessively long blocks.
[0078] Then the block size s is determined: , The block step size is half the block length, which can form time blocks with an overlap rate of about 50%, controlling the amount of computation while taking into account the local waveform structure and the ability to capture peak and valley changes.
[0079] Based on the determined block length and step size, the preliminary predicted value and the actual wave height are divided into multiple time blocks, and then three structural sub-losses are calculated from three dimensions: trend direction, fluctuation amplitude, and overall level. Specifically: First, there's the correlation loss, which measures the alignment between predicted and actual blocks in terms of trend and direction of change based on the Pearson correlation coefficient. For the i-th block, the Pearson correlation coefficient PCC... i The calculation formula is: , Among them, y i,j and These represent the actual value and the predicted value at the i-th block and the j-th time step, respectively. This is the mean of the true values within this block. This represents the mean of the predicted values within this block. The standard deviation of the true values within this block. The standard deviation of the predicted values within this block is given. The numerator is the covariance of the two sequences, reflecting the degree of their coordinated change; the denominator is the product of the standard deviations of the two sequences, used for normalization. The Pearson correlation coefficient ranges from -1 to 1, with values closer to 1 indicating a more consistent trend between the two sequences. Based on this, the correlation loss L is calculated. corr : , Here, mean(*) represents the average of the calculation results for all blocks. It uses the form of 1 minus the correlation coefficient to convert the similarity index into a loss index. The smaller the loss value, the more consistent the trend of the predicted waveform with the actual waveform.
[0080] Secondly, the variance loss L var It measures the consistency of amplitude distribution within a block to constrain the predicted waveform's fluctuation amplitude and dynamic range to match the real waveform. During calculation, each real and predicted block is first converted into a probability distribution using a softmax function, and then the KL divergence is used to measure the difference between the two distributions. The calculation formula is as follows: , Among them, y i This represents the actual value corresponding to the i-th block. Let be the predicted value corresponding to the i-th block, and KL(*||*) be the KL divergence, which measures the degree of difference between two probability distributions. The closer the distributions are, the smaller the KL divergence. The average KL divergence of all blocks is taken to obtain the overall variance loss. The smaller the loss value, the better the amplitude distribution of the predicted waveform matches the actual waveform.
[0081] The third item is the mean loss L. meanIt is used to measure the deviation between the predicted mean and the true mean at the block level, correcting for systematic biases at the overall level. The calculation formula is: , in, Let be the mean of the true values of the i-th block. The mean of the predicted values for each block is represented by |*|, which is the absolute value operation. The average of the absolute errors of the mean values for all blocks is used to obtain the overall mean loss. This loss effectively constrains the baseline level of the predicted waveform, avoiding systematic biases that are too high or too low overall. The three sub-losses apply structural constraints from different dimensions, which, compared to point-by-point MSE, better match the multi-layered structural characteristics of ocean waves under extreme sea conditions such as typhoons.
[0082] To balance the contributions of the three sub-losses during training and avoid a single loss dominating the optimization process, the gradient norms of the three sub-losses with respect to the output layer parameters are calculated at each training iteration. Based on the relative magnitudes of the three gradient norms, the weight coefficients of the three sub-losses are dynamically determined according to the reciprocal principle. First, the L2 norm of each sub-loss is calculated using the following formula: , Among them, g k Let be the magnitude of the gradient of the k-th sub-loss, reflecting the influence of this loss on parameter updates. k corresponds to the correlation loss, variance loss, and mean loss, respectively. Let ||k|| be the gradient of the k-th sub-loss with respect to the output layer parameters, and ||*||2 be the L2 norm operation. Then, the average of the three gradient norms is calculated. As a reference for gradient strength: .
[0083] To enable dynamic adjustment of weights based on prediction performance, a joint scaling factor η is introduced. This factor is determined by the overall correlation and variance alignment between the true and predicted values. First, the global Pearson correlation coefficient C is calculated, with a value range of [0,1]. The calculation formula is as follows: , in, σ is the covariance between the true and predicted values. Y and These are the standard deviations of the true value sequence and the predicted value sequence, respectively. Then, the variance alignment V is calculated using the following formula: , This formula measures variance consistency, with a value range of [0,1]. V reaches its maximum value of 1 when the variances of the true and predicted values are equal. The greater the difference in variance between the two, the smaller the value of V. The final joint scaling factor is obtained by multiplying the two, i.e., η=C·V, with a value range of [0,1]. η increases as the prediction aligns more closely with the true value in terms of correlation and variance, thereby increasing the overall weight of structural loss when the prediction effect is good and further refining the waveform fitting accuracy.
[0084] Based on the gradient norm and joint scaling factor, the dynamic weights of the three sub-losses are calculated using the following formulas: , Here, α, β, and γ correspond to the weights of the correlation loss, variance loss, and mean loss, respectively. This weighting mechanism follows the inverse gradient principle: the sub-loss with the larger gradient receives a smaller weight, preventing a single loss from having an excessively large gradient and dominating the optimization direction, thus ensuring that the three losses play a balanced role. Simultaneously, a joint scaling factor η is used to achieve dynamic adjustment of the weights, adapting to the optimization needs at different stages of training. The final block structure loss L is obtained by summing the three dynamically weighted sub-losses. PS The calculation formula is: , After calculating the basic loss and the block structure loss, the two are weighted and summed, and then an optional physical soft constraint is added to obtain the total loss. The physical soft constraint restricts the prediction results from the perspective of physical rationality, including two items: non-negativity constraint and time smoothness constraint. Specifically: Nonnegativity constraint L nonneg Based on the physical property that the effective wave height is not less than zero under true physical dimensions, a penalty is applied to the negative prediction value, and the calculation formula is as follows: , Where i is the sample index. The predicted wave height in true physical dimensions after global denormalization. This means that a penalty term is generated only when the predicted value is negative, and the penalty is 0 when the predicted value is non-negative. The squared penalty form is used so that the larger the negative value, the stronger the penalty. If the training data has been Z-score standardized, the prediction results should be restored to the true physical dimensions using the mean and standard deviation of the target variable in the training set before calculating the non-negativity constraint to avoid misclassifying normal wave heights that are below the mean but are still physically positive as negative wave heights.
[0085] Time smoothness constraint L smooth To limit drastic changes between adjacent prediction times and ensure that the predicted waveform conforms to the physical laws of continuous wave evolution, the calculation formula is as follows: , Where H is the prediction time domain length, and t is the prediction time index. Let be the predicted wave height in true physical dimensions for the i-th sample at time t, after global inverse standardization. This represents the predicted wave height in true physical dimensions for the i-th sample at time t+1, after global destandardization. The more drastic the wave height change between adjacent times, the greater this loss value, thus guiding the model to generate a smooth, continuous predicted waveform that conforms to the physical laws of wave evolution.
[0086] The total physical soft constraint loss L is obtained by weighted summation of the two physical constraints mentioned above. phy : , Where, λ nonneg and λ smooth These are the internal weights of the nonnegativity term and the time smoothing term, respectively. In this embodiment, λ is preferred. nonneg =1.0、λ smooth =0.1.
[0087] The final total loss L used for model optimization total The loss is obtained by summing the basic loss, the weighted block structure loss, and the weighted physical soft constraint loss. The calculation formula is as follows: , Where, λ ps λ represents the block-based structural loss weight, used to control the proportion of structural loss in the total loss, and is set to 0.5. phy The physical constraint weight is set to 0.1. The training process uses the AdamW optimizer, combined with cosine learning rate decay and early stopping strategies, and the gradient is clipped to ensure stable convergence during training. Finally, a wave height prediction model with high fitting accuracy, waveform structure matching, and physical rationality is obtained.
[0088] The aforementioned loss function construction and model training scheme integrates basic loss, block structure loss, and physical soft constraints, forming multi-level optimization constraints from three dimensions: point-by-point fitting accuracy, local waveform structure, and physical rationality. The basic loss supports multiple optional forms, and combined with sea state adaptive weighting and amplitude-weighted Huber mechanisms, it can specifically enhance the fitting effect for extreme sea states such as storms, balancing stable fitting for normal sea states with improved accuracy in extreme scenarios. The block structure loss uses Fourier adaptive block matching to match the inherent period of ocean waves, combining correlation, variance, and mean sub-losses with a gradient dynamic weighting strategy to balance the trend direction, amplitude distribution, and baseline level of the waveform, compensating for the insufficient constraint of point-by-point loss on waveform structural features. Superimposed non-negativity and time smoothness physical soft constraints further ensure that the prediction results conform to the physical laws of wave evolution. This entire mechanism can effectively adapt to diverse sea state scenarios, improve the structural matching degree between predicted and actual waveforms, suppress unreasonable prediction outputs, and comprehensively improve the fitting accuracy and generalization robustness of the wave height prediction model.
[0089] In summary, the wave height prediction modeling method based on time-frequency multi-branch collaboration provided by this invention decouples the original wave time series into multi-scale frequency components through learnable multi-layer wavelet decomposition. It employs a differentiated prediction architecture with three parallel branches: trend, seasonal, and frequency domain. These branches respectively explore the intrinsic patterns of wave signals from three complementary dimensions: low-frequency evolution in the time domain, multi-band periodic oscillation, and frequency domain variable resonance, comprehensively covering multi-dimensional features. The model dynamically allocates the weights of each branch through a sample-level adaptive fusion gate, and uses a stochastic depth regularization strategy during the training phase to suppress overfitting. The training process uses a multi-level loss function consisting of basic loss, block structure loss, and physical soft constraints, simultaneously ensuring point-by-point fitting accuracy, waveform structure consistency, and physical rationality. The overall solution can effectively adapt to diverse sea state scenarios, significantly improving the prediction accuracy and generalization robustness of long-term wave height, and can provide reliable prediction support for scenarios such as marine engineering operations and marine disaster early warning.
[0090] The present invention provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the above-mentioned wave height prediction modeling method based on time-frequency multi-branch collaboration.
[0091] This invention provides a wave height prediction modeling device based on time-frequency multi-branch collaboration, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, it implements the steps of the wave height prediction modeling method based on time-frequency multi-branch collaboration described above.
[0092] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the present invention in any way, and all technical solutions obtained by equivalent substitution or equivalent transformation fall within the protection scope of the present invention.
Claims
1. A wave height prediction modeling method based on time-frequency multi-branch collaboration, characterized in that, Includes the following steps: Acquire a multivariate time-series ocean wave dataset and perform preprocessing; The preprocessed dataset is input into the learnable multi-level wavelet decomposition module after being normalized by reversible instances, and decomposed into low-frequency approximate components and multiple high-frequency detail components. The processing steps of the learnable multi-layer wavelet decomposition module include: Using the normalized dataset as the initial approximate component, a multi-level recursive decomposition is performed. Each decomposition applies a learnable low-pass filter and an orthogonal mirror high-pass filter to the current approximate component, and downsamples the filtered result by a factor of 2 to obtain the low-frequency approximate component and high-frequency detail component of this layer. The coefficients of the low-pass filter are updated during training through gradient backpropagation, and the high-pass filter is constructed by flipping and alternating the signs of the coefficients of the low-pass filter in this layer. The low-frequency approximation components and high-frequency detail components obtained from each layer decomposition are linearly interpolated along the time dimension to restore the original playback length. The low-frequency approximate component is input into the trend prediction branch, and after nonlinear mixing between variables through a cross-variable KAN layer, it is further processed by block embedding and gated recurrent unit encoding through a B-spline KAN layer to obtain the trend term prediction result, including: The transvariable KAN layer is applied to the low-frequency approximation component along the variable dimension. The transvariable KAN layer maps the input along the variable dimension with learnable univariate basis functions and superimposes the mapping result with the input in a residual manner. The superimposed features are divided into multiple overlapping time blocks along the time dimension with a preset block length and block step size; The multiple overlapping time blocks are mapped to the latent space through the B-spline KAN layer to obtain a block latent vector sequence, wherein the output of the B-spline KAN layer is the weighted sum of the B-spline basis functions and the sum of the SiLU basis residual paths; The block latent vector sequence is input into a gated recurrent unit for temporal encoding. The last hidden state is then sequentially processed by B-spline KAN projection, layer normalized residual, random deactivation, and linear prediction head mapping to obtain the trend term prediction result. The multiple high-frequency detail components are input into the seasonal prediction branch, and after band-by-band modeling and adaptive weighted fusion according to the energy of each band, the seasonal prediction result is obtained. The normalized full signal is input into the frequency domain prediction branch, and after real-number fast Fourier transform and cross-variable KAN processing, the frequency domain prediction result is obtained. The trend prediction result, the seasonal prediction result, and the frequency domain prediction result are subjected to sample-level adaptive weighted fusion by a fusion gate, and then inverse instance normalization is performed to obtain the preliminary prediction value of the wave height. A loss function is constructed based on the preliminary predicted values and the corresponding actual wave height values, and the model parameters are optimized using the loss function.
2. The wave height prediction modeling method based on time-frequency multi-branch collaboration according to claim 1, characterized in that, The preprocessing includes: Perform time series linear interpolation on each variable in the multivariate wave time series dataset; Based on the statistics of the training set, each variable is standardized to zero mean and unit variance. Based on the direction and magnitude of the original wind speed, the original wind speed is decomposed into mutually orthogonal wind speed vector components. Based on timestamps, the variables are aligned to a unified time grid.
3. The wave height prediction modeling method based on time-frequency multi-branch collaboration according to claim 1, characterized in that, The reversible instance normalization includes: Within each review window, calculate the mean and standard deviation for each variable; Based on the mean and standard deviation, zero-mean unit variance transformation is performed on the data of each preprocessed variable in the current review window; After obtaining the preliminary prediction of the wave height, the preliminary prediction is inversely transformed using the mean and standard deviation of the statistics within the same review window to restore it to its original dimensions.
4. The wave height prediction modeling method based on time-frequency multi-branch collaboration according to claim 1, characterized in that, The process involves inputting the multiple high-frequency detail components into the seasonal prediction branch, performing band-by-band modeling, and adaptively weighting and fusing them according to the energy of each band to obtain the seasonal prediction result, including: Channel-independent linear projection is performed on each of the multiple high-frequency detail components to map each high-frequency detail component to the latent space; The mapped high-frequency detail components are modeled for nonlinear characteristics within the frequency band using residual KAN blocks, and then mapped by a linear prediction head to obtain the seasonal prediction results for each frequency band. The average energy of each high-frequency detail component within the current playback window is statistically analyzed, and the amplitude weight of each frequency band is obtained by mapping using the Softmax function. Based on the amplitude weights, the seasonal prediction results for each frequency band are weighted and summed to obtain the seasonal prediction results.
5. The wave height prediction modeling method based on time-frequency multi-branch collaboration according to claim 1, characterized in that, The normalized full signal is input into the frequency domain prediction branch, and after real-number fast Fourier transform and transvariable KAN processing, the frequency domain prediction result is obtained, including: The normalized full signal is subjected to a real-number fast Fourier transform along the time dimension to obtain a one-sided complex spectrum; The real and imaginary parts of the single-sided complex spectrum are spliced together and projected onto the latent space through a linear layer to obtain the frequency domain feature tensor; The transvariable KAN layer is applied along the variable dimension of the frequency domain feature tensor to model the resonance relationship of each variable in the frequency domain; The frequency domain feature tensor output by the transvariable KAN layer is processed by the multilayer perceptron residual block and mapped by the linear prediction head to obtain the frequency domain prediction result.
6. The wave height prediction modeling method based on time-frequency multi-branch collaboration according to claim 1, characterized in that, The preliminary predicted wave height is obtained by performing sample-level adaptive weighted fusion of the trend term prediction results, the seasonal term prediction results, and the frequency domain term prediction results through a fusion gate, followed by inverse instance normalization, including: The trend prediction result, the seasonal prediction result, and the frequency domain prediction result are flattened and concatenated to obtain a joint feature vector. The joint feature vector is mapped through a multilayer perceptron and then transformed by the Softmax function to obtain the sample-level weights of the three prediction results; The three prediction results are weighted and summed according to the sample-level weights to obtain the fused prediction result. The fusion prediction results are inversely transformed using the mean and standard deviation of the statistics within the same review window to obtain a preliminary prediction of the wave height.
7. The wave height prediction modeling method based on time-frequency multi-branch collaboration according to claim 6, characterized in that, During the model training phase, a random depth is applied to the outputs of the trend branch, seasonal branch, and frequency domain branch. The outputs of the entire branch are set to zero according to the samples with a preset probability, and the retained branches are scaled accordingly.
8. The wave height prediction model training method based on time-frequency multi-branch collaboration for wave height prediction according to claim 1, characterized in that, The loss function is constructed in the following ways: The basic loss is calculated based on the preliminary predicted value and the actual wave height value; The actual wave height is subjected to a Fast Fourier Transform to extract the dominant frequency, and the block length is adaptively determined based on the dominant frequency. According to the block length, the preliminary predicted value and the actual wave height are respectively divided into multiple time blocks; Calculate the correlation loss, variance loss, and mean loss between the preliminary predicted value and the actual wave height in each time block; In each training iteration, the gradient norms of the three sub-losses with respect to the output layer parameters are calculated respectively. Based on the relative magnitudes of the three gradient norms, the weight coefficients of the three sub-losses are dynamically determined according to the reciprocal principle. The block structure loss is obtained by summing the three sub-losses after dynamic weighting. The basic loss and the block structure loss are weighted and summed, and physical soft constraints are added to obtain the total loss. The model parameters are then optimized using the total loss.
9. The wave height prediction model training method based on time-frequency multi-branch collaboration for wave height prediction according to claim 8, characterized in that, The basic loss is constructed using a sea state adaptive weighted loss method, including: The sea state adaptive weight for each sample is determined based on the amplitude of the true wave height value; The sea state adaptive weighted loss is obtained by weighting the squared prediction errors of each prediction point with the sea state adaptive weights. The sea state adaptive weighted loss can be used as the base loss, or it can be used as the base loss after being weighted and summed with the mean square error.
10. The wave height prediction model training method based on time-frequency multi-branch collaboration for wave height prediction according to claim 8, characterized in that, The basic loss is constructed using the amplitude-weighted Huber loss method, including: Calculate the point-by-point loss for each prediction point based on the Huber loss function; The amplitude weight of each prediction point is determined based on the amplitude of the true value of the wave height. The Huber loss at each prediction point is weighted and averaged using the amplitude weight to obtain the amplitude-weighted Huber loss, which is then used as the base loss.
