# 黑箱模型

黑箱模型是一种仅通过其输入和输出来构建和使用的模型，不利用其所表示系统的物理或内部结构的先验知识；因此，用伦纳特·永（Lennart Ljung）的话说，它与其说是“建模”，不如说是“曲线拟合”。<sup>[1](https://www.diva-portal.org/smash/get/diva2:316697/FULLTEXT01.pdf)</sup> 在[控制论](https://www.edgepedia.org/zh/cybernetics)中，这一概念作为科学研究的工具和隐喻发展起来；黑箱是一个只有输入和输出已知、内部运作未知或不可知的系统。<sup>[2](https://-sage-cnpereading-com-443.webvpn1.xju.edu.cn/doi/10.1177/0162243919881212)</sup> 在机器学习中，辛西娅·鲁丁（Cynthia Rudin）将黑箱模型定义为：要么是复杂到任何人都无法理解的函数，要么是公式被隐藏的专有函数；有些模型两者兼有。<sup>[3](https://www.nature.com/articles/s42256-019-0048-x)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义性属性 | 不使用关于关系物理机制的先验知识；拟合数据是首要目标<sup>[1](https://www.diva-portal.org/smash/get/diva2:316697/FULLTEXT01.pdf)</sup> |
| 形式化访问 | 用户只能提出输入并观察输出；第三方执行或代码混淆会使即便已知的算法也变成黑箱<sup>[4](https://inria.hal.science/hal-03940259/file/tractatus_black_boxicus_EN.pdf)</sup> |
| 典型例子 | 神经网络、支持向量机、随机森林，以及仿真器的代理模型<sup>[4](https://inria.hal.science/hal-03940259/file/tractatus_black_boxicus_EN.pdf)</sup><sup> • </sup><sup>[5](https://ieeexplore.ieee.org/document/8882211)</sup><sup> • </sup><sup>[6](https://arxiv.org/pdf/2604.14240)</sup> |
| 准确率与可解释性 | 在2018年FICO挑战赛中，深度神经网络与高度可解释模型的准确率差异不到1%<sup>[7](https://hdsr.mitpress.mit.edu/pub/f9kuryi8/release/8)</sup> |
| 解释质量 | 局部解释方法（LIME、SHAP、Anchor、LORE）在表格基准上达到超过90%的保真度，但没有一种特别稳定<sup>[8](https://link.springer.com/article/10.1007/s10618-023-00933-9)</sup> |
| 监管 | 《欧盟人工智能法案》（EU AI Act）对高风险人工智能系统提出具体要求，包括透明性、向部署者提供信息以及人类监督，并在投放市场前进行合格评定<sup>[9](https://arxiv.org/pdf/2502.14868)</sup><sup> • </sup><sup>[32](https://ai-act-service-desk.ec.europa.eu/en/ai-act/annex-4)</sup> |

## 工作原理

黑箱模型产生输入-输出映射，并有意省略机制。在系统辨识中，模型结构通常按先验知识进行“颜色编码”：白箱模型完全由物理洞察得知，灰箱模型将物理结构与从数据估计的参数结合起来，而黑箱模型完全不使用物理洞察。<sup>[1](https://www.diva-portal.org/smash/get/diva2:316697/FULLTEXT01.pdf)</sup> 关键问题是选择合适的模型结构；在给定结构内进行拟合通常是次要问题。<sup>[10](https://link.springer.com/chapter/10.1007/978-1-4615-6281-8_26)</sup>

黑箱产生的是传递函数或预测器。对于质量-弹簧-阻尼系统，黑箱传递函数为 \( G(s)=1/(ms^{2}+cs+k) \)；只需要猜测模型阶数，而不需要运动方程。<sup>[11](https://www.mathworks.com/help/ident/ug/black-box-modeling.html)</sup> 线性结构可以将加性噪声显式建模为 \( y(t)=G \cdot u(t)+H \cdot e(t) \)，其中 \( H \) 是由白噪声 \( e(t) \) 驱动的线性系统。<sup>[11](https://www.mathworks.com/help/ident/ug/black-box-modeling.html)</sup> 线性模型族包括由五个结构参数 \( n_{b}, n_{c}, n_{d}, n_{f}, n_{k} \) 描述的Box-Jenkins模型，以及输出误差模型和ARMAX/ARX模型。<sup>[1](https://www.diva-portal.org/smash/get/diva2:316697/FULLTEXT01.pdf)</sup> 灰箱辨识为给定结构生成系数，而黑箱辨识从数据本身确定模型阶数。<sup>[12](https://eng.libretexts.org/Bookshelves/Introductory_Engineering/Mechatronics%3A_Fundamentals_Design_Integration_and_Validation_%28Zhu%29/02%3A_Mechatronic_System_Modeling/2.06%3A_Introduction_of_Gray-_and_Black-Box_Modeling_Using_System_Identification_and_Machine_Learning)</sup>

## 如何实施

标准工作流程将数据分为估计集和验证集，在估计集上估计不同规模的模型，并选择在验证数据上使准则最小化的模型。<sup>[1](https://www.diva-portal.org/smash/get/diva2:316697/FULLTEXT01.pdf)</sup> 这通常是试错过程，从简单的线性结构（传递函数、线性ARX、状态空间）开始，逐步过渡到更复杂的结构。<sup>[11](https://www.mathworks.com/help/ident/ug/black-box-modeling.html)</sup> 把黑箱当作预言机，就可以查询和近似它：观察到的输入-输出关系越多，代理模型就能越精确地表示该算法。<sup>[4](https://inria.hal.science/hal-03940259/file/tractatus_black_boxicus_EN.pdf)</sup> 代理模型（仿真器或元模型）是资源密集型仿真器输入-输出映射的数据驱动近似，它们在有限的高保真运行集上训练，从而以原始计算成本的一小部分实现快速评估。<sup>[6](https://arxiv.org/pdf/2604.14240)</sup> 克里金（[高斯过程](https://www.edgepedia.org/zh/gaussian-process)）模型是一种广泛使用的静态代理模型，它同时预测均值和方差，以涵盖内在与外在不确定性。<sup>[12](https://eng.libretexts.org/Bookshelves/Introductory_Engineering/Mechatronics%3A_Fundamentals_Design_Integration_and_Validation_%28Zhu%29/02%3A_Mechatronic_System_Modeling/2.06%3A_Introduction_of_Gray-_and_Black-Box_Modeling_Using_System_Identification_and_Machine_Learning)</sup>

## 起源

“黑箱”一词是在系统意义上使用的。<sup>[13](https://ranulphglanville.org.za/wp-content/uploads/2023/06/Ashby-and-the-Black-Box.pdf)</sup> 控制论学者在20世纪50年代初开始明确使用这一术语，此前维纳（Wiener）于1951年1月在布里斯托尔（Bristol）的伯登神经学研究所（Burden Neurological Institute）发表演讲，讨论如何从输入-输出观察推断一个盒子中未知的电气内容。<sup>[2](https://-sage-cnpereading-com-443.webvpn1.xju.edu.cn/doi/10.1177/0162243919881212)</sup> W. 格雷·沃尔特（W. Grey Walter）称黑箱为“通信工程师的方法”：无需查看盒子内部，只要将输入信号与输出信号对照，就能学到很多东西；这是他在1954年《活的大脑》（The Living Brain）中提出的研究大脑的方法。<sup>[14](https://doi.org/10.1097/00005053-195407000-00069)</sup> 威廉·罗斯·阿什比（William Ross Ashby）1956年的《控制论导论》（An Introduction to Cybernetics）将日常系统视为黑箱，例如孩子操作门把手（输入）来移动门闩（输出），却看不到连接二者的机制。<sup>[15](https://doi.org/10.5962/bhl.title.5851)</sup><sup> • </sup><sup>[13](https://ranulphglanville.org.za/wp-content/uploads/2023/06/Ashby-and-the-Black-Box.pdf)</sup> 斯塔福德·比尔（Stafford Beer）在1960年出版的《控制论与管理》（Cybernetics and Management）中将黑箱应用于极其复杂的系统，如大脑、公司或经济。<sup>[16](https://doi.org/10.2307/2343193)</sup> 后来的基础工作包括伦纳特·永（Lennart Ljung）1987年的《系统辨识：面向用户的理论》（System Identification: Theory for the User）、赤池（Akaike）1974年发表于《IEEE自动控制汇刊》（IEEE Transactions on Automatic Control）的统计模型辨识论文<sup>[17](https://doi.org/10.1109/tac.1974.1100705)</sup>，以及约纳斯·舍贝里（Jonas Sjöberg）及其同事1995年发表于《Automatica》的系统辨识中非线性黑箱建模统一综述<sup>[18](https://doi.org/10.1016/0005-1098%2895%2900120-8)</sup>。

## 变体

灰箱方法可以作为白箱与黑箱模型的串联或并联来部署；转变包括从白箱到灰箱，通过数据驱动校准或代理模型实现，以及从黑箱到灰箱，通过可解释人工智能或嵌入领域知识实现。<sup>[19](https://www.scitepress.org/Papers/2025/133614/133614.pdf)</sup> 物理信息机器学习（Physics-Informed Machine Learning，PIML）将物理定律、约束和控制方程直接集成到黑箱模型中，以减少数据依赖并提高泛化能力。<sup>[19](https://www.scitepress.org/Papers/2025/133614/133614.pdf)</sup> 在系统辨识中，两种标准的非线性黑箱结构是非线性ARX模型和Hammerstein-Wiener模型，后者分三个阶段计算输出：静态输入非线性、线性传递函数和静态输出非线性。<sup>[20](https://www.mathworks.com/help/ident/gs/identify-nonlinear-black-box-models-using-the-gui.html)</sup> 更早的非线性构建模块包括小波网络，由Q. 张（Q. Zhang）和A. 本韦尼斯特（A. Benveniste）于1992年发表于《IEEE神经网络汇刊》（IEEE Transactions on Neural Networks）<sup>[21](https://doi.org/10.1109/72.165591)</sup>；以及[利奥·布雷曼](https://www.edgepedia.org/zh/leo-breiman)（Leo Breiman）1993年发表于《IEEE信息论汇刊》（IEEE Transactions on Information Theory）的铰链超平面，用于回归、分类和函数逼近<sup>[22](https://doi.org/10.1109/18.256506)</sup>。

## 应用

神经网络是现代机器学习中的典型黑箱，因为它们产生非显式决策：其变量数量巨大，且在没有算法步骤的情况下，无法直接解释某一决策。<sup>[4](https://inria.hal.science/hal-03940259/file/tractatus_black_boxicus_EN.pdf)</sup> 基于SVM的模型被归类为黑箱，因为其数学运算难以理解；而基于ANN的模型（CNN和GAN家族）由于对输入数据进行了多次变换，对机器学习专家和应用专家来说都是最难理解的。<sup>[5](https://ieeexplore.ieee.org/document/8882211)</sup> 在仿真中，代理模型让从业者能够低成本地探索设计空间，尽管它们继承并常常加剧其所模拟仿真器的黑箱性质。<sup>[6](https://arxiv.org/pdf/2604.14240)</sup>

## 局限与替代方案

黑箱模型会以典型方式失效。它们的外推能力很差：一个气候仿真神经网络无法处理比训练中所见高出4开尔文以上的海表温度升高。<sup>[23](https://repository.tudelft.nl/file/File_2dc58a80-3a5b-4487-aa67-5cfd43a1e88c)</sup> 克里斯蒂安·塞格迪（Christian Szegedy）及其同事于2013年报告的对抗样本，是经过人类几乎无法察觉的改动、从而使机器分类结果翻转的输入；这类样本在神经网络中难以消除，而人脑则不会受其影响。<sup>[24](https://doi.org/10.48550/arxiv.1312.6199)</sup><sup> • </sup><sup>[23](https://repository.tudelft.nl/file/File_2dc58a80-3a5b-4487-aa67-5cfd43a1e88c)</sup> “聪明的汉斯”（Clever Hans）失效模式是指模型因错误原因预测出正确答案，在训练中表现良好，但在实践中表现不佳。<sup>[25](https://emse.fr/~xie/Interpretable%20Machine%20Learning.pdf)</sup> 数据驱动建模还可能过拟合，并且无法捕捉因果关系。<sup>[19](https://www.scitepress.org/Papers/2025/133614/133614.pdf)</sup>

鲁丁认为，解释黑箱模型而不是构建本身可解释的模型，会使不良做法延续下去，并可能在高风险领域造成巨大伤害；她还指出，事后解释往往不忠实，并以ProPublica-COMPAS案为例，其中线性解释模型依赖于种族，而COMPAS本身可能并非如此。<sup>[3](https://www.nature.com/articles/s42256-019-0048-x)</sup> 定量证据部分支持她的立场：在2018年FICO可解释机器学习挑战赛中，深度神经网络与高度可解释模型之间的准确率差异不到1%，作者称准确率与可解释性之间的权衡是一种谬误。<sup>[7](https://hdsr.mitpress.mit.edu/pub/f9kuryi8/release/8)</sup> 偏差-方差权衡是黑箱结构选择的核心<sup>[1](https://www.diva-portal.org/smash/get/diva2:316697/FULLTEXT01.pdf)</sup>，而观测数据填充输入空间的速度随输入维度呈指数下降。<sup>[26](http://maxim.ece.illinois.edu/teaching/fall20/final/Juditsky95.pdf)</sup>

打开黑箱是放弃黑箱之外的主要替代方案。隐藏内部逻辑在文献中被视为既是实践问题，也是伦理问题。<sup>[27](https://dl.acm.org/doi/10.1145/3236009)</sup> 马尔科·图利奥·里贝罗（Marco Tulio Ribeiro）、萨米尔·辛格（Sameer Singh）和卡洛斯·格斯特林（Carlos Guestrin）于2016年报告的[LIME](https://www.edgepedia.org/zh/local-interpretable-model-agnostic-explanations)，通过在模拟邻域点周围拟合局部近似来解释单个预测，但其解释依赖于邻域采样策略和核宽度，并且在不同运行之间可能不稳定。<sup>[28](https://doi.org/10.48550/arxiv.1606.05386)</sup><sup> • </sup><sup>[29](https://www.mdpi.com/1424-8220/25/21/6649)</sup> SHAP计算受博弈论沙普利（Shapley）值启发的加性特征归因，已知其对特征相关性敏感。<sup>[29](https://www.mdpi.com/1424-8220/25/21/6649)</sup> 在表格基准上，LIME、SHAP、Anchor和LORE的保真度超过90%，SHAP是最高效的方法，且没有一种解释器特别稳定。<sup>[8](https://link.springer.com/article/10.1007/s10618-023-00933-9)</sup> 对于仿真模型，全局敏感性分析提供了基于方差的索博尔（Sobol）指数和傅里叶振幅敏感性检验（Fourier Amplitude Sensitivity Test），这一工作脉络与安德烈亚·萨尔泰利（Andrea Saltelli）2002年发表于《风险分析》（Risk Analysis）的重要性评估论文相关。<sup>[6](https://arxiv.org/pdf/2604.14240)</sup><sup> • </sup><sup>[30](https://doi.org/10.1111/0272-4332.00040)</sup> 基于规则的近似是另一条路径：希马宾杜·拉卡拉朱（Himabindu Lakkaraju）及其同事的BETA框架在每条规则平均10个谓词的情况下，与5层深度网络达到约85%的一致率，而基线方法至少需要20个谓词。<sup>[31](https://doi.org/10.48550/arxiv.1707.01154)</sup>

## References

1. [Black-box Models from Input-output Measurements (Lennart Ljung)](https://www.diva-portal.org/smash/get/diva2:316697/FULLTEXT01.pdf)
2. [Building the Black Box: Cyberneticians and Complex Systems](https://-sage-cnpereading-com-443.webvpn1.xju.edu.cn/doi/10.1177/0162243919881212)
3. [Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead (Rudin, Nature Machine Intelligence)](https://www.nature.com/articles/s42256-019-0048-x)
4. [Tractatus Black Boxicus (formal definitions of black-box algorithms)](https://inria.hal.science/hal-03940259/file/tractatus_black_boxicus_EN.pdf)
5. [Black-Box vs. White-Box: Understanding Their Advantages and Weaknesses From a Practical Point of View (IEEE Access)](https://ieeexplore.ieee.org/document/8882211)
6. [Survey on explainability of surrogate models for complex-system simulation](https://arxiv.org/pdf/2604.14240)
7. [Why Are We Using Black Box Models in AI When We Don't Need To? A Lesson From an Explainable AI Competition (Harvard Data Science Review)](https://hdsr.mitpress.mit.edu/pub/f9kuryi8/release/8)
8. [Benchmarking and survey of explanation methods for black box models (Data Mining and Knowledge Discovery, 2023)](https://link.springer.com/article/10.1007/s10618-023-00933-9)
9. [Unlocking the Black Box: Analysing the EU Artificial Intelligence Act's Explainability Requirements](https://arxiv.org/pdf/2502.14868)
10. [Some Aspects of Nonlinear Black-Box Modeling in System Identification (Ljung, 1997)](https://link.springer.com/chapter/10.1007/978-1-4615-6281-8_26)
11. [Black-Box Modeling (MathWorks documentation)](https://www.mathworks.com/help/ident/ug/black-box-modeling.html)
12. [2.06: Introduction of Gray  and Black Box Modeling Using System Identification and Machine Learning (eng.libretexts.org)](https://eng.libretexts.org/Bookshelves/Introductory_Engineering/Mechatronics%3A_Fundamentals_Design_Integration_and_Validation_%28Zhu%29/02%3A_Mechatronic_System_Modeling/2.06%3A_Introduction_of_Gray-_and_Black-Box_Modeling_Using_System_Identification_and_Machine_Learning)
13. [A (Cybernetic) Musing: Ashby and the Black Box (Ranulph Glanville)](https://ranulphglanville.org.za/wp-content/uploads/2023/06/Ashby-and-the-Black-Box.pdf)
14. [W. Grey Walter (1954). THE LIVING BRAIN. The Journal of Nervous and Mental Disease.](https://doi.org/10.1097/00005053-195407000-00069)
15. [William Ross. Ashby (1956). An introduction to cybernetics. .](https://doi.org/10.5962/bhl.title.5851)
16. [S. Vajda, Stafford Beer (1960). Cybernetics and Management.. Journal of the Royal Statistical Society Series A (General).](https://doi.org/10.2307/2343193)
17. [H. Akaike (1974). A new look at the statistical model identification. IEEE Transactions on Automatic Control.](https://doi.org/10.1109/tac.1974.1100705)
18. [Nonlinear black-box modeling in system identification: a unified overview (Automatica, 1995)](https://doi.org/10.1016/0005-1098%2895%2900120-8)
19. [An Engineer-Friendly Terminology of White, Black and Grey-Box Models](https://www.scitepress.org/Papers/2025/133614/133614.pdf)
20. [Identify Nonlinear Black-Box Models Using System Identification App - MATLAB & Simulink](https://www.mathworks.com/help/ident/gs/identify-nonlinear-black-box-models-using-the-gui.html)
21. [Q. Zhang, A. Benveniste (1992). Wavelet networks. IEEE Transactions on Neural Networks.](https://doi.org/10.1109/72.165591)
22. [L. Breiman (1993). Hinging hyperplanes for regression, classification, and function approximation. IEEE Transactions on Information Theory.](https://doi.org/10.1109/18.256506)
23. [Philosophical questions regarding machine learning models and explanation (book chapter, TU Delft repository)](https://repository.tudelft.nl/file/File_2dc58a80-3a5b-4487-aa67-5cfd43a1e88c)
24. [Szegedy, Christian and colleagues (2013). Intriguing properties of neural networks. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1312.6199)
25. [Interpretable Machine Learning: Fundamental Principles and 10 Grand Challenges (retrieved PDF copy; publisher page not retrieved)](https://emse.fr/~xie/Interpretable%20Machine%20Learning.pdf)
26. [Nonlinear Black-box Models in System Identification: Mathematical Foundations (Juditsky et al., Automatica 1995)](http://maxim.ece.illinois.edu/teaching/fall20/final/Juditsky95.pdf)
27. [A Survey of Methods for Explaining Black Box Models (Guidetti et al., ACM Computing Surveys)](https://dl.acm.org/doi/10.1145/3236009)
28. [Ribeiro, Marco Tulio, Singh, Sameer, Guestrin, Carlos (2016). Model-Agnostic Interpretability of Machine Learning. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1606.05386)
29. [eXplainable Artificial Intelligence (XAI): A Systematic Review for Unveiling the Black Box Models and Their Relevance to Biomedical Imaging and Sensing (Sensors, MDPI)](https://www.mdpi.com/1424-8220/25/21/6649)
30. [Andrea Saltelli (2002). Sensitivity Analysis for Importance Assessment. Risk Analysis.](https://doi.org/10.1111/0272-4332.00040)
31. [Lakkaraju, Himabindu and colleagues (2017). Interpretable & Explorable Approximations of Black Box Models. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1707.01154)
32. [Annex 4 (ai-act-service-desk.ec.europa.eu)](https://ai-act-service-desk.ec.europa.eu/en/ai-act/annex-4)

---
*Initially written Sep 29, 2026 · Reviewed: Sep 30, 2026 · Edited: Sep 30, 2026; Oct 15, 2026; Oct 21, 2026 · Last review: Sep 30, 2026*

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

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/black-box-model

English original: https://www.edgepedia.org/black-box-model
