Source-linked AI summary

HARN: Hierarchical Associative Resonance Network for Event-Driven Multi-Timeframe Forecasting

Nabeel Ahmad Saidd

arXiv:2609.26822v1cs.LGq-fin.CPq-fin.GN

TL;DR

Multi-timeframe forecasting must account for asynchronous bar completion, since reading still-forming bars or refreshing unchanged representations can alter the information available at an event. HARN formalizes persistent event-driven updates and combines causal encoding, associative memory, resonance, and bottom-up evidence; under the reported scope, it has lower reconstructed-price errors than the accompanying single-timeframe baselines.

  • Problem

    At a forecast event, bars at different temporal resolutions may not complete together, so a system must distinguish newly available information from unchanged representations to avoid look-ahead leakage.

    Source: §1 · p. 1
  • Method

    HARN maintains persistent per-level states and updates them only when that level’s completed-bar indicator fires, combining causal encoding, gated associative memory, cross-level resonance, and bottom-up evidence.

    Source: §1 · p. 2
  • Results

    Under the reported configuration, HARN achieves lower reconstructed-price errors than the accompanying single-timeframe, anchor-only PatchTST and TimeXer baselines.

    Source: §10 · p. 26, §11 · p. 27
  • Takeaways & Limitations

    The paper’s contribution is an explicit persistent, asynchronously updated multi-timeframe protocol, rather than evidence of universal predictive superiority.

    Source: §11 · p. 27

    The baseline comparison does not isolate architecture from differences in information access, target formulation, or training procedure.

    Source: §10 · p. 26

Abstract

from arXiv · show

Financial time series evolve across multiple temporal resolutions, challenging forecasting systems to incorporate newly available information without repeatedly recomputing unchanged representations. We introduce HARN, a Hierarchical Associative Resonance Network for event-driven multi-timeframe forecasting. HARN maintains persistent representations across temporal levels and updates each level only when its corresponding completed bar becomes available. The architecture combines causal multi-scale temporal encoding, gated associative memory, cross-level resonance, and hierarchical evidence aggregation, with forecasting performed in basis-point space and reconstructed to the original price scale. We evaluate HARN on four assets spanning equity, foreign exchange, and commodity markets using multiple random seeds and component ablations. HARN achieves competitive reconstructed-price forecasting errors against single-timeframe PatchTST and TimeXer baselines, while ablations reveal the effects of removing individual components across assets and timeframes. A code-level audit further examines consistency between the implementation and the defined event-driven causal protocol. The results position HARN as a persistent multi-timeframe forecasting framework rather than evidence of universal predictive superiority.

1 Introduction

Multi-timeframe forecasting must respect when each completed bar becomes available, because refreshing inactive coarse representations or using still-forming bars can alter the information set and introduce look-ahead leakage. HARN formalizes persistent, asynchronously updated representations and combines several neural mechanisms, while framing its empirical comparisons as descriptive and scope-specific.

1 Introduction

  • A multi-timeframe forecaster must distinguish newly available bars from unchanged representations, since using still-forming coarse bars or refreshing inactive levels can introduce look-ahead leakage.HARN identifies causal alignment, persistent state between updates, and explicit cross-level communication as requirements for its event-driven formulation.Source: §1 · pp. 1–2

2 Related Work

  • Prior work motivates the combination of event-conditioned updates, persistent states, cross-level communication, and associative updates, without establishing that HARN is distinct from every prior system.The paper describes the gap as a protocol and state-transition gap rather than claiming that prior methods lack any individual component.Source: §1 · p. 2, §2 · p. 5

