Pith. sign in

REVIEW 4 major objections 5 minor 1 cited by

Hidformer: Transformer-Style Neural Network in Stock Price Forecasting

T0 review · 4 major / 5 minor · reviewed 2026-08-10 · deepseek-v4-flash

Pith's one-line read Hidformer, a hierarchical dual-tower Transformer, predicts 128-day stock price paths with error and trading-return results that match or beat CNN, RNN, LSTM, and DNN baselines on six consumer-goods stocks.

desk verdict Full-sample normalization and validation reuse make Hidformer's reported edge in stock forecasting unverifiable. read the letter →

arxiv 2412.19932 v1 pith:OWAEZMBY submitted 2024-12-27 cs.CE cs.AIcs.LGq-fin.CP

classification cs.CEcs.AIcs.LGq-fin.CP
keywords stockpriceforecastingTransformerHidformertimeseriespredictiontechnicalanalysisdeeplearningfinancialtradingstrategy
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

The paper asks whether Hidformer—a Transformer-style architecture designed for long-term time-series forecasting—can be carried over to stock price prediction. The authors train it on 128 days of daily open, high, low, close, adjusted close, and volume data from six large consumer-goods stocks, and test whether it can forecast the close price over the next 128 days. Their central claim is that Hidformer either outperforms or matches CNN, RNN, LSTM, and DNN baselines on standard error metrics and on a simple long/short trading strategy, with many differences reported as statistically significant. In the headline numbers, Hidformer posts the lowest MAE (0.159) and a MAPE (66) tied with the best baselines, while its MSE (0.040) is essentially tied with CNN's 0.039. If the claim holds, Transformer-style forecasting becomes a credible, practical option for multi-step financial prediction and trading support.

What carries the argument

The load-bearing object is Hidformer, a hierarchical dual-tower Transformer that feeds the input through a time-domain encoder with recursive attention and a frequency-domain encoder with linear attention, splitting the series into tokens and merging the segments after each block; the merged outputs feed an MLP decoder that produces all 128 forecast days in one pass. It is paired with a weighted MSE loss (weights running from $T_y=128$ down to 1) and a moving-window scheme in which the last 128 days of prices and volumes predict the next 128 close prices. Statistical significance is assessed with a Mann-Whitney U test across the five runs.

What would settle it

Recompute all experiments with min-max normalization fitted only on the training portion (or on a rolling window that never sees the validation period), and compare Hidformer's MAE, MSE, MAPE, and net values against the same baselines; if Hidformer no longer has the lowest MAE or the best net values, the central 'outperforms or matches' claim fails for a genuinely out-of-sample setup.

Watch

Extended reading notes

Core claim

On the paper's own terms, the discovery is that a hierarchical dual-tower Transformer—Hidformer—can be adapted to multi-step stock price forecasting with performance at least comparable to, and on several metrics better than, standard deep learning baselines. Hidformer processes the 128-day input through two encoder towers: one in the time domain with recursive attention, one in the frequency domain with linear attention, merging multi-scale segments before an MLP decoder outputs 128 future close prices. Across five independent training runs on six consumer-goods stocks, the model achieves the lowest MAE (0.159), a MAPE of 66 tied with CNN and DNN, and an MSE of 0.040, marginally above CNN's 0.039. The paper also reports that a long/short rule driven by Hidformer's one-day-ahead prediction produces net values that are often significantly higher ($P<0.01$) or similar to the baselines over a two-year validation period, and that visual analysis shows it tracking upward, downward, and mixed trends. The authors interpret this as empirical validation of Hidformer's adaptability to financial time series and its potential as a decision-support tool.

Load-bearing premise

The results assume that the minimum and maximum values used to scale the data may be computed from the entire sample, including the final 5% validation period; if the scaler is restricted to training data only, every reported error and trading return could change.

Editorial extensions

