arXiv:2608.29913cs.AIAug 2026

Manuscript Offprint

arXiv:2608.29913

On the Instance Hardness as a Decision Criterion in TinyML Systems

Tobiasz Puslecki, Krzysztof Walkowiak

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Tobiasz Puslecki (✉) and Krzysztof Walkowiak

Department of Systems and Computer Networks,

Wroclaw University of Science and Technology

tobiasz.puslecki@pwr.edu.pl

Abstract. TinyML includes the implementation of machine learning on devices with limited memory and computing resources. With the development of technology, AI systems continue to scale in terms of size and computational requirements. This forces researchers to adapt methods to be environmentally sustainable by designing techniques for reducing computational costs and energy consumption in inferring AI models, even in small devices. In this work, we present preliminary findings on a novel application of the tree depth prune instance hardness method to the TinyML system. The results indicate that threshold control can change energy consumption with limited classification quality changes. This method allows us to adjust classification accuracy, thereby influencing computational complexity and energy consumption for inference. We present a work in progress with initial results as a proof of concept.

Keywords: TinyML · Dynamic ensemble selection · Instance hardness · Sustainable AI.

1 Introduction

TinyML includes the implementation of machine learning models on devices with limited memory and computing resources [20]. These models must be lightweight and powerful to meet strict real-time constraints [6]. In many TinyML applications, power consumption is a critical limitation, so processing data in an energy-efficient way while maintaining the accuracy of the model is the main challenge [1]. With the development of technology, artificial intelligence systems continue to scale in terms of size and computational requirements. This forces researchers to adapt methods to be environmentally sustainable by designing techniques for reducing computational costs and energy consumption in inferring AI models, even in small devices. Another problem with TinyML systems is the changing context in which these devices operate. Data distribution, battery charge status, data intensity in the datastream, or the availability of energy from external energy sources (e.g., photovoltaic panels) may change.

Instance hardness (IH) is a set of measures that indicates the degree of difficulty in classifying an instance [11]. In general, the higher the hardness value, the more difficult it is for the model to trust the correct label of that instance.

T. Puslecki and K. Walkowiak

It is worth noting that samples subjected to inference may vary in IH. Consequently, some of the easier samples can be processed by a less complex model, while the rest can be handled by a much more complex one (locally or in the cloud, depending on the use case). This allows, through a trade-off between quality and complexity, for energy resources not to be wasted. Due to the nature of TinyML systems, labels for continuous evaluation cannot be obtained immediately or at all. This necessitates the use of unsupervised methods to calculate IH. One method for measuring IH is tree depth (TD) [18], i.e., the depth of the leaf node that classifies a given instance in the decision tree, normalized by the maximum depth of the tree. There are two versions of this metric using pruned (TDP) or unpruned (TDU) decision trees. Instances that are harder to classify are typically placed at deeper levels of the tree and have higher TD values (they are close to the decision boundary). TD could be used to decide whether to use a lightweight classifier or a heavier ensemble [8, 10]. TD can also be applied in concepts similar to big/LITTLE DNNs [14] (a large DNN is used when the output of a small DNN is estimated to be inaccurate), helping to decide when to use a large DNN.

The need to investigate new energy-saving methods necessitates exploring approaches other than deep neural networks (DNNs). Ensemble methods may serve as an alternative to deep learning methods [12]. In ensemble methods, multiple weak models are trained offline, and at runtime, the system selects the appropriate models based on the conditions. For example, a smaller ensemble can be used when currently available resources are limited, otherwise a larger and more complex ensemble is used. A key feature in the construction of the ensemble pool is diversity. It can reduce the risk of overfitting and improve the ability to generalize. Most often, it is achieved by choosing classifiers from different model families or different sets of hyperparameters. Different base models may be appropriate in different regions of the local feature space for a given sample. For this reason, a convenient approach is to select the most competent models from a pool to form a predictive ensemble. This approach is commonly known as Dynamic Ensemble Selection (DES). Unlike static selection, where the choice of classifiers is made during the training phase, dynamic selection (DS) is performed for each new test sample during the classification phase. DES systems can be an alternative for improving the overall accuracy of the system compared to monolithic classifiers, such as DNNs. [7]. The most popular DES methods are based on neighborhood (e.g., KNORA-U/E) or clustering (e.g., DES-Clustering). Dynamic neighborhood-based selection methods are not a good choice for resource-constrained systems—it is necessary to keep the validation set in memory to evaluate regions of competence. Although a naive version of the kNN algorithm is easy to implement by calculating the distance from a test example to all stored examples, it is computationally intensive for large training sets. Therefore, DS methods based on clustering are of interest for TinyML systems. In this case, only N centroids are stored in memory, along with pools of base classifiers assigned to them. DS methods based on clustering,

On the Instance Hardness in TinyML Systems

3

unlike neighborhood-based methods, are heavier during the training phase but lighter during the inference phase [17].

In [8], the authors investigate why dynamic classifier selection methods achieve better results despite using a similar neighborhood as K-NN. They confirm the hypothesis that DES performs better on difficult samples—that is, points near decision boundaries with high IH. In [10], the authors expand on this concept and use IH as a decision criterion in dynamic classifier ensembles (KNORA-U and KNORA-E). The authors propose classifying easy samples with a simple single classifier and directing only difficult ones to a more complex system combining dynamic feature selection and dynamic classifier selection. The goal is to reduce computational complexity without a significant loss of classification accuracy. They use kDN, based on the kNN method, as a measure of IH in the process of estimating the local competence of the base classifiers. Both papers address classification using dynamic ensembles and IH measures: the first explains when DES is better than K-NN, and the second shows how to use the same idea of IH to speed up the operation of dynamic ensembles. Importantly, the authors consider a fixed IH threshold but do not consider a scenario in which the threshold could be selected dynamically, depending on the context. Furthermore, both papers use neighborhood-based IH and DES methods, which, as described earlier, are not beneficial for TinyML systems.

Based on the above information, we propose using TDP as an IH metric in combination with the DES-Clustering method, providing a memory- and time-efficient solution tailored to TinyML systems. The main goal of this work is to explore the TDP IH method for the TinyML system. To this end, this paper presents preliminary findings on this novel application of the TDP method.