A research team from the HKU CANLab, the Department of Electrical and Computer Engineering (ECE) at The University of Hong Kong (HKU), led by Prof. Can LI, together with Mr. Bo WEN, Dr. Guoyun GAO and collaborators, has developed a novel hardware-software co-design approach that turns a long‑standing hardware limitation into a powerful advantage for trustworthy artificial intelligence. The research paper has been published in Nature Communications, titled “Trustworthy Tree-based Machine Learning by MoS2 Flash-based Analog Content-addressable Memory with Inherent Soft Boundaries”.
This work introduces a novel hardware‑software co‑design that uses the intrinsic gradual switching behaviour of analog content‑addressable memory (CAM) to natively execute soft decision trees—interpretable machine‑learning models that were previously far too computationally expensive for practical use. Unlike traditional approaches that fight against device non‑idealities, the team deliberately exploits the inherent “soft” boundaries of hardware to perform probabilistic inference directly where the model is stored, achieving state‑of‑the‑art accuracy and robustness while dramatically accelerating computation.
To validate the concept, the team fabricated 8×8 analog CAM arrays using atomically thin MoS₂ charge‑trap flash memory (related work published on Nature Nanotechnology, news: https://ece.hku.hk/20251217-2), which offers an ON/OFF ratio exceeding 109 and excellent gate controllability. Key experimental results include:
- 96 % accuracy on the Wisconsin Diagnostic Breast Cancer (WDBC) dataset and 97 % on the Iris dataset, outperforming a conventional hard decision tree while preserving full explainability.
- Exceptional hardware‑noise resilience: under 10 % device threshold variation, the soft tree model retains >99 % of its original accuracy on the MNIST dataset (drops only 0.6 %), whereas a traditional decision tree collapses by 45 %.
- Robustness against adversarial attacks: a soft tree of depth 20 loses only 1.7 % accuracy when the root node is perturbed, compared to a 14.3 % drop for a hard tree.
Benchmarks show that the analog CAM implementation reduces soft‑tree inference complexity from exponential to O(1), delivering 10³–10⁴× speed‑up and 10⁵–10⁶× energy reduction relative to state‑of‑the‑art CPU and GPU platforms. A scalable architecture with master match lines is further proposed, enabling large models to operate with negligible accuracy loss even under realistic device variations.
By bridging algorithmic robustness and hardware resilience, the results lay the foundation for a new generation of ultra‑efficient, trustworthy AI accelerators suited for safety‑critical domains such as healthcare, finance, and autonomous systems.

^From left to right: Prof. Can LI, Mr. Bo WEN, Dr. Guoyun GAO.
Read more in the paper: https://www.nature.com/articles/s41467-026-72118-z
Bo Wen#, Guoyun Gao#, Zhicheng Xu, Mingrui Jiang, Ruibin Mao, Xiaojuan Qi, Jiezhi Chen, Xunzhao Yin, X.Sharon Hu and Can Li* (2026). Trustworthy tree-based machine learning by MoS2 flash-based analog content-addressable memory with inherent soft boundaries. Nature Communications. https://doi.org/10.1038/s41467-026-72118-z