If this is right

  • For practitioners, Hidformer offers a workable alternative to CNN, RNN, LSTM, and DNN when the goal is a 128-day close-price forecast, with no extra financial feature engineering beyond min-max scaling.
  • Because the decoder emits all 128 future days at once, the model can sketch a trend path rather than only the next tick, which is what makes it useful for human decision-making.
  • The reported net-value improvements imply that a simple sign-of-prediction long/short strategy on consumer-goods stocks could earn higher or similar backtested returns than the same strategy driven by classical networks.
  • The statistical significance claims (Mann-Whitney U, $P<0.01$ on many comparisons) mean the observed differences are unlikely to be artifacts of a single training run.
  • The two-tower frequency/time design appears to transfer from the original long-term series benchmarks (Weather, Traffic, Electricity) to financial data, supporting the general claim that Transformer-style attention is competitive for financial time series.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • A consequence the authors leave implicit is that the full-sample min-max normalization makes the validation numbers not strictly out-of-sample; refitting the scaler on the training window only would tell whether the reported MAE advantage survives a genuinely forward-looking setup.
  • Because MSE still favors CNN (0.039 vs 0.040), a user whose loss function penalizes large errors more heavily might prefer CNN; the choice of metric, not just the model, determines the practical winner.
  • The paper's own future-work suggestion of per-sector decoders points to a testable extension: training one decoder per industry (or conditioning on a sector vector) could prevent the encoders from learning contradictory formations and improve cross-industry generalization.
  • The 128-day horizon with a single MLP decoder could be combined with uncertainty estimation (for example, ensembles or quantile heads) to produce prediction intervals for risk management; the paper does not report intervals, but the architecture does not preclude them.
Share X Bluesky LinkedIn Reddit HN

Signed reviews

No signed human review yet.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

4 major / 5 minor

Summary. The paper applies Hidformer, an existing hierarchical dual-tower Transformer architecture for long-term time series, to daily stock price forecasting. Using daily open/high/low/close/adjusted-close/volume data for six consumer-goods stocks from 1980 to 2023, the authors train Hidformer and CNN/RNN/LSTM/DNN baselines on a 128-day-input/128-day-output moving-window task and evaluate them with MAE, MSE, MAPE, a sign-based trading strategy, and visual inspection. The central claim, stated in Section 1, is that Hidformer outperforms or matches the existing baselines. The experiments use a chronological 95/5 split, with the last 5% of data treated as a validation set.

Significance. If the experimental results were clean, the paper would offer a modest data point on the applicability of a recent Transformer-style architecture to daily stock price forecasting. Its strengths include a clearly specified set of hyperparameters, five independent runs, and evaluation through both error metrics and a trading backtest. However, the evaluation protocol contains a full-sample normalization look-ahead and uses the same validation window for model selection and final scoring, so the reported numbers cannot currently be interpreted as out-of-sample evidence. The paper does not provide code or data, and it makes no theoretical or architectural contribution beyond applying an existing model, so its value is entirely empirical. Because the empirical evaluation is contaminated, the significance of the claimed finding is not assessable at present.

major comments (4)
  1. [§4.1, Eq. (1), with §5.1] Equation (1) normalizes the data using xmax and xmin computed from 'the entire sample.' Section 5.1 then designates the last 5% of the data (31/12/2021 to 31/12/2023) as the validation set. Consequently, the scaling constants used to build every training window are derived from the future period the model is later asked to predict. This leaks validation-period statistics into both the training inputs and the normalized targets, so the MAE/MSE/MAPE values in Table 2 and the net values in Tables 3–4 are not clean out-of-sample measurements. The normalization should be recomputed using statistics from the training portion only (or an expanding window), and all reported metrics and trading results should be regenerated under that protocol.
  2. [§5.1 and §5.2] The same 5% validation window is used both for model selection ('we selected the model chosen as the best during training') and for computing all reported evaluation metrics. No held-out test set or nested resampling procedure is described. The reported errors and trading returns are therefore selected on the same data used for early stopping, which can inflate apparent performance. The authors should introduce a true held-out test period or a time-series cross-validation scheme, and report metrics separately for model selection and final evaluation.
  3. [§5.4, Tables 2–4] The text repeatedly states that Hidformer is 'significantly' better than the baselines with 'P-values lower than 0.01,' but it does not report the Mann-Whitney U test procedure, the exact p-values, the number of pairwise comparisons, or any correction for multiple testing. This matters because the differences in Table 2 are within one standard error on several metrics (e.g., MAE 0.159 vs. 0.160 for CNN; MSE 0.040 vs. 0.039 for CNN), so the significance claims are under-supported as reported. The authors should provide the full test setup, exact p-values for each metric and pairwise model comparison, and an appropriate multiplicity adjustment.
  4. [§5.3, Eq. (2)] The trading strategy in Eq. (2) uses a one-day-ahead prediction ŷ_{t+1}, but the model is trained to output Ty = 128 future close prices. It is not explained how ŷ_{t+1} is extracted from the multi-horizon output (e.g., the first horizon only, the last horizon, or an aggregation). This choice directly affects the backtest returns in Tables 3 and 4, so the authors should specify and justify the extraction rule and, ideally, evaluate all horizons consistently.
