Table of Contents

A practitioner's guide to time series, temporal deep learning, foundation models, and sequential decision making.

Second Edition · 2026

9 parts · 36 chapters · 189 sections, plus 7 appendices and a capstone. All 36 chapters, the front matter, the seven appendices (A to G), and the capstone are live and linked below.

Front Matter · Why This Book Exists

8 entries

Why the book exists, what it covers, who it is for, how to read it, a look inside, the authors, the legal page, and the series it belongs to.

  1. F1
    Why This Book ExistsTime is the hidden axis of intelligence; this book teaches forecasting, sequence models, and decision making as one connected story.
  2. F2
    What This Book CoversThe nine-part arc, from classical forecasting to sequential decision making and deployment.
  3. F3
    Who Should Read This BookEngineers, graduate students, and researchers with basic Python, linear algebra, and probability; no prior time-series experience required.
  4. F4
    What's InsideA guided preview of the book's signature elements: worked code, library shortcuts, callouts, and labs.
  5. F5
    How to Use This BookReading paths for practitioners, researchers, and self-study learners, and how the parts depend on each other.
  6. F6
    About the AuthorsWho wrote this book and how.
  7. F7
    Copyright & LegalEdition, license, and attribution.
  8. F8
    About the Hands-On AI Science SeriesThe nine-book series this volume belongs to, and the build-it-yourself approach they share.

Part I · Foundations of Temporal AI

2 chapters

What makes intelligence temporal, the limits of predictability, and the temporal data engineering and leakage discipline every later part depends on.

  1. 1
    Introduction to Temporal Intelligence Why time is a first-class dimension of intelligence, what we can predict, and how to read this book.
    1. 1.1 What Makes Intelligence Temporal?
    2. 1.2 Temporal Data Across Domains
    3. 1.3 Prediction, Reasoning, and Decision Making
    4. 1.4 Types of Temporal Data
    5. 1.5 Predictability, Entropy Rate, and the Limits of Forecasting
    6. 1.6 Challenges in Temporal Modeling
    7. 1.7 The Temporal AI Landscape and How to Read This Book
    part-1-foundations/module-01-intro-temporal-intelligence/
  2. 2
    Temporal Data Engineering Time stamps, sampling, irregular observations, feature engineering, and the leakage-free evaluation protocols that keep results honest.
    1. 2.1 Time Stamps, Time Zones, and Event Ordering
    2. 2.2 Sampling, Resampling, and Aggregation
    3. 2.3 Missing Data and Irregular Observations
    4. 2.4 Feature Engineering for Temporal Data
    5. 2.5 Windowing, Segmentation, and Lag Construction
    6. 2.6 Evaluation Protocols, Backtesting, and Data Leakage
    7. 2.7 Reproducibility and Temporal Data Pipelines

Part II · Classical Forecasting and Time Series Analysis

6 chapters

