arXiv:2609.05242cs.CVSep 2026

Manuscript Offprint

arXiv:2609.05242

Few-Shot Video Recognition via Hierarchical Metric Learning

Jiaxin Zhang, Haoran Gao, Xizhan Gao, Zihao Dong, Tingwei Wang, Sijie Niu

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

Jiaxin Zhang, Haoran Gao, Xizhan Gao*, Zihao Dong, Tingwei Wang, Sijie Niu

School of Information Science and Engineering, University of Jinan, Shandong, China

Corresponding Author: Xizhan Gao. Email: ise_gaoxz@ujn.edu.cn

Abstract—Few-shot action recognition (FSAR) aims to recognize unseen action categories with only a small number of annotated video samples. Recent works typically apply single-prototype supervision at the network output and fail to sufficiently exploit rich cross-frame global spatial information in videos. Even existing multi-level metric schemes only impose parallel prototype constraints on intermediate layers, without progressive supervision along the full feature pipeline, which results in limited generalization ability of the learned class prototypes. Inspired by this, we present a novel method, hierarchical metric learning for few-shot action recognition (HML-FSAR). First, a spatial-enhanced module is developed to capture cross-frame global spatial representations. Combined with temporal MHA, heterogeneous alignment, spatial-temporal feature fusion and dictionary learning modules, it constructs the complete feature processing pipeline. Second, a hierarchical metric learning (HML) strategy is embedded into HML-FSAR. Composed of center metric, alignment metric, contrastive metric, dictionary metric and prototype metric, HML imposes progressive multi-stage complementary constraints from frame-level representations to final class prototypes, so as to jointly optimize feature compactness, heterogeneous spatial-temporal alignment, inter-class discriminability and anti-noise robustness. The proposed HML-FSAR method is validated on five widely-used FSAR datasets, and experimental results fully demonstrate its effectiveness.

Index Terms—Few-shot learning; Action recognition; Hierarchical metric learning; Spatial-enhanced feature learning.

I. INTRODUCTION

Action recognition aims to automatically identify human actions from video sequences. It has attracted extensive attention due to its wide applications in intelligent surveillance, human-computer interaction, autonomous driving, video retrieval, and healthcare [1], [2]. Compared with image recognition, video action recognition requires models to simultaneously understand spatial appearance and temporal dynamics, making it considerably more challenging. Although recent deep learning methods have achieved remarkable success with large-scale annotated datasets [2]–[4], collecting sufficient labeled videos is expensive and time-consuming. Therefore, few-shot action recognition (FSAR) has become an important research topic [5], [6].

Figure

Fig. 1: Comparison between existing FSAR methods and our HML-FSAR. (a) Existing methods employ only a single prototype metric at the top layer of the network and fail to fully exploit the rich spatial information contained in videos, resulting in poor separability between class prototypes and further leading to misclassification. (b) In contrast, our method introduces a spatial-enhanced branch to boost the discriminative ability of spatial-temporal features, and leverages hierarchical metric learning to optimize the prototype feature learning process in multiple stages for obtaining class prototypes with stronger separability, thus achieving more accurate FSAR.

FSAR mostly adopts the metric-based meta-learning paradigm. Through episodic training, videos from the support set and query set are mapped into a unified feature embedding space, and predictions for novel-category samples are made according to feature similarity (see Fig. 1 (a)). Within this framework, the discriminability and generalization ability of class prototypes play a critical role in recognition performance. To obtain prototype features with superior discriminability and generalization performance, existing studies are mainly conducted along two research lines: spatial-temporal feature learning and metric learning. Spatial-temporal feature learning methods focus on designing high-performance spatial-temporal feature extraction networks, such as TARN [7], ProtoGAN [8],

GgHM [9], TSAM [10], SFAR [11] and DiST [12]. They cover diverse implementations built upon CNN, Transformer, and pre-trained vision-language models. Although these methods have achieved promising progress, most of them mine temporal information upon frame-level local spatial features, or adopt two-branch networks to learn spatial and temporal features separately. The spatial representations they capture are restricted to local information within individual frames and ignore the benefits of cross-frame global spatial features for action recognition.

In contrast, metric learning based methods tend to devise diverse metric losses to regularize the learning of spatial-temporal features, such as OTAM [5], MbFSL [13], PEAG [14], HCL [15], and MML-FSAR [16]. However, some of these methods [5], [13] adopt only a single prototype metric at the network output to guide model parameter updates. Since supervision signals are imposed merely on the final output, intermediate-layer features can only be updated indirectly via back-propagation. Such a paradigm tends to drive the network to overemphasize the discriminability of high-level representations, while early intermediate features lack explicit constraints. Consequently, high-level features acquire certain discriminative power yet suffer from limited generalization performance. To tackle this issue, several studies have introduced multi-level metric learning [14]–[16], which relocates prototype losses to multiple intermediate layers of the network. Nevertheless, such schemes are essentially variants of mutually-independent multi-layer prototype metrics that only apply parallel prototype constraints to outputs at different layers. They not only introduce extra computational overhead but also lack progressive relationships among different layers. Hence they cannot fundamentally optimize the evolution of the feature pipeline and merely supplement high-level representations with middle- and low-level features, which hardly improves the generalization ability of prototypes. We argue that ideal class prototype features should possess both discriminability and generalization capacity. Therefore, supervision should not be limited to the final network output. Instead, explicit progressive constraints should be imposed on the entire feature pipeline from frame-level to video-level early stage feature learning.

To address the above limitations, a novel end-to-end model named hierarchical metric learning for few-shot action recognition (HML-FSAR) is proposed. On the one hand, a spatial-enhanced (SE) module is designed to exploit cross-frame global spatial representations, compensating for the deficiency of frame-local spatial representations. This module, together with temporal MHA (TMHA), heterogeneous alignment (HA), spatial-temporal feature fusion (STFF) and dictionary learning (DL) modules, forms the network architecture of HML-FSAR. On the other hand, the hierarchical metric learning (HML) strategy is embedded in HML-FSAR. It consists of center metric, alignment metric, contrastive metric, dictionary metric, and prototype metric, which progressively supervise feature learning along the whole feature propagation pipeline from frame-level representations to final class prototypes. Specifically, the center metric constrains intra-video frame-level feature compactness, the alignment metric eliminates heterogeneity gaps between spatial-enhanced and temporal features, the contrastive metric improves inter-class discriminability of fused spatial-temporal representations, and the dictionary metric suppresses feature noise and mitigates prototype drift under limited labeled samples. Extensive experiments demonstrate the superiority of our proposed method.

The main contributions of this paper are summarized as follows:

  • A spatial-enhanced module is proposed to mine cross-frame global spatial representations for videos. It alleviates the limitation that existing approaches only exploit local spatial information within individual frames, and enriches spatial representations for few-shot action recognition.

  • A novel hierarchical metric learning (HML) strategy is proposed. Unlike existing parallel multi-layer prototype metrics, it applies progressive complementary constraints (center, alignment, contrastive, and dictionary metrics) across the full feature pipeline to improve feature compactness, alignment, discriminability and robustness.

  • An end-to-end model termed HML-FSAR is constructed, which integrates the above-mentioned HML strategy, along with our newly-designed SE, TMHA, HA, STFF and DL modules. Extensive experiments demonstrate its overall effectiveness on five standard benchmarks.

The rest of this paper is organized as follows. Section II reviews related work. Section III elaborates the details of our proposed HML-FSAR method. Section IV presents experimental results and analysis. Finally, Section V concludes this work.

References (40)