GreedyLR¶
Implements GreedyLR, a loss-feedback learning-rate scheduler that greedily raises the rate while the loss keeps improving and lowers it while the loss stalls.
GreedyLR tracks a (optionally smoothed) loss signal and counts consecutive epochs of improvement and deterioration. Once a run of good epochs exceeds the patience, the rate is multiplied up toward an upper bound; once a run of bad epochs exceeds the patience, the rate is multiplied down toward a lower bound. Improvement is judged against the best observed loss up to a tolerance \(\delta\), and the rate is always clamped to \([\eta_{\min}, \eta_{\max}]\). In its simplest form (no patience, no smoothing) the rule reduces to dividing the rate by a factor \(F \in (0,1)\) when the loss drops and multiplying by \(F\) when it does not.
where \(\ell_t\) is the streaming-averaged loss at epoch \(t\), \(\text{best}_t\) the running best loss, \(\delta\) the improvement threshold, \(n^{+}_t\) and \(n^{-}_t\) the counts of consecutive good and bad epochs, \(p\) the patience, \(F\) the multiplicative factor (\(F>1\) for the increase branch, \(F<1\) for the decrease branch), and \([\eta_{\min},\eta_{\max}]\) the learning-rate bounds. Warmup and cooldown counters extend a run of increases or decreases for a fixed number of epochs after the loss trend reverses.
Reference: Shreyas Subramanian, Bala Krishnamoorthy, Pranav Murthy, "Dynamic Learning Rate Scheduling based on Loss Changes Leads to Faster Convergence", arXiv 2025. https://arxiv.org/abs/2512.14527