1 Introduction

  • HARN maintains a persistent state at each configured timeframe and updates that level only when its completed-bar indicator fires.At anchor events, states may interact through cross-level resonance, with directional bottom-up evidence and forecasts in basis-point change space reconstructed to price.Source: §1 · p. 2
  • The paper’s central contribution is the formulation and implementation of persistent, asynchronously updated multi-timeframe representations, not a claim of universal predictive superiority.Its evaluation covers four assets, reconstructed-price results, single-timeframe PatchTST and TimeXer comparisons, component ablations, and a code-level causal-consistency audit.Source: §1 · p. 2
  • The baseline comparison is descriptive rather than information-matched, and a static code review examines causal-protocol consistency without empirically testing for leakage.The paper also presents the causal-alignment and evaluation concerns as implementation-level implications of prior work, not as evidence that its target representation improves results.Source: §1 · p. 2, §2 · p. 3

2 Related Work

  • HARN’s hierarchy represents timeframes with different completion rates and state-transition eligibility, rather than requiring output forecasts to satisfy aggregation constraints.The experiments do not compare HARN with reconciled hierarchical forecasting methods or explicitly matched multi-scale neural baselines.Source: §2 · p. 5

3 Problem Formulation: Event-Driven Multi-Timeframe Forecasting

The formulation treats each forecast as an anchor event with potentially different latest-completed-bar times across temporal levels. Binary update indicators govern persistent state transitions, while the causal requirement permits ordered same-event communication between levels.

3 Problem Formulation: Event-Driven Multi-Timeframe Forecasting

  • Event time is the anchor timestamp, while representation time is the latest completed-bar timestamp available at each level; these clocks coincide only at the finest level by construction.The post-event state is used for the forecast emitted at the current anchor, not after waiting for the next event.Source: §3 · p. 6
  • At each anchor, preprocessing selects the latest bar no later than that time, and timestamp equality determines whether the level’s update indicator fires.A zero indicator retains the selected higher-level window as context but prevents overwriting the persistent state; exact timestamp equality is an implementation assumption.Source: §3 · p. 6
  • A binary update mask selects each level’s candidate state and memory when active, and leaves the prior state and memory unchanged when inactive.The base level updates at every anchor, and the binary mask makes an inactive transition an exact identity.Source: §3 · p. 6
  • HARN trains and evaluates batches of contiguous streams in parallel, applying each stream’s binary update mask to its own state transition.The BPS target is reconstructed to absolute price for evaluation; reported metrics are on reconstructed prices, and zero BPS reproduces the last-value forecast.Source: §3 · pp. 6–8
  • Causal validity excludes bars completed after the forecast event, but allows a higher-level update to read a lower-level state already updated at that same event.Thus the protocol is causal at event granularity, not past-event-only within an event.Source: §3 · p. 7

4 The HARN Architecture

HARN processes completed windows through causal per-level encoders, persistent associative memory, and two distinct cross-level communication paths before producing forecasts. Its components combine local temporal-scale representations with event-persistent state and cross-level context.

4 The HARN Architecture

  • At each event, completed OHLCV windows pass through per-level causal encoders, prior-state resonance, memory candidates, ordered bottom-up evidence, posterior resonance, and forecasting heads.Each configured level has its own encoder, memory, history, and forecasting head, making the hierarchy both representational and update-based.Source: §4 · p. 8, Figure 1 · p. 8

4.1 Causal multi-scale encoder

  • Four left-padded, depthwise-separable gated convolution branches use dilations 1, 2, 4, and 8, followed by a learned scale mixture and decayed pooling.The encoder also combines the pooled representation with a projection of the last position and a short trailing mean; the raw window supplies the local signal, while persistence comes from memory.Source: §4.1 · pp. 9–10, Figure 2 · p. 9

4.2 Gated associative memory with residual-driven writes

  • The associative cell retrieves content for a key and forms a residual between the current value and retrieved value, which the paper calls “surprise” only as an internal retrieval residual.The residual enters a bounded, rank-one outer-product write; it is not an explicit input to the write or blend gates, and it is not downstream forecast error.Source: §4.2 · p. 10, Figure 3 · p. 11

