Gate2Bit-FI is an end-to-end reliability evaluation framework designed to bridge the gap between gate-level hardware defects and application-level software degradation in Image Classification - Quantized Neural Networks (QNNs).
The tool is composed by two main engines:
- Gate-level Fault Injector: it is able to perform statistcial fault injection campaigns of permanent stuck-@ faults at gate-level (within the core arithmetic units (Adders and Multipliers)) of a general-purpose processor core (RISC-V
cve2) - BitFlipper: it is a hardware-agnostic software bit-flip masks applied directly to the model weights and biases.
|
- Cross-Layer Fault Mapping: Avoids the multi-order simulation slowdowns of full gate-level netlist execution by allowing the user to emulate it via software-level bit-flips in model tensors.
- High-Fidelity Evaluation: Validated on real-world edge-AI workloads (find more in DEEP-VAULT), achieving a peak end-to-end cross-correlation of 99.90% (87.24% average, for MUL and Adder) at the network's final output.
- Edge-AI Focused: Native support for UINT8, INT8 quantized models evaluated on the CIFAR-10 dataset.
The framework is organized into two main co-dependent layers:
📁 Gate2Bit-FI
├── 📁 Gate-level-FI/ # Hardware Logic Layer
│ ├── 📁 apps/
│ │ └── 📁 hw_fault_injector/ # hw-level simulated fault injector core
│ │ ├── 📁 tools/
│ │ | └── 📁 stats_extractor/ # Tool to extract top-1 and top-5 stats
│ │ ├── main.cpp # Entry point
│ │ └── 📁 data/
│ │ └── 📁 configs/ # contains JSON config files
│ ├── 📁 gatelevel/ # Gate-level RV32IM multiplier and adder descriptions
│ ├── 📁 includes/ # Header files and common definitions
│ ├── 📁 injectors/ # Modules responsible for injecting faults into the C++ verilated circuit wrapper
│ ├── 📁 tflm/ # TensorFlow Lite Micro (LiteRT) source and related files
│ └── 📁 tools/ # Injector class generation utilities
├── 📁 BitFlipper/ # Application Layer Bit Flipper for Weights and Biases
│ ├── 📁 utils/ # Utils files for proper functioning
│ ├── 📁 config/ # Configuration files
│ └── main.py # Entry point
This module targets hardware datapath blocks. It injects permanent stuck-at-0 and stuck-at-1 faults into the netlist execution of functional units. It outputs the exact bit-level corruption profiles resulting from faulty hardware operations.
A "plug-and-play", hardware-agnostic Python framework. It reads the pre-characterized hardware fault profiles and emulates their exact mathematical impact by applying deterministic single or double bit-flips within the static weight tensors of PyTorch INT8 models.
Refer to the readme.md files in both Gate-level_FI and Bitflipper folders.
If you use Gate2Bit-FI in your research, please cite our work:
@INPROCEEDINGS{11480360,
author={Perlo, Giacomo and Porsia, Antonio and Ruospo, Annachiara and Sanchez, Ernesto},
booktitle={2026 IEEE 27th Latin American Test Symposium (LATS)},
title={Emulating SDC-1 Hardware Faults Through Application Level Bit-Flip Injections in QNNs},
year={2026},
volume={},
number={},
pages={1-6},
keywords={Activity recognition;Human activity recognition;Circuits;System-on-chip;Microcontrollers;Register transfer level;Very large scale integration;Circuits and systems;Microprocessors;AI accelerators},
doi={10.1109/LATS70329.2026.11480360}}
This project is licensed under the MIT License - see the LICENSE file for details.
