An interpretable emotion recognition embedded system based on adaptive dendrites
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-30
- Publication Date
- 2026-08-11
AI Technical Summary
针对现有技术在情绪识别中存在的面部特征域偏移导致鲁棒性差、深度学习模型呈“黑盒”特性缺乏决策可解释性以及难以在国产嵌入式平台上运行等问题,本发明提供了一种基于国产嵌入式系统的可解释人脸情绪识别的嵌入式系统
1.通过自适应树突分类模块的可学习系数k和分支注意力机制,在保持轻量化的同时,实现了根据输入特征重要性自适应调整激活强度的能力,提升微弱微表情特征的识别准确率,有效抑制了背景噪声干扰,模型整体泛化能力显著增强。
Smart Images

Figure CN122551409A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing, specifically to an interpretable emotion recognition embedded system based on adaptive dendrites. Background Technology
[0002] In fields such as human-computer interaction, public safety management, and mental health monitoring, facial expressions, as important external features reflecting an individual's emotional state, play a crucial role in identifying psychological changes, behavioral trends, and potential risks. In particular, real-time identification of negative emotions can provide important evidence for emotion intervention, risk warning, and behavioral guidance.
[0003] With the development of artificial intelligence technology, deep learning has been widely applied in the field of emotion recognition. However, it still faces two major technical bottlenecks in practical applications: First, deployment at the edge is difficult. High-precision models consume a lot of computation, often resulting in high inference latency on domestically produced embedded hardware with limited computing power. This makes it difficult to balance real-time performance and recognition accuracy, and its heavy reliance on the cloud poses a risk of privacy leaks. Second, deep learning models for emotion recognition generally exhibit "black box" characteristics, lacking interpretability. Existing systems only output category probabilities, failing to provide specific features that trigger emotion judgments or semantic attributions, severely reducing the transparency and credibility of recognition results in real-world application scenarios.
[0004] Based on the above problems, it is necessary to propose a technical solution that can realize real-time recognition and interpretable analysis of negative emotions on a domestic embedded platform, so as to achieve localized processing, real-time analysis, and high-precision judgment, thereby improving the intelligence level and application reliability of the system. Summary of the Invention
[0005] (a) Technical problems to be solved To address the shortcomings of existing emotion recognition technologies, such as poor robustness due to facial feature domain shifts, the "black box" nature of deep learning models lacking decision interpretability, and difficulty in running on domestic embedded platforms, this invention provides an embedded system for interpretable facial emotion recognition based on a domestically developed embedded system. By integrating a camera and an improved, interpretable emotion recognition algorithm into the embedded device, rapid detection and interpretable analysis of negative facial emotions can be achieved, improving the accuracy, real-time performance, and transparency of emotion recognition. This meets the requirements of local computing, privacy security, and stable operation in intelligent application scenarios.
[0006] (II) Technical Solution To achieve the above objectives, the present invention provides the following technical solution: an interpretable emotion recognition embedded system based on adaptive dendrites, comprising the following steps: S1: It uses the domestic Orange Pi embedded development board as the core hardware unit and captures the facial expression images of the target object in real time through a visible light shooting device connected to the USB interface. S2: Perform face alignment, spatial scaling and data augmentation preprocessing on the acquired images, and transmit the preprocessed images to the NPU processor in the Orange Pi development board for neural network computing to complete the extraction and processing of facial expression features. S3: Input the processed image into an emotion classification network for feature extraction and classification. The emotion classification network includes: (a) Feature extraction backbone network: ResNet18 is used to extract deep features through initial convolutional layers and multiple residual blocks, and then a one-dimensional global sentiment feature vector is obtained through global average pooling; (b) Graph batch normalization module: calculate the cosine similarity between the feature vectors of each sample in the current batch, construct the feature relationship graph within the batch, and normalize and nonlinearly map the global sentiment features based on the relationship graph to obtain the robust sentiment features after distribution alignment; (c) Adaptive dendrite classification module: The robust emotion features are input into the adaptive dendrite classification module, which includes a synaptic layer, a dendritic layer, a branching attention layer, and a membrane layer or cell body layer; After the synaptic layer performs layer normalization on the input features, it uses a tensor broadcasting mechanism to virtually expand the dimensions along the category and branch dimensions. Then, the expanded features are multiplied element-wise with the synaptic weight matrix and a bias is added. At the same time, an independent and learnable coefficient k is introduced for each dendritic branch, and a nonlinear mapping is performed through the activation function. k is adaptively updated according to the gradient of the loss function during backpropagation: when the feature corresponding to a certain branch contributes greatly to the correct classification, the gradient guides k to increase, making the activation function steeper to amplify the signal; when the branch introduces noise, the gradient guides k to decrease, making the activation function smoother to suppress interference. The dendritic layer sums the features output by the synaptic layer along the dimension of the input features to generate a branch feature matrix; The branch attention layer is composed of a fully connected layer bottleneck structure, which generates attention weights for the branch feature matrix and reweights them. The membrane layer linearly weights and fuses the features of each weighted branch under the same emotion category, and the cell body layer outputs the predicted probability scores of various negative emotions through the Softmax function. S4: Call the concept clustering visual attribution module to perform interpretable analysis on the classification prediction results, specifically including: extracting the spatial feature map of the deep output of the emotion classification network, using non-negative matrix factorization to reduce the dimensionality to obtain the underlying visual concept basis matrix, then using K-Means clustering to aggregate the underlying concepts into high-order semantic concept groups, using Halton sequence to generate random perturbation masks for global sensitivity analysis, calculating the contribution score of each high-order concept group to the predicted category, selecting the core concept group with the highest contribution and mapping its spatial activation region back to the original image to generate a concept visual attribution heatmap; S5: Overlay the negative emotion categories and predicted probability scores output by S3 with the concept heatmap generated by S4 in the interactive display window of the OrangePi development board.
[0007] Preferably, in step S1, the Orange Pi development board establishes a physical connection with a visible light camera via a USB interface; it collects image data of seven basic facial expressions, including surprise, fear, disgust, happiness, sadness, anger, and neutral states, to construct a facial emotion dataset.
[0008] Preferably, in step S2, the original image is cropped to retain key facial feature regions, and the image size is uniformly adjusted to 224×224 pixels; the processed image dataset is divided into training set, validation set and test set in a ratio of 8:1:1; during the model training phase, only the training set is subjected to data augmentation strategies including horizontal flipping, random erasure and Gaussian noise, while the validation set and test set retain the original image features for model performance evaluation.
[0009] Preferably, in step S3, the number of dendritic branches in the adaptive dendritic classification module is set to 32; each dendritic branch is independently assigned a learnable coefficient k. During the backpropagation phase of the network, the error gradient is calculated using the cross-entropy loss function. When the model produces a prediction error for the emotion category, the gradient guides the update of the learnable coefficient k of the corresponding dendritic branch: if the input of the branch is a key micro-expression feature, the optimizer will increase the value of k to make the activation function of the synaptic layer steeper to amplify weak signals; if it is background noise, the value of k will be decreased to make the activation function smoother to suppress ineffective feedforward.
[0010] Preferably, in step S3, the branch attention layer is composed of a fully connected bottleneck structure. The bottleneck structure includes a dimensionality reduction layer and a reconstruction layer. The dimensionality reduction layer reduces the dimension of the branch feature matrix and activates it using the ReLU activation function. Then, the original dimension is restored by the reconstruction layer, and attention weights are generated by the Sigmoid function. The attention weights are multiplied element-wise with the original branch feature matrix to obtain the reweighted branch features.
[0011] Preferably, in step S4, the specific implementation of the nonnegative matrix decomposition is as follows: the local feature activation map matrix is approximately decomposed into the product of a nonnegative concept basis matrix and a nonnegative concept representation matrix, wherein each column of the concept basis matrix represents a low-level visual concept; the K-Means clustering is iteratively optimized with the goal of minimizing the sum of squared Euclidean distances within groups, dividing the low-level visual concepts into a specified number of high-order concept groups, and assigning a corresponding group label to each low-level concept.
[0012] Preferably, in step S4, the global sensitivity analysis uses a Halton sequence to generate multiple uniformly distributed random perturbation masks. For each mask, it is multiplied element-wise with the concept representation matrix to calculate the absolute difference in the model's prediction score for the target category before and after the perturbation. The average of the differences of all masks is taken as the importance score of each underlying concept. Then, based on the group label, the importance scores of all underlying concepts belonging to the same higher-order concept group are aggregated to obtain the comprehensive importance distribution of each higher-order concept group.
[0013] Preferably, in step S4, the specific method for generating the concept visual attribution heatmap is as follows: the core concept group with the highest contribution is selected, the spatial activation matrix of all the underlying concepts belonging to the group is extracted, the average activation value is calculated, and the image is upsampled to the original input image resolution through bilinear interpolation. After normalization and pseudo-color mapping, the image is linearly weighted and superimposed with the original image to obtain the superimposed concept heatmap.
[0014] (III) Beneficial Effects This invention provides an interpretable emotion recognition embedded system based on adaptive dendrites, which has the following advantages: 1. By using the learnable coefficient k and branch attention mechanism of the adaptive dendritic classification module, the model achieves the ability to adaptively adjust the activation intensity according to the importance of input features while maintaining lightweight design. This improves the recognition accuracy of weak micro-expression features, effectively suppresses background noise interference, and significantly enhances the overall generalization ability of the model.
[0015] 2. A concept attribution method based on nonnegative matrix factorization and K-Means clustering is proposed, which breaks through the limitations of traditional pixel-level heatmaps and can clearly identify the core facial semantic concepts that lead to emotion judgment, providing a traceable decision basis for high-reliability scenarios.
[0016] 3. By constructing a graph structure based on the feature relationships between samples within a batch for normalization, the accuracy of recognition is improved in complex scenarios such as changes in illumination and pose shifts compared to traditional batch normalization. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the facial emotion recognition model of the present invention; Figure 2 This is a framework diagram for model training and detection in this invention; Figure 3 This is a framework diagram of the adaptive dendritic emotion classification module of the present invention; Figure 4 This is a framework diagram of the interpretable visual attribution module for enhanced concept clustering in this invention. Figure 5 The results of the ablation experiment for the adaptive dendrite classification module of this invention are shown. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Please see Figure 1-5 The present invention provides a technical solution: such as Figure 2 As shown, model training and testing include the following steps: The first step is to collect training images: use an external visible light camera to photograph the faces of the target objects, and collect image data of seven basic facial expressions, including negative emotions such as surprise, fear, disgust, happiness, sadness, and anger, as well as neutral states, to construct a facial emotion dataset. Several samples of each expression are collected to ensure the diversity of data features.
[0020] The second step is optimal network training: the original images are cropped to retain key facial features, and then the image size is uniformly compressed to 224×224 pixels, and divided into training, validation, and test sets according to the proportions; data augmentation is performed on the training set before training; the data-augmented training set is used to train the interpretable negative emotion classification network, and the network is validated and tested using the divided validation and test sets to evaluate the network's performance.
[0021] The specific steps for training the network structure modules in the second step are as follows: (1) Facial Emotion Feature Extraction and Distribution Calibration Module. This module uses a deep convolutional neural network to extract features from the input facial image, with ResNet18 as the backbone network. This network structure consists of an input processing layer, multiple residual block groups, and an output layer, used to perform progressive downsampling and deep semantic feature extraction on a 224×224 RGB three-channel image. Specifically, the network first achieves rapid extraction of low-level features through an initial convolutional layer; then, it constructs a deep structure by stacking residual blocks with skip connections. In the output stage, global average pooling is used to compress the feature map into a one-dimensional global emotion feature vector with dimension D, which is 512 in this embodiment. The feature extraction process is expressed as follows: , This is the extracted global sentiment feature vector. Finally, to further optimize the spatial distribution of the global features, this global sentiment feature vector... Graph batch normalization is performed, and cosine similarity between feature samples within a batch is calculated to construct graph relationships. Based on this, features are normalized and nonlinearly mapped to obtain robust sentiment features with better distribution alignment and resistance to interference. .
[0022] (2) Adaptive Dendritic Emotion Classification Module. This module uses robust emotion features extracted and optimized. As input, the classification mapping is performed by simulating the mechanism of biological neurons. The internal forward processing logic is as follows: First, layer normalization is used to normalize the input features, resulting in a one-dimensional feature vector. Tensor broadcasting is used along the category dimension. and branch dimensions right Virtual dimensionality expansion is then performed. Next, the synaptic layer is entered, where the expanded feature tensor is element-wise multiplied with the synaptic weight matrix, and a bias matrix is added. Simultaneously, learnable coefficients are introduced for dynamic scaling. The calculation expression is as follows: ,in, Indicates the first Synaptic response of each category and the m-th dendritic branch on the d-th feature dimension; is the value of the normalized feature in the d-th dimension; and These represent the corresponding synaptic weights and biases, respectively. Let represent the synaptic activation function; k is a learnable coefficient that is adaptively updated during backpropagation to control the activation strength, with each dendritic branch assigned a separate learnable coefficient. Specifically, during the backpropagation phase of the network, this invention uses a defined loss function to calculate the partial derivative of the global error with respect to k. When faced with difficult samples with subtle features, the gradient guides the corresponding branch responsible for capturing those features to adaptively adjust the value of k in the direction of increasing, making the activation function of that branch steeper. This generates a strong nonlinear response in the feature space, enabling automatic amplification of weak signals. Conversely, if the branch introduces background noise that increases the error, the gradient will guide the value of k to adaptively decrease, making the activation function smoother, thus suppressing invalid features at the physical branch level.
[0023] The signal then enters the dendritic layer. After local layer normalization, the synaptic response features are summed along the input feature dimension D to generate a branch feature matrix representing the state of each branch. ,in This represents the initial aggregation feature of the m-th dendritic branch under the o-th category; This represents the activation function of the dendritic layer. A branch attention mechanism is introduced, where the branch feature matrix is input into a bottleneck structure composed of fully connected layers to generate attention weights, which are then reweighted. , A is the attention weight matrix; Weights for the bottleneck dimensionality reduction layer. Weights for the feature reconstruction layer; For ReLU functions; These are the target branch features after attention reweighting.
[0024] After entering the membrane layer, the features of each branch under the same emotion category are weighted, combined, and fused to obtain... , Output a scalar for the o-th category of membrane fusion; and These represent the weights and biases for linear fusion of the membrane layers. Finally, the vector V is probabilistically normalized using the Softmax function at the cell body layer, outputting the predicted probability scores for various negative emotions.
[0025] (3) Concept-Enhanced Interpretable Visual Attribution Module. Addressing the semantic deficiency problem of traditional feature attribution algorithms, this invention introduces a spatial clustering mechanism under the concept interpretability framework, constructing a concept-enhanced visual attribution module. Existing mainstream interpretable methods (such as gradient-based Grad-CAM) are mostly limited to the pixel level, only able to roughly locate the image regions of interest to the model. This invention adopts a concept-level interpretability architecture, whose core advantage lies in its ability to directly map the black-box decisions of deep networks into higher-order semantic concepts that conform to human cognition, and to map these higher-order semantic concepts to the spatial dimension through a concept attribution graph. The specific processing logic of this module is as follows: First, the trained classification network is decoupled into a spatial feature extractor. With predictive projection head The process consists of two parts. Local image patches are extracted from the input image using a sliding window mechanism and then input into the spatial feature extractor to obtain local feature activation maps. Non-negative matrix factorization is then used to reduce the dimensionality of these patches. This yields a nonnegative concept basis matrix containing R underlying visual concepts. (C is the number of feature channels) and the corresponding concept representation matrix U.
[0026] Furthermore, an unsupervised clustering algorithm (K-Means algorithm is used in this example) is employed to perform spatial clustering on the concept basis matrix W. Iterative optimization is performed with the objective of minimizing the sum of squared Euclidean distances within groups; the objective function can be expressed as: ,in Let be the r-th underlying visual concept feature vector in the concept basis matrix W; This is the g-th concept group; It serves as the cluster center for the g-th concept group; The total number of higher-order concept groups set ( It effectively integrates fragmented low-level features into a coherent set of semantics with stronger expressive power, and assigns corresponding group labels to each low-level concept.
[0027] In the quantification of concept importance stage, the initial importance of each underlying concept is first estimated using a global sensitivity analysis method. A uniformly distributed random perturbation mask is generated using a Halton sequence and then multiplied element-wise with the concept representation matrix. Subsequently, high-order semantic grouping and aggregation are performed. Based on the obtained concept group labels, the importance scores of all underlying concepts belonging to the same concept group are extracted, and aggregation functions (such as mean or summation) are applied to calculate the fusion of scores within the group. The aggregation expression is as follows: ,in The overall importance score of the g-th higher-order concept group; The initial independent importance score for the r-th underlying concept belonging to this group; This represents the total number of underlying concepts contained within the group. Through this grouping and aggregation mechanism, the overall importance distribution of each higher-order concept group to a specific emotion category is output. Finally, based on the calculated importance scores of the higher-order concept groups, the core concept groups that contribute the most to the target emotion are selected. The spatial activation matrix of the key concepts belonging to this group is extracted and upsampled to the original input image resolution using bilinear interpolation; after normalization and pseudo-color mapping, it is linearly weighted and superimposed with the original input image.
[0028] The third step is the interpretable negative emotion recognition function: real-time captured facial expression images of the target object are input into the trained interpretable negative emotion recognition network to extract facial emotion feature information. After image batch normalization processing and classification by the adaptive dendritic emotion classification module, the interpretable visual attribution module with concept clustering enhancement is called to extract and superimpose higher-order concept activation features. Finally, the classification and interpretation results are displayed on the screen of the embedded development board.
[0029] Example 1: Performance Testing of Standard Dataset This embodiment uses the publicly available FERPlus facial expression dataset for testing. This dataset contains 35,887 48×48 grayscale facial images, divided into 7 emotion categories. The images were upsampled to 224×224 and then input into the system of this invention. The test results are as follows:
[0030] Example 2: Robustness Testing in Complex Scenarios This embodiment uses a self-made complex scene dataset, containing 12,000 images with interference samples such as lighting changes, pose shifts, and partial occlusion. The results are as follows:
[0031] Based on the above steps, such as Figure 1 As shown, the specific operation steps of an interpretable emotion recognition embedded system based on adaptive dendrites are as follows: S1: It uses the domestic Orange Pi embedded development board as the core hardware unit and acquires the facial expression images of the target object in real time through an external visible light camera. S2: Preprocess the original image, including operations such as face region cropping, resizing, data enhancement, and format conversion; S3: The preprocessed image is fed into the network deployed on the NPU processor of the embedded development board for feature extraction. The global emotion features are extracted through the feature extraction network and the distribution is calibrated by image batch normalization. Then, it is fed into the adaptive dendritic emotion classification module to complete the nonlinear branch feature aggregation and probability output. At the same time, the concept clustering enhanced interpretation module is used to estimate the importance and spatially map the higher-order concept groups. S4: The final output includes the emotion classification result of the target object, the predicted probability score, the face region concept heatmap, and the corresponding importance score of the higher-order concept group. All results are clearly displayed in the interactive display window of the development board.
[0032] In the optimization process of the entire network, the network gradually learns complex and varied facial negative emotion features, adaptive dendritic branch weight combinations, and semantic association information of higher-order visual concepts. This model not only possesses high-precision negative emotion recognition capabilities but also provides human-understandable visual logic explanations.
[0033] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. An interpretable emotion recognition embedded system based on adaptive dendrites, characterized in that: Includes the following steps: S1: It uses the domestic Orange Pi embedded development board as the core hardware unit and captures the facial expression images of the target object in real time through a visible light shooting device connected to the USB interface. S2: Perform face alignment, spatial scaling, and data augmentation preprocessing on the acquired images, and transmit the preprocessed images to the NPU processor in the Orange Pi development board for neural network computing to complete the extraction and processing of facial expression features. S3: Input the processed image into an emotion classification network for feature extraction and classification. The emotion classification network includes: (a) Feature extraction backbone network: ResNet18 is used to extract deep features through initial convolutional layers and multiple residual blocks, and then a one-dimensional global sentiment feature vector is obtained through global average pooling; (b) Graph batch normalization module: calculate the cosine similarity between the feature vectors of each sample in the current batch, construct the feature relationship graph within the batch, and normalize and nonlinearly map the global sentiment features based on the relationship graph to obtain the robust sentiment features after distribution alignment; (c) Adaptive dendrite classification module: The robust emotion features are input into the adaptive dendrite classification module, which includes a synaptic layer, a dendritic layer, a branching attention layer, and a membrane layer or cell body layer; After the synaptic layer performs layer normalization on the input features, it uses a tensor broadcasting mechanism to virtually expand the dimensions along the category and branch dimensions. Then, the expanded features are multiplied element-wise with the synaptic weight matrix and a bias is added. At the same time, an independent and learnable coefficient k is introduced for each dendritic branch, and a nonlinear mapping is performed through the activation function. k is adaptively updated according to the gradient of the loss function during backpropagation: when the feature corresponding to a certain branch contributes greatly to the correct classification, the gradient guides k to increase, making the activation function steeper to amplify the signal; when the branch introduces noise, the gradient guides k to decrease, making the activation function smoother to suppress interference. The dendritic layer sums the features output by the synaptic layer along the dimension of the input features to generate a branch feature matrix; The branch attention layer is composed of a fully connected layer bottleneck structure, which generates attention weights for the branch feature matrix and reweights them. The membrane layer linearly weights and fuses the features of each weighted branch under the same emotion category, and the cell body layer outputs the predicted probability scores of various negative emotions through the Softmax function. S4: Call the concept clustering visual attribution module to perform interpretable analysis on the classification prediction results, specifically including: extracting the spatial feature map of the deep output of the emotion classification network, using non-negative matrix factorization to reduce the dimensionality to obtain the underlying visual concept basis matrix, then using K-Means clustering to aggregate the underlying concepts into high-order semantic concept groups, using Halton sequence to generate random perturbation masks for global sensitivity analysis, calculating the contribution score of each high-order concept group to the predicted category, selecting the core concept group with the highest contribution and mapping its spatial activation region back to the original image to generate a concept visual attribution heatmap; S5: Overlay the negative emotion categories and predicted probability scores output by S3 with the concept heatmap generated by S4 in the interactive display window of the Orange Pi development board.
2. The interpretable emotion recognition embedded system based on adaptive dendrites according to claim 1, characterized in that: In step S1, the Orange Pi development board establishes a physical connection with a visible light camera via a USB interface; it collects image data of seven basic facial expressions, including surprise, fear, disgust, happiness, sadness, anger, and neutral states, to construct a facial emotion dataset.
3. The interpretable emotion recognition embedded system based on adaptive dendrites according to claim 1, characterized in that: In step S2, the original image is cropped to retain key facial feature regions, and the image size is uniformly adjusted to 224×224 pixels. The processed image dataset is divided into training set, validation set and test set in a ratio of 8:1:
1. During the model training phase, only the training set is subjected to data augmentation strategies including horizontal flipping, random erasure and Gaussian noise. The validation set and test set retain the original image features for model performance evaluation.
4. The interpretable emotion recognition embedded system based on adaptive dendrites according to claim 1, characterized in that: In step S3, the number of dendritic branches in the adaptive dendritic classification module is set to 32; each dendritic branch is independently assigned a learnable coefficient k. During the backpropagation phase of the network, the error gradient is calculated using the cross-entropy loss function. When the model produces a prediction error for the emotion category, the gradient guides the update of the learnable coefficient k of the corresponding dendritic branch: if the input of the branch is a key micro-expression feature, the optimizer will increase the value of k to make the activation function of the synaptic layer steeper to amplify weak signals; if it is background noise, the value of k will be decreased to make the activation function smoother to suppress ineffective feedforward.
5. The interpretable emotion recognition embedded system based on adaptive dendrites according to claim 1, characterized in that: In step S3, the branch attention layer is composed of a fully connected bottleneck structure. The bottleneck structure includes a dimensionality reduction layer and a reconstruction layer. The dimensionality reduction layer reduces the dimension of the branch feature matrix and then activates it through the ReLU activation function. The original dimension is then restored through the reconstruction layer, and attention weights are generated through the Sigmoid function. The attention weights are multiplied element-wise with the original branch feature matrix to obtain the reweighted branch features.
6. The interpretable emotion recognition embedded system based on adaptive dendrites according to claim 1, characterized in that: In step S4, the specific implementation of the nonnegative matrix decomposition is as follows: the local feature activation map matrix is approximately decomposed into the product of a nonnegative concept basis matrix and a nonnegative concept representation matrix, wherein each column of the concept basis matrix represents a low-level visual concept; the K-Means clustering is iteratively optimized with the goal of minimizing the sum of squared Euclidean distances within groups, dividing the low-level visual concepts into a specified number of high-order concept groups, and assigning a corresponding group label to each low-level concept.
7. The interpretable emotion recognition embedded system based on adaptive dendrites according to claim 1, characterized in that: In step S4, the global sensitivity analysis uses Halton sequences to generate multiple uniformly distributed random perturbation masks. For each mask, it is multiplied element-wise with the concept representation matrix to calculate the absolute difference in the model's prediction score for the target category before and after the perturbation. The average of the differences of all masks is taken as the importance score of each underlying concept. Then, based on the group label, the importance scores of all underlying concepts belonging to the same higher-order concept group are aggregated to obtain the comprehensive importance distribution of each higher-order concept group.
8. The interpretable emotion recognition embedded system based on adaptive dendrites according to claim 1, characterized in that: In step S4, the specific method for generating the concept visual attribution heatmap is as follows: the core concept group with the highest contribution is selected, the spatial activation matrix of all the underlying concepts belonging to the group is extracted, the average activation value is calculated, and the image is upsampled to the original input image resolution through bilinear interpolation. After normalization and pseudo-color mapping, the image is linearly weighted and superimposed with the original image to obtain the superimposed concept heatmap.