[论文解读] TensorFI: A Flexible Fault Injection Framework for TensorFlow Applications
TensorFI 是一个灵活的、高级别的 TensorFlow 应用程序故障注入框架,可在不修改原始代码的情况下,在运行时于算子级别和图级别注入硬件和软件故障。它通过在 Python 中使用并行的、带 instrumentation 的图,实现了较低的性能开销(平均 1.5 倍),并在 12 个机器学习模型上展示了有效的弹性评估,包括自动驾驶车辆的深度神经网络。
As machine learning (ML) has seen increasing adoption in safety-critical domains (e.g., autonomous vehicles), the reliability of ML systems has also grown in importance. While prior studies have proposed techniques to enable efficient error-resilience techniques (e.g., selective instruction duplication), a fundamental requirement for realizing these techniques is a detailed understanding of the application's resilience. In this work, we present TensorFI, a high-level fault injection (FI) framework for TensorFlow-based applications. TensorFI is able to inject both hardware and software faults in general TensorFlow programs. TensorFI is a configurable FI tool that is flexible, easy to use, and portable. It can be integrated into existing TensorFlow programs to assess their resilience for different fault types (e.g., faults in particular operators). We use TensorFI to evaluate the resilience of 12 ML programs, including DNNs used in the autonomous vehicle domain. Our tool is publicly available at https://github.com/DependableSystemsLab/TensorFI.
研究动机与目标
- 应对在自动驾驶和航空等领域中,对安全关键型机器学习系统可靠性与故障弹性评估日益增长的需求。
- 克服现有故障注入工具在低级代码层面运行或与 TensorFlow 等高级机器学习框架不兼容的局限性。
- 开发一个可移植、可配置且高性能的故障注入框架,可在不修改原始模型或运行时行为的前提下,于 TensorFlow 图和算子级别运行。
- 使开发者能够系统性地评估不同类型的故障(例如,位翻转、随机值替换)对多样化机器学习应用中模型输出的影响。
- 通过将故障注入逻辑隔离在独立的可选执行路径中,确保与外部库的兼容性,并在正常执行时保持高性能。
提出的方法
- 构建一个并行的、带 instrumentation 的 TensorFlow 图(FI 图),其镜像原始模型的算子,但包含可配置的故障注入功能。
- 使用 Python 实现故障注入算子,以确保可移植性和配置简便性,避免对低级 C++ 或汇编代码进行修改。
- 通过运行时分发机制,根据配置标志选择使用原始算子或 FI 变体算子,确保在故障未启用时性能影响最小。
- 在 TensorFlow 操作的输出处注入故障,支持多种故障类型:单一位翻转、随机值替换和基于错误率的注入。
- 保持与原始图在语义和结构上的兼容性,以确保依赖 TensorFlow 图结构的第三方库功能不受影响。
- 通过极少的代码更改将框架集成到现有 TensorFlow 应用中,实现无缝的弹性评估。
实验结果
研究问题
- RQ1如何在不修改原始模型或影响性能的前提下,有效实现 TensorFlow 图级别的故障注入?
- RQ2将故障注入框架集成到真实世界的 TensorFlow 应用中,其性能开销是多少?
- RQ3不同类型的故障(例如,位翻转、随机替换)如何影响安全关键应用中深度神经网络的输出?
- RQ4TensorFI 在多大程度上可用于评估真实世界机器学习模型的弹性,包括自动驾驶中使用的模型?
- RQ5该框架能否实现可移植性并兼容依赖原始 TensorFlow 图结构的第三方库?
主要发现
- 当故障注入关闭时,TensorFI 仅引入平均 1.5 倍的性能开销,满足了正常执行时最小干扰的目标。
- 由于在 Python 层次上模拟算子,故障注入的开销范围为 21 倍到 131 倍,但考虑到该框架用于分析而非生产,这一开销是可以接受的。
- 最耗时的实验(ResNet 和 Highway CNN)在 16 小时内完成,大多数实验在 3–4 小时内完成 10,000 次故障注入。
- 通过位翻转注入的故障在 GAN 生成的图像中产生了更多双极性(黑白)伪影,而随机替换则导致了更多样化的像素强度。
- 该框架成功评估了 12 种不同模型的弹性,包括与自动驾驶相关的 DNN,证明了其在安全关键型机器学习系统验证中的实用性。
- TensorFI 通过不修改原始图结构,保持了与外部库的兼容性,确保依赖工具能继续正确运行。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。