## 3 Classification Model Design
### Architecture
The following rules for classification analysis in the adaptive calculations framework are proposed:  
* neural network calculations are performed sequentially, section by section;
* high-level sections can be skipped if the maximal value of the membership function in the output of the current section, with regards to a particular class of the lower hierarchical level, exceeds the confidence threshold T;
* if the maximal value of the membership function of any of the hierarchical levels of the classifier at the output of the current section has not increased compared to the previous section, the subsequent calculations can be omitted;
* where any of the conditions of omission of the subsequent sections are fulfilled or the classifier in question is the last classifier in the model and the maximal value of the membership function of the lower hierarchical level does not exceed the confidence threshold, a higher level in the hierarchy is checked;
* where a class with a sufficient confidence level has not been identified, a decision is refused, a request for a manual labeling is generated, and the corresponding sample is designated as suitable for semi-supervised tuning. The hierarchical prototype-based classifier module consists of class prototypes, hyperspherical container parameters, and parameter regularization intended to compress (discretize) feature representation and prototypes. In this case, the confidence in the forecast of the i-th sample belonging to the k-th class, is determined by the following membership function [28; 29; 52]  
\[\mu_{k}(z_{i})=1-\frac{\text{dist}(z_{i},\,\overline{z}_{k})}{\text{N:r}_{k}}, \tag{1}\]  
where \(z_{i}\) is a binarized feature representation of i-th example at the feature extractor output; \(\overline{z}_{k}\) is a trainable k-th class prototype;N is a dimension of input feature vector \(x_{i}\); \(r_{k}\) is a trainable scale factor for the radius of hyperspherical decision boundary (container) of the k-th class, \(r_{k}\in(0;1)\); \(dist(\cdot)\) is a Euclidean squared distance. If the maximum value of Function (1) for an input unlabeled sample \(z_{i}\) is less than zero, such a forecast should not be trusted and such a sample should be added to the queue of unlabeled data outside the training distribution. Where the input unlabeled sample falls into one of the containers of the recognition classes (at any of the levels), it should be added to the in-class unlabeled data buffer within the training distribution. Unlabeled sample buffers can be used for training with pseudo-labeling and soft-labeling, or for consistency regularization. Where the model is trained, but an occurrence of n samples of the c-th class misallocated during forward propagation to k-th class container is detected in the queue of the new labeled data, the real concept drift is recognized. To avoid catastrophic forgetting in the context of concept drifts or the emergence of a new recognition class, a reminder function is implicitly implemented. Such a function is based on unlabeled data queues and prototypical vectors in feature space, which are changing slowly. Upper-layer knowledge distillation mechanism also serves the same purpose. Data from the unlabeled data queue can be moved to the labeled data queue after the feedback on their actual affiliation with the classes is received. The priority of specific samples being recommended for manual labeling depends on the value of the membership Function (1).