4.3 Cross-scale communication and forecasting head

  • Cross-level resonance is all-to-all and contemporaneous, whereas bottom-up evidence passes directionally from an adjacent lower level to a coarser level through a four-read history.The readout combines attention with a recent-read term and buffer mean; its 0.35 and 0.15 coefficients are hand-set constants without supplied derivation or sensitivity analysis.Source: §4.3 · pp. 11–12, Figure 4 · p. 12
  • The forecasting head maps a cross-scale-informed state and anchor features to a one-step BPS forecast, which is reconstructed to absolute price using the last observed close.In the default configuration, its input concatenates the state, posterior resonance context, and six anchor features; the head combines a two-hidden-layer GELU MLP with a residual linear path.Source: §4.3 · pp. 12–13

5 Streaming Semantics and Training

The streaming protocol updates persistent temporal states only when completed-bar events arrive, while training preserves chronological stream continuity and manages state at defined boundaries.

5 Streaming Semantics and Training

  • At each anchor event, the implementation selects completed-bar windows, computes candidate transitions for every level, and uses update masks to overwrite only active levels.Missing activity flags default to lock-step updates; Figure 5 summarizes the event ordering.Source: §5 · p. 13, Figure 5 · p. 13
  • State and history reset at epoch and evaluation boundaries or batch-size changes, and production training detaches them after each optimizer step, limiting backpropagation to one batch transition.The longer gradient accumulation shown in the demonstration script is not the production procedure.Source: §5 · p. 13
  • The production loss sums per-level BPS mean-squared error without level normalization, so larger-variance levels can dominate gradients and hierarchies with different level counts have different loss scales.Production defaults include batch size 256, 50 maximum epochs, AdamW, cosine annealing, patience 15, and CUDA automatic mixed precision when available.Source: §5 · p. 14
  • StreamingBatcher preserves chronological continuity at each batch position by dividing each split into non-overlapping contiguous streams and discarding any unfillable remainder.This continuity is the property assumed by masking and detachment.Source: §5 · p. 14

6 Experimental Setup and Provenance

The section documents the asset and split setup, comparator scope, and provenance of reported configurations. The baseline comparison is descriptive because HARN and the single-timeframe baselines differ in inputs, targets, and training procedures.

6.1 Data, splits, and comparators

  • The four assets use different anchor frequencies and hierarchy depths, with windows defaulting to 32 bars; their per-level update rates decrease at coarser levels, as expected from bar durations.USDCHF’s H1 level updates once per four M15 bars, a rate of 0.250, serving as a completed-bar alignment sanity check.Source: §6.1 · pp. 14–15
  • PatchTST and TimeXer are trained on the anchor timeframe, their native single-timeframe configuration, whereas HARN is evaluated with all configured payload levels.The comparison therefore concerns complete pipelines rather than matched architectural components.Source: §6.1 · p. 15, Table 2 · p. 16
  • The HARN–baseline comparison is descriptive: the models differ in timeframe scope, target representation, and training protocol, so the reported gap does not isolate any single factor.Table 2 records the scope and training differences underlying this caveat.Source: §6.1 · p. 15, Table 2 · p. 16

6.2 Which configuration produced which reported result

  • Table 3 associates reported items with configurations when the manuscript and repository artifacts support that link, while stating unresolved ambiguities rather than inferring missing provenance.The section also inventories released preprocessing, configuration, checkpoints, and per-seed results; raw vendor data and precomputed per-event predictions are not included, and the zero-BPS persistence baseline remains unreported.Source: §6 · p. 14, §6.2 · p. 16, Table 3 · p. 17

7 Metrics and Reported Results

The supplied results compare reconstructed-price forecasts across assets and timeframes, with HARN numerically below both single-timeframe baselines at each asset’s anchor timeframe. Further-timeframe and cross-seed results are descriptive, with important limits on what they establish.

7 Metrics and Reported Results

  • MAE and RMSE use native price units, sMAPE is a symmetric percentage error, and all reported metrics are computed on reconstructed absolute price.MASE divides reconstructed-price MAE by the mean absolute first difference of the stored training target-event sequence, an implementation-defined scale.Source: §7 · p. 18

