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。