Statistical foundations, the frequency domain, univariate and multivariate models, state-space filtering, and anomaly and change-point detection.

  1. 3
    Statistical Foundations Random processes, stationarity, autocorrelation, and decomposition: the vocabulary of classical time series.
    1. 3.1 Random Processes and Ergodicity
    2. 3.2 Stationarity and Unit Roots
    3. 3.3 Autocorrelation and Partial Autocorrelation
    4. 3.4 Trend and Seasonality
    5. 3.5 Time-Series Decomposition (classical, STL, robust)
  2. 4
    Frequency-Domain and Spectral Analysis Every series is a sum of waves; the spectrum explains periodicity, filtering, and modern frequency mixers.
    1. 4.1 Fourier Analysis and the Periodogram
    2. 4.2 Spectral Density Estimation
    3. 4.3 Filtering in the Frequency Domain
    4. 4.4 Wavelets and Time-Frequency Analysis
    5. 4.5 Connections to Modern Architectures (frequency mixers, FEDformer)
  3. 5
    Univariate Forecasting Models From moving averages to ARIMA, ETS, and Prophet: the workhorses of statistical forecasting.
    1. 5.1 Moving Average Models
    2. 5.2 Autoregressive Models
    3. 5.3 ARMA and ARIMA
    4. 5.4 SARIMA and Seasonal Modeling
    5. 5.5 Exponential Smoothing and ETS
    6. 5.6 Prophet and Modern Statistical Frameworks
    7. 5.7 Model Selection, Diagnostics, and Information Criteria
  4. 6
    Multivariate and Econometric Models VAR, cointegration, dynamic factors, and the GARCH family for many series and their volatility.
    1. 6.1 Vector Autoregression (VAR) and VARMA
    2. 6.2 Granger Causality and Impulse-Response Analysis
    3. 6.3 Cointegration and Error-Correction Models
    4. 6.4 Dynamic Factor Models
    5. 6.5 Volatility Modeling: ARCH, GARCH, and Stochastic Volatility
  5. 7
    State-Space Models and Filtering Hidden states, the Kalman filter, particle filters, and HMMs: filtering as recurrent inference.
    1. 7.1 Hidden States and the State-Space Formulation
    2. 7.2 The Kalman Filter
    3. 7.3 Extended and Unscented Kalman Filters
    4. 7.4 Particle Filters and Sequential Monte Carlo
    5. 7.5 Hidden Markov Models
    6. 7.6 Bridge: Filtering as Recurrent Inference
  6. 8
    Temporal Anomaly and Change-Point Detection Spotting the unexpected and the moment a regime changes, with industrial monitoring in mind.
    1. 8.1 Point, Contextual, and Collective Anomalies
    2. 8.2 Statistical and Distance-Based Approaches
    3. 8.3 Change-Point Detection (offline and online)
    4. 8.4 Forecasting-Residual and Reconstruction Methods
    5. 8.5 Industrial and Monitoring Applications

Part III · Temporal Deep Learning

7 chapters

Sequence fundamentals, RNNs, TCNs, Transformers, structured state-space and continuous-time models, deep forecasting, and temporal foundation models.

  1. 9
    Neural Sequence Modeling Fundamentals Backpropagation through time and the gradient pathologies that motivate every later architecture.
    1. 9.1 Feedforward Networks for Time Series
    2. 9.2 Sequence Learning Concepts and Tasks
    3. 9.3 Backpropagation Through Time
    4. 9.4 Long-Term Dependencies and Gradient Pathologies
  2. 10
    Recurrent Neural Networks LSTMs, GRUs, and seq2seq, and the bridge that reads an RNN as a learned Kalman filter.
    1. 10.1 Vanilla RNNs
    2. 10.2 LSTM Networks
    3. 10.3 GRU Networks
    4. 10.4 Encoder-Decoder and Seq2Seq Architectures
    5. 10.5 Bridge: RNNs as Learned Kalman Filters
    6. 10.6 Practical Considerations and Training Stability
  3. 11
    Temporal Convolutional Networks Dilated, causal convolutions and WaveNet, compared head to head with RNNs and Transformers.
    1. 11.1 One-Dimensional Convolutions
    2. 11.2 Dilated and Causal Convolutions
    3. 11.3 Temporal Convolutional Networks (TCN)
    4. 11.4 WaveNet
    5. 11.5 Comparative Analysis (RNN vs TCN vs Transformer)
  4. 12
    Attention and Transformers Self-attention, temporal encodings, and the long-sequence and efficiency tricks that make it practical.
    1. 12.1 Self-Attention
    2. 12.2 The Transformer Architecture
    3. 12.3 Positional and Temporal Encodings
    4. 12.4 Long-Sequence Modeling and Memory
    5. 12.5 Efficient and Sparse Transformers
  5. 13
    State-Space and Continuous-Time Neural Models S4 and Mamba, linear attention, and Neural ODEs and CDEs that unify RNNs, SSMs, and attention.
    1. 13.1 From HiPPO to Structured State-Space Models (S4, S5)
    2. 13.2 Selective State-Space Models (Mamba) and Hardware-Aware Scans
    3. 13.3 Linear Attention, RWKV, and RetNet
    4. 13.4 Neural ODEs, Latent ODEs, and ODE-RNNs
    5. 13.5 Neural CDEs and Irregularly-Sampled Data
    6. 13.6 Bridge: Unifying RNNs, SSMs, and Linear Attention
  6. 14
    Deep Forecasting Architectures DeepAR, N-BEATS, TFT, and the Transformer-versus-linear debate over what actually forecasts well.
    1. 14.1 DeepAR and Probabilistic RNN Forecasting
    2. 14.2 N-BEATS and N-HiTS
    3. 14.3 Temporal Fusion Transformer (TFT)
    4. 14.4 Informer, Autoformer, and FEDformer
    5. 14.5 PatchTST, DLinear/NLinear, and the "Are Transformers Effective?" Debate
    6. 14.6 TSMixer, TiDE, and MLP-Based Forecasters
  7. 15
    Temporal Foundation Models Pretrained forecasters and LLMs for time series, from Chronos and TimesFM to in-context forecasting.
    1. 15.1 Pretraining Paradigms for Time Series
    2. 15.2 Chronos, Lag-Llama, and MOMENT
    3. 15.3 TimeGPT, TimesFM, and Moirai
    4. 15.4 Tiny and Tabular Time-Series Models (TTM, TabPFN-TS)
    5. 15.5 LLMs for Time Series (LLMTime, Time-LLM, prompting and in-context forecasting)
    6. 15.6 Zero-Shot, Few-Shot, and Transfer; Future Directions