7.1 Baseline comparison and further timeframes

  • HARN's supplied reconstructed-price errors are numerically lower than both baselines for all four assets at their anchor timeframes.The comparison is between complete pipelines as configured, not an isolated architectural effect.Source: Table 4 · p. 18, §7.1 · p. 19
  • The reported results omit a persistence baseline, and the implementation-defined MASE values do not establish whether HARN improves on persistence over the test period.No persistence output is included as a precomputed file; the comparator requires a rerun.Source: §7 · p. 18, §7.1 · p. 19
  • Further-timeframe results document HARN forecasts at several resolutions but do not establish superiority, cross-level coherence, or a benefit from the hierarchy.No baseline was run at those further levels, and higher-level MASE values are not comparable across timeframes because their denominators use repeated targets.Source: §7.1 · p. 19

7.2 Cross-seed variance and statistical status

  • HARN's reported standard deviations across three seeds are very small relative to the baselines, but their cause and seed independence remain unresolved.The small HARN spread should not be read as evidence of robustness, and the differing protocols prevent interpreting the baselines' larger spread as an architectural property.Source: §7.2 · pp. 19–20
  • Figures 6 and 7 provide qualitative context only because their asset, timeframe, seed, and split are unidentified and predictions are not precomputed.They therefore do not provide a statistical comparison.Source: §7.2 · p. 20, Figure 6 · p. 21, Figure 7 · p. 22
  • Three-seed aggregate standard deviations are not confidence intervals for temporal forecast errors and cannot supply paired differences for formal predictive-accuracy tests.No confidence intervals, paired tests, Diebold–Mariano tests, Wilcoxon tests, effect sizes, or multiplicity corrections were computed.Source: §7.2 · p. 23

8 Ablation Variants: Single-Run Observations

The ablation study compares component-replacement variants within HARN, while retaining the surrounding streaming pipeline and tensor interfaces. Its single-run observations are small and nonmonotonic, so they do not establish statistically reliable component effects.

8 Ablation Variants: Single-Run Observations

  • A1 replaces associative memory with a gated recurrent-style update, A2 replaces resonance with identity, and A3 zeros history-readout evidence.A2 retains bottom-up evidence, so it removes the all-to-all resonance path rather than all cross-level communication.Source: §8 · p. 23, Table 5 · p. 24
  • The variants are not matched counterfactuals because interventions also change parameterization, capacity, or optimization dynamics.Firmer component claims require multi-seed, capacity-matched experiments; Figure 8's relative degradation plot is descriptive only.Source: §8 · p. 23, Figure 8 · p. 24
  • A0 is not uniformly best: some variants score lower on selected AAPL or EURUSD H1 metrics, and no single component dominates these single-run observations.Variant differences are similar in size to unexplained gaps between A0 and the corresponding Table 4 HARN means.Source: §8 · p. 23, Table 5 · p. 24
  • Table 5 covers only AAPL and EURUSD, with single aggregate values and no uncertainty or documented repeated runs.The entries are therefore single-run observations, not statistically established sensitivity effects.Source: §8 · p. 23, Table 5 · p. 24

9 Code-Level Causality Audit

The static code review finds consistency with the event-level information-ordering contract, qualified by same-event evidence ordering. It also notes that inactive levels retain state but still incur computation, and that exact-timestamp updates assume aligned data feeds.

9 Code-Level Causality Audit

  • The static review finds implementation consistency with the event-level information-ordering contract, subject to a same-event evidence-ordering qualification.It is a code review, not an empirical test of whether forecasts remain unchanged when future bars are perturbed, shuffled, or withheld.Source: §9 · p. 25, Table 6 · p. 25
  • Higher-level evidence can read lower-level state already updated at the same event, so ordering is not strictly past-event-only within an event.The audit also notes that the lower-level read is appended before the higher-level evidence is read.Source: §9 · p. 25
  • Inactive levels retain persistent state and memory, but their windows and anchors are still processed at every event.Only the persistent overwrite is masked; the audit also covers alignment, targets, training-only statistics, local causality, state lifecycle, streaming, cleaning, and checkpoint selection.Source: §9 · p. 25
  • The exact-timestamp-equality update rule assumes consistent timestamp conventions; feeds with clock skew or asynchronous bar closes need an explicit alignment policy.The audit does not assess upstream data construction, timestamp conventions, clock synchronization, or price adjustment.Source: §9 · p. 25