minor comments (5)
  1. [§5.4, Tables 3–4] Table 3 reports mean net values without standard errors, while Table 4 includes standard errors for the same quantities; reporting errors consistently across both tables would aid interpretation.
  2. [§5.5, Figures 4–6] The figure captions do not identify which stock or time interval is shown, and the plots lack clear axis labels and legends; adding these would make the visual analysis reproducible and interpretable.
  3. [Throughout] The term 'validation set' is used for the final evaluation data, but no test set is defined; using 'test set' for the final evaluation would avoid ambiguity about model selection.
  4. [§4.2, Figure 3] Figure 3 is captioned as 'Hidformer model overwiew. [16]' but the source reference appears to be to the original Hidformer paper through citation [8]; the caption should cite the original source and clarify whether the figure is reproduced or adapted.
  5. [References] Several references are incomplete (e.g., [11] and [14] lack full bibliographic details such as publishers or page ranges); the reference list should be brought to journal style.

Circularity Check

0 steps flagged · score 0.0 of 10

No significant circularity: the paper makes an empirical performance claim rather than a derivation, and its self-citations are background only; the full-sample normalization is a data-leakage concern, not a circular reduction.

full rationale

This paper contains no equation-level derivation chain whose output could reduce to its input by construction. Hidformer is adopted from prior work [8], and the central claim is an empirical comparison of forecasting errors and trading returns on a validation split. The only self-citations ([1], [2]) support background statements about neural-network forecasting and do not carry the experimental conclusion. The full-sample min-max normalization in Eq. (1) is a genuine methodological concern: because xmax and xmin are computed over the entire sample including the last 5% used as validation, the normalized features encode future-period statistics, and the same validation split is also used for model selection and final metrics. This undermines the clean out-of-sample interpretation of Tables 2-4, but it is data leakage rather than circularity. The reported predictions are not defined to be equal to the fitted scaling constants or to any other input, and no equation or construction step in the paper shows the outcome reducing to the premise. No load-bearing self-citation chain, imported uniqueness theorem, or ansatz-smuggling pattern is present. Therefore no circular step meeting the quoted-reduction standard is identified, and the appropriate circularity score is 0.

Assumptions & free parameters 10 free parameters · 5 assumptions · 0 invented entities

The central experiment rests on hand-picked model hyperparameters, a leaky normalization scheme, and strong domain assumptions about the predictability of stock prices from daily OHLCV data. The paper introduces no new theoretical entities; its empirical claims depend entirely on the validity of the evaluation setup, which has serious flaws.

free parameters (10)
  • Tx = 128 = 128
    Input window length in trading days, chosen without sensitivity analysis.
  • Ty = 128 = 128
    Prediction horizon in trading days, chosen without sensitivity analysis.
  • NT = 4 = 4
    Number of tokens in the segment layer, hand-picked.
  • NE = 1 = 1
    Flattened embedding dimension, hand-picked.
  • NB = 3 = 3
    Number of encoder blocks per tower, hand-picked.
  • ND = 2 = 2
    Number of decoder layers, hand-picked.
  • Weighted MSE loss weights = Ty down to 1
    Linear decay weights from horizon size to 1, chosen by hand.
  • Learning rate = 0.0001
    Adam optimizer learning rate, standard choice.
  • Batch size = 64
    Mini-batch size, standard choice.
  • Epochs = 100
    Number of training epochs, set to guarantee convergence.
assumptions (5)
  • domain assumption Technical analysis premises: the market discounts everything, prices move in trends, and history repeats itself.
    Section 2.1 invokes these premises as the justification for using price and volume data to predict future prices; the paper asserts the model will learn them tabula rasa.
  • domain assumption Daily OHLC, adjusted close, and volume data contain sufficient information to forecast future close prices.
    Sections 2.1 and 4.1 assume that the six-dimensional daily quote format is an adequate representation for prediction.
  • domain assumption A model trained on 1980-2021 data transfers to 2022-2023 market conditions.
    Section 5.1 uses a single 95/5 temporal split; this assumes stationarity of the learned patterns.
  • ad hoc to paper Min-max normalization using statistics from the full sample, including the validation period, does not invalidate the backtest.
    Section 4.1 Eq. (1) computes xmax and xmin over the entire sample; this is a look-ahead bias assumption that the paper does not justify.
  • domain assumption Independence of observations for the Mann-Whitney U test.
    Section 5 states significance was confirmed through a Mann-Whitney U test, which assumes independent samples; daily overlapping predictions are autocorrelated, so this assumption is questionable.

how reviews work

0 comments
Cite this review

Pith. "Pith review of Hidformer: Transformer-Style Neural Network in Stock Price Forecasting." pith.science (2026). https://pith.science/paper/OWAEZMBY

