# YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information

Programmable gradient information keeps input details for training lightweight detectors

Chien-Yao Wang, I-Hau Yeh, Hong-Yuan Mark Liao · arXiv · 2024-2-21

- **Problem** Deep detectors lose input information as data passes through layers, which biases the gradients used to train them.
- **Method** PGI adds an auxiliary reversible branch that feeds gradients to the main branch, then is dropped at inference.
- **Results** On MS COCO, trained from scratch, YOLOv9-C matches YOLOv7 AF at 53% AP with 42% fewer parameters.

## Where information is lost in deep feedforward

Much detection research has concentrated on objective functions, label assignment and architectures, while the information that enters a network is rarely tracked as it passes through its layers. The authors argue that this loss of information biases the gradient flows that update the model, so the network can learn incorrect associations between inputs and targets.

They describe the phenomenon with the information bottleneck principle, in which the mutual information between the input and the target can only stay the same or shrink along a chain of transformations.

The authors treat this as an inference to be checked, and they check it by feeding randomly initialised networks and visualising their feature maps. In that visualisation PlainNet loses information needed for object detection in its deep layers, and the amount each architecture keeps is described as positively related to the accuracy reached after training.

Three remedies are in use: reversible architectures, masked modeling and deep supervision. Each has a cost: reversible designs need extra layers that raise inference cost, masked modeling's reconstruction loss can conflict with the target loss, and deep supervision can accumulate errors.

## Why width, reversibility and the lightweight case differ

Because each layer can only keep or lose information about the input, a deeper output retains less about the target, and the parameter updates computed from that output become unreliable. A larger model can perform a more complete transformation and so keep enough information for the mapping, which the authors use to explain why width matters more than depth in many modern models.

They note that width alone does not solve unreliable gradients in very deep networks, which leads them to reversible functions.

A reversible function has an inverse, so the input can be recovered from the output and the mutual information is preserved through the transformation. PreAct ResNet is cited as an example of this principle: it carries the original input forward explicitly and can converge with more than a thousand layers. The authors argue that this explicit carrying of data weakens the reason for depth on hard problems, and that PreAct ResNet performs worse than ResNet when the layer count is small.

For a lightweight model, the part relevant to the target, I(Y,X), is only a very small part of I(X,X), so the goal is to filter I(Y,X) accurately rather than to keep all of X. This is why the authors seek a training method that generates reliable gradients and still suits shallow and lightweight networks.

## How the auxiliary branch shapes training

PGI has three parts: a main branch used for inference, an auxiliary reversible branch that supplies gradients to the main branch, and multi-level auxiliary information that controls how the auxiliary gradients reach the main branch. The auxiliary reversible branch supplies the information that maps data to targets, so the loss function can guide the main branch away from false correlations found in incomplete features.

Since inference uses only the main branch, the auxiliary branch does not add inference cost, and it can be removed at inference so the original network's capacity is kept. The authors measured that adding connections from deep to shallow layers to a reversible architecture of the RevCol kind raised inference time by 20%, which is why the reversible path is kept off the inference route.

The authors regard the reversible branch as an extension of the deep supervision branch, and they do not force the main branch to keep all of the original information. The main branch receives useful gradients from the auxiliary branch instead, and this is presented as the reason the method can also apply to shallower networks.

## Why each pyramid level needs every object

With deep supervision, the pyramid levels of object detection predict different object sizes, so shallow features learn small objects and treat objects of other sizes as background. The authors argue that this starves the deep pyramid levels of the information they need to predict their own targets.

Multi-level auxiliary information inserts an integration network between the auxiliary pyramid levels and the main branch, and this network merges the gradients returned from different prediction heads before they update the main branch. Because any integration network can be used here, the semantic levels to be learned can be planned for networks of different sizes.

## GELAN and its block choices

GELAN combines CSPNet and ELAN, both designed around gradient path planning, and generalises ELAN so that it accepts any computational block rather than only stacked convolutions. The component unit adopted in YOLOv9 is CSP-ELAN, which replaces ELAN in the network topology.

The authors choose CSP blocks because they lower parameters and computation and raise AP by 0.7 points.

Raising the ELAN depth from 1 to 2 gives a clear gain in accuracy. Beyond that, changing the ELAN depth or the CSP depth moves parameters, computation and accuracy together, which the authors read as low sensitivity of GELAN to depth. For YOLOv9-S, -M and -C the ELAN and CSP depth pairs are {2, 3}, {2, 1} and {2, 1}.

