When Losses Align: Gradient-Based Composite Loss Weighting for Efficient Pretraining

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Karpukhin, Ivan, Savchenko, Andrey
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910201436700672
author Karpukhin, Ivan
Savchenko, Andrey
author_facet Karpukhin, Ivan
Savchenko, Andrey
contents Modern deep models are often pretrained on large-scale data with missing labels using composite objectives, where the relative weights of multiple loss terms act as hyperparameters. Tuning these weights with random search or Bayesian optimization is computationally expensive, as it requires many independent training runs. To address this, we propose a gradient-based bilevel method that learns pretraining loss weights online by aligning the composite pretraining gradient with a downstream objective. By exploiting the structure of the loss, the method avoids the multiple backward passes typically required by truncated backpropagation through the full model, reducing the overhead of hyperparameter tuning to approximately 30% above a single training run. We evaluate the approach on event-sequence modeling and self-supervised computer vision, where it matches or improves upon carefully tuned baselines while substantially reducing the cost of hyperparameter tuning compared to random or Bayesian search.
format Preprint
id arxiv_https___arxiv_org_abs_2605_07756
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle When Losses Align: Gradient-Based Composite Loss Weighting for Efficient Pretraining
Karpukhin, Ivan
Savchenko, Andrey
Machine Learning
Artificial Intelligence
Modern deep models are often pretrained on large-scale data with missing labels using composite objectives, where the relative weights of multiple loss terms act as hyperparameters. Tuning these weights with random search or Bayesian optimization is computationally expensive, as it requires many independent training runs. To address this, we propose a gradient-based bilevel method that learns pretraining loss weights online by aligning the composite pretraining gradient with a downstream objective. By exploiting the structure of the loss, the method avoids the multiple backward passes typically required by truncated backpropagation through the full model, reducing the overhead of hyperparameter tuning to approximately 30% above a single training run. We evaluate the approach on event-sequence modeling and self-supervised computer vision, where it matches or improves upon carefully tuned baselines while substantially reducing the cost of hyperparameter tuning compared to random or Bayesian search.
title When Losses Align: Gradient-Based Composite Loss Weighting for Efficient Pretraining
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2605.07756