  Designing proper loss functions is essential in training deep networks.
Especially in the field of semantic segmentation, various evaluation metrics
have been proposed for diverse scenarios. Despite the success of the widely
adopted cross-entropy loss and its variants, the mis-alignment between the loss
functions and evaluation metrics degrades the network performance. Meanwhile,
manually designing loss functions for each specific metric requires expertise
and significant manpower. In this paper, we propose to automate the design of
metric-specific loss functions by searching differentiable surrogate losses for
each metric. We substitute the non-differentiable operations in the metrics
with parameterized functions, and conduct parameter search to optimize the
shape of loss surfaces. Two constraints are introduced to regularize the search
space and make the search efficient. Extensive experiments on PASCAL VOC and
Cityscapes demonstrate that the searched surrogate losses outperform the
manually designed loss functions consistently. The searched losses can
generalize well to other datasets and networks. Code shall be released.
