The Level-dependent Class Activation Map (L-CAM) module generates spatial attention maps that leverage the hierarchical class subordination between adjacent affective levels (la−1 and la) to guide spatial feature selection.
For a local classifier at affective level la with weight vector wlak for class k, the class activation map Mlak(x,y) is computed over the feature map F5−la as:
Mlak(x,y)=∑cwlak,cF5−lac(x,y)
where F5−lac(x,y) is the c-th channel attribute of F5−la at spatial location (x,y).
Given the predicted parent category j at the preceding affective level la−1 (j=argmaxPLla−1), L-CAM computes an aggregate spatial attention map Mla(x,y) over all children categories k∈j by combining average pooling and max pooling:
Mla(x,y)=∣k∣1∑k∈jMlak(x,y)+maxk∈jMlak(x,y)
The modulated feature map Fls is then obtained via residual scaling:
Fls=(1+Mla)⊙(Cls−1′⊕Fls)
where ⊙ represents element-wise multiplication broadcast across channels, and ⊕ denotes element-wise feature addition.