Deep learning models are often deployed in downstream tasks that the training procedure may not be aware of. For example, models solely trained to achieve accurate predictions may struggle to perform well on downstream tasks because seemingly small prediction errors may incur drastic task errors. The standard end-to-end learning approach is to make the task loss differentiable or to introduce a differentiable surrogate that the model can be trained on. In these settings, the task loss needs to be carefully balanced with the prediction loss because they may have conflicting objectives. We propose take the task loss signal one level deeper than the parameters of the model and use it to learn the parameters of the loss function the model is trained on, which can be done by learning a metric in the prediction space. This approach does not alter the optimal prediction model itself, but rather changes the model learning to emphasize the information important for the downstream task. This enables us to achieve the best of both worlds: a prediction model trained in the original prediction space while also being valuable for the desired downstream task. We validate our approach through experiments conducted in two main settings: 1) decision-focused model learning scenarios involving portfolio optimization and budget allocation, and 2) reinforcement learning in noisy environments with distracting states. The source code to reproduce our experiments is available at https://github.com/facebookresearch/taskmet
翻译:深度学习模型常被部署于训练过程可能未考虑的下游任务中。例如,仅以实现准确预测为目标训练的模型,在下游任务中可能表现不佳,因为看似微小的预测误差可能导致严重的任务错误。标准的端到端学习方法通常通过使任务损失可微分或引入可微分的代理损失函数来训练模型。在这些场景中,任务损失需要与预测损失仔细权衡,因为二者可能存在目标冲突。我们提出将任务损失信号深入到模型参数之外的另一层面——利用该信号来学习模型训练所用损失函数的参数,这可以通过在预测空间中学习度量函数来实现。该方法不改变最优预测模型本身,而是通过调整模型学习过程来强调对下游任务重要的信息。这使得我们能够同时实现双重目标:在原始预测空间训练的预测模型,同时也能为期望的下游任务提供价值。我们在两类主要场景中通过实验验证了所提方法的有效性:1)涉及投资组合优化与预算分配的决策导向模型学习场景;2)存在干扰状态的噪声环境中的强化学习。实验复现代码已发布于 https://github.com/facebookresearch/taskmet