Part IV · Temporal Representation Learning

3 chapters

Self-supervised and contrastive representations, generative temporal models, and event, point-process, and temporal-graph modeling.

  1. 16
    Learning Temporal Representations Self-supervised pretext tasks, contrastive learning, and masked modeling for time series.
    1. 16.1 Representation Learning Fundamentals
    2. 16.2 Self-Supervised Pretext Tasks for Time Series
    3. 16.3 Contrastive Learning (TS2Vec, TF-C, and variants)
    4. 16.4 Masked Modeling for Time Series
    5. 16.5 Temporal Embeddings and Disentanglement
  2. 17
    Generative Temporal Models Sequence autoencoders, VAEs, GANs, and diffusion models for synthesizing realistic series.
    1. 17.1 Autoencoders and Sequence Autoencoders
    2. 17.2 Variational Autoencoders and Sequential VAEs
    3. 17.3 GANs for Time Series (TimeGAN and beyond)
    4. 17.4 Diffusion Models for Time Series (TimeGrad, CSDI)
    5. 17.5 Synthetic Temporal Data Generation and Evaluation
  3. 18
    Event and Sequence Modeling Marked event streams, temporal point processes, dynamic graphs, and time-to-event modeling.
    1. 18.1 Event Streams and Marked Sequences
    2. 18.2 Temporal Point Processes (Hawkes, neural TPPs)
    3. 18.3 Temporal and Dynamic Graphs
    4. 18.4 Event Prediction and Time-to-Event Modeling
    5. 18.5 Process Mining

Part V · Uncertainty, Online, and Adaptive Learning

3 chapters

Probabilistic and conformal forecasting, online and continual learning under drift, and adaptive systems that maintain themselves in production.

  1. 19
    Probabilistic Forecasting and Uncertainty Quantification Scoring rules, calibration, quantile forecasts, and conformal prediction for time series.
    1. 19.1 Point vs Probabilistic Forecasts
    2. 19.2 Proper Scoring Rules and Calibration
    3. 19.3 Quantile and Distributional Forecasting
    4. 19.4 Bayesian and Ensemble Approaches; Gaussian Processes for Time Series
    5. 19.5 Conformal Prediction for Time Series
    6. 19.6 Decision-Aware Evaluation of Forecasts
  2. 20
    Online and Continual Learning Streaming optimization, concept drift, and continual learning without catastrophic forgetting.
    1. 20.1 Streaming Data and Online Optimization
    2. 20.2 Concept Drift: Types and Detection
    3. 20.3 Online and Incremental Models
    4. 20.4 Continual and Lifelong Learning (catastrophic forgetting, replay, regularization)
    5. 20.5 Lifelong Temporal Systems
  3. 21
    Adaptive Temporal AI Systems Retraining triggers, production drift detection, active learning, and human-in-the-loop adaptation.
    1. 21.1 Dynamic Model Updating and Retraining Triggers
    2. 21.2 Drift Detection in Production
    3. 21.3 Active Learning for Temporal Data
    4. 21.4 Human-in-the-Loop Adaptation

Part VI · Sequential Decision Making

8 chapters