10 Discussion and Limitations

Under the reported configuration, HARN has lower reconstructed-price errors than the accompanying single-timeframe baselines, but the comparison is descriptive and does not isolate architectural effects. The study also limits the strength of its ablation claims and the scope of conclusions about generalization and computational cost.

10 Discussion and Limitations

  • HARN achieves lower reconstructed-price errors than the accompanying single-timeframe, anchor-only baselines, but the comparison is descriptive rather than a controlled architectural comparison.The models differ in information access, target formulation, and training procedure; the evidence does not support attributing observed differences to a specific design choice.Source: §10 · p. 26
  • The single-run ablations show only slight changes in reported values and do not establish the independent contribution of individual components.They cover a subset of assets and are not parameter- or compute-matched, so they provide component-level observations rather than statistically robust attribution.Source: §10 · p. 26
  • The baseline comparison lacks a persistence reference, confidence intervals, and paired predictive-accuracy tests; HARN’s unusually small cross-seed spread remains unexplained.Per-event predictions and paired statistical tests are proposed work.Source: §10 · pp. 26–27
  • Evidence from four assets and specific evaluation periods does not establish performance across broader assets, market conditions, hierarchy depths, or time periods.The proposed work includes broader comparisons and multi-seed, capacity-matched ablations.Source: §10 · pp. 26–27
  • The practical cost of maintaining multiple resolution-specific states remains incompletely characterized because latency, peak memory, throughput, and energy were not systematically measured.Systematic latency, memory, and throughput measurements are proposed work.Source: §10 · pp. 26–27
  • The evidence-readout coefficients are hand-set and unvalidated, while the update indicator relies on exact timestamp equality under the chosen bar-construction protocol.The timestamp assumption would require an explicit alignment policy for feeds with different conventions, clock skew, or asynchronous bar-close reporting.Source: §10 · p. 26

11 Conclusion

The conclusion specifies HARN as an event-driven, stateful multi-timeframe forecaster and reports numerically lower absolute-price error than the accompanying PatchTST and TimeXer runs. Because those comparisons are scope-specific and the ablations show no dominant component, whether the differences reflect scope, target representation, or training remains open.

11 Conclusion

  • HARN reports numerically lower absolute-price error than the accompanying PatchTST and TimeXer runs, but the comparison is descriptive and scope-specific.The baselines are single-timeframe models trained on their native anchor-timeframe configuration, unlike HARN’s multi-timeframe, event-driven evaluation.Source: §11 · p. 27
  • HARN combines causal local encoding, gated matrix memory, all-to-all cross-scale resonance, directional bottom-up evidence, masked asynchronous updates, and BPS reconstruction.Its central contribution is the completed-bar update protocol, formalized in scalar and batched form and reviewed at code level for event-level causal consistency.Source: §11 · p. 27
  • The single-run ablations show no dominant component, and the reported differences cannot be attributed to architecture, target definition, or training recipe.Whether the differences reflect multi-timeframe scope, target representation, or training recipe remains open.Source: §11 · p. 27

12 Data and Code Availability

The repository or workspace contains implementation, preprocessing, training, evaluation, ablation, checkpoint, and per-seed result artifacts, while raw vendor data cannot be redistributed. The paper also declares no conflicts of interest and reports no external organizational funding or control over the work.

