Abstract
Given the variety of the visual world, there is not one true scale for recognition: objects may appear at drastically different sizes across the visual field. Rather than enumerate variations across filter channels or pyramid levels, dynamic models locally predict scale and adapt receptive fields accordingly. The degree of variation and diversity of inputs makes this a difficult task. Existing methods either learn a feedforward predictor, which is not itself totally immune to the scale variation it is meant to counter, or select scales by a fixed algorithm, which cannot learn from the given task and data. We extend dynamic scale inference from feedforward prediction to iterative optimization for further adaptivity. We propose a novel entropy minimization objective for inference and optimize over task and structure parameters to tune the model to each input. Optimization during inference improves semantic segmentation accuracy and generalizes better to extreme scale variations that cause feedforward dynamic inference to falter.
Introduction
In computer vision, scale is a persistent challenge: a car can occupy 10 pixels or 10,000 pixels depending on its distance from the camera. Standard deep networks typically handle this in two ways: static enumeration (processing image pyramids) or dynamic adaptation (using a predictor sub-network). However, feedforward predictors are themselves neural networks prone to failure when input scales fall far outside the training distribution. This work introduces a method to "tune" a model during the inference phase, making it self-correcting when faced with extreme, out-of-distribution scale shifts.
Methodology: Iterative Dynamic Inference
The proposed approach treats inference as an optimization problem rather than a single forward pass. By minimizing the Shannon Entropy of predictions, the model iteratively adapts its receptive fields to the specific scale of each input image without requiring ground-truth labels.
The Optimization Objective
Since ground-truth labels are unavailable during testing, entropy serves as an unsupervised loss function. High entropy indicates uncertainty; by minimizing it, the model seeks a scale that makes its predictions as "sharp" and confident as possible.
Parameter Tuning
To maintain efficiency and prevent overfitting, only two sets of parameters in the final layers are optimized:
- $\theta_{score}$: Parameters mapping features to class labels.
- $\theta_{scale}$: Parameters determining the size of local receptive fields.
The architecture utilizes "Dynamic Gaussian Receptive Fields," allowing the model to physically expand or shrink the area it "looks at" for each pixel. Adaptive thresholding focuses gradients on pixels with above-average entropy to stabilize the process.
Evaluation and Results
The method was evaluated on the PASCAL VOC dataset. To test scale robustness, validation images were artificially scaled from 1.5x up to 4x, creating a challenging out-of-distribution test environment.
Key Findings
- Consistent Performance Gains: The method improved Mean Intersection-over-Union (mIoU) by approximately 2 points across all tested scales compared to feedforward baselines.
- Robustness to Extreme Shifts: At a 4x scale shift—where standard models typically fail—the entropy minimization approach significantly outperformed the baseline.
- Efficiency: Peak performance is reached in approximately 32 iterations. Since only a few layers are updated, one optimization step takes roughly 1/10th the time of a full forward pass.
- Complementarity: The iterative optimization provides a performance boost even when applied to models already trained with heavy data augmentation.
Discussion
This research demonstrates that the testing phase can be dynamic. By allowing the model to perform "mental rehearsals" on a single image, it can adapt to visual conditions never encountered during training. Confidence, measured via entropy, acts as an effective proxy for correctness, enabling a top-down feedback loop where final outputs correct intermediate structural parameters.
While efficient, the iterative nature still introduces computational overhead compared to single-pass models. Future work may explore generalizing this entropy minimization technique to other domain shifts, such as changes in lighting, rotation, or weather conditions.
Summary updated