iconOpen Access

ARTICLE

Feature-Wise Linear Modulation for Heterogeneous-Frequency Multimodal Fusion in Temporal Sequence Encoders

Maurice Kyla Octaviano, Jin-Taek Seong*

Graduate School of Data Science, Chonnam National University, Gwangju, Republic of Korea

* Corresponding Author: Jin-Taek Seong. Email: email

Computers, Materials & Continua 2026, 88(3), 80 https://doi.org/10.32604/cmc.2026.082842

Abstract

Integrating high-frequency sequential signals with low-frequency contextual descriptors into a unified deep encoder is a recurring challenge in computational modelling, exemplified by cross-sectional stock ranking where price dynamics must be jointly modelled with quarterly accounting fundamentals. Existing approaches use late concatenation, where the contextual signal influences only the final prediction head and cannot shape upstream feature extraction. We propose Feature-wise Linear Modulation (FiLM) as an intermediate conditioning mechanism: fundamentals generate per-channel scaling (gamma) and shifting (beta) parameters that affinely transform the encoder’s intermediate representations before aggregation. The same price sequence thus yields different temporal features depending on the firm’s fundamental profile, which we hypothesise reduces signal variability across heterogeneous market regimes by allowing the encoder to amplify or suppress patterns based on contextual quality. We instantiate FiLM across recurrent (LSTM), convolutional (TCN), and attention-based (iTransformer) encoders, evaluated on China A-share equities (2010–2024). Across the convolutional and recurrent encoder families, the primary benefit of FiLM conditioning is improved signal stability—formally measured as the standard deviation of RankIC across rebalancing dates—and risk-adjusted performance, rather than mean predictive accuracy. The gain depends critically on where modulation is applied: pre-aggregation conditioning on temporally-rich representations produces the largest variance reduction. FiLM-TCN, which modulates the convolutional feature map before pooling, achieves RankIC of 0.1415, annualised Sharpe of 1.633, and IC hit rate of 80.4% net of transaction costs. The insight that intermediate conditioning improves signal stability rather than raw accuracy may inform analogous fusion problems in other sequential modelling domains.

Keywords

Feature-wise linear modulation; temporal convolutional network; iTransformer; multimodal fusion; heterogeneous-frequency fusion; quantitative finance; stock ranking; China A-shares

1  Introduction

Integrating a low-frequency contextual descriptor with a high-frequency sequential signal—such that the former governs how the latter is encoded rather than merely how the resulting representation is interpreted—is a recurring architectural challenge in deep learning for sequential data. A natural instantiation of this problem arises in cross-sectional stock ranking [1], where sequential price dynamics must be jointly modelled with periodic accounting fundamentals disclosed at quarterly frequency. Unlike point forecasting of individual asset returns, cross-sectional ranking is concerned with the relative ordering of stocks at each rebalancing date, making it naturally suited to learning-to-rank formulations and robust to the absolute level of market returns.

Two broad categories of information are relevant to this task. Price and market microstructure data—open, high, low, close, volume, turnover, and their derived technical indicators—encode short- to medium-term behavioural dynamics available at daily or higher frequency. Quarterly accounting fundamentals—profitability ratios, earnings, and capital structure metrics—encode the underlying economic quality of the firm but are disclosed with a lag. These modalities are complementary: price data captures when a stock is moving, while fundamentals provide context for why a given pattern may be persistent or mean-reverting. Critically, they differ in temporal frequency by an order of magnitude, creating a heterogeneous-frequency fusion problem that is not well addressed by standard late concatenation.

The dominant approach to combining these modalities in deep learning-based stock prediction is late fusion: a temporal encoder processes the price sequence independently, and the resulting representation is concatenated with the fundamental vector before a prediction head [2]. While simple and effective, late fusion has a structural limitation—the fundamental context is never allowed to influence how temporal patterns are extracted. A model that has learned to recognise momentum patterns, for instance, cannot amplify those patterns for high-quality firms and suppress them for distressed ones without first seeing the fundamental signal, which under late fusion arrives only after the temporal encoding is complete.

Feature-wise Linear Modulation (FiLM) [3] offers a principled alternative. Originally proposed for visual question answering, FiLM applies a learned affine transformation—parameterised as a function of a conditioning input—to intermediate representations within a neural network. Applied to temporal sequence encoding, FiLM allows the low-frequency contextual signal to modulate every layer of the encoder, enabling the model to adapt its temporal pattern extraction to the contextual profile of each input at each time step.

In this paper, we investigate FiLM conditioning as a mechanism for heterogeneous-frequency multimodal fusion, instantiated in the context of cross-sectional stock ranking. We evaluate the approach across three temporally structured encoder families: a two-layer LSTM [4], a six-block dilated Temporal Convolutional Network [5], and a two-layer inverted Transformer [6]. For each family we construct a baseline variant using late-fusion concatenation and a FiLM-conditioned variant, yielding six deep models in total, supplemented by an XGBoost tabular baseline [7].

All models are evaluated on a large-scale longitudinal dataset of China A-share equities spanning January 2010 to December 2024, with monthly rebalancing and a strict walk-forward train/validation/test split. Chinese equity markets have distinctive structural properties—high retail participation, regulatory interventions, and a distinctive fundamental disclosure regime—and all conclusions are scoped to this single benchmark. The extent to which the findings and the conditioning framework generalise to other sequential prediction domains is an open and important direction for future work.

Main Contributions

1.   Intermediate conditioning as a fusion mechanism. We propose and systematically evaluate FiLM as a mechanism for integrating a low-frequency contextual descriptor into a high-frequency temporal sequence encoder via intermediate affine modulation, providing a principled alternative to late-fusion concatenation across three encoder families—recurrent, convolutional, and attention-based.

2.   Architecture–fusion interaction. The benefit of intermediate conditioning depends on where modulation is applied within the encoder: feature-map modulation (FiLM-TCN) produces the most consistent gains, hidden-state modulation (FiLM-LSTM) yields mixed results, and per-layer attention modulation (FiLM-iTransformer) produces intermediate but less parameter-efficient improvements—a finding that motivates more targeted architectural investigation in future work.

3.   Signal consistency as the primary locus of gain. For the convolutional and recurrent encoder families, FiLM conditioning improves signal stability and risk-adjusted metrics more reliably than mean predictive accuracy, suggesting that intermediate conditioning reduces variance in the predictive signal rather than uniformly amplifying it.

The remainder of the paper is organised as follows. Section 2 reviews related work on deep learning for stock prediction and multimodal fusion. Section 3 describes the dataset construction and feature engineering pipeline. Section 4 presents the model architectures, training objective, and experimental setup. Section 5 reports and analyses the results. Section 6 discusses the findings, and Section 7 concludes.

2  Related Work

2.1 Cross-Sectional Ranking and Machine Learning

The application of machine learning to cross-sectional ranking has a substantial and growing history. Classical factor models identify firm characteristics—momentum, value, size—as predictors of future returns [1,8,9], but assume linear relationships and rely on hand-crafted features. Gu et al. [2] provide a large-scale empirical comparison of machine learning methods for equity return prediction, demonstrating that non-linear models including neural networks and gradient-boosted trees substantially outperform linear factor models, and establishing the rank-based cross-sectional evaluation protocol that we adopt in this work. Kelly et al. [10] further show that firm characteristics can be understood as covariances in a latent factor structure, providing theoretical grounding for the use of fundamental features as inputs to predictive models. Feng et al. [11] extend this line of work by showing that deep neural networks can generate latent pricing factors from firm characteristics, outperforming conventional characteristic-sorted portfolios on cross-sectional return prediction. Fan and Shen [12] demonstrate that a simple MLP-based architecture with channel-mixing operations achieves competitive stock ranking performance, highlighting that architectural simplicity with well-designed feature mixing can rival attention-based approaches.

The generalisability of these findings across markets has received increasing attention. Leippold et al. [13] conduct a comprehensive ML study of the China A-share market, applying a range of algorithms to 94 stock-level characteristics and demonstrating that ML models dominate linear factor benchmarks. Importantly for our work, they highlight that the China A-share market has distinctive structural properties—high retail investor participation, liquidity-driven predictability, and an opaque fundamental disclosure environment—that distinguish it from the US market studied in Gu et al. [2]. Ma et al. [14] further demonstrate using instrumented principal component analysis that firm characteristics condition latent factor loadings in the Chinese market—a result that motivates our hypothesis that fundamentals can act as a mechanism switcher for temporal price patterns rather than merely as additive predictors. Our work builds on this foundation by investigating whether deep temporal sequence encoders with intermediate conditioning via FiLM provide incremental value over tabular approaches on this benchmark.

2.2 Deep Sequential Encoders

Recurrent neural networks, particularly LSTMs [4], have been widely applied to sequential modelling owing to their ability to capture long-range dependencies in time-series data. Temporal Convolutional Networks [5] offer an alternative to recurrent architectures, using dilated causal convolutions to achieve large receptive fields with parallelisable training and competitive empirical performance on a range of sequence modelling benchmarks. The Transformer architecture [15], originally proposed for natural language processing, has subsequently been adapted for time-series forecasting in numerous variants. Among these, Nie et al. [16] propose PatchTST, which segments time series into subseries-level patches as input tokens, reducing attention complexity and improving long-range forecasting accuracy. Liu et al. [6] further invert the standard attention mechanism to operate across the variate dimension rather than the time dimension, achieving strong results on multivariate forecasting benchmarks. In our work, we evaluate all three encoder families as backbones for cross-sectional sequential ranking.