## Training and implementation conditions

All models are trained from scratch on the MS COCO 2017 split for 500 epochs, following the YOLOv7 AF setup. The optimizer is SGD, the learning rate decays linearly from 0.01 to 0.0001, and the first three epochs are a warm-up that updates only the bias. Mosaic augmentation is turned off for the last 15 epochs.

The general version of YOLOv9 is built on YOLOv7, and the extended version on Dynamic YOLOv7. ELAN is replaced by GELAN with CSP blocks and planned RepConv, the downsampling module is simplified to a DOWN module of pooling and a convolution, and the prediction head is optimized.

## MS COCO comparison with real-time detectors

Among train-from-scratch detectors, the authors name YOLO MS-S as the strongest lightweight baseline, YOLO MS as the strongest medium baseline, YOLOv7 AF for general models and YOLOv8-X for large models.

Against YOLOv7 AF, YOLOv9-C has 42% fewer parameters and 22% fewer calculations at the same AP of 53%.

Compared with YOLOv8-X, YOLOv9-E has 16% fewer parameters and 27% fewer calculations, and it is 1.7% higher in AP, as the paper states. These are comparisons of train-from-scratch models against baselines taken from their published results in the same table, not runs under a shared protocol.

Figure 5 compares YOLOv9 with detectors that use ImageNet pretrained weights, including RT DETR, RTMDet and PP-YOLOE, on parameters and on computation.

## Computational blocks and depth

Res, Dark and CSP blocks were each substituted into ELAN, and the system keeps good performance across them. In GELAN-S, the Res block version reaches 44.3% and the Dark block version 44.5%, both below the plain convolution version at 44.8%.

In the depth study, GELAN-M with ELAN depth 2 and CSP depth 1 reaches 51.1%, and with ELAN depth 2 and CSP depth 3 it reaches 52.3%. The rows of Table 3 show that the depth changes are read by the authors as stable behaviour rather than a sensitive design choice.

## Which PGI parts help

On GELAN-C, the variant with the ICN auxiliary reversible branch and the lead head guided assignment (LHG-ICN) reaches 53.0%, above the 52.5% baseline. ICN uses DHLC linkage to obtain multi-level reversible information, and the lead head guided training is the one proposed in YOLOv7.

Adding PGI to GELAN-C raises AP val50:95 from 52.5% to 53.0%. Adding deep supervision to GELAN-S lowers AP val50:95 from 46.7% to 46.5%, while PGI on GELAN-S gives 46.8%, a gain of only 0.1 point. On GELAN-M, PGI adds 0.3 points, and on GELAN-E it adds 0.6 points over 55.0%.

In the backbone and neck ablation, the PFH setting, which is equivalent to traditional deep supervision, leaves GELAN-C at 52.5% and reaches 55.3% on GELAN-E, which the authors read as effective only in deep models. The cumulative table moves from YOLOv7 AF at 53.0% to YOLOv9-E at 55.6%, with GELAN and PGI each contributing an added row.

## Feature maps and early gradients

With random initial weights, PlainNet has lost object locations by the 50th layer and all distinguishable features by the 100th layer. ResNet keeps object positions at the 50th layer but loses boundaries and becomes blurry by the 100th, while CSPNet and GELAN keep features that support identification up to the 200th layer.

The authors use a PAN feature-map visualisation after one epoch of bias warm-up to compare GELAN with YOLOv9, which is GELAN with PGI. GELAN without PGI diverges at object boundaries and responds to some background areas, while the PGI version focuses on the object area, which the authors read as PGI supplying better gradients.

## Limits of the evidence

The experiments use MS COCO object detection only. The tables report parameters and FLOPs, not measured inference latency, so the speed of YOLOv9 is not measured here.

The 20% inference-time increase was measured for the reversible architecture the authors analysed, not for the final YOLOv9 network. The link from information loss to biased gradients is a hypothesis the authors support with visualisations rather than with a quantity they measure.

The PGI gain on GELAN-S is 0.1 point, and deep supervision on GELAN-S lowers AP, so the benefit is small for the smallest model. The authors say deep supervision is unstable for general models and helps only very deep ones, and PFH only helps deep models in their ablation.

The visualisations use random initial weights or a single epoch, so they are qualitative and do not give a trained-model accuracy. The pretrained comparisons in Table 3 come from different training settings, so they are not one controlled experiment with YOLOv9.

