Supported by a prestigious ERC starting grant, Professor Marian Verhelst recently concluded her 5-years long Re-SENSE project. Re-SENSE tackled a fundamental conflict between information-extraction and resource-efficiency in embedded sensing applications. This was done through the realization of a very unique sensing concept exploited by animals and humans, yet absent in almost all electronic sensing systems: dynamic attention-scalability. Leuven.AI coordinator Jens Bürger talked to Marian Verhelst about the Re-SENSE project, the contributions to machine learning hardware, as well as about her ideas on future AI hardware.

Marian Verhelst

Marian Verhelst

Jens Bürger

Jens Bürger

In recent years, some of the more prominently discussed advances in computer hardware were related to the application of neural networks. For example, tensor processing units, GPUs, or Intel’s Loihi. Your Re-Sense project had a focus on embedded sensing applications. With an eye on the relation of AI software and hardware architectures, can you describe what different hardware design challenges this focus poses as compared to the mentioned processor examples?

Marian: Traditionally, most machine learning applications have been executed in the cloud: in large powerful computers populating many remote server farms. Over the past 5 years, we however see a strong trend to move machine intelligence to the so called “edge of the cloud” or even the “extreme edge”: Extreme edge devices such as wearables, portables, robots or other embedded devices constantly collect information through an increasing amount of built-in sensors. For latency, privacy and communication efficiency reasons, these wireless devices do not send all their data to the central cloud anymore. Instead, the aim is to process the data locally, either in the extreme edge device itself, or in a local gateway (the “edge device”) which connects many extreme edge devices to the cloud.

While TPU’s and GPU’s have all been optimized to improve machine intelligence in the cloud, designing processors for the extreme edge comes with new challenges. Specifically, machine learning processors for the extreme edge are characterized by a need for strong customization for energy efficiency, small area and memory footprint, and low average power or advanced sleep states.

The Re-Sense project pursued the use of probabilistic graphical models such as Bayesian networks. What makes such models a good fit for the project’s focus on resource-awareness, sensor fusion and attention scalability?

Marian: Most machine learning research currently focusses on neural network models. These connectionist models prove to bring excellent application accuracy, yet they also have several downsides for deployment in the resource-scarce sensing devices at the extreme edge: Smart sensing devices need to be able to handle broken sensors or missing observations and be robust against noisy sensor data. Moreover, it is, again for efficiency reasons, important that these models are able to incorporate expert knowledge, and are explainable. These are all characteristics found in probabilistic graphical models such as Bayesian models.

Example of a Bayesian network.
An objective of the project was to enable tractable machine learning, a notion that considers not just the performance (e.g., accuracy) of a model, but also its efficiency to compute an output. You introduced a hardware-aware cost metric guiding the trade-off between model performance and tractability by scaling model complexity, feature and sensor sets, as well as precision. What were some of the important insights gained from searching such a trade-off?

Marian: In the field of machine learning, tractability is often expressed in terms of HW-unaware notions of computational complexity, such as features of the compute graph (number of nodes, edges,…). Yet, we know from experience that they do not correlate well with their execution cost on an embedded processor. What is important for such devices is how much latency it takes to perform the targeted inference on the model, or how much energy is drained from the device’s battery to do so. To take this into account, we made analytical cost models, which can quickly estimate the energy and latency consumption of a given model on an embedded system. These models were then used in the incremental creation and training of a series of probabilistic graphical models. Starting from a single node graph, the model was gradually expanded to find the best trade-off between accuracy and their HW footprint.

We, however, did not only incorporate the cost of executing the probabilistic model itself on the embedded device. The device executes this inference, making use of signal features extracted from sensory data. The cost model we deploy therefore also incorporates the cost to collect the necessary sensor data for one inferencing step, and the cost to extract the desired features from these sensor samples. This allows to estimate the complete hardware footprint of an inference action.

A mobile classification scenario has two feature subsets available, F1={FA1, FB2, FD1} and F2={FB1, FB2, FD1}, which attain the same accuracy. The goal is to find the least expensive subset. The solution to this problem would clearly be F1 when considering only feature cost. But when considering also the costs of the sensors, F2 turns out to be a better choice, as sensor A is unused and can be turned off.

We showcase our framework on a mobile activity recognition scenario, and on a variety of benchmark datasets representative of the field of tractable learning. The results were published at NeurIPS 2019:

Galindez Olascoaga, Laura I., Wannes Meert, Nimish Shah, Marian Verhelst, and Guy Van den Broeck. “Towards hardware-aware tractable learning of probabilistic models.” Advances in Neural Information Processing Systems 32 (2019).


You then further investigated the impact of precision-scaling, precisely, the impact of low-precision representations on inference accuracy. For neural network hardware and computer vision applications some investigations of precision vs. accuracy have shown that, depending on the data set complexity, one can scale-down precision to 4 bits without compromising on accuracy. What relation did you find between precision and accuracy for the datasets you used?

Marian: Quantized execution is indeed already widespread for neural network inference. Most neural network inferences do not need floating point data types, but can get away with INT (fixed point) representations. This comes at very large hardware savings, as e.g. 8-bit fixed point additions or multiplications are more than an order of magnitude more efficient compared to floating point operations. Moreover, they allow to store all model parameters and intermediate data with less bits, bringing additional hardware footprint benefits.

We wanted to explore whether the same is true when inferencing Bayesian networks and probabilistic graphical models. It turns out that also here you can save resources by going to different data representations. Yet, simply going to fixed point data types does not work, as the intermediate data values traversing the probabilistic graph in the inferencing step often represent very small probabilities. A fixed point representation would quantize all these small values to zero, leading to large accuracy degradation. Instead, we tried reduced precision floating point operations (e.g. float 16 or float 8). While this gave interesting results for several applications, even more savings could be achieved with exploiting a more exotic data type: posits. Posits are a kind of “floating point representation of a floating point data type”. In essence, it is a data type with three fields: a mantissa, an exponent, and an exponent of the exponent. This allows to represent data values across a very wide dynamic range with only very few bits, exactly what we needed for our efficient probabilistic inference!

POSIT (unum III) representation.

Our observations are described in more detail in our DATE 2019 and ISSCC 2021 papers:

Shah, Nimish, Laura I. Galindez Olascoaga, Wannes Meert, and Marian Verhelst. “Problp: A framework for low-precision probabilistic inference.” In Proceedings of the 56th Annual Design Automation Conference 2019, pp. 1-6. 2019.

Shah, Nimish, Laura Isabel Galindez Olascoaga, Shirui Zhao, Wannes Meert, and Marian Verhelst. “9.4 PIU: A 248GOPS/W Stream-Based Processor for Irregular Probabilistic Inference Networks Using Precision-Scalable Posit Arithmetic in 28nm.” In 2021 IEEE International Solid-State Circuits Conference (ISSCC), vol. 64, pp. 150-152. IEEE, 2021.


You also addressed the question of model complexity and how to efficiently compute large graphs. Alike to neural networks, the key to speed-up computation is parallelism. However, unlike neural networks, you are dealing with graphs having irregular data dependencies, meaning one cannot design a regular, massively parallel hardware architecture that will always match the graph structures. You developed GraphOpt, a tool that optimizes the parallelisation of irregular graphs. Is GraphOpt already specialised for a particular hardware, or does it also improve the execution of graphical models on standard computer hardware? In other words, is GraphOpt a tool applicable to a wider range of applications, beyond the focus of the Re-Sense project?

Marian: GrapOpt indeed is a compiler which tries to maximally exploit the opportunities for parallel execution of irregular graphs. It allocates to be evaluated nodes of the graph to a series of parallel processing cores you have available. Its optimization consists of optimizing the load balancing across the parallel processing cores, while minimizing synchronization overhead between the different cores.

Different ways to partition a DAG, and impact on parallelization, communication, and workload balance.

In this, GraphOpt is not limited to specific hardware or graphs. It can handle any (upfront known) directed acyclic compute graph (DAG). We e.g. tried GraphOpt on graphs stemming from probabilistic inference, but also on the graphs of sparse matrix triangular solvers (linear algebra).

GraphOpt is also not limited to one specific hardware platform. You can define the number of parallel cores or threads supported in the targeted system, and GraphOpt will parallelize towards that hardware characteristic. So far, we have been able to prove significant speedups both in GPU’s, multi-core CPU, as well as in our own DAG Processing Unit (DPU) processor.

