KAFNet: Fourier-Structured Neural Networks
- KAFNet is a dual-purpose neural architecture: one design for irregular time series forecasting using CPA and another for replacing MLP/FFN blocks with a Kolmogorov–Arnold approach.
- It employs Fourier structures, including trainable Random Fourier Features and hybrid GELU–Fourier activations, to enhance expressiveness and parameter efficiency.
- For time series, it integrates Pre-Convolution, Temporal Kernel Aggregation, and Frequency Linear Attention to address challenges of sparsity and sequence length explosion.
KAFNet denotes two technically distinct neural-network constructions that appeared in 2025 literature. In irregular multivariate time series (IMTS) forecasting, KAFNet is a compact architecture grounded in Canonical Pre-Alignment (CPA) and built from a Pre-Convolution module, a Temporal Kernel Aggregation module, and Frequency Linear Attention blocks (Zhou et al., 4 Aug 2025). In a separate line of work on Kolmogorov–Arnold networks, the term appears in the formulation of the Kolmogorov–Arnold–Fourier Network, which preserves the Kolmogorov–Arnold compositional template while replacing spline-based univariate functions with trainable Random Fourier Features and a hybrid GELU–Fourier activation mechanism (Zhang et al., 9 Feb 2025). The shared label reflects a common emphasis on Fourier structure and parameter efficiency, but the two models address different problem classes and operate at different architectural scales.
1. Terminological scope and problem settings
In the IMTS literature, KAFNet is introduced for forecasting when each variate is sampled at uneven time intervals and different variates are sampled at different times. The observation set is written as
and the forecasting task is to learn a model that maps historical IMTS and future queries to predicted future values. This setting is defined by intra-series irregularity and inter-series asynchrony, and the architecture is explicitly organized around handling CPA-induced sparsity and length explosion (Zhou et al., 4 Aug 2025).
In the Kolmogorov–Arnold formulation, KAFNet is not a forecasting-specific pipeline but a feedforward network family derived from Kolmogorov–Arnold’s representation theorem. The theorem is presented in the form
with and interpreted as outer and inner functions. KAFNet retains this compositional structure while substituting spline-based bases with Fourier-based representations and hybrid activations. This version is evaluated across vision, NLP, audio processing, tabular ML, function approximation, and differential equation-solving tasks (Zhang et al., 9 Feb 2025).
The coexistence of these two usages creates a possible source of confusion. Factually, one KAFNet is a CPA-based encoder-decoder for irregular time series, whereas the other is a Kolmogorov–Arnold-type layer family intended to replace MLP or FFN blocks. A plausible implication is that the name should always be interpreted together with its paper context and application domain.
2. Kolmogorov–Arnold–Fourier KAFNet: formulation and parameterization
The Kolmogorov–Arnold–Fourier construction defines a single layer, after layer normalization, as
Here , is an RFF-based nonlinear mapping, are learnable channel-wise scaling vectors, and with 0 supplies the outer linear composition. The model identifies the theorem’s inner functions with trainable Fourier series and the outer functions with linear layers plus hybrid activations (Zhang et al., 9 Feb 2025).
A central design objective is to remove the dual-matrix structure of standard KAN. In the schematic KAN form
1
2 parameterizes spline bases and 3 combines basis outputs. The corresponding parameter count is given as
4
KAFNet uses matrix associativity to collapse the structure into
5
thereby absorbing the remaining linear combination into a single effective projection. Its per-layer parameter complexity becomes
6
and is described as approximately 7, comparable to an MLP rather than to KAN’s multiplicative factor 8.
The layer structure is explicitly organized into input normalization, hybrid feature generation, channel-wise adaptive mixing,
9
and outer linear projection,
0
Stacking such layers yields a full KAF network, and in transformer-style or residual architectures KAF layers replace standard MLP/FFN blocks.
3. Spectral representation, initialization, and interpretability in Kolmogorov–Arnold–Fourier KAFNet
The Fourier branch is based on a learnable Random Fourier Feature embedding
1
followed by a linear projection
2
Unlike classical RFF, where 3 and 4 are fixed random draws, this model makes them trainable. The gradients are analytic, with
5
which supports end-to-end backpropagation (Zhang et al., 9 Feb 2025).
Initialization is treated as a spectral matching problem. The frequency matrix is initialized as
6
or in normalization-aware form
7
with the paper deriving an effective spectral scaling factor 8 for GELU. Phase initialization is
9
and the projection matrix uses Xavier/Glorot initialization
0
These choices are stated to eliminate spectral distortion and improve convergence, especially in high-dimensional vision or audio tasks.
The hybrid activation is
1
with initialization
2
This biases early training toward a GELU-like low-frequency regime. The paper further describes a training progression in which 3 increases moderately and 4 increases more strongly, so the model starts dominantly GELU, gradually increases the Fourier contribution, and ends with substantial RFF-based high-frequency correction. The stated interpretation is that GELU supplies a smooth, low-frequency, local gate, whereas the Fourier branch supplies oscillatory, high-frequency, globally supported bases.
The model’s expressiveness is tied back to the Kolmogorov–Arnold superposition class. Because RFF spans trigonometric bases, the paper states that for every 5 there exist KAF parameters such that
6
Interpretability is framed in three ways: each RFF component corresponds to a clear frequency 7, the learned scales 8 indicate reliance on smooth versus oscillatory structure, and the overall architecture retains the “inner functions + outer composition” structure associated with KAN.
4. Empirical profile of the Kolmogorov–Arnold–Fourier model
The Kolmogorov–Arnold–Fourier model is evaluated under the Kanbefair protocol on 8 vision datasets, 2 NLP datasets, 2 audio datasets, and 4 tabular/ML datasets: MNIST, EMNIST-Balanced, EMNIST-Letters, Fashion-MNIST, KMNIST, CIFAR-10, CIFAR-100, SVHN, CoLA, AG News, SpeechCommands, UrbanSound8K, Bean, Rice, Titanic, and Wine. The paper’s qualitative summary states that KAF consistently achieves the highest accuracy at a given parameter budget across nearly all datasets, with especially visible gains on CIFAR-10/100, SVHN, AG News, and the audio datasets; it often matches or exceeds KAN accuracy while using dramatically fewer parameters and faster training (Zhang et al., 9 Feb 2025).
On large-scale vision backbones, replacing the feature mixer with KAF yields modest increases in parameter count and FLOPs relative to MLP while improving accuracy in several settings. In ResNet-18 on CIFAR-10, MLP reports 11.1M parameters, 0.56G FLOPs, and 91.19 top-1 accuracy, whereas KAF reports 12.0M parameters, 0.63G FLOPs, and 91.72. In MLP-Mixer-S/16 on ImageNet-1K, MLP reports 18.2M parameters, 3.8G FLOPs, and 63.5 top-1 accuracy, whereas KAF reports 18.8M parameters, 4.2G FLOPs, and 64.7. In ViT-Tiny/16 on ImageNet-1K, MLP reports 5.7M parameters, 1.08G FLOPs, and 72.3 top-1 accuracy, whereas KAF reports 5.9M parameters, 1.12G FLOPs, and 73.2. In MLP_KAN on CIFAR-100, MLP reports 1.3M parameters, 0.12G FLOPs, and 49.0 top-1 accuracy, while KAF reports 1.4M parameters, 0.15G FLOPs, and 53.8. In several of these settings, KAN is listed as too large.
For language modeling, GPT-2 small replaces the FFN MLP with KAF or KAN and is evaluated on WikiText and OpenWebText. On WikiText, MLP yields PLL 184.53, train time 20h 37m, and 117M parameters; KAF yields PLL 180.85, train time 19h 20m, and 128M parameters; KAN yields PLL 39,782, train time 304h 06m, and 478M parameters. On OpenWebText, MLP yields PLL 151.27, train time 60h 57m, and 117M parameters; KAF yields PLL 145.64, train time 52h 45m, and 128M parameters; KAN yields PLL 27,832, train time 960h 19m, and 478M parameters. The paper interprets this as evidence that KAF provides a practical Kolmogorov–Arnold-inspired FFN for Transformers.
For function approximation, the reported examples include Bessel, where KAF test RMSE is 9 versus MLP’s 0; Highly-Nonlinear, where KAF is 1 versus MLP’s 2; and Multi-Scale, where KAF is 3 versus MLP’s 4. In PDE solving on Poisson, 1D wave, heat, and Burgers equations, KAF and KAN generally outperform MLP in error, while KAF is described as more stable than GPKAN and FAN and far more computationally manageable than full KAN.
The ablation results emphasize the necessity of the hybrid construction. “Only RFF” underperforms full KAF; removing the adaptive scales lowers accuracy and slows convergence; random RFF initialization gives worse accuracy and less stable training; and varying the RFF frequency scale shows approximately 47–52 accuracy for 5–6, approximately 54–55 for 7–8, with 9 reported as best or near-best. The paper also reports that KAF fits periodic functions accurately over 0, whereas MLP(ReLU/GELU) struggles to maintain periodicity and KAN still shows distortions.
5. KAFNet for irregular multivariate time series forecasting
In the forecasting-specific usage, KAFNet is built around Canonical Pre-Alignment. CPA merges all timestamps into a global grid
1
and constructs a value matrix 2 and mask matrix 3 with zeros inserted wherever a variate is unobserved. The total number of true observations is
4
but after CPA the dense representation has size 5, which is approximately 6 when timestamp overlap is rare. The resulting “length explosion” is identified as the core computational problem that the model addresses (Zhou et al., 4 Aug 2025).
The architecture has four stages. First, Pre-Convolution applies
7
where 8 is ReLU, the 9 convolution is depthwise along time, and the 0 convolution is pointwise. This stage distributes information from observed points to neighbors, decorrelates the representation from the raw zero pattern, and enhances local temporal patterns.
Continuous time is encoded separately because the CPA index is not proportional to elapsed time. The time embedding is
1
and is fused with the smoothed series through
2
The stated role of this design is to preserve precise temporal information while alleviating sparsity induced by CPA.
The second stage, Temporal Kernel Aggregation (TKA), compresses each sequence from length 3 to a fixed kernel count 4. Timestamps are normalized to 5, and TKA places 6 Gaussian kernels with fixed evenly spaced centers and learnable bandwidths
7
For timestamp 8 and kernel 9, the unnormalized weight is
0
which is then normalized over time:
1
Kernel summaries are
2
followed by gating,
3
a binary observation flag
4
and a projection
5
This is the principal compression step that removes downstream dependence on the pre-aligned length.
The third stage, Frequency Linear Attention (FLA), models inter-variate dependencies across the 6 variates. With row-wise LayerNorm, it first computes
7
For each head,
8
and softmax attention is replaced by an RFF feature map
9
The resulting linear attention is
0
which has complexity 1 instead of 2. The heads are concatenated, mapped back with inverse real FFT,
3
and followed by a residual MLP block:
4
The output layer answers arbitrary future queries. For each query time 5,
6
and the objective is mean squared error,
7
All parameters in Pre-Conv, TE, TKA, FLA, and the output MLP are trained end-to-end.
6. Complexity, efficiency, and forecasting results of the IMTS KAFNet
The total per-sample cost is given as
8
Only the term 9 depends on the pre-aligned length 0, coming from Pre-Conv and TKA; after compression, both FLA and the output head are independent of 1. The paper therefore characterizes KAFNet as linear in both 2 and 3, in contrast to a CPA-based Transformer with 4 self-attention (Zhou et al., 4 Aug 2025).
Empirically, the model is evaluated on PhysioNet, MIMIC-III, Human Activity, and USHCN, using MSE and MAE over all query points. Twenty-one baselines are included, spanning regular MTS forecasters, IMTS classification models adapted to forecasting, interpolation or continuous-time models adapted to forecasting, and state-of-the-art IMTS graph or hypergraph models such as tPatchGNN, GraFITi, TimeCHEAT, and HyperIMTS.
The reported main results rank KAFNet best overall. On PhysioNet, KAFNet reports MSE 5 and MAE 6; HyperIMTS has a slightly smaller MSE of 7, but KAFNet attains the best MAE and overall rank. On MIMIC, KAFNet achieves the best MSE, 8, and MAE, 9. On Human Activity, it achieves the best MSE, 00, and MAE, 01. On USHCN, it reports MSE 02 and MAE 03, with the best MAE and second-best MSE. The average rank across all metrics and datasets is 1.6 for KAFNet, versus 2.4 for tPatchGNN and 3.8 for GraFITi, and a Friedman test plus Nemenyi post-hoc is reported to confirm statistical significance at 04.
Efficiency claims are quantitatively explicit. On the MIMIC dataset with 96 variates, Figure 1(a) shows KAFNet with only about 05K parameters, while strong baselines such as tPatchGNN, TimeCHEAT, and HyperIMTS have orders of magnitude more parameters. Averaged over datasets, KAFNet achieves a 7.206 parameter reduction relative to those state-of-the-art graph-based methods and an 8.407 training-inference acceleration. The paper also states that KAFNet’s FLOPs are the lowest among compared models on MIMIC and that both training time per batch per epoch and inference time per batch are the smallest.
A direct comparison between FLA and vanilla softmax attention on PhysioNet shows the block-level efficiency gain. FLA uses 890 MB memory, 118.4K parameters, 360.5M FLOPs, 0.023 s train time, and 1.23 s inference time; the softmax-attention variant uses 1022 MB memory, 125.4K parameters, 378.2M FLOPs, 0.039 s train time, and 1.30 s inference time. The paper adds that FLA produces sharper attention maps.
The ablations isolate the contribution of each module. Removing CPA worsens performance, for example raising PhysioNet MSE from 08 to 09 and MIMIC MSE from 10 to 11. Removing Pre-Conv degrades PhysioNet MSE from 12 to 13. Removing timestamp min-max normalization in TKA harms performance. Removing TKA causes a notable performance drop, including Human Activity MSE from 14 to 15. Replacing FLA with standard self-attention yields consistently worse performance and higher cost. A central point of the paper is therefore that CPA should not be discarded; it should be compressed and modeled appropriately.
7. Relationship between the two KAFNet usages and research directions
The two 2025 usages of KAFNet are related by Fourier machinery and efficiency-oriented design, but they are not architecturally interchangeable. The Kolmogorov–Arnold–Fourier model is a replacement for spline-based KAN or MLP/FFN layers, with trainable RFF, hybrid GELU–Fourier activation, and parameter scaling close to an MLP (Zhang et al., 9 Feb 2025). The IMTS KAFNet is a CPA-based forecasting pipeline whose defining components are Pre-Convolution, TKA, FLA, and a query-conditioned output MLP (Zhou et al., 4 Aug 2025).
Their methodological emphases also differ. In the Kolmogorov–Arnold–Fourier line, the salient claims concern universal approximation, spectral complementarity between GELU and RFF, and the replacement of KAN’s dual-matrix spline parameterization by an MLP-like effective linear transform. In the IMTS line, the salient claims concern retaining the global shared timeline induced by CPA while avoiding dense-sequence costs through kernel compression and frequency-domain linear attention. A common misconception addressed by the IMTS work is that CPA itself is intrinsically undesirable; the stated position is instead that the difficulty lies in treating CPA-aligned sequences naively as long dense sequences.
The practical guidance in the Kolmogorov–Arnold–Fourier work is to drop KAF in wherever one would use an MLP or FFN block, including ResNet bottlenecks, ViT FFNs, and GPT FFNs, with moderate Fourier feature count 16 for vision, audio, and PDEs, smaller 17 for NLP, frequency initialization using 18, phase initialization on 19, projection initialization by Xavier, and scales initialized as 20, 21. The reported optimizers are Adam or AdamW, learning rates are in the same range as standard models, and KAF is described as scaling comfortably to ImageNet-scale vision and GPT-2-scale LLMs.
The forward-looking directions highlighted for the IMTS KAFNet are adaptation to IMTS classification, interpolation, and anomaly detection; more expressive kernels in TKA, including Laplacian, periodic, learned mixtures, multi-scale kernels, adaptive centers, and multi-channel TKA; scaling to transportation, energy, and environmental networks with hundreds or thousands of variates; incorporation of spatial structure through graph priors; probabilistic extensions based on diffusion, flow-based decoders, or Bayesian variants of TKA; and hybridization with Neural ODE, Neural CDE, or continuous-time state-space models. These directions suggest that, across both usages, the KAFNet label is associated less with a single canonical architecture than with a broader design pattern: Fourier-structured representations used to reconcile expressiveness with computational tractability.