Overview
This paper introduces a Learnable Tree Filter (LTF) module designed to capture long-range global context in images while strictly preserving fine object details. By leveraging the structural properties of Minimum Spanning Trees (MST) and a novel linear-time algorithm, the LTF achieves state-of-the-art semantic segmentation performance with significantly less computational overhead than traditional non-local operations.
The Challenge: Global Context vs. Fine Details
In semantic segmentation, a model must understand both the "big picture" (global context) and the "fine details" (object boundaries). Standard Convolutional Neural Networks (CNNs) struggle to balance these two needs:
- Local operations (like standard convolutions) have a limited receptive field. They require many layers to see the whole image, which often results in the loss of fine detail.
- Non-local operations (like self-attention) can capture global dependencies but tend to "blur" object structures because they do not explicitly respect spatial boundaries. Furthermore, they are computationally expensive, scaling quadratically ($O(N^2)$) with the number of pixels.
The authors aim to bridge this gap by creating a module that can aggregate information across the entire image while following the natural contours and structures of objects.
The Learnable Tree Filter
The core innovation is the Learnable Tree Filter. Instead of processing a dense grid, the module represents the image as a graph where pixels are vertices.
- MST Generation: The module builds a 4-connected planar graph from low-level features and extracts a Minimum Spanning Tree (MST). This tree connects similar pixels while pruning edges between dissimilar ones (such as those across an object boundary).
- Differentiable Filtering: The tree filtering process is formulated as a differentiable operation. This allows the dissimilarity weights—and thus the tree structure itself—to be learned during backpropagation.
- Linear-Time Algorithm: To make this practical for high-resolution images, the authors developed a dynamic programming algorithm that performs the filtering in linear time ($O(N)$). This involves two passes: an aggregation pass (from leaves to root) and a propagation pass (from root to leaves).
Key Insights
- Structure Matters: Unlike standard "Non-local" blocks that treat all pixel pairs equally, the Tree Filter uses the MST to ensure that feature aggregation happens primarily between pixels that likely belong to the same object.
- Low-Level Guidance: Using low-level features to guide the MST generation ensures that the "skeleton" of the image (edges, textures) is preserved even when processing high-level semantic information.
- Efficiency is King: By reducing complexity from $O(N^2)$ to $O(N)$, the Tree Filter can be applied at multiple scales and higher resolutions where standard non-local blocks would run out of memory.
Results and Performance
The authors evaluated their approach on two major semantic segmentation benchmarks: PASCAL VOC 2012 and Cityscapes. The Learnable Tree Filter consistently outperformed established methods like PSPNet and Non-local blocks while remaining much lighter.
- Accuracy: On PASCAL VOC 2012, it achieved 84.2% mIoU (without COCO pretraining) and 86.3% (with COCO), setting a new state-of-the-art at the time of publication. On the challenging Cityscapes test set, it reached 80.8% mIoU using a vanilla ResNet-101 backbone.
- Efficiency: When added to a ResNet-50 backbone, the Tree Filter increased FLOPs by only 1.0G. In contrast, a standard Non-local block increased FLOPs by 37.0G, yet the Tree Filter achieved a better mIoU (74.9% vs 74.2%).
Limitations and Future Work
While highly effective for semantic segmentation, the current implementation focuses primarily on 4-connected planar graphs. The authors suggest that exploring more complex graph structures or applying this "structure-preserving" philosophy to other tasks like object detection and instance segmentation are promising future directions. Additionally, while the filtering algorithm is linear-time, the MST construction itself (using Borůvka’s algorithm) is a separate step that could be further optimized for GPU parallelization.
Summary updated