## Paper info

- **Authors**: Chien-Yao Wang, I-Hau Yeh, Hong-Yuan Mark Liao
- **Venue**: arXiv · Preprint
- **First published**: 2024-2-21
- **Added**: 2026-11-11
- **Updated**: 2024-2-29
- **Version**: v2
- **arXiv**: 2402.13616
- **Category**: cs.CV
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/2402.13616v2) · [PDF ↗](https://arxiv.org/pdf/2402.13616v2)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Chien-Yao Wang, I-Hau Yeh, Hong-Yuan Mark Liao (2024). YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information. arXiv:2402.13616v2. https://arxiv.org/abs/2402.13616v2

**BibTeX**

```
@misc{wang2024yolov9,
  title = {{YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information}},
  author = {Chien-Yao Wang and I-Hau Yeh and Hong-Yuan Mark Liao},
  year = {2024},
  eprint = {2402.13616},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.13616v2}
}
```

## Other paper commentary

- [Context Encoders: Feature Learning by Inpainting](https://refivu.com/en/papers/7b297366-a2d7-4dfc-9233-9920c1be930e-context-encoders-feature-learning-by-inpainting.md)
- [Object Detection with Deep Learning: A Review](https://refivu.com/en/papers/7a141689-80c4-419f-837d-9d8f246ca5fc-object-detection-with-deep-learning-a-review.md)
- [OpenPose: Realtime Multi-Person 2D Pose Estimation using Part Affinity Fields](https://refivu.com/en/papers/5a0057d5-5ad8-405d-b3a0-1ddc3220df6c-openpose-realtime-multi-person-2d-pose-estimation-using.md)
- [DETRs Beat YOLOs on Real-time Object Detection](https://refivu.com/en/papers/2872fb04-6c8b-4f48-a976-80e6dd5be309-detrs-beat-yolos-on-real-time-object-detection.md)
- [Deformable DETR: Deformable Transformers for End-to-End Object Detection](https://refivu.com/en/papers/e0311cd6-f252-409d-a37d-7b236622ec8e-deformable-detr-deformable-transformers-for-end-to-end.md)
- [Swin-Unet: Unet-like Pure Transformer for Medical Image Segmentation](https://refivu.com/en/papers/178a13b8-5d0e-4448-a1cb-759db558ade3-swin-unet-unet-like-pure-transformer-for-medical.md)
- [Multimodal Machine Learning: A Survey and Taxonomy](https://refivu.com/en/papers/2148fea3-852f-4876-ab29-675f2c95c8d9-multimodal-machine-learning-a-survey-and-taxonomy.md)
- [Spatial Temporal Graph Convolutional Networks for Skeleton-Based Action Recognition](https://refivu.com/en/papers/bbd98e39-133a-4c51-b43b-84aa4583b3aa-spatial-temporal-graph-convolutional-networks-for-skeleton.md)
- [Stacked Hourglass Networks for Human Pose Estimation](https://refivu.com/en/papers/5578e324-2c80-4bb0-90a0-e90427560e5f-stacked-hourglass-networks-for-human-pose-estimation.md)
- [Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processing](https://refivu.com/en/papers/e4640bef-1400-41e6-a928-8e765fc75d0e-pre-train-prompt-and-predict-a-systematic-survey.md)
- [CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features](https://refivu.com/en/papers/5b819733-3817-45f5-9d87-61545a63f83b-cutmix-regularization-strategy-to-train-strong-classifiers.md)
- [A Survey of Convolutional Neural Networks: Analysis, Applications, and Prospects](https://refivu.com/en/papers/070c8ac2-628a-4354-98cb-c9aeae701850-a-survey-of-convolutional-neural-networks-analysis.md)

## Terms in this paper

- [Object detection](https://refivu.com/en/terms/113bfdb14049-object-detection)
- [FLOPs](https://refivu.com/en/terms/14c405888d5b-flops)
- [deep supervision](https://refivu.com/en/terms/5fe4f2985157-deep-supervision)
- [information bottleneck](https://refivu.com/en/terms/a3cb119534db-information-bottleneck)
- [CSPNet](https://refivu.com/en/terms/97f34ddba355-cspnet)
- [ELAN](https://refivu.com/en/terms/73161fefec46-elan)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/11ec3a37-5335-4563-b8f6-6949e50f3a4f-yolov9-learning-what-you-want-to-learn-using)
