# 特征存储

特征存储是一种数据系统，负责管理、存储和提供特征——即机器学习模型所消费的输入信号——从而使相同的特征定义和特征值在模型训练和生产推理过程中保持一致可用。<sup>[1](https://www.ibm.com/think/topics/feature-store)</sup> 首个工业级特征存储于2017年由一个团队构建，成员包括斯坦福大学的劳雷尔·奥尔（Laurel Orr）和优步人工智能团队；它减少了工程师的工作量并提升了模型质量，此后该品类已成为运营型机器学习基础设施的标准组件。<sup>[2](https://www.vldb.org/pvldb/vol14/p3178-orr.pdf)</sup> 在优步，该系统以米开朗基罗特征存储的形式出现，名为Palette，是一个经过整理、内部众包的特征数据库，任何项目都可以复用。<sup>[3](https://bhft.com/blog/feature-store-without-seeing-anyones-code)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | 一个集中式数据系统，用于存储、版本化、管理和提供带有元数据及访问控制的机器学习特征<sup>[4](https://www.tecton.ai/blog/what-is-a-feature-store/)</sup> |
| 核心架构 | 双数据存储：用于训练的离线存储（通常为SQL数仓）和用于低延迟服务的在线存储（通常为内存或键值数据库管理系统）<sup>[2](https://www.vldb.org/pvldb/vol14/p3178-orr.pdf)</sup> |
| 在线与离线记录 | 在线存储仅保留最新事件时间的记录；离线存储保留所有历史记录<sup>[5](https://docs.aws.amazon.com/sagemaker/latest/dg/feature-store-concepts.html)</sup> |
| 时间点正确性 | 训练数据集绝不能包含标签时间戳之后的特征值；特征存储通过时间点连接来强制执行此规则<sup>[6](https://harut8.github.io/system-design/tasks/feature-store/)</sup> |
| 五大组件 | 转换、存储、服务、监控和特征注册表<sup>[4](https://www.tecton.ai/blog/what-is-a-feature-store/)</sup> |
| 开源方案 | Feast，由前Gojek/谷歌工程师于2020年构建，2024年被接纳进入云原生计算基金会（CNCF）沙箱<sup>[7](https://ttlab.hopto.org/blog/culture/2026-05-16-feature-stores-feast-tecton-hopsworks-databricks-feldera-bytewax-materialize-2026-deep-dive?lang=en)</sup> |
| 示例规模目标 | 每秒50万次持续在线查询<sup>[6](https://harut8.github.io/system-design/tasks/feature-store/)</sup> |

## 用途与生命周期角色

特征存储位于模型与数据的接口处。它们运行将原始数据转换为特征值的流水线，存储和管理这些数据，并为训练和推理提供一致的服务。<sup>[4](https://www.tecton.ai/blog/what-is-a-feature-store/)</sup> 由于机器学习工作流跨越模型训练和推理，特征必须同时从历史数据和新生产数据中计算，而保持两者之间的一致性正是特征存储旨在解决的协调问题。<sup>[1](https://www.ibm.com/think/topics/feature-store)</sup>

**复用是经济层面的论据。** 当一个特征被注册后，它便可供组织内其他模型立即复用，这减少了重复的数据工程工作，并使新项目能够从经过整理、可用于生产的特征库起步。<sup>[4](https://www.tecton.ai/blog/what-is-a-feature-store/)</sup> 特征定义一次，存储在共享系统中，通过API或SDK访问，协调工作通常通过特征注册表来管理。<sup>[1](https://www.ibm.com/think/topics/feature-store)</sup> IBM将特征存储支持的生命周期阶段列为特征工程与开发、模型训练、推理与服务、以及监控与迭代，包括检测数据分布之间的偏差。<sup>[1](https://www.ibm.com/think/topics/feature-store)</sup>

## 组件

现代特征存储通常被描述为具有五个组件：转换、存储、服务、监控和特征注册表。<sup>[4](https://www.tecton.ai/blog/what-is-a-feature-store/)</sup>

- **转换**运行数据流水线，将原始数据从批处理、流式和请求时来源转化为特征值。
- **存储**分为离线存储和在线存储：离线存储保存历史值，用于探索、模型训练和批处理推理；在线存储是一种低延迟、高可用性的存储，支持对最新记录的实时查找。<sup>[5](https://docs.aws.amazon.com/sagemaker/latest/dg/feature-store-concepts.html)</sup>
- **服务**将特征值交付给模型，离线检索通过适合交互式笔记本的SDK进行，在线检索通过低延迟API进行。<sup>[4](https://www.tecton.ai/blog/what-is-a-feature-store/)</sup>
- **监控**跟踪特征质量指标，如新鲜度、空值计数、训练-部署偏差和漂移检测。<sup>[2](https://www.vldb.org/pvldb/vol14/p3178-orr.pdf)</sup>
- **注册表**记录每个特征的名称、实体键、数据类型、来源、转换、所有者、新鲜度SLO和血缘关系，并作为共享契约驱动批处理物化和时间点训练连接。<sup>[8](https://hld.handbook.academy/curriculum/ai-ml-system-design/feature-stores-model-serving/)</sup>

## 时间点正确性与训练-服务偏差

两个正确性属性定义了这一品类。第一个是时间点正确性：给定一组带有时间戳的实体行，系统重现每个时间戳处的世界状态，仅连接当时存在的特征值，因此训练数据永远不会包含标签时间戳之后的值。Feast将此实现为从每个实体时间戳向过去回溯扫描，回溯范围不超过特征视图的TTL，并提供一个`filter_by_created_timestamp`选项，将检索限制为创建时间戳等于或早于实体时间戳的值，防止回填值泄漏到训练数据中。<sup>[9](https://docs.feast.dev/getting-started/concepts/point-in-time-joins)</sup>

第二个是在线-离线一致性：在时间T在线提供的值必须与时间T的时间点离线查询所返回的值相匹配，且在新鲜度SLA范围内。<sup>[6](https://harut8.github.io/system-design/tasks/feature-store/)</sup> 当两个存储不一致时，就会产生[训练-服务偏差](https://www.edgepedia.org/zh/training-serving-skew)，这可能导致预测精度显著下降；因此一些特征存储允许仅直接更新一个存储并将值同步到另一个存储，代价是额外的开销和延迟。<sup>[10](https://escholarship.org/content/qt5xk0f4z9/qt5xk0f4z9.pdf)</sup> 一条单一的物化路径从填充离线存储的同一计算中填充在线存储，可保持两者对齐。<sup>[11](https://precisionfederal.com/insights/feature-stores-in-practice)</sup>

在线存储施加了真实的性能约束。使用Redis等内存键值存储是因为服务必须在数百毫秒或更短的延迟约束内完成。<sup>[10](https://escholarship.org/content/qt5xk0f4z9/qt5xk0f4z9.pdf)</sup> 大型部署的代表性设计目标包括：跨100个或更多团队的50,000个或更多特征定义、在线存储中10亿个实体、每秒50万次持续在线查询且峰值达每秒100万次、以及流式写入传播到在线存储的第99百分位延迟不超过5秒。<sup>[6](https://harut8.github.io/system-design/tasks/feature-store/)</sup>

## 局限性与研究

保持所有特征完全最新是极其昂贵的，尤其是对于由模型计算得到的向量嵌入特征，然而现有系统采用一刀切的更新策略，忽略了查询访问模式和预测精度。RALF是VLDB 2023上由加州大学伯克利分校的研究者（包括莎拉·伍德斯（Sarah Wooders）、伊恩·斯托伊卡（Ion Stoica）、约瑟夫·M·海勒斯坦（Joseph M. Hellerstein）和约瑟夫·E·冈萨雷斯（Joseph E. Gonzalez））提出的系统，它利用下游误差反馈来调度特征更新，以最小化作者所称的特征存储遗憾。在800核上运行的275,077个键的异常检测工作负载中，精度感知调度使预测误差最多降低32.7%，或使计算成本最多降至原来的62.5%。<sup>[12](https://www.vldb.org/pvldb/vol17/p563-wooders.pdf)</sup> 伯克利的一项相关分析发现，现有存储对称地对待所有数据更新和键，并且仅在新鲜度方面做出尽力而为的尝试，因此特征可能变得任意陈旧并损害精度。<sup>[10](https://escholarship.org/content/qt5xk0f4z9/qt5xk0f4z9.pdf)</sup>

第二个开放问题是嵌入。特征存储是为表格特征构建的；预训练的自监督嵌入是通过点积相似度比较的派生数据，因此空值计数等标准指标无法捕捉漂移，而管理嵌入训练数据、质量和下游模型在标准存储中仍基本未得到解决。<sup>[2](https://www.vldb.org/pvldb/vol14/p3178-orr.pdf)</sup>

## 产品格局

市场有三种主要形态：开源、自管理的特征存储；托管特征平台；以及捆绑在云机器学习平台中的特征存储。<sup>[13](https://resources.tecton.ai/hubfs/Buyers-Guide-to-Evaluating-Feature-Solutions.pdf)</sup> Feast作为开源选项，提供元数据注册表和SDK，而用户自带离线存储（BigQuery、[Snowflake](https://www.edgepedia.org/zh/snowflake)、Redshift、Spark等）和在线存储（Redis、DynamoDB、Bigtable、Cassandra等）；其网站报告有293名贡献者、超过1200万次下载和5500名Slack成员。<sup>[14](https://feast.dev/)</sup><sup> • </sup><sup>[7](https://ttlab.hopto.org/blog/culture/2026-05-16-feature-stores-feast-tecton-hopsworks-databricks-feldera-bytewax-materialize-2026-deep-dive?lang=en)</sup> 托管平台自动化了普通特征存储留给用户的流水线；Tecton由优步米开朗基罗背后的团队构建，是最知名的例子。<sup>[3](https://bhft.com/blog/feature-store-without-seeing-anyones-code)</sup><sup> • </sup><sup>[13](https://resources.tecton.ai/hubfs/Buyers-Guide-to-Evaluating-Feature-Solutions.pdf)</sup>

该品类自2023年以来已经整合。Databricks于2025年8月22日宣布收购Tecton，[Featureform](https://www.edgepedia.org/zh/featureform)被Redis收购（2025年10月9日宣布），其开源仓库自2025年5月16日以来没有提交；Redis现在将延续产品作为Redis Feature Form销售。<sup>[15](https://www.hivebook.wiki/wiki/feast-open-source-feature-store-for-machine-learning)</sup> 云原生存储不与其平台分开销售：SageMaker Feature Store从[Amazon S3](https://www.edgepedia.org/zh/amazon-s3)、Amazon Redshift、AWS Lake Formation、Snowflake和Databricks Delta Lake等来源摄取数据，并在摄取时将数据转换为机器学习特征，而Azure的托管特征存储物化到ADLS Gen2（离线）和Redis（在线）。<sup>[16](https://aws.amazon.com/sagemaker/ai/feature-store/)</sup><sup> • </sup><sup>[17](https://learn.microsoft.com/en-us/azure/machine-learning/concept-what-is-managed-feature-store?view=azureml-api-2)</sup> 高德纳分析师法尔汉·乔杜里（Farhan Choudhary）、索耶布·巴罗特（Soyeb Barot）和埃里克·布雷特努（Erick Brethenoux）早在2021年就指出，AWS、Databricks和IBM等数据科学平台供应商已将特征存储作为平台战略的一部分构建，而Feast等开源替代方案可以满足自助式客户的需求。<sup>[18](https://pages.run.ai/hubfs/PDFs/Gartner-Cool-Vendors-2021.pdf)</sup>

## References

1. [What Is a Feature Store? IBM](https://www.ibm.com/think/topics/feature-store)
2. [Managing ML Pipelines: Feature Stores and the Coming Wave of Embedding Ecosystems, PVLDB 14(12): 3178-3181, 2021](https://www.vldb.org/pvldb/vol14/p3178-orr.pdf)
3. [Every feature at BHFT, without seeing anyone's code, BHFT](https://bhft.com/blog/feature-store-without-seeing-anyones-code)
4. [What is a Feature Store? Tecton/Databricks](https://www.tecton.ai/blog/what-is-a-feature-store/)
5. [Feature Store concepts, Amazon SageMaker AI documentation](https://docs.aws.amazon.com/sagemaker/latest/dg/feature-store-concepts.html)
6. [Feature store, System Design Notes](https://harut8.github.io/system-design/tasks/feature-store/)
7. [Feature Stores 2026 Deep Dive, TT Lab](https://ttlab.hopto.org/blog/culture/2026-05-16-feature-stores-feast-tecton-hopsworks-databricks-feldera-bytewax-materialize-2026-deep-dive?lang=en)
8. [Feature Stores and Model Serving, The HLD Handbook](https://hld.handbook.academy/curriculum/ai-ml-system-design/feature-stores-model-serving/)
9. [Point-in-time joins, Feast documentation](https://docs.feast.dev/getting-started/concepts/point-in-time-joins)
10. [Feature Store Systems (EECS technical report), UC Berkeley](https://escholarship.org/content/qt5xk0f4z9/qt5xk0f4z9.pdf)
11. [Feature Stores in Practice, Precision Federal](https://precisionfederal.com/insights/feature-stores-in-practice)
12. [RALF: Accuracy-Aware Scheduling for Feature Store Maintenance, PVLDB 17(3): 563-576, 2023](https://www.vldb.org/pvldb/vol17/p563-wooders.pdf)
13. [ML Feature Solution Categories, Tecton](https://resources.tecton.ai/hubfs/Buyers-Guide-to-Evaluating-Feature-Solutions.pdf)
14. [Feast: The Open Source Feature Store for Machine Learning](https://feast.dev/)
15. [Feast, open source feature store, Hivebook](https://www.hivebook.wiki/wiki/feast-open-source-feature-store-for-machine-learning)
16. [Amazon SageMaker Feature Store, AWS](https://aws.amazon.com/sagemaker/ai/feature-store/)
17. [What is managed feature store? Azure Machine Learning, Microsoft Learn](https://learn.microsoft.com/en-us/azure/machine-learning/concept-what-is-managed-feature-store?view=azureml-api-2)
18. [Gartner Cool Vendors in Data Management, 2021](https://pages.run.ai/hubfs/PDFs/Gartner-Cool-Vendors-2021.pdf)

---
*Initially written Oct 26, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Machine learning and neural computation

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/feature-store

English original: https://www.edgepedia.org/feature-store
