
Meta Input: How to Leverage Off-the-Shelf Deep Neural Networks
Minsu Kim*, Youngjoon Yu*, Sungjune Park*, Yong Man Ro
Image and Video Systems Lab, KAIST, South Korea
{ms.k, greatday, sungjune-p, ymro}@kaist.ac.kr
Abstract
These days, although deep neural networks (DNNs) have
achieved a noticeable progress in a wide range of research
area, it lacks the adaptability to be employed in the real-world
applications because of the environment discrepancy prob-
lem. Such a problem originates from the difference between
training and testing environments, and it is widely known
that it causes serious performance degradation, when a pre-
trained DNN model is applied to a new testing environment.
Therefore, in this paper, we introduce a novel approach that
allows end-users to exploit pretrained DNN models in their
own testing environment without modifying the models. To
this end, we present a meta input which is an additional in-
put transforming the distribution of testing data to be aligned
with that of training data. The proposed meta input can be
optimized with a small number of testing data only by con-
sidering the relation between testing input data and its output
prediction. Also, it does not require any knowledge of the
network’s internal architecture and modification of its weight
parameters. Then, the obtained meta input is added to testing
data in order to shift the distribution of testing data to that
of originally used training data. As a result, end-users can
exploit well-trained models in their own testing environment
which can differ from the training environment. We validate
the effectiveness and versatility of the proposed meta input by
showing the robustness against the environment discrepancy
through the comprehensive experiments with various tasks.
Introduction
Recently, as the deep learning has achieved a great devel-
opment, deep neural networks (DNNs) have shown remark-
able performances in various research areas, such as com-
puter vision (He et al. 2016), natural language processing
(Vaswani et al. 2017), and speech processing (Amodei et al.
2016). Nevertheless, there exists one significant problem to
be solved in utilizing DNNs robustly in the real-world, that
is, the environment discrepancy problem. The environment
discrepancy problem occurs when the training data distri-
bution and testing data distribution are mismatched, and it
results in the serious performance degradations of DNNs
(Klejch et al. 2019; Touvron et al. 2019; Teney et al. 2020).
Therefore, although end-users want to exploit well-trained
DNNs in their own testing environment, they would fail to
*These authors contributed equally.
experience the powerfulness of DNNs because of the afore-
mentioned problem. For example, as described in Fig. 1(a),
an end-user tries to adopt an object detection model which is
trained with clean weather data, and of course, it detects ob-
jects successfully under thte same clean weather condition.
However, as shown in Fig. 2(b), when the user wants to de-
tect objects under adverse weather condition, the detection
model would fail to conduct the robust object detection, be-
cause the testing environment (i.e., adverse weather) differs
from the training environment (i.e., clean weather) (Huang,
Hoang, and Le 2022; Sakaridis, Dai, and Van Gool 2018).
Therefore, end-users are recommended to find and exploit
the DNN models well-trained on the training data that is
consistent with their own testing environment. One possi-
ble approach to alleviate such a problem is Domain Adap-
tation (DA) which aims to reduce the domain gap between
the source and target domains by learning the domain in-
variant representations (Xiao and Zhang 2021; Saito et al.
2018; Bousmalis et al. 2017; Ganin and Lempitsky 2015;
Long et al. 2017). However, such DA methods are usually
required to know the internal architecture of the network and
have an access to both source and target data simultaneously
for learning the domain invariant features. Therefore, it is
time-consuming and difficult for end-users to understand the
behavior of the network and use both kinds of data.
In this paper, we focus on how to make end-users en-
joy the beneficial performances of well-trained DNN models
even with different testing data distribution. To this end, we
introduce a method that end-users can adapt the pretrained
model into their testing environment without any knowledge
of model architecture or finetuning the model, by using only
a small number of data in testing environment. Motivated
by the recent success in the input-level transformation to
convert the originally learned task to another task (Elsayed,
Goodfellow, and Sohl-Dickstein 2018), instead of modifying
the weight parameters of the pretrained models, we propose
to use an additional input, called meta input, to match the
distributions of testing data with that of training data. Specif-
ically, we suppose that an end-user wants to adopt a pre-
trained model under different testing environment with a few
labeled/unlabeled testing data only, while the user cannot
have an access to the training data which is used to pretrain
the model. Then, the proposed meta input can be optimized
to transform the testing data distribution to be aligned with
arXiv:2210.13186v1 [cs.LG] 21 Oct 2022