Shah, Nimish, Laura Isabel Galindez Olascoaga, Shirui Zhao, Wannes Meert, and Marian Verhelst. “DPU: DAG Processing Unit for Irregular Graphs With Precision-Scalable Posit Arithmetic in 28 nm.” IEEE Journal of Solid-State Circuits (2021).

Shah, Nimish, Wannes Meert, and Marian Verhelst. “GRAPHOPT: constrained-optimization-based parallelization of irregular graphs.” IEEE Transactions on Parallel and Distributed Systems (2022).


Your research then also led to the design of a custom chip, the Probabilistic Inference Unit (PIU). Without going into the actual hardware design aspects, what has the PIU already demonstrated or what does it promise in terms of hardware-aware tractable learning and energy efficient machine learning compared to alternative approaches?

Marian: PIU is optimized to efficiently execute irregular directed acyclic graphs (DAGs). In order to do this, this custom processor chip differentiates from traditional CPU and GPU architectures along a few lines:

  • First of all, the DPU has 64 independent, but simple, processing cores. Each core can execute its own instructions, to process different parts of the graph in parallel. A lightweight hardware synchronization mechanism enables the cores to synchronize at low overhead.
  • Secondly, each core has an access/execute decoupling, where separate load/store units handle data movements and couple it through FIFO buffers to the execution units. This prevents many data-induced stalls, to keep the processor cores as busy as possible.
  • Finally, the datapath of the processor supports multi-precision posit operation. Every cycle, each core can execute one 32-bit, two 16-bit or four 8-bit posit operations.

These innovations were implemented in a 28nm chip fabricated through TSMC. The resulting PIU chip achieves an 1.1×, 1.6×, 13.1× higher throughput and 271×, 1173× and 503× higher energy-efficiency than state-of-the-art CPU, desktop and embedded GPU chips, respectively, running optimized CUDA and OpenMP code.

Shah, Nimish, Laura Isabel Galindez Olascoaga, Shirui Zhao, Wannes Meert, and Marian Verhelst. “9.4 PIU: A 248GOPS/W Stream-Based Processor for Irregular Probabilistic Inference Networks Using Precision-Scalable Posit Arithmetic in 28nm.” In 2021 IEEE International Solid-State Circuits Conference (ISSCC), vol. 64, pp. 150-152. IEEE, 2021.

Shah, Nimish, Laura Isabel Galindez Olascoaga, Shirui Zhao, Wannes Meert, and Marian Verhelst. “DPU: DAG Processing Unit for Irregular Graphs With Precision-Scalable Posit Arithmetic in 28 nm.” IEEE Journal of Solid-State Circuits (2021).


And to conclude, I want to turn to the recent Intel’s 2021 Outstanding Researcher Award you received together with your colleagues Wannes Meert and Guy Van den Broeck for your work. Receiving this award from the biggest chip manufacturer in the world, what do you think how soon your research will reach chips available on the market and, thus, will become more widely available to AI researchers and AI applications? And what could come next in terms of AI hardware?

Marian: We were indeed very honoured to receive this award. It proves that the collaboration we had between the hardware expertise of my lab at MICAS, and the machine learning expertise of KU Leuven’s DTAI group and the UCLA group of Prof. Van den Broeck, is unique and fruitful.

I do believe that industry is already increasingly looking at the exploitation of non neural-network-based ML models. Intel’s interest in our project is a clear example of this. Reasoning models will likely be combined with neural network based models, to come to hybrid AI solutions. These will initially still be executed on CPU and GPU architectures, where we will gradually see modifications to the architecture to better support such workloads, such as more efficient synchronization mechanisms or a wider diversity in data type support.

In the long run, I believe we will go to even much more heterogeneous compute systems than we have today. Modern processors for cell phones or laptops contain these days multiple high performance CPU cores (central processing unit), together with multiple energy-efficient CPU cores, one or more GPUs (graphical processing unit) and an NPU (neural processing unit) core. All these are typically integrated on a single chip. In the future, we can expect the type of co-processor cores to grow further, to better customize to other workloads, such as graph processing. I look forward to the challenge of defining this heterogeneous set of cores for our future devices.


An overview of the Re-SENSE project and funding information, publication list, and participating researchers can be found on Leuven.AI.

If you would like to get more insights on Marian’s work in particular or on energy-efficient machine learning in general, we encourage you to watch the recent tinyML Trailblazer Success Story.