MDPs, POMDPs, bandits and RL foundations, deep and advanced RL, optimal control and imitation, sequences as decisions, and world models.

  1. 22
    Markov Decision Processes The Markov property, value functions, Bellman equations, and dynamic programming.
    1. 22.1 Sequential Decision Problems
    2. 22.2 The Markov Property
    3. 22.3 Policies, Value Functions, and Bellman Equations
    4. 22.4 Dynamic Programming (value/policy iteration)
  2. 23
    Partial Observability and POMDPs Belief states, approximate solvers, and recurrent and SSM-based agents that remember.
    1. 23.1 Partial Observability and Belief States
    2. 23.2 Solving POMDPs (exact and approximate)
    3. 23.3 Recurrent and SSM-Based Agents for Partial Observability
    4. 23.4 Bridge: Filtering, Belief Tracking, and Memory
  3. 24
    Bandits and Foundations of Reinforcement Learning Multi-armed and contextual bandits, regret, and the temporal-difference roots of RL.
    1. 24.1 Multi-Armed Bandits
    2. 24.2 UCB, Thompson Sampling, and Regret
    3. 24.3 Contextual Bandits
    4. 24.4 Monte Carlo and Temporal-Difference Learning
    5. 24.5 Q-Learning and SARSA
    6. 24.6 Exploration vs Exploitation
  4. 25
    Deep Reinforcement Learning DQNs, policy gradients, actor-critic methods, and the realities of training deep RL.
    1. 25.1 Deep Q-Networks and Variants
    2. 25.2 Policy Gradient Methods
    3. 25.3 Actor-Critic Methods (A2C/A3C, PPO, SAC)
    4. 25.4 Continuous Control
    5. 25.5 Practical Deep RL (stability, reproducibility, evaluation)
  5. 26
    Advanced Reinforcement Learning Model-based, offline, multi-agent, safe, and hierarchical RL with temporal abstraction.
    1. 26.1 Model-Based RL
    2. 26.2 Offline RL
    3. 26.3 Multi-Agent RL
    4. 26.4 Safe and Constrained RL
    5. 26.5 Hierarchical RL and Temporal Abstraction (options)
  6. 27
    Optimal Control and Imitation Learning LQR and MPC, behavioral cloning and DAgger, inverse RL, and preference-based RL with RLHF.
    1. 27.1 LQR and the Linear-Quadratic-Gaussian Setting
    2. 27.2 Model Predictive Control (MPC)
    3. 27.3 Behavioral Cloning and DAgger
    4. 27.4 Inverse Reinforcement Learning and GAIL
    5. 27.5 Preference-Based RL and RLHF
  7. 28
    Sequence Models for Decision Making RL recast as sequence modeling: Decision Transformer, return conditioning, and diffusion planners.
    1. 28.1 RL as Sequence Modeling
    2. 28.2 Decision Transformer and Trajectory Transformer
    3. 28.3 Return-Conditioned and Goal-Conditioned Policies
    4. 28.4 Diffusion Planners (Diffuser, Decision Diffuser)
    5. 28.5 Bridge: Transformers/SSMs from Part III as Policies
  8. 29
    World Models and Planning Latent environment models, Dreamer, and planning in latent space for long horizons.
    1. 29.1 Latent Environment Models
    2. 29.2 Dreamer and Recurrent World Models
    3. 29.3 Predictive State Representations
    4. 29.4 Planning in Latent Space (MuZero-style search)
    5. 29.5 Temporal Abstraction and Long-Horizon Planning

Part VII · Building Intelligent Temporal Systems

3 chapters

Temporal reasoning and causality, temporal AI agents with memory and tool use, and spatio-temporal intelligence.

  1. 30
    Temporal Reasoning and Causality Temporal logic, causal discovery for time series, and counterfactual what-if analysis over time.
    1. 30.1 Temporal Logic and Interval Reasoning
    2. 30.2 Causal Discovery for Time Series (Granger, PCMCI, causal nets)
    3. 30.3 Causal Effects and Treatment over Time
    4. 30.4 Counterfactual and What-If Analysis
  2. 31
    Temporal AI Agents Agent architectures, memory systems, planning and tool use, and long-horizon credit assignment.
    1. 31.1 Agent Architectures
    2. 31.2 Memory Systems (short/long-term, retrieval)
    3. 31.3 Planning and Tool Use
    4. 31.4 Long-Horizon Tasks and Credit Assignment
    5. 31.5 Agent Evaluation
  3. 32
    Spatio-Temporal Intelligence Mobility, traffic, video, and dynamic spatio-temporal graphs where space and time interact.
    1. 32.1 Mobility Modeling
    2. 32.2 Traffic Forecasting
    3. 32.3 Video Understanding
    4. 32.4 Activity Recognition
    5. 32.5 Dynamic and Spatio-Temporal Graph Learning