12 Data and Code Availability

  • The repository or workspace contains HARN and baseline code, preprocessing and alignment tools, trainers, an evaluator, seed-specific checkpoints, and per-seed result CSVs.The candidate public repository URL returned HTTP 404 when checked during revision, so the paper does not claim a public release.Source: §12 · p. 27
  • Raw market data cannot be redistributed, but the vendor-neutral pipeline can regenerate data from compatible feeds with the expected completed-bar schema and bar-construction rules.The pipeline uses chronological 70%/15%/15% splits and computes feature and target statistics on training samples only.Source: §12 · pp. 27–28
  • The standalone evaluator uses a single stream rather than the trainer’s eight-stream default, and ablation checkpoints are not parameter-count matched.Per-event predictions and persistence outputs are not included as precomputed files, though they can be generated from checkpoints and compatible vendor data.Source: §12 · p. 28
  • The source-level command templates are documented commands, not recovered historical commands for the supplied tables.The templates cover production HARN training, standalone evaluation, and ablation training.Source: §12 · p. 28

Conflicts of Interest

  • The author declares no conflicts of interest and states that no external organization funded or directed the experimental methodology or controlled the reported results.The work is presented for research purposes, not as investment advice or a trading recommendation.Source: Conflicts of Interest · p. 28

A Technical and Reproducibility Appendix

The appendix supports reproduction and scrutiny with transition derivations, tensor shapes, an ordered event algorithm, configuration details, and per-seed metrics. It clarifies that masked transitions preserve persistent state but do not skip candidate encoding, and that causality is specified at event granularity.

A Technical and Reproducibility Appendix

  • The appendix gathers the transition derivation, tensor shapes, ordered algorithm, script configurations, and per-seed metrics for technical scrutiny and reproduction.It introduces no new experiments.Source: A Technical and Reproducibility Appendix · p. 28

A.1 Event-transition derivation

  • The transition mask selects between already-computed branches, preserving persistent state without computational skipping because candidate encodings are formed for all supplied windows.The base level's update indicator is always active.Source: §A.1 · pp. 28–29
  • Causality is defined at event granularity: a higher-level update may consume a lower-level representation produced at the same event, after the lower-level read is appended to history.The passage identifies this as the qualification associated with entry 9 of Table 6.Source: §A.1 · p. 29

A.2 Tensor shapes across the pipeline

  • The default tensor-shape account distinguishes a 72 × 18 associative store per sample from a standard recurrent vector state.Higher levels receive 72-dimensional bottom-up evidence, accounting for 144- versus 216-dimensional memory inputs.Source: §A.2 · p. 29, Table 7 · p. 29

A.3 Ordered per-event algorithm

  • The ordered per-event procedure selects completed windows, encodes inputs, applies prior and posterior resonance, updates levels and evidence, then emits BPS forecasts before price reconstruction.The base level is always active, and price reconstruction follows the BPS forecast.Source: §A.3 · pp. 29–30

A.4 Configuration inventory across the supplied scripts

The appendix consolidates configurations across supplied scripts and documents per-seed aggregate metrics. It flags a validation/test stream-count discrepancy and reports that recomputed means and standard deviations match the main-text entries.

A.4 Configuration inventory across the supplied scripts

  • The production trainer, reported recipe, and ablation trainer differ in seed lists and ablation epoch budget, with shared settings explicitly consolidated in Table 8.The configurations should not be silently merged.Source: §A.4 · p. 30, Table 8 · p. 30
  • The reported recipe specifies eight-stream validation and test, while the standalone evaluator uses one stream and reconstructs missing checkpoint settings from defaults and tensor shapes.The reported three-seed aggregates can be regenerated from the repository with a compatible vendor feed.Source: §A.4 · p. 30

A.5 Per-seed metrics

  • Baseline per-seed CSVs lack timeframe labels, so Table 10's timeframe labels are inferred from Tables 2 and 4.Table 10 groups PatchTST and TimeXer aggregate test metrics by asset, model, and timeframe.Source: §A.5 · p. 30, Table 10 · p. 32
  • Recomputed means and population-standard-deviation entries from the per-seed values reproduce Table 4, with no discrepancies reported.The per-seed aggregates cover seeds 42, 151, and 359; training trajectories and per-event predictions are not included as precomputed files.Source: §A.5 · pp. 30–31, Table 9 · p. 31
Loading 2609.26822v1…