Hierarchical Context Transformer for Multi-Level Semantic Scene Understanding

Luoying Hao, Yan Hu, Yang Yue, Li Wu, Huazhu Fu, Jinming Duan, Jiang Liu

Abstract

Surgical scene understanding is a complex task involving multiple levels of granularity. We present the Hierarchical Context Transformer (HCT), a framework that treats this problem as a multi-level hierarchy—from broad surgical phases to specific tool-tissue actions. By utilizing a Hierarchical Relation Aggregation Module (HRAM) and inter-task contrastive learning, HCT exploits natural task dependencies. Furthermore, we introduce spatial-temporal adapters to ensure parameter efficiency. HCT achieves state-of-the-art performance on cataract and prostatectomy datasets, demonstrating the value of hierarchical context in computer-assisted surgery.

Introduction

Computer-assisted surgery (CAS) systems aim to provide real-time support and post-operative analysis by "understanding" surgical procedures. Traditionally, this has been approached as a single-level recognition task—identifying either broad surgical phases, specific steps, or fine-grained tool-tissue actions. However, these levels are intrinsically linked: a specific "Incision" step typically occurs during an "Opening" phase and involves a "Knife."

Overview of Multi-level Semantic Scene Understanding (MSSU) in surgical videos.

The Hierarchical Context Transformer (HCT) addresses the limitations of isolated task recognition by treating surgical scene understanding as a multi-level hierarchy. By exploiting the natural dependencies between these levels, HCT achieves superior performance while remaining parameter-efficient.

Methodology

The HCT framework introduces several key innovations to model the complex relationships within surgical videos.

Multi-level Semantic Scene Understanding (MSSU)

HCT simultaneously predicts four hierarchical levels: Phase, Step, Action, and Instrument. This joint modeling allows the system to leverage coarse-grained context to improve fine-grained detection. For instance, knowing the current phase is "Opening" provides a powerful prior for identifying the "Knife" tool and the "Incision" step.

Hierarchical Relation Aggregation Module (HRAM)

To explicitly capture dependencies between tasks, the HRAM uses cross-attention mechanisms. This allows features from one level (e.g., Phase) to inform and augment features at another (e.g., Step), effectively "digging out" the underlying hierarchical structure of the procedure.

Inter-task Contrastive Learning (ICL)

To ensure internal representation consistency, ICL pulls embeddings of the same video clip closer together across different tasks while pushing different scenes apart. This forces the model to learn compact, meaningful features that represent the surgical scene holistically across all levels of granularity.

The Hierarchical Context Transformer (HCT) architecture.

Parameter Efficiency with ST-Ada

To mitigate the high computational cost and overfitting risks associated with fine-tuning large Vision Transformers (ViTs) on specialized medical data, the authors introduced Spatial-Temporal Adapters (ST-Ada). In the HCT+ variant, the backbone is frozen, and only these small bottleneck layers are trained, significantly reducing the number of tunable parameters without sacrificing performance.

Experimental Results

The model was evaluated on two surgical datasets: a private Cataract surgery dataset and the public PSI-AVA prostatectomy dataset.

  • Cataract Dataset: HCT achieved state-of-the-art results, with a Phase mAP of 0.9635 and a Step mAP of 0.9581, outperforming previous methods like TMRNet and Tapir by significant margins (roughly 1.4% and 2.9% respectively).
  • PSI-AVA Dataset: On this challenging dataset with sparse annotations, HCT achieved a Phase mAP of 0.6457 and improved the Action mAP to 0.2820, compared to the 0.2729 MViTv2 baseline.
  • Efficiency: HCT+ achieved comparable performance to the full model while tuning only 26.9M parameters (vs. 57.2M) and requiring significantly less peak memory during training.

Discussion and Conclusion

The Hierarchical Context Transformer demonstrates that hierarchical context is a powerful prior for surgical scene understanding. By integrating multi-level dependencies and utilizing parameter-efficient adapters, HCT provides a robust and scalable framework for the next generation of computer-assisted surgical systems.

While the model shows strong performance, limitations remain, such as the impact of sparse annotations on learning temporal dynamics for fine-grained actions. Future work will explore how well these hierarchical priors transfer across different surgical specialties without extensive retraining.

Summary updated

BibTeX
@article{hao2025hierarchical,
  author = {Luoying Hao and Yan Hu and Yang Yue and Li Wu and Huazhu Fu and Jinming Duan and Jiang Liu},
  title = {{Hierarchical Context Transformer for Multi-Level Semantic Scene Understanding}},
  journal = {IEEE Trans. Circuits Syst. Video Technol.},
  year = {2025},
}
Figure