Part VIII · Trustworthy and Deployed Temporal AI

2 chapters

Interpretability, robustness, fairness, and privacy for temporal models, then serving, monitoring, and the MLOps of streaming systems.

  1. 33
    Interpretability, Robustness, and Responsible Temporal AI Temporal saliency, adversarial robustness, fairness, federated privacy, and governance.
    1. 33.1 Interpretability for Temporal Models (attention analysis, temporal saliency, SHAP for sequences)
    2. 33.2 Robustness and Adversarial Attacks on Time Series
    3. 33.3 Fairness and Bias in Temporal Predictions
    4. 33.4 Privacy and Federated Temporal Learning
    5. 33.5 Ethics, Governance, and Auditing
  2. 34
    Deploying and Operating Temporal AI Systems Streaming inference, drift alarms and retraining loops, feature stores, scaling, and incident response.
    1. 34.1 Serving and Latency for Streaming Inference
    2. 34.2 Monitoring, Drift Alarms, and Retraining Loops (MLOps)
    3. 34.3 Feature/Online Stores and Data Contracts
    4. 34.4 Cost, Scaling, and Efficiency
    5. 34.5 Reliability, Versioning, and Incident Response

Part IX · Applications and Future Directions

2 chapters

Industrial applications across finance, healthcare, manufacturing, energy, robotics, science, supply chain, and security, then the road toward general temporal intelligence.

  1. 35
    Industrial Applications The running datasets and application skeleton scaled to real domains: finance, healthcare, manufacturing, energy, robotics, science, supply chain, and security.
    1. 35.1 Finance (forecasting, volatility, risk, execution)
    2. 35.2 Healthcare (clinical time series, monitoring, prognosis)
    3. 35.3 Manufacturing and Predictive Maintenance
    4. 35.4 Energy and Climate
    5. 35.5 Autonomous Systems and Robotics
    6. 35.6 Scientific Discovery
    7. 35.7 Supply Chain, Retail Demand, and Inventory Decisions
    8. 35.8 Cybersecurity, Fraud, and Temporal Security Operations
  2. 36
    Toward General Temporal Intelligence Unified sequence models, multimodal temporal AI, foundation agents, and the open research frontier.
    1. 36.1 Unified Sequence Models Across Modalities
    2. 36.2 Multimodal Temporal AI
    3. 36.3 Foundation Agents
    4. 36.4 Scaling Laws and Efficiency Frontiers
    5. 36.5 Open Challenges and Research Frontiers

Appendices · Reference and Pedagogy

7 appendices
  1. A
    Mathematical Foundations and Unified NotationA single notation table that reconciles the ML, control, and statistics traditions across the book.
  2. B
    Probability and Statistics RefresherThe probability and statistics needed before the classical forecasting chapters.
  3. C
    Optimization and Deep Learning BasicsGradient-based optimization and the deep learning essentials underlying Parts III to VI.
  4. D
    PyTorch for Temporal AI (and JAX notes)A practical PyTorch primer for temporal models, with notes on JAX where it helps.
  5. E
    Datasets, Benchmarks, and Evaluation ProtocolsThe datasets and benchmarks used throughout, with leakage-free evaluation protocols.
  6. F
    Reproducibility, Compute, and Experiment ManagementReproducible temporal pipelines, compute budgeting, and experiment tracking.
  7. G
    Solutions to Selected ExercisesWorked solutions to a curated subset of the end-of-chapter exercises.

Capstone · An End-to-End Temporal AI System

1 project
  1. Capstone Project: An End-to-End Temporal AI SystemDesign, build, evaluate, and deploy a complete temporal system spanning the book: data engineering, a forecasting or decision model, honest uncertainty quantification, and a monitored deployment.