Most closely related to our work, Li et al. [17] propose MASTER, a conditioning-based stock Transformer that uses an external market-index signal to gate and select features dynamically. Like our approach, MASTER is motivated by the observation that an external conditioning signal should modulate how individual features are processed, rather than being fused only at the output. However, MASTER conditions on market-index aggregates rather than firm-level contextual descriptors, operates at daily frequency with an 8-day lookback window, and explicitly models inter-stock correlations—design choices that reflect a different but complementary perspective on the conditioning problem.

Gradient-boosted trees, and XGBoost [7] in particular, remain highly competitive on tabular prediction tasks despite the proliferation of deep learning approaches. We include XGBoost as a strong tabular baseline to assess whether deep temporal encoders provide incremental value over well-tuned classical methods on this benchmark [2].

2.3 Multimodal Fusion Strategies

A recurring challenge in multimodal sequential prediction is the integration of heterogeneous data streams that differ in temporal frequency, dimensionality, and information content. In the setting studied here, these streams comprise a high-frequency sequential signal (price dynamics) and a low-frequency contextual descriptor (accounting fundamentals). Early work on multimodal fusion for sequential prediction focused predominantly on combining sequential signals with auxiliary text. Xu and Cohen [18] propose a deep generative model that jointly encodes tweet sentiment and historical price sequences, demonstrating that cross-modal fusion consistently outperforms unimodal baselines.

The dominant fusion approach in the broader machine learning literature remains late fusion: each modality is encoded independently and the resulting representations are concatenated before a prediction head [2]. While simple and widely adopted, late fusion has a structural limitation—the conditioning modality cannot influence how the primary modality is encoded, which may prevent the model from learning cross-modal interactions at the representational level rather than merely at the output stage.

Alternative fusion strategies have been explored in the broader multimodal learning literature. Early fusion concatenates raw features before any encoding, preserving all cross-modal interactions but making the encoder responsible for disentangling them from a high-dimensional joint input. Cross-attention mechanisms [15] allow each modality to attend over the other’s representations, enabling richer interaction at the cost of increased model complexity and potential overfitting on smaller datasets. Gating-based approaches, such as the feature selection mechanism in MASTER [17], use an external signal to rescale input features before temporal encoding, which is closely related to FiLM but operates at the input layer rather than intermediate representations. What is absent from existing approaches is a mechanism that allows the contextual signal to interact with learned temporal representations at multiple levels of abstraction without requiring structural modification to the encoder—the gap that motivates the approach developed in Section 4.

2.4 Feature-Wise Linear Modulation

Feature-wise Linear Modulation (FiLM) was introduced by Perez et al. [3] for visual question answering, where a language conditioning signal modulates intermediate representations in a convolutional image encoder via learned affine transformations. The original paper noted that FiLM is a generalisation of conditional normalisation techniques previously used for image stylisation and speech recognition, suggesting its applicability well beyond the vision domain.

Subsequent work has confirmed this generality across modalities and architectures. Birnbaum et al. [19] propose Temporal FiLM (TFiLM), which uses a recurrent network to modulate the activations of a convolutional sequence model, demonstrating improvements on text classification and audio super-resolution. Brockschmidt [20] extends FiLM to graph neural networks, showing that feature-wise modulation of message-passing enables target-node representations to gate incoming messages, outperforming standard GNN aggregation schemes on multiple graph learning benchmarks. Together, these works establish that FiLM’s core mechanism—element-wise scaling and shifting of intermediate features conditioned on an external signal—is a flexible, parameter-efficient conditioning strategy that has been successfully applied across vision, language, audio, and graph-structured domains. However, all prior applications share the same temporal granularity between the conditioning signal and the primary signal. Our work introduces a qualitatively different setting: the conditioning signal (quarterly fundamentals) operates at a frequency an order of magnitude lower than the primary signal (daily price dynamics), requiring the generator to bridge two heterogeneous temporal scales rather than modulate within a single one—the core architectural problem that motivates the approach developed in Section 4.

2.5 Learning-to-Rank Methods

Learning-to-rank methods [21] frame prediction as an ordering problem rather than a regression or classification task, which is a natural fit for any setting where the goal is to identify the relative ordering of items in a cross-section rather than predict their absolute values. Listwise approaches, and ListMLE in particular [22], directly optimise the likelihood of the ground-truth permutation and have been shown to be effective for cross-sectional ranking tasks [2]. In our training objective we combine ListMLE with an MSE term to stabilise early training, following the common practice of mixing ranking and regression losses in sequential prediction tasks [2].

3  Data and Feature Engineering

3.1 Data Collection

