Justin Beaurivage;Messaoud Ahmed Ouameur;Frédéric Domingue
{"title":"A Memory Representation of Random Forests Optimized for Resource-Limited Embedded Devices","authors":"Justin Beaurivage;Messaoud Ahmed Ouameur;Frédéric Domingue","doi":"10.1109/LES.2025.3574563","DOIUrl":null,"url":null,"abstract":"Random forests (RFs) are a versatile and effective machine learning technique widely applied across various tasks. With the increasing demand for deploying machine learning models on resource-constrained embedded devices, such as microcontrollers, challenges arise from the growing complexity of modern datasets. These challenges often result in models that are too large in memory and storage requirements to be feasibly implemented on small devices. In this letter, we propose a lossless memory representation of RFs that significantly limits the amount of random-access memory (RAM) required for prediction tasks, while also reducing the amount of nonvolatile memory needed to store the model. The approach achieves efficiency by embedding the data of leaf nodes within the decision nodes, thereby streamlining the tree structure. Additionally, it supports in-place prediction without requiring a decompression step. To evaluate our method, we implemented four RFs derived from real-world datasets onto four microcontroller platforms. Our results demonstrate that prediction tasks can be performed using at most 144 bytes of RAM for classification tasks, and at most 48 bytes for regression tasks, while memory accesses account for a maximum of 27.0% of the total CPU cycles. On the fastest platform, prediction times ranged between 59 and <inline-formula> <tex-math>$75~\\mu $ </tex-math></inline-formula>s, highlighting the suitability of this method for a variety of real-time applications.","PeriodicalId":56143,"journal":{"name":"IEEE Embedded Systems Letters","volume":"18 2","pages":"115-118"},"PeriodicalIF":2.0000,"publicationDate":"2026-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Embedded Systems Letters","FirstCategoryId":"94","ListUrlMain":"https://ieeexplore.ieee.org/document/11016824/","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2025/3/28 0:00:00","PubModel":"Epub","JCR":"Q3","JCRName":"COMPUTER SCIENCE, HARDWARE & ARCHITECTURE","Score":null,"Total":0}
引用次数: 0
Abstract
Random forests (RFs) are a versatile and effective machine learning technique widely applied across various tasks. With the increasing demand for deploying machine learning models on resource-constrained embedded devices, such as microcontrollers, challenges arise from the growing complexity of modern datasets. These challenges often result in models that are too large in memory and storage requirements to be feasibly implemented on small devices. In this letter, we propose a lossless memory representation of RFs that significantly limits the amount of random-access memory (RAM) required for prediction tasks, while also reducing the amount of nonvolatile memory needed to store the model. The approach achieves efficiency by embedding the data of leaf nodes within the decision nodes, thereby streamlining the tree structure. Additionally, it supports in-place prediction without requiring a decompression step. To evaluate our method, we implemented four RFs derived from real-world datasets onto four microcontroller platforms. Our results demonstrate that prediction tasks can be performed using at most 144 bytes of RAM for classification tasks, and at most 48 bytes for regression tasks, while memory accesses account for a maximum of 27.0% of the total CPU cycles. On the fastest platform, prediction times ranged between 59 and $75~\mu $ s, highlighting the suitability of this method for a variety of real-time applications.
期刊介绍:
The IEEE Embedded Systems Letters (ESL), provides a forum for rapid dissemination of latest technical advances in embedded systems and related areas in embedded software. The emphasis is on models, methods, and tools that ensure secure, correct, efficient and robust design of embedded systems and their applications.