@misc{pith2026241219932,
  author       = {Pith},
  title        = {Pith review of: Hidformer: Transformer-Style Neural Network in Stock Price Forecasting},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/OWAEZMBY}},
  note         = {Machine review of arXiv:2412.19932}
}
read the original abstract

This paper investigates the application of Transformer-based neural networks to stock price forecasting, with a special focus on the intersection of machine learning techniques and financial market analysis. The evolution of Transformer models, from their inception to their adaptation for time series analysis in financial contexts, is reviewed and discussed. Central to our study is the exploration of the Hidformer model, which is currently recognized for its promising performance in time series prediction. The primary aim of this paper is to determine whether Hidformer will also prove itself in the task of stock price prediction. This slightly modified model serves as the framework for our experiments, integrating the principles of technical analysis with advanced machine learning concepts to enhance stock price prediction accuracy. We conduct an evaluation of the Hidformer model's performance, using a set of criteria to determine its efficacy. Our findings offer additional insights into the practical application of Transformer architectures in financial time series forecasting, highlighting their potential to improve algorithmic trading strategies, including human decision making.

Figures

Figures reproduced from arXiv: 2412.19932 by the authors.

Figure 1
Figure 1. Sample stock chart (https://www.tradingview.com/). The aforementioned daily stock quote corresponds, on a logical level, to the format of the data we use. In our study, we will show that our model will learn the above premises of the justification for using technical analysis tabula rasa. 2.2 Market analysis with deep learning neural networks In recent years, with the intensive development of deep learning methods a… view at source ↗
Figure 2
Figure 2. Informer model - conceptual overwiew. The leading improvements were: 1. A ProbSparse self-attention mechanism which reduces the time and memory complexity of the algorithm to O(Llog L), considering L-length inputs/outputs. 2. The self-attention distilling which is a modification of self-attention that highlights dominating attention by halving cascading layer input, which in turn ensures efficient processing of long… view at source ↗
Figure 3
Figure 3. Hidformer model overwiew. [16] Considering the description above, we believe that after adding improve￾ments related to data processing from the frequency domain perspective, the Transformer-type neural network will prove effective in predicting stock market quotations, as discussed below. 5 Experiments In this section, we conduct experiments with the aim of answering whether the Hidformer model is capable of predic… view at source ↗
Figures from the paper (2 more)
Figure 4
Figure 4. Figure 4: Upward trend prediction [PITH_FULL_IMAGE:figures/full_fig_p010_4.png]
Figure 6
Figure 6. Figure 6: Mixed Trend Prediction: Upward, Sideways, Downward. 6 Conclusion and future work The problem of forecasting stock prices has a particular resonance in the do￾main of artificial neural networks, where Transformer-based architectures, have been increasingly recognized fo…

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. Compression-Based Behavioral Similarity for Open-World Sybil Discovery on Ethereum

    cs.LG 2026-07 reject novelty 6.0 of 10

    Gzip-based compression distance over transaction grammars separates Sybil from organic and MEV wallets and expands seed wallets into candidate clusters, but validation is weakened by potentially circular ground-truth labels.

Reference graph

Works this paper leans on

16 extracted references · 10 canonical work pages · cited by 1 Pith paper

  1. [1]

    Expert Systems with Applications 213, 119203 (2023)

    Chudziak, A.: Predictability of stock returns using neural networks: Elusive in the long term. Expert Systems with Applications 213, 119203 (2023). https://doi.org/https://doi.org/10.1016/j.eswa.2022.119203, https://www.sciencedirect.com/science/article/pii/S0957417422022217

  2. [2]

    In: Jakubiak, A

    Chudziak, A., Chudziak, J.: Artificial neural networks in stock market forecasting – remarks on the current research landscape. In: Jakubiak, A. (ed.) Prace naukowe Wydzia/suppress lu Elektroniki i Technik Informacyjnych Politechniki Warszawskiej. Tom 2. Oficyna Wydawnicza PW (2021)

  3. [3]

    Applied Intelli- gence 48(12), 4694–4714 (Dec 2018)

    Dinh, D.T., Le, B., Fournier-Viger, P., Huynh, V.N.: An efficient algo- rithm for mining periodic high-utility sequential patterns. Applied Intelli- gence 48(12), 4694–4714 (Dec 2018). https://doi.org/10.1007/s10489-018-1227-x, https://link.springer.com/article/10.1007/s10489-018-1227-x, company: Springer Distributor: Springer Institution: Springer Label:...

  4. [4]

    MIT Press (2016)

    Goodfellow, I.J., Bengio, Y., Courville, A.: Deep Learning. MIT Press (2016)

  5. [5]

    A Survey of Forex and Stock Price Prediction Using Deep Learning

    Hu, Z., Zhao, Y., Khushi, M.: A Survey of Forex and Stock Price Prediction Using Deep Learning. Applied System Innovation 4(1), 9 (Feb 2021). https://doi.org/10.3390/asi4010009, http://arxiv.org/abs/2103.09750, arXiv:2103.09750 [q-fin]

  6. [6]

    Packt (2020)

    Jansen, S.: Machine Learning for Algorithmic Trading - Second Edition. Packt (2020)

  7. [7]

    https://doi.org/10.48550/arXiv.1907.00235, http://arxiv.org/abs/1907.00235, arXiv:1907.00235 [cs, stat]

    Li, S., Jin, X., Xuan, Y., Zhou, X., Chen, W., Wang, Y.X., Yan, X.: En- hancing the Locality and Breaking the Memory Bottleneck of Transformer on Time Series Forecasting (Jan 2020). https://doi.org/10.48550/arXiv.1907.00235, http://arxiv.org/abs/1907.00235, arXiv:1907.00235 [cs, stat]

  8. [8]

    Expert Systems with Appli- cations 239, 122412 (Apr 2024)

    Liu, Z., Cao, Y., Xu, H., Huang, Y., He, Q., Chen, X., Tang, X., Liu, X.: Hidformer: Hierarchical dual-tower transformer using multi-scale mer- gence for long-term time series forecasting. Expert Systems with Appli- cations 239, 122412 (Apr 2024). https://doi.org/10.1016/j.eswa.2023.122412, https://www.sciencedirect.com/science/article/pii/S0957417423029147

Show all 16 references
  1. [9]

    Journal of Electrical and Computer Engineering Innovations (JECEI) 9(1), 1–10 (Nov 2020)

    Mohammadi Farsani, R., Pazouki, E.: A Transformer Self-attention Model for Time Series Forecasting. Journal of Electrical and Computer Engineering Innovations (JECEI) 9(1), 1–10 (Nov 2020). https://doi.org/10.22061/jecei.2020.7426.391, https://jecei.sru.ac.ir/article 1477.html...

  2. [10]

    New York Institute of Finance (1999)

    Murphy, J.J.: Technical analysis of the financial markets. New York Institute of Finance (1999)

  3. [11]

    https://doi.org/10.5220/0009340700630071

    Obthong, M., Tantisantiwong, N., Jeamwatthanachai, W., Wills, G.: A Survey on Machine Learning for Stock Price Prediction: Algorithms and Techniques (Feb 2020). https://doi.org/10.5220/0009340700630071

  4. [12]

    https://doi.org/10.48550/arXiv.1706.03762, http://arxiv.org/abs/1706.03762, arXiv:1706.03762 [cs]

    Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, L., Polosukhin, I.: Attention Is All You Need (Aug 2023). https://doi.org/10.48550/arXiv.1706.03762, http://arxiv.org/abs/1706.03762, arXiv:1706.03762 [cs]

  5. [13]

    Expert Systems with Applica- tions 208, 118128 (Dec 2022)

    Wang, C., Chen, Y., Zhang, S., Zhang, Q.: Stock market index pre- diction using deep Transformer model. Expert Systems with Applica- tions 208, 118128 (Dec 2022). https://doi.org/10.1016/j.eswa.2022.118128, https://www.sciencedirect.com/science/article/pii/S0957417422013100

  6. [14]

    In: Gurevych, I., Miyao, Y

    Xu, Y., Cohen, S.B.: Stock Movement Prediction from Tweets and Historical Prices. In: Gurevych, I., Miyao, Y. (eds.) Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). pp. 1970–1979. Association for Computational Li...

  7. [15]

    In: Proceed- ings of the First ACM International Conference on AI in Finance

    Yang, H., Liu, X.Y., Zhong, S., Walid, A.: Deep reinforcement learn- ing for automated stock trading: an ensemble strategy. In: Proceed- ings of the First ACM International Conference on AI in Finance. pp. 1–8. ICAIF ’20, Association for Computing Machinery, New York, NY, USA ...

  8. [16]

    Proceedings of the AAAI Conference on Artificial Intelligence 35(12), 11106–11115 (May 2021)

    Zhou, H., Zhang, S., Peng, J., Zhang, S., Li, J., Xiong, H., Zhang, W.: Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting. Proceedings of the AAAI Conference on Artificial Intelligence 35(12), 11106–11115 (May 2021). https://doi.org/10.1609/aaai....

Pith tools

Reviewed August 10, 2026 · model on record in the stance chip above.