To evaluate the proposed conditioning framework, we construct a large-scale longitudinal panel dataset using China A-share equities as a testbed. This market provides a natural evaluation setting for the heterogeneous-frequency fusion problem studied here: it offers two modalities that differ substantially in temporal frequency—daily price and microstructure data available at high frequency, and quarterly accounting fundamentals disclosed with a lag—over a sufficiently long horizon to cover multiple market regimes. The dataset spans January 2007 to December 2025 (|𝒯 |=19 years), sourced from the BaoStock financial data API (http://www.baostock.com).

The dataset comprises two raw modalities: (i) daily market data—open, high, low, close, volume, monetary turnover, daily return, and turnover rate for each stock—and (ii) quarterly accounting fundamentals—profitability ratios, earnings, and share structure metrics reported each fiscal quarter. From these two modalities, we engineer a 12-dimensional daily feature sequence and an 8-dimensional fundamental conditioning vector per stock, described in detail in Section 3.2.

The stock universe 𝒮t is rebalanced annually at each year-end, excluding financially distressed and suspended securities to ensure that the cross-section reflects a realistic opportunity set. The resulting panel 𝒟={(s,t)s𝒮t, t𝒯 } is unbalanced, as 𝒮t evolves over time due to new listings, delistings, and changes in stock status. The cross-section grows over the sample period, expanding from approximately 1000 eligible stocks in the early years to over 3500 by the end of the sample, reflecting the substantial growth in A-share listings over this period.

3.2 Feature Engineering

Raw market data are transformed into a structured sequence dataset through a five-stage pipeline: feature engineering, fundamental alignment, monthly snapshot construction, sequence tensor assembly, and temporal train/validation/test splitting.

For each stock s and each trading day d, we compute a set of price-derived technical features from the raw Open-High-Low-Close-Volume (OHLCV) series. Let cs,d denote the forward-adjusted closing price and rs,d=cs,d/cs,d11 the daily simple return. Let rs,d(k), σs,d(w), μs,d(p/q), ρs,dv, τ¯s,d(20), δs,dhl, RSIs,d(14), and r~s,d denote the feature components defined in the equations below. The full 12-dimensional daily feature vector is:

ϕs,d=(rs,d(1), rs,d(5), rs,d(20), σs,d(20), σs,d(60), μs,d(5/20), μs,d(20/60), ρs,dv, τ¯s,d(20), δs,dhl, RSIs,d(14), r~s,d),(1)

where the components are defined as follows. Multi-horizon return features capture short- and medium-term price momentum [9], where k denotes the lookback horizon in trading days:

rs,d(k)=cs,dcs,dk1,k{1,5,20}.(2)

The rolling volatility σs,d(w) measures return dispersion over two horizons, where w denotes the window length in trading days, i is the lag index, and r¯s,d(w)=1wi=0w1rs,di is the rolling mean return over the same window:

σs,d(w)=1wi=0w1(rs,dir¯s,d(w))2,w{20,60}.(3)

The moving-average momentum ratio μs,d(p/q) encodes trend strength relative to different lookback scales, where p and q denote the short and long window lengths in trading days respectively, and 1pi=0p1cs,di is the p-day simple moving average of the closing price:

μs,d(p/q)=1pi=0p1cs,di1qi=0q1cs,di1,(p,q){(5,20),(20,60)}.(4)

The volume ratio ρs,dv and 20-day turnover moving average τ¯s,d(20) capture liquidity and trading activity relative to recent history, where vs,d is the trading volume, τs,d is the daily turnover rate, and ϵ >0 is a small constant for numerical stability:

ρs,dv=vs,d120i=120vs,di +ϵ,(5)

τ¯s,d(20)=120i=019τs,di.(6)

The normalised high-low range δs,dhl encodes intraday price dispersion, where hs,d and ls,d denote the daily high and low prices respectively:

δs,dhl=hs,dls,dcs,d+ϵ.(7)

The 14-day Relative Strength Index RSIs,d(14) [23] is computed as follows, where rs,d+=max(rs,d,0) and rs,d=max(rs,d,0) denote the positive and negative components of the daily return respectively:

RSIs,d(14)=1001001+114i=013rs,di+114i=013rs,di+ϵ.(8)

Finally, r~s,d is the percentage change of the closing price as reported directly by the exchange. In all formulae, ϵ=108 is a small constant added for numerical stability.

To ensure year-boundary rolling statistics are computed over a full lookback window, the daily data for year t are prepended with a 30-trading-day buffer from year t1 prior to feature computation; the buffer rows are discarded before saving.

3.2.1 Look-Ahead-Free Fundamental Alignment

Let xs,qfundRFf denote the fundamental feature vector of stock s reported in fiscal quarter q, and let ts,qpub denote the corresponding public announcement date. For a given rebalancing date d, the active fundamental conditioning vector xs,dfund is taken from the most recently announced quarter q whose announcement date does not exceed d, ensuring that no future disclosure is visible to the model:

xs,dfund=xs,qfund,q=argmaxq{ts,qpubd}.(9)

In practice, ts,qpub is the actual filing date recorded in the BaoStock database, which reflects the regulatory disclosure deadline under CSRC rules: annual reports must be filed within four months of fiscal year-end, and interim reports within two months of the half-year end. The as-of join in Eq. (9) therefore incorporates the full regulatory reporting lag rather than assuming instantaneous disclosure.

This construction strictly prevents look-ahead bias, a critical requirement in ML-based asset pricing [2]: the model is never exposed to financial results before their public disclosure. Fundamental data are available from 2009 onward; stocks with no disclosed fundamental record prior to a given rebalancing date carry NaN values in the fundamental vector, which are subsequently imputed with zero after normalisation (see Section 3.2.3).

3.2.2 Monthly Snapshot and Target Construction

Rather than training on every trading day, we construct a monthly panel by selecting, for each stock s and calendar month m, the observation corresponding to the last trading day of m. This rebalancing-frequency design reduces temporal redundancy in the training data while matching the typical holding period of institutional quantitative strategies. Let 𝒮d denote the eligible cross-section of stocks at rebalancing date d.

The raw 20-trading-day forward return ys,d is defined as:

ys,d=cs,d+20cs,d1,(10)

where cs,d+20 is the closing price 20 trading days ahead. This quantity is used solely for evaluation (IC computation) and to define the ground-truth cross-sectional ordering; it is not used directly as a training target due to its sensitivity to absolute market level.

Two derived training targets are constructed from ys,d. The first is the continuous cross-sectional rank y~s,d[0,1]:

y~s,d=rank(ys,d𝒮d)1|𝒮d|1,(11)

which serves as the regression target for the pointwise loss component. The second is the quintile label zs,d{1,2,3,4,5}, obtained by applying cross-sectional equal-frequency binning to ys,d at each rebalancing date, which defines the ground-truth permutation π for the listwise ranking loss component. The model is trained jointly against both targets via the composite loss defined in Section 4.2.1. Both targets are computed within the eligible cross-section 𝒮d, making them invariant to absolute market direction.

3.2.3 Feature Normalisation

Price and Technical Features

Let ϕs,d(j) denote the j-th scalar component of the feature vector ϕs,d, where j{1,,12} indexes the features defined in Eq. (1), and let s𝒮d denote a generic stock in the eligible cross-section on day d. Each feature ϕs,d(j) is independently rank-normalised across the cross-section:

ϕ^s,d(j)=rank(ϕs,d(j){ϕs,d(j)}s𝒮d)1|𝒮d|1,(12)

mapping all features to the interval [0,1] while preserving relative ordinal relationships and providing automatic robustness to outliers and scale differences [10].

Fundamental Features

Fundamental features require additional treatment owing to their heavier-tailed distributions and sign-asymmetric magnitudes. A three-step normalisation is applied per rebalancing date d:

1.   Winsorisation. Each feature is clipped to its 1st–99th percentile bounds within the cross-section 𝒮d [2], suppressing the influence of extreme accounting values.

2.   Signed log-scaling. Applied to the net profit feature only, owing to its heavy-tailed and sign-asymmetric distribution. Let Πs,d denote the raw net profit of stock s at rebalancing date d, and let sgn() denote the sign function. The transformed value Π~s,d is defined as:

Π~s,d=sgn(Πs,d)log(1+|Πs,d|).(13)

3.   Cross-sectional rank normalisation. Eq. (12) is applied to each fundamental feature to yield a uniform [0,1] distribution per feature per rebalancing date.

Missing values that remain after alignment (Eq. (9)) are imputed with 0.0 after normalisation, corresponding to the median of the normalised distribution and therefore encoding absence of information without introducing directional bias.

3.2.4 Sequence Tensor Construction

For each (stock, rebalancing-date) pair (s,d) that passes all filters, we extract a fixed-length historical window of L=60 trading days ending on d, where Fp=12 is the price feature dimension and Ff=8 is the fundamental feature dimension. The resulting input tensors are:

Xs,dpriceRL×Fp,L=60, Fp=12,(14)

xs,dfundRFf,Ff=8,(15)

where Xs,dprice is the normalised price/technical feature matrix (Eqs. (1)(12)) and xs,dfund is the normalised fundamental conditioning vector (Section 3.2.3). Samples with fewer than L historical trading days available prior to d are discarded. The FiLM conditioning vector xs,dfund is used to modulate the temporal encoder at each layer [3], as detailed in Section 4.1.

4  Methodology

4.1 Model Architecture

Figs. 13 provide an overview of all six deep model architectures evaluated in this work. Each encoder family—recurrent (LSTM), convolutional (TCN), and attention-based (iTransformer)—is instantiated in two variants: a baseline that incorporates the fundamental conditioning vector xfundRFf via late-fusion concatenation before the prediction head, and a FiLM-conditioned variant (ours) that instead injects xfund into intermediate representations of the encoder via learned affine modulation. All six models share an identical prediction head architecture and hidden dimension Dh=64, ensuring that observed performance differences are attributable to the fusion strategy rather than model capacity. The FiLM application point differs by encoder family: for the LSTM it modulates the final hidden state (Fig. 1b), for the TCN it modulates the full temporal feature map prior to pooling (Fig. 2d), and for the iTransformer it is applied inside each attention block after the self-attention sublayer and before the feed-forward sublayer (Fig. 3f).

images

Figure 1: LSTM architecture variants. (a) LSTMRanker baseline—fundamentals concatenated to hidden state. (b) FiLM-LSTM—fundamentals modulate hlast via affine transformation before the prediction head.

images

Figure 2: TCN architecture variants. (c) TCNRanker baseline—fundamentals concatenated after global average pooling. (d) FiLM-TCN—fundamentals modulate the full temporal feature map prior to pooling.

images

Figure 3: iTransformer architecture variants. (e) iTransformerRanker baseline—fundamentals concatenated to the flattened representation before the prediction head. (f) FiLM-iTransformer—a single FiLM generator produces layer-specific parameters (γl,βl) applied inside each attention block after self-attention and before the feed-forward sublayer. xfund is not concatenated to the prediction head.

4.1.1 Problem Formulation

Given the sequence tensor Xs,dpriceRL×Fp and the fundamental conditioning vector xs,dfundRFf constructed in Section 3.2.4, the task is to learn a scoring function fθ, where θ denotes the learnable model parameters:

fθ: RL×Fp×RFf  R,(16)

such that, within each cross-section 𝒮d, the predicted score y^s,d=fθ(Xs,dprice,xs,dfund) for stock s at rebalancing date d is monotonically consistent with the ground-truth cross-sectional rank y~s,d (Eq. (11)). This is a cross-sectional ranking problem: the absolute level of y^s,d is irrelevant; only the relative ordering of stocks within a rebalancing date matters.

4.1.2 FiLM Conditioning Mechanism

Feature-wise Linear Modulation (FiLM) [3] is a general-purpose conditioning mechanism that applies a learned affine transformation to an intermediate representation as a function of an external conditioning signal. Let Dh denote the hidden dimension of the encoder, hRDh an intermediate encoder representation, and zRFf the conditioning input. The notation FiLM(h;z) uses a semicolon to separate the modulated representation h from the conditioning input z. FiLM computes:

FiLM(h;z)=γ(z)h+β(z),(17)

where denotes element-wise multiplication, and γ:RFfRDh and β:RFfRDh are learned feature-wise scaling and shifting functions respectively. Let ReLU(x)=max(0,x) denote the rectified linear unit activation applied element-wise, and let [;] denote vertical vector concatenation. Both γ and β are implemented as a shared three-layer MLP with weight matrices W1RDh×Ff, W2RDh×Dh, and W3R2Dh×Dh, where the output dimension 2Dh accounts for the concatenated [γ;β] vector:

[γ(z);β(z)]=W3ReLU(W2ReLU(W1z))R2Dh.(18)

The scaling output γ(z) is further passed through a scaled sigmoid activation σ() to constrain the gain to [0,2], preventing unstable amplification:

γ(z)=2σ(W3(γ)ReLU(W2ReLU(W1z))),(19)

where W3(γ) denotes the γ partition of W3, and σ(x)=(1+ex)1 is the sigmoid function. This parameterisation allows FiLM to selectively amplify, suppress, or shift each dimension of h conditioned on the fundamental context, without requiring the fundamental signal to be concatenated into the temporal processing stream.

In our setting, z=xs,dfund is the Ff-dimensional normalised fundamental vector, with Ff=8. Our instantiation departs from the original formulation of Perez et al. [3] in three specific ways motivated by the heterogeneous-frequency fusion setting. First, the original FiLM generator is a GRU over word token embeddings; ours is a three-layer MLP over eight normalised tabular accounting ratios, since fundamentals are tabular scalars rather than sequential tokens. Second, the original FiLM conditions inside every convolutional layer at the spatial level; ours conditions on complete encoder representations, because the conditioning signal is quarterly while the price sequence is daily—applying conditioning before a complete temporal summary is available would be meaningless for a static low-frequency signal. Third, the original FiLM’s conditioning and primary signals share the same temporal granularity; ours deliberately bridges two different frequencies, which is the core architectural problem this paper addresses. The sigmoid constraint on γ to [0,2] is an additional design choice not present in the original formulation, introduced to prevent unstable amplification in the presence of financial data noise. We instantiate FiLM at different points in each encoder family, as described below.

4.1.3 Encoder Architectures

LSTM and FiLM-LSTM

The recurrent baseline (LSTM Ranker) encodes the price sequence Xs,dpriceRL×Fp with a two-layer LSTM [4], processing the sequence step by step and extracting the final hidden state hLRDh, where L is the sequence length and Dh is the hidden dimension defined in Section 4.1.2. Let Head() denote the prediction head—a two-layer MLP with a scalar output that maps the encoder representation to the predicted score. Fundamentals are incorporated by late fusion—concatenation with the hidden state before the prediction head:

y^s,d=Head([hL; xs,dfund]).(20)

The proposed FiLM-LSTM instead modulates the final hidden state via Eq. (17) before the prediction head:

y^s,d=Head(FiLM(hL; xs,dfund)).(21)

This allows the fundamental context to rescale and shift the learned temporal summary before any scoring decision is made. FiLM is applied at hL rather than at each intermediate step t<L for two reasons. First, quarterly accounting fundamentals are static within the 60-day window—injecting the same conditioning vector at every recurrent step would provide no additional temporal information. Second, intermediate hidden states ht for t<L encode only a partial sequential context; hL is the earliest point at which the complete 60-day sequence has been processed, making it the natural insertion point for a low-frequency static signal [3,19]. The structural consequence of this placement—that FiLM-LSTM conditions a collapsed representation rather than a temporally-rich feature map—is discussed in Section 6.

TCN and FiLM-TCN

The convolutional baseline (TCN Ranker) uses a Temporal Convolutional Network [5] consisting of Nc=6 causal dilated residual blocks, where Nc denotes the number of blocks. Let i{1,,Nc} denote the block index (distinct from the lag index used in Section 3.2), kc=3 the convolutional kernel size, and δi=2i1 the exponentially increasing dilation factor of block i. The resulting receptive field is 1+2(kc1)i=0Nc12i=127 time steps, sufficient to cover the full L=60-day input window.

Let C=Dh denote the number of feature channels, F(i)RC×L the feature map after block i, and t{1,,L} the time step index. The input feature map is F(0)=Xs,dpriceRFp×L, where () denotes the matrix transpose. Let Conv1dδicausal() denote a causal dilated 1D convolution with dilation δi, which ensures no future time steps are visible to the model. Each block applies this convolution followed by ReLU activation, dropout, and a residual shortcut:

F(i)=ReLU(Conv1dδicausal(F(i1)))+F(i1),i=1,,Nc.(22)

The notation F:,t(Nc)RC denotes the t-th column of the final feature map, i.e., the feature vector at time step t. The baseline performs global average pooling over the time dimension and concatenates with fundamentals before the head:

y^s,d=Head([1Lt=1LF:,t(Nc); xs,dfund]).(23)

The proposed FiLM-TCN applies FiLM conditioning to the full temporal feature map F(Nc)RC×L prior to pooling, producing a modulated map F~(Nc)RC×L:

F~:,t(Nc)=γ(xs,dfund)F:,t(Nc)+β(xs,dfund),t{1,,L},(24)

followed by global average pooling and the prediction head. Crucially, conditioning occurs before aggregation rather than after, enabling the fundamental context to modulate how each temporal pattern is weighted across the entire sequence—for instance, amplifying momentum patterns for high-ROE stocks while suppressing them for low-quality firms [3].

iTransformer and FiLM-iTransformer

The attention-based baseline (iTransformer Ranker) [6] inverts the standard Transformer architecture by treating each variate (feature dimension) as a token rather than each time step. Let Demb denote the embedding dimension, l{1,,Nl} the layer index, and Nl=2 the number of inverted self-attention layers. Let WembRL×Demb denote the learned embedding projection matrix. The L-length time series of each of the Fp features is first projected to a Demb-dimensional embedding, yielding the initial embedding matrix E(0)RFp×Demb:

E(0)=Xs,dpriceWembRFp×Demb,(25)

where () denotes the matrix transpose as before. Let LayerNorm() denote layer normalisation, MHA(Q,K,V) multi-head attention with query Q, key K, and value V matrices and H=4 attention heads, and FFN() a two-layer feed-forward network with hidden dimension 4Demb. Let E(l)RFp×Demb denote the embedding matrix after layer l, and E the intermediate embedding after the self-attention sublayer. Each of the Nl layers models inter-variate dependencies:

E=LayerNorm(E(l1)+MHA(E(l1),E(l1),E(l1))),(26)

E(l)=LayerNorm(E+FFN(E)).(27)

The baseline concatenates flatten(E(Nl))—where flatten() reshapes a matrix into a vector—with xs,dfund before the prediction head. The proposed FiLM-iTransformer introduces a shared FiLM generator that produces layer-specific scaling and shifting parameters γl,βlRFp×Demb for each layer l, via a layer-specific MLP MLPl():

[γl;βl]=MLPl(xs,dfund)R2×Fp×Demb,(28)

E(l)=FiLM(E; γl,βl).(29)

This design allows the fundamental context to modulate the inter-variate attention representations at every layer, giving the model direct control over which cross-feature interactions are amplified or suppressed conditional on the firm’s financial profile. The prediction head uses only the modulated representation—xs,dfund is not concatenated—as the conditioning information has already been fully absorbed into E(Nl):

y^s,d=Head(flatten(E(Nl))).(30)

XGBoost Ranker

As a strong tabular baseline, we train an XGBoost gradient-boosted tree model [7] on the flattened union of all price/technical and fundamental features (20 features total), without any temporal sequence structure. This model serves as the primary indicator of whether deep temporal encoders provide incremental value over well-tuned classical approaches.

4.1.4 Model Configurations

All deep models share a common hidden dimension Dh=64 and a common prediction head architecture: a two-layer MLP with ReLU activation, dropout with rate pdrop=0.3, and a scalar output. The three encoder families evaluated are: the two-layer LSTM [4], the six-block dilated TCN [5], and the two-layer iTransformer [6], each instantiated in a baseline and a FiLM-conditioned variant. Table 1 summarises the key architectural hyperparameters.

images

4.2 Training Objective

4.2.1 Loss Function

Let denote the composite training objective, ListMLE the listwise ranking loss, MSE the pointwise regression loss, and α[0,1] the weighting coefficient controlling their relative contribution. Model training optimises:

=αListMLE+(1α)MSE,α=0.1,(31)

where the MSE term provides dense, stable gradients early in training and the ListMLE term directly optimises the ranking objective. The MSE loss is defined as:

MSE=1ns𝒮d(y^s,dy~s,d)2,(32)

where y~s,d is the continuous cross-sectional rank defined in Eq. (11), serving as the regression target.

The ListMLE loss [22] maximises the log-likelihood of the ground-truth permutation of stocks ranked by their 20-day forward returns. Let n=|𝒮d| denote the number of stocks in the cross-section at rebalancing date d, y^=(y^1,d,,y^n,d) the vector of predicted scores, and π the ground-truth permutation induced by ranking stocks by ys,d in descending order, where π(r) denotes the index of the stock at rank r. Let r and r denote summation indices over ranks (distinct from the lag and block indices used earlier), and let log and exp denote the natural logarithm and natural exponential respectively:

ListMLE=1nr=1n[y^π(r)logr=rnexp(y^π(r))],(33)

where y^π(r) denotes the predicted score of the stock at ground-truth rank r. The log-sum-exp term logr=rnexp(y^π(r)) is computed using the numerically stable log-sum-exp identity logiexp(ai)=c+logiexp(aic), where c=maxiai, to avoid floating-point overflow. ListMLE is only well-defined within a single cross-section; accordingly, each training batch is constructed to contain stocks from exactly one rebalancing date (Section 4.2.3).

4.2.2 Optimisation and Regularisation

All deep models are trained with the AdamW optimiser [24], a variant of Adam with decoupled weight decay, using weight decay coefficient λw=103 and gradient clipping: the 2 norm of the gradient 2 is clipped to a maximum of 1.0 at each update step to stabilise training.

Two learning rate schedules are used depending on encoder type. Let ητ denote the learning rate at training step τ (distinct from the time step index t used in Section 4.1.3), ηmin and ηmax the minimum and maximum learning rates respectively, and Tmax the total number of training steps. LSTM and TCN models use cosine annealing [24]:

ητ=ηmin+12(ηmaxηmin)(1+cosπcτTmax),(34)

where πc3.14159 is the mathematical constant (distinct from the permutation π defined in Section 4.2.1), with ηmax=103 (LSTM) or 3×104 (TCN), and ηmin=0.01ηmax.

Transformer-based models use a one-cycle learning rate schedule [25] consisting of three phases: a linear warmup over the first 10% of training steps from ηmax/10 to ηmax, followed by cosine annealing from ηmax to ηmax/100 over the remaining steps, with ηmax=3×104.

Early stopping monitors the validation Information Coefficient (IC), defined formally in Section 4.2.4, with a patience of 10 epochs for LSTM and TCN models and 15 epochs for Transformer variants.

4.2.3 Cross-Sectional Batch Construction

A training batch is defined as the set of all stock samples from a single rebalancing date, and one epoch is a full pass over all rebalancing dates in the training split. A custom grouped sampler, which we refer to as DateGroupedSampler, constructs batches such that all samples within a batch originate from the same rebalancing date. This is a hard requirement for the ListMLE loss (Eq. (33)): ranking stocks from different calendar months in the same gradient update is semantically meaningless, as their forward returns are not cross-sectionally comparable and no valid permutation π exists across months.

Batches with fewer than 10 stocks are discarded to ensure a minimum cross-sectional diversity for the ListMLE loss to produce a meaningful ranking gradient. The training split covers 96 calendar months (January 2010 to December 2017, Table 2), yielding mini-batches of 128 stocks drawn exclusively from the same rebalancing date, resulting in approximately 1500 gradient updates per epoch across the training split.

images

4.2.4 Evaluation Protocol

Model selection uses the Information Coefficient (IC), defined as the Spearman rank correlation between the vector of predicted scores y^d=(y^1,d,,y^n,d) and the vector of continuous cross-sectional ranks y~d=(y~1,d,,y~n,d) (Eq. (11)) across all stocks in 𝒮d. Let ρs(,) denote the Spearman rank correlation coefficient. The IC at rebalancing date d is:

ICd=ρs(y^d, y~d),(35)

and the mean IC across all rebalancing dates d𝒟val in the validation set is:

IC¯=1|𝒟val|d𝒟valICd.(36)

The model checkpoint achieving the highest IC¯ on the validation set is selected for final evaluation.

The IC Information Ratio (ICIR) measures the consistency of the predictive signal and is defined as the ratio of the mean IC to its standard deviation σIC across rebalancing dates:

ICIR=IC¯σIC,σIC=1|𝒟val|1d𝒟val(ICdIC¯)2.(37)

ICIR is logged per epoch but is not used for model selection: with only 24 validation months (Table 2), the standard error on σIC is too large for reliable model selection.

To quantify variance due to random weight initialisation, all models are trained under three independent random seeds ={42,123,777}; test results are reported as mean ± standard deviation across seeds. Mixed-precision training, which reduces memory footprint by storing activations in 16-bit floating point during the forward pass, is enabled throughout via torch.amp.autocast in PyTorch.

4.3 Experimental Setup

4.3.1 Dataset Splits

The dataset is partitioned into three non-overlapping temporal splits following a strict walk-forward protocol with no shuffling across time boundaries (Table 2).

The test set is intentionally held out until final evaluation to prevent indirect data snooping through hyperparameter tuning on test-period market regimes. The test split contains more total sequences than the training split despite covering fewer calendar months, reflecting the growth of the A-share cross-section over the sample period; the number of unique stocks appearing in each split is 3185 (train), 3420 (validation), and 4423 (test), with the increase driven by new listings over the 15-year window.

4.3.2 Baseline Models

We compare the three proposed FiLM-conditioned models against four baselines spanning the classical-to-deep-learning spectrum:

•   XGBoost Ranker [7]: a gradient-boosted tree model trained on the full 20-dimensional tabular feature vector (12 price/technical + 8 fundamental features), without any temporal sequence structure.

•   LSTM Ranker:a two-layer LSTM [4] encoding the 60-day price sequence, with fundamental features incorporated via late-fusion concatenation to the final hidden state (Eq. (20)).

•   TCN Ranker: a six-block dilated causal TCN [5] with fundamental features concatenated after global average pooling (Eq. (23)).

•   iTransformer Ranker:a two-layer inverted Transformer with variate-level attention [6], with fundamental features concatenated to the flattened representation before the prediction head.

Each deep baseline shares identical hidden dimension (Dh=64), dropout (pdrop=0.3), and prediction head with its FiLM-conditioned counterpart, ensuring that performance differences are attributable solely to the conditioning mechanism rather than model capacity.

4.3.3 Evaluation Metrics

We evaluate all models on two complementary axes: predictive ranking quality and simulated portfolio performance.

Ranking Metrics

The Information Coefficient (IC) [1] measures the Pearson correlation between the predicted scores y^s,d and the realised 20-day forward returns ys,d, computed per rebalancing date and averaged. Let ρp(,) denote the Pearson correlation coefficient, 𝒟 the set of all rebalancing dates in the evaluation period, and ICd the per-date IC:

ICd=ρp({y^s,d}s𝒮d, {ys,d}s𝒮d),(38)

with the mean IC across all rebalancing dates defined as:

IC¯=1|𝒟|d𝒟ICd.(39)

Note that this section uses Pearson correlation for IC, consistent with standard practice in asset pricing [1], while Section 4.2.4 uses Spearman correlation for model selection—the distinction is discussed further in Section 5.

The Rank Information Coefficient (RankIC) substitutes Spearman rank correlation ρs(,) for ρp(,) in Eq. (38), providing robustness to outlier returns:

RankICd=ρs({y^s,d}s𝒮d, {ys,d}s𝒮d),(40)

with RankIC¯ defined analogously to Eq. (39).

The corresponding ICIR and RankICIR are defined as the ratio of the mean IC (or RankIC) to its standard deviation σIC (or σRankIC) across rebalancing dates, where IC¯ and σIC are as defined in Eq. (37):

ICIR=IC¯σIC,RankICIR=RankIC¯σRankIC.(41)

We additionally report IC > 0, the fraction of rebalancing dates on which ICd>0, as a measure of signal hit rate:

IC>0=1|𝒟|d𝒟1[ICd>0],(42)

where 1[] denotes the indicator function.

We formally define signal stability as the standard deviation of RankICd across rebalancing dates in the evaluation period:

σ(RankIC)=1|𝒟|1d𝒟(RankICdRankIC¯)2.(43)

A lower σ(RankIC) indicates a more consistent month-to-month predictive signal. Note that σ(RankIC) is the denominator of RankICIR—a model with lower σ(RankIC) at the same mean RankIC will produce a higher RankICIR. We report σ(RankIC) explicitly alongside RankICIR to separate the contribution of signal mean from signal variance to the overall risk-adjusted predictive quality.

Portfolio Metrics

To evaluate practical utility, we construct a monthly long-short portfolio by assigning each stock to one of five equal-frequency quintile buckets based on its predicted score y^s,d, where quintile 1 (Q1) contains the lowest-scoring stocks and quintile 5 (Q5) the highest-scoring stocks. The portfolio takes a long position in Q5 and a short position in Q1.

Let r¯d(q) denote the equal-weighted mean 20-day forward return of quintile q{1,,5} at rebalancing date d, and let ctc=30bps denote the one-way transaction cost in basis points (1 bps =0.01%), applied to both legs assuming 100% monthly portfolio turnover [2]. The 30 bps one-way cost assumption follows standard practice in Chinese A-share quantitative research and is applied conservatively: actual measured turnover across all nine deep models ranges from 54.7% to 70.4%, meaning the 100% assumption overstates costs and the reported net returns are lower bounds on practically achievable performance under realistic execution. The monthly long-short portfolio return rdLS is:

rdLS=(r¯d(5)ctc)(r¯d(1)+ctc).(44)

Let T=|𝒟test| denote the total number of rebalancing dates in the test period. The annualised return (Ann.Ret) is computed via geometric compounding, which accounts for the path-dependent effect of return volatility on terminal wealth:

Ann.Ret=(d=1T(1+rdLS))12/T1,(45)

where the exponent 12/T converts from monthly to annual frequency, assuming 12 rebalancing periods per year.

Let r¯LS=1Td=1TrdLS denote the mean monthly L/S return and σrLS=1T1d=1T(rdLSr¯LS)2 its sample standard deviation. The annualised Sharpe ratio [26], scaled by 12 to convert from monthly to annual frequency, is:

Sharpe=r¯LSσrLS12.(46)

Let m{1,,T} denote a portfolio time index (distinct from the sequence time step t and training step τ used earlier), and let Cm=d=1m(1+rdLS) denote the cumulative L/S return up to period m. Maximum drawdown (MaxDD) [27] is the largest peak-to-trough decline in the cumulative return series:

MaxDD=minm{1,,T}CmmaxmmCmmaxmmCm,(47)

where m is a look-back index over all prior periods.

4.3.4 Ensemble and Statistical Reporting

To account for variance due to random weight initialisation, all deep models are trained independently under three random seeds, collected in the set ={42,123,777}, where each seed determines the initial model weights. Let y^s,d(r) denote the predicted score of stock s at rebalancing date d produced by the model trained under seed r, where each seed yields a separate saved model checkpoint—the model state at the epoch achieving the highest validation IC¯ (Eq. (36)). At evaluation time, the ensemble predicted score y^s,dens is the average across the three seed checkpoints, using seed index r to avoid conflict with the rank index r used in Eq. (33):

y^s,dens=1||ry^s,d(r).(48)

All reported test metrics are computed using y^s,dens in place of y^s,d. Ensemble averaging has been shown to reduce variance in IC estimates for financial prediction tasks [2]. Per-seed validation ICd values are additionally reported as mean ± standard deviation across to characterise training stability.

4.3.5 Implementation Details

All experiments are implemented in PyTorch and executed on a single NVIDIA RTX PRO 6000 Blackwell Server Edition GPU. Mixed-precision training (torch.amp.autocast) is enabled throughout to reduce memory footprint. The full hyperparameter configuration is summarised in Table 3.

images

5  Results

5.1 Main Results

Tables 4 and 5 report the full test-set performance of all seven models over the 2020–2024 evaluation period. All deep model results are ensemble predictions averaged across three random seeds ={42,123,777} as described in Section 4.3.4.

images

images

FiLM-TCN Achieves the Best Overall Performance

FiLM-TCN attains the highest scores among the six deep encoder models in Table 4 across every primary metric: IC of 0.0905, RankIC of 0.1415, ICIR of 0.730, RankICIR of 1.099, annualised Sharpe ratio of 1.633, and an IC hit rate of 80.4%. Among all seven models including the tabular baseline, FiLM-TCN leads on IC, RankIC, RankICIR, Sharpe, and IC > 0; XGBoost achieves a higher ICIR (0.785 vs. 0.730), a point discussed further in Section 6.1. Relative to its baseline TCN, FiLM conditioning yields consistent improvements across all metrics—a +2.7% relative gain in IC, +9.7% in ICIR, and +6.2% in Sharpe—demonstrating that modulating the full temporal feature map with fundamental context (Eq. (24)) provides meaningful incremental signal over late-fusion concatenation.

FiLM Improves Consistency More than Raw Predictive Power

For the convolutional and attention-based encoders, the primary benefit of FiLM conditioning is most visible in the stability metrics (ICIR, RankICIR, IC > 0) rather than mean IC alone. FiLM-TCN achieves an ICIR of 0.730 vs. 0.665 for TCN (+9.7%), and FiLM-iTransformer achieves a RankICIR of 0.864 vs. 0.782 for iTransformer (+10.5%). The recurrent setting tells a more nuanced story: FiLM-LSTM improves portfolio metrics (Sharpe +2.4%, annualised return +2.2%) but does not improve IC-based ranking consistency, suggesting that hidden-state modulation is a less effective FiLM application point than feature-map modulation on this dataset. FiLM-TCN achieves a Signal Stability of 0.1287 (Eq. (43)), the lowest of all evaluated models as reported in Table 4, confirming that intermediate pre-aggregation conditioning reduces predictive variance relative to both late-fusion concatenation and post-pool gating.

Statistical Robustness and Regime-Based Stability

Paired t-tests on the 56-month RankIC series confirm that mean RankIC differences between FiLM and baseline models are not statistically significant at conventional thresholds (all p>0.05), consistent with the modest absolute magnitudes (ΔRankIC 0.002 for the TCN family) and the limited statistical power of a 56-observation window—a known constraint of financial ML evaluation [28]. This reinforces that FiLM’s primary contribution is signal stability rather than mean accuracy gains. To examine whether the stability advantage holds across market conditions, Table 6 partitions the test period into three regimes. FiLM-TCN achieves lower SD(RankIC) than TCN in all three regimes, with the largest advantages in the Regulatory Bear period (0.1022% vs. 0.1303%, 21.6%)—the most challenging market environment in the test window—and Mixed Recovery (0.1519% vs. 0.1608%, 5.5%); the Recovery period advantage is marginal (0.1011 vs. 0.1017).

images

5.2 Fusion Mechanism Comparison and Sensitivity Analysis

GMU Comparison

To situate FiLM against a strong alternative fusion mechanism, we evaluate Gated Multimodal Unit (GMU) encoders across all three encoder families, replacing the FiLM module with a learned gating operation applied post-encoding. Table 7 reports the three-way comparison across late concatenation, GMU, and FiLM per encoder family.

images

For the TCN family, GMU-TCN achieves the highest raw RankIC (0.1466 vs. 0.1415) and leads on Sharpe (1.701 vs. 1.633) and annualised return (27.7% vs. 25.3%), demonstrating that post-encoding gating is a competitive fusion mechanism on mean accuracy and risk-adjusted portfolio performance. However, FiLM-TCN achieves higher RankICIR (1.099 vs. 1.079), lower Signal Stability (0.1287 vs. 0.1359), and higher IC hit rate (80.4% vs. 78.6%), confirming that pre-aggregation conditioning produces a more consistent month-to-month predictive signal. This tradeoff is structurally interpretable: GMU operates post-pooling and can sharpen final predictions but cannot reduce signal variance across time steps, whereas FiLM conditions the full temporal feature map prior to aggregation. For the LSTM family, FiLM-LSTM leads GMU-LSTM on RankIC (0.1380 vs. 0.1347), RankICIR (1.029 vs. 0.998), Sharpe (1.498 vs. 1.482), and annualised return (23.3% vs. 22.5%), while GMU-LSTM achieves a higher IC hit rate (75.0% vs. 71.4%). For the iTransformer family, FiLM-iTransformer leads GMU-iTransformer on RankIC (0.1288 vs. 0.1181), RankICIR (0.864 vs. 0.783), Sharpe (1.228 vs. 0.961), and annualised return (19.4% vs. 14.8%), while GMU-iTransformer achieves a marginally higher IC hit rate (73.2% vs. 71.4%), suggesting that per-layer conditioning provides more integration points than a single post-encoding gate on the primary ranking and risk-adjusted metrics.

FiLM Generator Sensitivity

We evaluate variants of the FiLM generator across all three encoder families, varying generator width (narrow: 83232, wide: 8128128) and γ bound ([0,1], [0,2], [0,4]). Results are reported in Table 8.

images

For FiLM-TCN, all variants remain within ±0.006 RankIC of the original, with the original achieving the highest RankICIR (1.099), confirming the default configuration produces the most consistent signal and that the [0,2] γ bound is an appropriate design choice for signal stability. For FiLM-LSTM, all variants produce equivalent results within noise, confirming that the performance inconsistency relative to FiLM-TCN is architectural rather than generator-dependent. For FiLM-iTransformer, the original configuration outperforms all generator variants, with narrow and wide generators both degrading RankIC to 0.117, consistent with the near-identity γ values indicating the generator is already operating at its structural ceiling regardless of capacity.

iTransformer Hidden Dimension Sensitivity

We evaluate iTransformer hidden dimensions Dh{64,128,256} to test whether larger capacity closes the performance gap with FiLM-TCN. Table 9 reports results; the finding is discussed in Section 6.3.

images

6  Discussion

6.1 Comparison with Baselines

XGBoost achieves the highest ICIR of 0.785 across all seven models and a competitive IC of 0.0890, outperforming all deep model variants on ICIR. This result reflects a well-established property of gradient-boosted trees on tabular financial data [2]: by operating directly on cross-sectional rank-normalised features, XGBoost produces a highly stable predictive signal with low month-to-month variance—precisely what ICIR measures. The deep models, encoding 60-day sequential dynamics, introduce additional variance that is not always compensated by incremental predictive accuracy on this monthly-frequency benchmark. That XGBoost operates on a flattened 20-dimensional feature vector with no temporal structure further suggests that much of the predictive signal in the China A-share cross-section is captured by static monthly snapshots rather than sequential dynamics.

The deep models are therefore most valuable as controlled comparisons rather than performance maximisers: because each encoder family is instantiated in both a baseline and a FiLM-conditioned variant with identical capacity, they isolate the contribution of the conditioning mechanism in a way that a tabular baseline cannot. That isolation reveals that the primary benefit of FiLM conditioning on this benchmark lies in signal stability—FiLM-TCN improves ICIR by +9.7% and RankICIR by +8.3% over its baseline—rather than in mean predictive accuracy alone. FiLM-TCN outperforms XGBoost on five of six reported metrics including IC, RankIC, RankICIR, Sharpe (1.633 vs. 1.522), and annualised return (25.30% vs. 21.97%, a 333 basis point gap net of transaction costs), with XGBoost’s ICIR advantage reflecting its strength on static snapshots rather than sequential dynamics.

The GMU comparison in Table 7 provides a further baseline perspective. For the TCN family, GMU-TCN achieves higher raw RankIC (0.1466 vs. 0.1415) and a higher Sharpe ratio (1.701 vs. 1.633) than FiLM-TCN, demonstrating that post-encoding gating is a competitive fusion mechanism on mean accuracy and risk-adjusted performance. However, FiLM-TCN achieves higher RankICIR (1.099 vs. 1.079) and lower Signal Stability (0.1287 vs. 0.1359), confirming that the stability advantage of pre-aggregation conditioning is not replicated by post-encoding gating—a distinction that is only visible when a post-encoding fusion baseline is included. For the LSTM family, FiLM-LSTM leads GMU-LSTM on RankIC, RankICIR, Sharpe, and annualised return, while GMU-LSTM achieves a higher IC hit rate (75.0% vs. 71.4%). For the iTransformer family, FiLM-iTransformer outperforms GMU-iTransformer on RankIC, RankICIR, Sharpe, and annualised return, while GMU-iTransformer achieves a marginally higher IC hit rate (73.2% vs. 71.4%). Across all three encoder families, the relative advantage of each mechanism varies by metric, confirming that performance depends on both the fusion mechanism and the dimension of evaluation.

Table 10 contextualises the practical trade-offs between model complexity and performance. XGBoost inference is near-instantaneous (<1 ms per rebalancing date); all deep models require 2.4–4.3 ms—a difference that is operationally negligible for monthly rebalancing workflows where scoring the full universe occurs once per month. The meaningful trade-off is therefore model complexity and data requirements rather than latency. FiLM-TCN introduces a modest +18.0% parameter overhead (82,241 vs. 69,697) relative to its TCN baseline—the most parameter-efficient fusion strategy evaluated. By contrast, GMU-iTransformer introduces +290.3% overhead (810,241 parameters) without a corresponding stability benefit. XGBoost remains preferable when GPU access is unavailable, training history is limited, or interpretability is required. FiLM-TCN is preferable when monthly rebalancing makes inference latency irrelevant, temporal pattern extraction is valued, and signal stability across market regimes is the primary objective.

images

6.2 FiLM Modulation Parameters and Mechanism Evidence

We extract γ and β parameters from each FiLM encoder across the full test set (3-seed ensemble) to verify active modulation. FiLM-LSTM and FiLM-TCN produce γ means of 0.936 and 0.957 respectively (both std 0.039), confirming active suppression relative to the identity γ=1. FiLM-iTransformer converges near identity (γ=0.997, std 0.011), consistent with the architectural incompatibility discussed in Section 6.3. Stratifying by ROE quintile, FiLM-TCN β shifts monotonically from 0.029 at Q1 (lowest ROE) to 0.046 at Q5 (highest ROE), indicating progressively stronger downward shifting for high-quality firms and directly substantiating the mechanism-switcher hypothesis. FiLM-LSTM shows near-zero β across all quintiles and FiLM-iTransformer near-identity γ across all quintiles, corroborating that meaningful conditioning requires pre-aggregation access to temporally-rich representations. Figs. 46 show the full stratifications.

images

Figure 4: γ and β by ROE quintile, FiLM-LSTM. Near-zero β across all quintiles, consistent with post-encoding placement.

images

Figure 5: γ and β by ROE quintile, FiLM-TCN. β shifts monotonically from 0.029 (Q1) to 0.046 (Q5), substantiating the mechanism-switcher hypothesis.

images

Figure 6: γ and β by ROE quintile, FiLM-iTransformer. Near-identity values across all quintiles, consistent with architectural incompatibility.

A permutation feature importance analysis identifies which accounting metrics drive the modulation gains: each of the eight fundamental features is zeroed out in turn and the RankIC drop measured across the test set, averaged over three seeds and three repeats. The baseline RankIC in each figure (0.1361 for FiLM-TCN; 0.1195 for FiLM-iTransformer) reflects per-seed evaluation averaged across seeds, and is therefore lower than the ensemble RankIC in Table 4 (0.1415; 0.1288), where scores are averaged across seeds before rank computation—a standard variance-reduction property of score-level ensembling. Net profit, price-to-book ratio (most recent quarter), and price-to-sales ratio (trailing twelve months) emerge as the top three features for both FiLM-TCN and FiLM-LSTM, with RankIC drops of +0.0185, +0.0093, and +0.0077 for FiLM-TCN. FiLM-iTransformer shares the same top-three ranking, consistent with limited exploitation of the conditioning signal. The consistent top-three ranking of netProfit, pbMRQ, and psTTM across FiLM-TCN and FiLM-LSTM—the two architectures where FiLM conditioning is effective—confirms that these profitability and valuation metrics are the primary drivers of modulation. For FiLM-iTransformer, a larger proportion of features show negative importance, consistent with the near-identity γ values (Section 6.3) indicating that the conditioning signal is minimally exploited regardless of which feature is masked. Full importance profiles are shown in Figs. 79.

images

Figure 7: Permutation feature importance, FiLM-LSTM. Mean RankIC drop per feature, averaged across 3 seeds × 3 repeats.

images

Figure 8: Permutation feature importance, FiLM-TCN. Mean RankIC drop per feature, averaged across 3 seeds × 3 repeats.

images

Figure 9: Permutation feature importance, FiLM-iTransformer. Mean RankIC drop per feature, averaged across 3 seeds × 3 repeats.

6.3 FiLM Conditioning and Architectural Compatibility

FiLM-iTransformer introduces a +98.0% parameter overhead relative to its baseline, the largest of the three encoder families, yet delivers only moderate improvements—smaller in magnitude than those achieved by FiLM-TCN relative to TCN. This disproportion reflects an architectural compatibility issue: the benefit of FiLM conditioning depends on where modulation is applied, and the iTransformer’s variate-level attention architecture is structurally less suited to temporal conditioning than the TCN’s feature maps.

The iTransformer operates across the variate dimension rather than the time dimension, treating each feature as a token and modelling inter-feature dependencies at each layer. FiLM conditioning applied inside the attention blocks therefore modulates cross-feature interactions rather than temporal patterns—a subtly different operation than the one motivated in Section 4.1.2, where the goal is to govern how sequential dynamics are extracted. In contrast, FiLM-TCN applies modulation to the full temporal feature map prior to pooling, directly governing how each time step contributes to the final representation. This structural alignment between the conditioning mechanism and the encoder’s processing axis appears to be a necessary condition for efficient gain.

The Dh sensitivity results in Table 9 confirm that the performance gap is not a capacity limitation. For FiLM-iTransformer, larger hidden dimensions consistently degrade RankIC relative to Dh=64 (0.12880.12270.1177). Both larger variants also show substantially lower RankICIR and Sharpe than Dh=64, though the relationship between Dh=128 and Dh=256 is non-monotonic—Sharpe partially recovers from 0.827 at Dh=128 to 1.035 at Dh=256, while remaining well below 1.228 at Dh=64. The near-identity γ mean of 0.997 (std 0.011) extracted from FiLM-iTransformer—compared to 0.957 (std 0.039) for FiLM-TCN—provides a direct mechanistic explanation: the iTransformer’s architecture provides insufficient temporal structure for the conditioning signal to exploit, so the generator learns to produce minimal modulation regardless of capacity. A more parameter-efficient future design—for example, low-rank conditioning at the input embedding rather than inside each attention block—may improve the efficiency–performance trade-off.

The FiLM-LSTM results warrant consideration within the same framework. FiLM-LSTM applies conditioning at hlast—a collapsed vector produced after all temporal extraction is complete—which prevents the fundamental signal from influencing how individual time steps are weighted. The mixed performance of FiLM-LSTM is therefore consistent with this structural post-encoding placement rather than a failure of the FiLM mechanism. The FiLM-LSTM vs. FiLM-TCN performance gap serves as implicit empirical support that pre-aggregation conditioning on temporally-rich representations is structurally more effective than post-sequence conditioning on a collapsed hidden state.

6.4 Limitations

Single Market and Asset Class

All experiments are conducted on China A-share equities. Chinese equity markets have distinctive structural properties—high retail investor participation, circuit-breaker mechanisms, periodic regulatory interventions, and a relatively short history of systematic factor investing—that may make them an unusual or unrepresentative testbed. The extent to which the findings generalise to other equity markets (e.g., US, European, or emerging-market equities), other asset classes (e.g., commodities, fixed income), or higher-frequency trading environments is unknown and constitutes an important direction for future work.

Transaction Cost Assumptions

The 30 bps one-way cost assumption follows standard practice in Chinese A-share quantitative research and is applied conservatively: actual measured turnover across all nine deep models (Tables 5 and 7) ranges from 54.7% to 70.4%, meaning the 100% assumption overstates costs and the reported net returns are lower bounds on practically achievable performance under realistic execution.

Hyperparameter Sensitivity

The architectural hyperparameters (hidden dimension Dh=64, sequence length L=60, FiLM MLP depth and width) were selected based on domain knowledge and computational budget rather than systematic grid search. It is possible that different configurations would alter the relative ranking of models, particularly for the iTransformer family which may benefit from larger Dh given its quadratic attention complexity.

Portfolio Risk for FiLM-iTransformer

FiLM-iTransformer records the largest maximum drawdown among the models in Table 5 (19.08%), substantially exceeding its late-fusion baseline (14.51%). This elevated drawdown is consistent with the architectural incompatibility discussed in Section 6.3: without meaningful temporal conditioning, the added parameter budget introduces instability in portfolio construction rather than improving risk management.

Fundamental Data Coverage

Quarterly fundamental features are only available from 2009 onward, and are missing for a non-trivial fraction of stocks at any given rebalancing date (imputed with zero after normalisation). The FiLM conditioning signal is therefore absent or uninformative for a subset of the training data, which may understate the potential benefit of fundamental conditioning under more complete disclosure regimes.

7  Conclusion

The central finding of this work is not that FiLM-conditioned models uniformly outperform their baselines, but that intermediate conditioning reliably shifts the locus of gain toward signal stability and risk-adjusted performance rather than mean predictive accuracy—a pattern that holds across two architecturally distinct encoder families and survives transaction costs in portfolio simulation. This suggests a reframing of the role of fundamental data in sequential models: rather than serving purely as additive predictive signal appended at the output, quarterly accounting fundamentals can act as a stabilising contextual prior when injected at intermediate encoder layers.

The architecture–fusion interaction uncovered here provides a further analytical perspective. Across three fusion strategies—late concatenation, post-encoding gating (GMU), and intermediate conditioning (FiLM)—the primary differentiator is not which mechanism is used but where conditioning is applied: feature-map modulation (FiLM-TCN) produces the most consistent signal stability improvements—lowest σ(RankIC) and highest RankICIR among all evaluated models—while hidden-state modulation (FiLM-LSTM) improves portfolio metrics but not ranking consistency, and per-layer attention modulation (FiLM-iTransformer) yields intermediate improvements at disproportionate parameter cost. Extracted γ and β parameters confirm that FiLM-TCN applies systematically different modulation across firm quality strata, with β shifting monotonically from 0.029 at the lowest ROE quintile to 0.046 at the highest—providing empirical grounding for the mechanism-switcher hypothesis rather than merely asserting it.

Three directions for future work are most immediate. First, the conditioning framework should be evaluated on other markets and asset classes to assess generalisability beyond the China A-share benchmark. Second, the FiLM generator design for the iTransformer warrants targeted investigation—low-rank projection at the input embedding rather than per-layer attention conditioning may achieve better efficiency–performance trade-offs. Third, the heterogeneous-frequency fusion problem studied here—a static low-frequency signal conditioning a high-frequency sequential encoder—arises broadly across computational modelling disciplines, and the stability-vs.-accuracy tradeoff observed here may inform analogous fusion problems in other domains.

Acknowledgement: This work was supported by the National Research Foundation of Korea (NRF) grant funded by the Korean government (MSIT) (RS-2023-00242528).

Funding Statement: This research was funded by the National Research Foundation of Korea (NRF) grant funded by the Korean government (MSIT), grant number RS-2023-00242528.

Author Contributions: The authors confirm contribution to the paper as follows: conceptualization, Maurice Kyla Octaviano and Jin-Taek Seong; methodology, Maurice Kyla Octaviano; software, Maurice Kyla Octaviano; validation, Maurice Kyla Octaviano and Jin-Taek Seong; formal analysis, Maurice Kyla Octaviano; investigation, Maurice Kyla Octaviano; data curation, Maurice Kyla Octaviano; writing—original draft preparation, Maurice Kyla Octaviano; writing—review and editing, Jin-Taek Seong; supervision, Jin-Taek Seong; project administration, Jin-Taek Seong; funding acquisition, Jin-Taek Seong. All authors reviewed and approved the final version of the manuscript.

Availability of Data and Materials: The data that support the findings of this study are available from the BaoStock financial data API (http://www.baostock.com).

Ethics Approval: Not applicable.

Conflicts of Interest: The authors declare no conflicts of interest.

References

1. Grinold RC, Kahn RN. Active portfolio management: a quantitative approach for producing superior returns and controlling risk. 2nd ed. New York, NY, USA: McGraw-Hill; 1999. [Google Scholar]

2. Gu S, Kelly B, Xiu D. Empirical asset pricing via machine learning. Rev Financ Stud. 2020;33(5):2223–73. doi:10.3386/w25398. [Google Scholar] [PubMed] [CrossRef]

3. Perez E, Strub F, de Vries H, Dumoulin V, Courville A. FiLM: visual reasoning with a general conditioning layer. In: Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence (AAAI); 2018 Feb 2–7; New Orleans, LA, USA. p. 3942–51. [Google Scholar]

4. Hochreiter S, Schmidhuber J. Long short-term memory. Neural Comput. 1997;9(8):1735–80. doi:10.1162/neco.1997.9.8.1735. [Google Scholar] [PubMed] [CrossRef]

5. Bai S, Kolter JZ, Koltun V. An empirical evaluation of generic convolutional and recurrent networks for sequence modeling. arXiv:1803.01271. 2018. [Google Scholar]

6. Liu Y, Hu T, Zhang H, Wu L, Wang S, Ma L, et al. iTransformer: inverted transformers are effective for time series forecasting. In: Proceedings of the International Conference on Learning Representations (ICLR); 2024 May 7–11; Vienna, Austria. p. 1–24. [Google Scholar]

7. Chen T, Guestrin C. XGBoost: a scalable tree boosting system. In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining; 2016 Aug 13–17; San Francisco, CA, USA. p. 785–94. [Google Scholar]

8. Fama EF, French KR. Common risk factors in the returns on stocks and bonds. J Financ Econ. 1993;33(1):3–56. doi:10.1016/0304-405x(93)90023-5. [Google Scholar] [CrossRef]

9. Jegadeesh N, Titman S. Returns to buying winners and selling losers: implications for stock market efficiency. J Financ. 1993;48(1):65–91. doi:10.1111/j.1540-6261.1993.tb04702.x. [Google Scholar] [CrossRef]

10. Kelly BT, Pruitt S, Su Y. Characteristics are covariances: a unified model of risk and return. J Financ Econ. 2019;134(3):501–24. [Google Scholar]

11. Feng G, He J, Polson NG, Xu J. Deep learning in characteristics-sorted factor models. J Financ Quant Anal. 2024;59(7):3001–36. doi:10.1017/s0022109023000893. [Google Scholar] [CrossRef]

12. Fan J, Shen Y. StockMixer: a simple yet strong MLP-based architecture for stock price forecasting. In: Proceedings of the AAAI Conference on Artificial Intelligence; 2024 Feb 20–27; Vancouver, BC, USA. p. 8681–9. [Google Scholar]

13. Leippold M, Wang Q, Zhou W. Machine learning in the Chinese stock market. J Financ Econ. 2022;145(2):64–82. doi:10.1016/j.jfineco.2021.08.017. [Google Scholar] [CrossRef]

14. Ma T, Leong WJ, Jiang F. A latent factor model for the Chinese stock market. Int Rev Financ Anal. 2023;87(6):102555. doi:10.1016/j.irfa.2023.102555. [Google Scholar] [CrossRef]

15. Vaswani A, Shazeer N, Parmar N, Uszkoreit J, Jones L, Gomez AN, et al. Attention is all you need. Adv Neural Inf Process Syst. 2017;30:5998–6008. doi:10.65215/ctdc8e75. [Google Scholar] [CrossRef]

16. Nie Y, Nguyen NH, Sinthong P, Kalagnanam J. A time series is worth 64 words: long-term forecasting with transformers. In: Proceedings of the International Conference on Learning Representations (ICLR); 2023 May 1–5; Kigali, Rwanda. p. 1–17. [Google Scholar]

17. Li T, Liu Z, Shen Y, Wang X, Chen H, Huang S. MASTER: market-guided stock transformer for stock price forecasting. Proc AAAI Conf Artif Intell. 2024;38(1):162–70. doi:10.1609/aaai.v38i1.27767. [Google Scholar] [CrossRef]

18. Xu Y, Cohen SB. Stock movement prediction from tweets and historical prices. In: Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Melbourne, Australia: Association for Computational Linguistics; 2018. p. 1970–9. [Google Scholar]

19. Birnbaum S, Kuleshov V, Enam SZ, Koh PW, Ermon S. Temporal FiLM: capturing long-range sequence dependencies with feature-wise modulations. Adv Neural Inf Process Syst. 2019;32:1–12. [Google Scholar]

20. Brockschmidt M. GNN-FiLM: graph neural networks with feature-wise linear modulation. PMLR. 2020;119:1144–54. [Google Scholar]

21. Liu TY. Learning to rank for information retrieval. Found Trends Inf Retr. 2009;3(3):225–331. doi:10.1561/1500000016. [Google Scholar] [CrossRef]

22. Xia F, Liu TY, Wang J, Zhang W, Li H. Listwise approach to learning to rank: theory and algorithm. In: Proceedings of the 25th International Conference on Machine Learning (ICML); 2008 Jul 5–9; Helsinki, Finland. p. 1192–9. [Google Scholar]

23. Wilder JW. New concepts in technical trading systems. Greensboro, NC, USA: Trend Research; 1978. [Google Scholar]

24. Loshchilov I, Hutter F. Decoupled weight decay regularization. In: Proceedings of the 7th International Conference on Learning Representations (ICLR); 2019 May 6–9; New Orleans, LA, USA. p. 1–18. [Google Scholar]

25. Smith LN. Super-convergence: very fast training of neural networks using large learning rates. Artif Intell Mach Learn Multi-Domain Oper Appl. 2019;11006:1–15. [Google Scholar]

26. Sharpe WF. The sharpe ratio. J Portf Manag. 1994;21(1):49–58. doi:10.3905/jpm.1994.409501. [Google Scholar] [CrossRef]

27. Magdon-Ismail M, Atiya AF. Maximum drawdown. Risk Mag. 2004;17(10):99–102. [Google Scholar]

28. Arian HR, Norouzi Mobarekeh D, Seco LA. Backtest overfitting in the machine learning era: a comparison of out-of-sample testing methods in a synthetic controlled environment. Knowl Based Syst. 2024;300:112194. [Google Scholar]


Cite This Article

APA Style
Octaviano, M.K., Seong, J. (2026). Feature-Wise Linear Modulation for Heterogeneous-Frequency Multimodal Fusion in Temporal Sequence Encoders. Computers, Materials & Continua, 88(3), 80. https://doi.org/10.32604/cmc.2026.082842
Vancouver Style
Octaviano MK, Seong J. Feature-Wise Linear Modulation for Heterogeneous-Frequency Multimodal Fusion in Temporal Sequence Encoders. Comput Mater Contin. 2026;88(3):80. https://doi.org/10.32604/cmc.2026.082842
IEEE Style
M. K. Octaviano and J. Seong, “Feature-Wise Linear Modulation for Heterogeneous-Frequency Multimodal Fusion in Temporal Sequence Encoders,” Comput. Mater. Contin., vol. 88, no. 3, pp. 80, 2026. https://doi.org/10.32604/cmc.2026.082842


cc Copyright © 2026 The Author(s). Published by Tech Science Press.
This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
  • 256

    View

  • 49

    Download

  • 0

    Like

Share Link