Batch features are feature values computed offline on static, historical datasets using high-throughput distributed processing frameworks like Apache Spark. These features capture long-term statistical aggregations, such as a customer's average monthly spend over the past year or a product's lifetime return rate, and are materialized into the offline store of a feature store for model training and batch inference.
Glossary
Batch Features

What is Batch Features?
Feature values computed on static, historical datasets using distributed processing frameworks, typically capturing long-term trends and aggregations.
Unlike streaming features, batch features are not updated in real-time and exhibit higher latency, making them suitable for capturing slow-moving trends and historical patterns. They are typically recomputed on a scheduled cadence—daily or hourly—and backfilled using point-in-time correct joins to ensure training datasets are historically accurate and free of data leakage.
Key Characteristics of Batch Features
Batch features are the foundational building blocks of machine learning, capturing long-term trends and historical aggregations computed over static datasets using distributed processing frameworks.
Computed on Static, Historical Data
Batch features are derived from offline data warehouses or data lakes containing snapshots of historical records. Unlike streaming features, they do not process real-time events. The computation runs against a fixed, bounded dataset—for example, all user transactions from the previous three years. This allows for complex, multi-stage aggregation pipelines that would be impossible to execute with low-latency constraints.
- Source: Data warehouses (Snowflake, BigQuery), data lakes (S3, ADLS)
- Cadence: Typically daily or hourly, not sub-second
- Example: A user's total spend over the last 90 days, computed at 2 AM UTC
Captures Long-Term Trends and Aggregations
The primary purpose of batch features is to encode slow-moving signals and historical patterns. These features provide the model with context that cannot be inferred from a single real-time event. Common aggregations include rolling window statistics, lifetime counts, and decay-weighted averages.
- Rolling Window: Average order value over the last 30 days
- Lifetime Metrics: Total number of purchases since account creation
- Cohort Analysis: A user's percentile rank within their acquisition cohort
- Seasonality: Purchase frequency during the same calendar month last year
Processed via Distributed Frameworks
Due to the massive scale of historical data, batch feature computation relies on distributed processing engines that parallelize workloads across clusters. These frameworks handle data shuffling, partitioning, and fault tolerance to produce feature values efficiently.
- Apache Spark: The dominant framework for batch feature engineering, using DataFrames and SQL for transformations
- Apache Hive: SQL-based processing on Hadoop for legacy pipelines
- dbt: For transformation logic in modern data warehouses, often used for simpler aggregations
- Execution Pattern: MapReduce-style operations that scan, filter, group, and aggregate entire datasets
Stored in the Offline Store
Once computed, batch features are persisted in the feature store's offline store—a high-throughput, scalable storage layer optimized for large-scale retrieval during model training. The offline store acts as the system of record for historical feature values.
- Storage Backends: Parquet files on object storage, Delta Lake tables, or cloud data warehouses
- Retrieval Pattern: Full table scans for training dataset generation, not point lookups
- Point-in-Time Correctness: The offline store must support time-travel queries to reconstruct feature values exactly as they existed at any historical timestamp, preventing data leakage from future information
Materialized to the Online Store for Inference
Although computed in batch, these features are often materialized into the online store to serve low-latency predictions. The materialization process copies the latest computed values into a key-value database optimized for point lookups during inference.
- Materialization Job: A scheduled process that reads the latest batch values and upserts them into the online store
- Latency Trade-off: Batch features in the online store have T+1 freshness—they reflect the state as of the last batch run, not the current moment
- Use Case: A user's 'favorite category' computed nightly and served instantly at login the next morning
Contrast with Streaming Features
Batch features and streaming features serve complementary roles in a feature store. Batch features provide deep historical context, while streaming features capture immediate intent. Understanding the distinction is critical for feature selection.
- Batch: User's 90-day average cart size (computed nightly)
- Streaming: Items in the user's current session cart (updated in real-time)
- Hybrid Use: A model often combines both—using batch features for long-term preferences and streaming features for session context
- Infrastructure: Batch uses Spark on offline data; streaming uses Flink or Kafka Streams on event logs
Frequently Asked Questions
Clear, technical answers to the most common questions about computing, storing, and serving batch features in modern feature stores.
Batch features are feature values computed on static, historical datasets using distributed processing frameworks like Apache Spark or SQL engines, typically capturing long-term trends and aggregations. They are recalculated on a fixed schedule—hourly, daily, or weekly—and materialized into an offline store for training or an online store for inference. In contrast, streaming features are computed incrementally on real-time event data with low latency, capturing immediate user intent. The key distinction is the computation trigger and data scope: batch features operate on bounded, historical data at rest, while streaming features operate on unbounded, continuous data in motion. For example, a user's 90-day average order value is a batch feature, while their clicks in the last 5 minutes is a streaming feature.
Batch Features vs. Streaming Features
A comparison of feature engineering approaches based on data processing methodology, latency, and use case suitability.
| Characteristic | Batch Features | Streaming Features | On-Demand Features |
|---|---|---|---|
Computation Trigger | Scheduled (e.g., hourly, daily) | Event-driven (continuous) | Request-time (synchronous) |
Data Scope | Historical, static datasets | Real-time event streams | Raw request payload |
Processing Framework | Apache Spark, SQL Warehouses | Apache Flink, Kafka Streams | Feature Store Serving API |
Serving Latency | High (pre-computed) | Low (pre-computed) | Medium (computed on read) |
Temporal Granularity | Aggregates over days/weeks | Aggregates over seconds/minutes | Point-in-time context |
Primary Use Case | Long-term user taste profiles | Session-based intent signals | Contextual input (device, location) |
Data Freshness | Hours to days | Sub-second to minutes | Instantaneous |
Storage Location | Offline Store | Online Store | Not persisted |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Explore the core concepts surrounding the computation and management of batch features within a modern feature store ecosystem.
Offline Store
The high-throughput, scalable storage layer where batch features are persisted after computation. It stores historical feature data for large-scale model training.
- Optimized for distributed queries (Spark, Trino)
- Stores years of historical data for time-series analysis
- The source of truth for point-in-time correct training datasets
Materialization
The process of pre-computing batch features from source data and persisting them. This transforms raw data into a queryable format.
- Batch materialization runs on a schedule (hourly, daily)
- Pushes features from the offline store to the online store for inference
- Ensures features are ready before a model needs them
Point-in-Time Correctness
A critical data engineering guarantee when using batch features for training. It ensures feature values are reconstructed exactly as they existed at a specific historical timestamp.
- Prevents data leakage from the future
- Requires joining feature tables using time travel queries
- Essential for accurate evaluation of model performance
Streaming Features
The real-time counterpart to batch features. While batch features capture long-term trends, streaming features are computed incrementally on live event data.
- Capture immediate user intent (e.g., items viewed in current session)
- Often combined with batch features to form a complete feature vector
- Require stream processing engines like Apache Flink or Kafka Streams
Backfilling
The process of computing batch feature values for a historical time range. This is required when a new feature is defined and needs to be populated retroactively.
- Runs large-scale distributed jobs over historical data
- Populates the offline store so the feature is available for training on past events
- Critical for bootstrapping new models with sufficient training data
Feature Drift
A change in the statistical distribution of feature data over time. Monitoring batch features for drift is essential to detect when long-term consumer behavior shifts.
- Compares the distribution of recent batch windows to a training baseline
- High drift signals that a model may be stale and require retraining
- Often detected using statistical distance metrics like Population Stability Index (PSI)

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us