Building Resilience to Out-of-Distribution Visual Data via Input Optimization and Model Finetuning

Christopher J. Holder, Majid Khonji, Jorge Dias, Muhammad ShafiquearXiv 2022 · DOI

Abstract

Deep learning models often struggle with out-of-distribution (OOD) data caused by environmental factors like weather or sensor changes. This paper presents the Input Optimization Network (ION), a CNN-based preprocessor designed to translate degraded visual data into a format optimized for pre-trained vision models. By employing a joint optimization strategy where the preprocessor and target model are trained in tandem, the proposed method significantly enhances resilience to domain shifts in classification and segmentation tasks, often outperforming traditional finetuning and aesthetic-focused image enhancement.

Introduction

The "brittleness" of deep learning models remains a significant hurdle for real-world deployment. A semantic segmentation model trained on the clear, sunny days of the Cityscapes dataset often fails when encountering rain, fog, or different camera sensors. This challenge, known as the Out-of-Distribution (OOD) problem, is typically addressed through model finetuning or standard image enhancement (e.g., dehazing). However, finetuning can lead to "catastrophic forgetting," and aesthetic enhancement does not necessarily improve machine performance.

This research introduces the ION to bridge this gap. Unlike traditional methods, ION focuses on "functional" translation—modifying images specifically to minimize the task loss of a downstream vision model.

Methodology

The core of the proposed approach is the ION, a symmetrical U-Net style encoder-decoder architecture.

Input Optimization Network (ION)

The ION ($G$) acts as a learned preprocessor. Unlike Generative Adversarial Networks (GANs) that optimize for human-perceived realism, the ION is trained to minimize the task loss (e.g., cross-entropy) of a specific target model ($F$).

The ION (G) processes input data (x) to optimize it for the downstream task.

During training, gradients are backpropagated from the target model's output through to the ION's weights. In the standard configuration, the target model remains frozen, ensuring its original capabilities are preserved.

Joint Optimization

To further improve performance, the authors propose a Joint Optimization scheme. In this mode, both the ION and the target model are trained simultaneously. This synergy allows the networks to converge on an internal representation that effectively handles both clean and degraded data without the pitfalls of standard finetuning.

Experimental Setup and Datasets

The effectiveness of ION was evaluated across two primary tasks:

  1. Image Classification: Using CIFAR-10 with added Gaussian noise.
  2. Semantic Segmentation: Using Cityscapes as the baseline, with evaluations on A2D2 (domain shift), and synthetic modifications for fog (CS Fog), rain (CS Rain), and underexposure.
Ground truth segmentation map used to calculate task loss during ION training.

Results and Discussion

The ION demonstrated significant performance gains across all tested scenarios.

Utility over Aesthetics

A key finding is that ION-processed images often appear "unnatural" to humans—exhibiting high contrast and exaggerated edges. However, these features are highly functional for the segmentation model, allowing it to better distinguish objects in low-visibility conditions. In low-light tests, ION outperformed GANs, producing higher Intersection over Union (IoU) scores despite GANs producing "prettier" images.

Performance Metrics

  • Noise Resilience: ResNet-50 accuracy on noisy CIFAR-10 improved from 56.1% to 88.0% with ION.
  • Segmentation Gains: In multimodal domain shift scenarios, the Joint Optimization approach achieved a mean IoU of 0.678 on Cityscapes, compared to a 0.584 baseline.
  • Domain Adaptation: On the unseen A2D2 dataset, ION improved IoU from 0.333 to 0.415, nearly matching the 0.438 achieved by full finetuning.

Efficiency

The ION is computationally efficient. By scaling the architecture down to 3 blocks, the system achieves 16.5 FPS on a standard GPU, making it suitable for real-time applications in robotics and autonomous systems.

Conclusion and Future Work

The Input Optimization Network provides a robust framework for handling OOD visual data by prioritizing task-specific utility over aesthetic quality. While highly effective, the system occasionally "over-processes" images that the baseline model already handles well. Future research will explore "gatekeeper" mechanisms to selectively apply ION processing and methods to balance machine performance with human-readable outputs for safety monitoring.

Summary updated

Abstract

A major challenge in machine learning is resilience to out-of-distribution data, that is data that exists outside of the distribution of a model's training data. Training is often performed using limited, carefully curated datasets and so when a model is deployed there is often a significant distribution shift as edge cases and anomalies not included in the training data are encountered. To address this, we propose the Input Optimisation Network, an image preprocessing model that learns to optimise input data for a specific target vision model. In this work we investigate several out-of-distribution scenarios in the context of semantic segmentation for autonomous vehicles, comparing an Input Optimisation based solution to existing approaches of finetuning the target model with augmented training data and an adversarially trained preprocessing model. We demonstrate that our approach can enable performance on such data comparable to that of a finetuned model, and subsequently that a combined approach, whereby an input optimization network is optimised to target a finetuned model, delivers superior performance to either method in isolation. Finally, we propose a joint optimisation approach, in which input optimization network and target model are trained simultaneously, which we demonstrate achieves significant further performance gains, particularly in challenging edge-case scenarios. We also demonstrate that our architecture can be reduced to a relatively compact size without a significant performance impact, potentially facilitating real time embedded applications.
BibTeX
@misc{holder2022building,
  author = {Christopher J. Holder and Majid Khonji and Jorge Dias and Muhammad Shafique},
  title = {{Building Resilience to Out-of-Distribution Visual Data via Input Optimization and Model Finetuning}},
  year = {2022},
  eprint = {2211.16228},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.16228},
}
Figure