---
title: "Learning Lightweight Lane Detection CNNs by Self Attention"
description: "How self attention distillation improves lightweight lane detection networks, what the benchmark results show, and where the evidence stops."
canonical: "https://research.elamur.ai/free/en/papers/hou-2019-learning-lightweight-lane-detection-cnns/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/hou-2019-learning-lightweight-lane-detection-cnns/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2019](https://md.research.elamur.ai/free/en/papers/2019/) / Learning Lightweight Lane Detection CNNs by Self Attention Distillation

# Learning Lightweight Lane Detection CNNs by Self Attention Distillation

Paper · 2019 · Yuenan Hou, Zheng Ma, Chunxiao Liu et al.

**Authors:** Yuenan Hou, [Zheng Ma](https://md.research.elamur.ai/free/en/authors/zheng-ma/), Chunxiao Liu and Chen Change Loy · **Year:** 2019 · **Venue:** IEEE/CVF International Conference on Computer Vision (ICCV) · **Licence:** [CC BY-NC-SA 4.0 (arXiv)](https://creativecommons.org/licenses/by-nc-sa/4.0/)

[**780** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W2981441441|W3043328850) · [IEEE/CVF International Conference on Computer Vision (ICCV)](https://openalex.org/S4363607764) · [licence](https://creativecommons.org/licenses/by-nc-sa/4.0/)

- [PDF](https://arxiv.org/pdf/1908.00821)
- [DOI 10.1109/iccv.2019.00110](https://doi.org/10.1109/iccv.2019.00110)
- [arXiv 1908.00821](https://arxiv.org/abs/1908.00821)
- [OpenAlex](https://openalex.org/W2981441441)

Citations: OpenAlex, 2026-10-14.

## Deep dive: Learning Lightweight Lane Detection CNNs by Self Attention Distillation

How self attention distillation improves lightweight lane detection networks, what the benchmark results show, and where the evidence stops. · about 34 minutes to read

**In this deep dive**

1. [Summary](#dd-summary)
2. [Ideas worth borrowing](#dd-ideas-worth-borrowing)
3. [How Mova uses it](#dd-how-mova-uses-it)
4. [The problem and its context](#dd-the-problem-and-its-context)
5. [The method, step by step](#dd-the-method-step-by-step)
6. [Experiments and results](#dd-experiments-and-results)
7. [What the ablations show](#dd-what-the-ablations-show)
8. [Limitations](#dd-limitations)
9. [What came after](#dd-what-came-after)

### Summary

Lane detection asks a vision system to identify the markings that organize a road into lanes. The difficulty is not simply recognizing painted lines. A useful system must also work when vehicles hide parts of those lines, lighting makes them faint, or other road markings create misleading patterns. Training examples provide surprisingly little direct guidance: lanes occupy narrow strips of an image, while almost everything else belongs to the background. This paper investigates whether a small convolutional network can learn more from those sparse annotations by reusing information that develops inside its own layers.

The proposed method is Self Attention Distillation, abbreviated SAD. After a network has learned something useful about the task, its deeper layers produce activation patterns that reflect both lane locations and broader road context. The authors turn those patterns into spatial attention maps: images showing where a layer has strong responses. During further training, selected shallower layers are encouraged to produce attention maps resembling those of deeper layers. The network therefore supplies an additional training signal to itself. Ordinary lane annotations remain essential, but they are supplemented by contextual targets that require neither a separate teacher network nor new human labels.

This is a training procedure instead of an extra component of the deployed detector. The attention generators and matching losses guide learning; the underlying network still performs the prediction at deployment. That distinction matters because an alternative discussed in the paper, spatial message passing, improves contextual reasoning by adding computation to the prediction process. SAD instead tries to improve what the existing computation learns. Its meaning of attention is also specific: the method summarizes convolutional activations across channels and compares the resulting spatial maps.

The authors evaluate SAD with ENet and several ResNet variants on TuSimple, CULane, and BDD100K. Their principal lightweight detector, ENet-SAD, combines the training method with changes to ENet’s lane-detection architecture. The paper reports competitive performance on TuSimple and CULane and stronger results than its comparison systems on the adapted BDD100K task. For CULane, the authors describe ENet-SAD as having 20 × fewer parameters and operating 10 × faster than SCNN. An explicitly quantified experiment with the deeper ResNet-101 also shows a benefit: CULane F₁ rises from 70.8 to 71.8, while BDD100K accuracy rises from 34.45% to 35.56%.

The controlled comparisons make the conclusion more precise. Deeper-to-shallower transfer works best among intermediate and later blocks, particularly between neighboring blocks. Forcing early feature extractors to imitate more semantic representations can hurt, and reversing the direction of transfer reduces TuSimple accuracy in a reported experiment. Introducing SAD after useful attention has emerged improves convergence behavior, although the tested introduction times eventually reach similar performance. The evidence supports a practical way to strengthen lane detectors without increasing their deployment computation. It does not establish that all internal attention is reliable, that every transfer path helps, or that the method solves difficult road scenes.

### Ideas worth borrowing

Learn from an internal target. A network can contain useful supervisory structure beyond its final prediction. Here, a deeper block supplies a spatial target to an earlier block within the same network. The useful distinction is between information already available during training and information that would require another annotation effort. This idea could apply wherever a task has sparse labels but later representations capture broader regularities. The lane-detection experiments support that possibility within convolutional vision networks; transferring it elsewhere would require a fresh evaluation.

Match a meaningful summary. SAD compares spatial summaries instead of requiring complete activation tensors to agree. Collapsing the channel dimension lets blocks with different channel structures communicate through a shared representation: where their activity is concentrated. This makes the transfer less dependent on matching every internal feature. Elsewhere, an analogous summary would need to preserve something the task actually needs. The reusable principle is to identify a suitable common object for comparison, rather than assuming that all intermediate representations should become identical.

Spend computation during training. The auxiliary attention losses make learning more elaborate without becoming part of the deployed prediction path. This is useful when training resources are easier to obtain than deployment resources, or when latency places a firm constraint on the final system. The paper’s contribution is especially relevant to [efficient models and compression](https://md.research.elamur.ai/free/en/topics/efficient-models/): improving a compact architecture does not always require adding operations that remain active after training. The important accounting question is where the extra work occurs.

Respect the division of labor between layers. The path ablations show that additional supervision can be harmful when it asks a layer to abandon its useful role. Early blocks preserve local visual detail; later blocks represent broader structures. Encouraging agreement among neighboring, more semantic blocks works better than indiscriminately connecting every stage. This suggests a general design rule for auxiliary objectives: decide which differences between representations are productive before introducing a loss that tries to erase them.

Wait for a useful signal. SAD does not require an externally trained teacher, but its internal targets still need quality. The authors find that introducing the loss too early offers less useful guidance and changes convergence behavior. A transferable lesson is to inspect how an auxiliary target develops during learning. The schedule for activating an objective can matter because the target is generated by a changing system, rather than supplied as a fixed, trustworthy label.

Separate the mechanism from neighboring improvements. ENet-SAD includes architectural modifications, additional segmentation losses, augmentation, and the attention objective. The paper therefore also examines different backbones, transfer paths, direct intermediate supervision, and the influence of the lane-existence branch. Those comparisons help identify what SAD contributes within a larger training system. This is worth borrowing as an experimental habit: a strong final result becomes more informative when nearby explanations are tested rather than left entangled.

Treat visualizations as evidence to investigate. The attention images suggest that SAD makes responses concentrate more on road structure and relevant objects. The authors connect that observation to quantitative detection results and controlled comparisons. A reusable practice is to use internal visualizations to propose a mechanism, then test consequences of that mechanism. A plausible-looking map alone would not establish that the highlighted context causes the improvement or that the detector will remain reliable in unfamiliar conditions.

### How Mova uses it

For Mova, a small transparent language system implemented in Rust, this paper offers a possible training principle instead of a ready-made language component. No implementation of SAD in Mova is established by the paper. Its experiments concern road images, convolutional activations, and lane segmentation. Any connection to language processing must therefore be treated as a design proposal, with its own assumptions and tests.

The closest reusable idea is to compare interpretable summaries produced at different stages of processing. In the lane detector, the shared object is a spatial map. A language system would need an object appropriate to its own architecture and task. If Mova had trainable stages that assigned relevance to positions in a sentence, an experiment could ask whether a later stage’s relevance distribution provides useful guidance to an earlier one. That would be an analogy to SAD, not an application already validated by these lane-detection results.

Transparency changes what such a proposal should demand. A compact internal summary is useful only if its meaning can be stated clearly. In the paper, the attention generator has an explicit construction: aggregate activation magnitudes, align spatial resolution, and normalize across locations. A Mova experiment should similarly specify exactly what is being summarized, what agreement means, and why the later stage should offer better guidance. Calling an arbitrary internal score attention would not supply those missing arguments.

The paper’s path results are particularly relevant to a system that values understandable stages. An early language-processing stage might have a useful local responsibility, while a later stage combines broader context. SAD’s failures at early visual blocks suggest a question worth testing: would forcing those stages into agreement damage their different responsibilities? The paper does not answer that question for language. It supplies a reason to preserve the distinction and compare selective transfer against indiscriminate transfer.

Its training and deployment separation is also potentially attractive. If Mova used a compatible trainable component, an auxiliary objective could be evaluated during development and omitted from normal execution. Rust itself neither establishes nor prevents that possibility; the relevant issue is the component’s learning procedure. The honest engineering claim would be that a training experiment might improve a fixed computation, not that implementing the attention loss automatically makes the running system faster.

A useful Mova investigation would also borrow the paper’s controls. It would compare ordinary task supervision with the same system plus internal matching, examine the direction of transfer, and check whether the proposed target becomes useful only after some learning. It should retain the original task metric and inspect whether apparent internal agreement actually improves behavior. Agreement can increase while task performance deteriorates, as the paper’s backward-transfer result illustrates.

The most defensible connection is therefore methodological. Mova could explore explicit, inspectable internal teaching signals while keeping a clear boundary between the signal, its intended role, and the evidence for its usefulness. This paper supports that style of investigation. It supplies no language-processing results and no basis for claiming that a transparent Rust system already benefits from the particular attention maps used for lane detection.

### The problem and its context

#### Why narrow labels leave a large learning problem

The paper begins from a mismatch between the visual task and its usual supervision. Lane detection needs a representation of road structure, but its annotations frequently identify only the lane pixels. Those pixels are sparse because lane markings are long and thin. A network can therefore receive many examples of background while seeing comparatively little direct evidence about the structures it must recover.

The authors describe the common approach as dense prediction. An image enters a convolutional network, and the network assigns a class to each image location. In a simple formulation, that class indicates whether the location belongs to a lane. Other formulations distinguish lane categories or instances. Although every pixel receives a prediction, the informative positive annotations still occupy a small portion of the scene.

This matters most when local appearance is insufficient. A vehicle may cover part of a marking. Poor illumination may weaken the contrast between paint and road. An unrelated marking may resemble a lane fragment without belonging to the lane structure. A successful detector needs contextual information to interpret what it sees and to avoid being distracted by irrelevant visual detail.

One apparent solution is to make the target lanes wider, giving training more positive pixels. The authors caution that this can damage detection quality. Broadening an annotation changes the target being learned; it does not automatically provide the scene understanding needed to distinguish real lane structure from nearby background. The paper nevertheless uses controlled dilation for its BDD100K training targets, which makes this a practical tradeoff instead of a blanket rejection of wider supervision.

#### From hand-designed features to learned segmentation

The earlier lane-detection systems described in the paper rely on manually selected visual features. They first obtain candidate lane segments and then group them into a final result. The authors characterize these methods as difficult to design and insufficiently robust for complicated driving conditions. Their limitations motivate learning features directly from images.

The subsequent deep-learning approaches discussed in the paper replace the manual feature pipeline with trainable convolutional processing. Several treat the problem as semantic segmentation. DVCNN, for instance, uses both frontal and top-view imagery. Another approach, associated with Neven and colleagues, separates the task into identifying lane pixels and then assigning those pixels to individual lanes.

These alternatives show that lane detection contains more than a single classification decision. The system may need to recognize lane-colored pixels, connect them into coherent structures, and distinguish neighboring lanes. The formulation chosen for evaluation determines which of those abilities is measured. This becomes especially important when the paper adapts BDD100K to a binary lane-detection task instead of retaining lane-instance classification.

SAD does not replace the dense-prediction formulation. The network still learns to produce segmentation maps, and some configurations also predict whether particular lanes exist. Its intervention concerns the representations that support those outputs. The authors ask whether internal contextual information can become an additional learning signal without changing the essential prediction task.

#### Extra tasks and message passing

The paper identifies multitask learning as one way earlier systems enrich supervision. A lane detector can also learn road areas, scene segmentation, or vanishing points. Such targets can expose relationships that narrow lane labels leave implicit. A vanishing point, for instance, provides a cue about the organization of the road rather than simply identifying a strip of paint.

The cost, in the authors’ account, is preparing the additional annotations. Extra tasks can require human effort and another labeling process. Their usefulness does not remove the practical question of whether the necessary supervision is available. SAD is motivated partly by the possibility that a network already contains contextual signals that could be reused without commissioning those labels.

The related-work discussion also describes joint road and lane-boundary learning with geometric constraints. It mentions an adversarial approach that encourages predicted segmentation maps to resemble lane labels. These methods illustrate different ways of supplying structure beyond a straightforward pixelwise classification objective. SAD belongs to that broader effort to make lane supervision more informative, but it obtains its extra target internally.

Spatial message passing offers another route. SCNN propagates information across spatial positions in high-level representations so that distant parts of a scene can influence one another. The paper presents this as useful for contextual reasoning, especially when sparse lane annotations cannot directly teach every needed relationship.

The drawback emphasized here is sequential computation during prediction. According to the authors, the message-passing operation in a layer accounts for 35% of SCNN’s overall forward-processing time. This motivates a different engineering objective: obtain a better contextual representation while retaining the ordinary feedforward structure at deployment. SAD is proposed as a training-time route towards that objective.

#### From teacher networks to internal attention targets

The distillation background begins with [Distilling the Knowledge in a Neural Network](https://md.research.elamur.ai/free/en/papers/hinton-2015-distilling-knowledge-neural-network/). As described in the paper, conventional distillation uses a teacher to guide a student, commonly transferring information from a larger network to a smaller one. Other cited studies consider teachers and students with matching capacity or transfer between different architectures.

Attention transfer changes the object being copied. Rather than matching only final outputs or complete intermediate features, the student learns from attention maps supplied by a teacher. The paper specifically builds on [Paying More Attention to Attention](https://md.research.elamur.ai/free/en/papers/zagoruyko-2016-paying-more-attention-attention-improving/), which considers attention derived from activations and attention derived from gradients.

SAD retains the idea that a spatial summary can be a useful target, but removes the separate teacher. A later block and an earlier block belong to the same network. Their relationship is directional: deeper attention guides a selected shallower representation. Because the earlier representation also contributes to subsequent processing, changes to it can affect the later block that supplied the target.

The paper also uses architectures from the line introduced by [Deep Residual Learning for Image Recognition](https://md.research.elamur.ai/free/en/papers/he-2015-deep-residual-learning-image-recognition/). Those experiments help separate the training idea from its principal ENet implementation. The contribution is not a claim that one particular encoder alone explains the gains. It is a claim that appropriately arranged internal attention matching can improve several convolutional backbones on lane detection.

### The method, step by step

#### Define the prediction task

The input is a road image, and the main output is a segmentation map. Each position in that map receives a class label. In the notation used by the authors, the allowable label values are:

```
lᵢⱼ ∈ {1, …, N꜀}
```

Here, lᵢⱼ is the label at image position indexed by i and j. N꜀ denotes the total number of classes. The segmentation map, called s, collects the labels across the image. The precise output classes depend on the dataset configuration.

The network is represented as a learned mapping:

```
ℱ: X ↦ (s, b)
```

X is the input image. ℱ is the convolutional prediction function. The output s is the segmentation map, while b contains binary indicators of lane presence. The existence output supports the evaluation and lane-reconstruction procedure used in relevant configurations. It is removed in the paper’s BDD100K experiments, where the output is binary lane segmentation.

This setup is important because SAD is not the sole source of learning. The detector continues to receive ordinary segmentation supervision, and, where applicable, supervision for lane existence. Internal attention agreement is added to these objectives rather than substituted for them.

Training a lane detector with self attention distillation The steps in order.

#### Extract a spatial summary from each block

A convolutional block produces a collection of feature maps. Each channel can respond to different image patterns, and the channels together form an activation tensor:

```
Aₘ ∈ ℝ^(Cₘ × Hₘ × Wₘ)
```

Aₘ is the activation output associated with layer or block m. Cₘ is its channel count, Hₘ its height, and Wₘ its width. ℝ indicates that the entries are real-valued. Though the paper uses layer notation generally, its ENet examples organize the transfer around encoder blocks.

To obtain an attention map, the method removes the channel dimension while preserving the spatial dimensions:

```
𝒢: ℝ^(Cₘ × Hₘ × Wₘ) → ℝ^(Hₘ × Wₘ)
```

𝒢 is the aggregation function. Its input is the activation tensor, and its output assigns one value to each spatial location. The authors interpret activation magnitude as a measure of that location’s importance for the prediction. This is an operational definition used to construct the target, instead of a separate annotation of what the network should attend to.

The paper considers a simple magnitude sum:

```
𝒢_sum(Aₘ) = ∑ᵢ₌₁^Cₘ |Aₘᵢ|
```

Aₘᵢ is the spatial feature map in channel i of block m. The vertical bars take absolute values at every location. The summation combines the magnitudes across all Cₘ channels, producing one spatial map.

A second option raises each magnitude to a power before summing:

```
𝒢_sumᵖ(Aₘ) = ∑ᵢ₌₁^Cₘ |Aₘᵢ|ᵖ
```

The exponent p is greater than 1. Larger p gives stronger responses more influence relative to weaker ones. The other symbols retain their previous meanings. This operation still combines evidence from multiple channels, but changes the emphasis within that combination.

The third option keeps the largest powered response across channels:

```
𝒢_maxᵖ(Aₘ) = maxᵢ∈{1,…,Cₘ} |Aₘᵢ|ᵖ
```

The maximum is taken independently at each spatial location. Rather than accumulating channel activity, the output reflects whichever channel has the strongest magnitude there. The authors argue that the powered sum is less dependent on a single response because it retains contributions from multiple channels.

Their preferred mapping is the sum of squared activation magnitudes. In the notation above, that is 𝒢_sum². The paper reports that this choice gives the strongest performance improvement among the tested mappings. It also reports that activation-derived attention is effective while the gradient-derived alternative contributes little, so the method discussion concentrates on activations.

#### Align and normalize attention maps

Different blocks can produce feature maps at different resolutions. Directly comparing their spatial arrays would then be inappropriate: a location in one array would not correspond to a location in the other. SAD therefore includes bilinear resizing when alignment is necessary.

After alignment, a spatial softmax converts the attention values into a normalized distribution over locations. This makes the target describe the relative concentration of activity across the map. The attention generator is written as:

```
Ψ(Aₘ) = Φ(ℬ(𝒢_sum²(Aₘ)))
```

Ψ is the complete attention-generation function. 𝒢_sum² first aggregates squared magnitudes over channels. ℬ denotes bilinear resizing when required to make the spatial dimensions compatible. Φ is spatial softmax, applied after that alignment. Aₘ remains the activation tensor from the selected block.

The ordering matters. The method summarizes activations, brings the resulting map into the required spatial frame, and then normalizes across positions. It does not compare raw channel tensors, and it does not require that the blocks have identical channel counts.

The normalized map is also not a replacement segmentation label. Strong activity can occur around contextual objects that help interpret the road, including vehicles and curbs. The supervised segmentation objective still determines the desired lane output. SAD supplies a different kind of guidance about the organization of internal responses.

#### Make earlier attention resemble later attention

For adjacent selected stages, the distillation objective compares their attention maps using an L₂ loss. The general successive-layer expression is:

```
ℒ_distill = ∑ₘ₌₁^(M−1) ℒ_d(Ψ(Aₘ), Ψ(Aₘ₊₁))
```

ℒ_distill is the total attention-matching loss. M is the number of stages considered in the general expression. ℒ_d denotes the L₂ discrepancy between a pair of normalized attention maps. Aₘ and Aₘ₊₁ belong to successive stages, and Ψ turns each into the comparable spatial representation.

The intended target is the map from the later stage, Ψ(Aₘ₊₁). The earlier stage is encouraged to resemble it. The general expression should not be read as a recommendation to connect every available block: the path experiments show that early-stage matching can be detrimental.

For ENet, the illustrated configuration places attention generators after E₂, E₃, and E₄. E₂ learns from E₃, while E₃ learns from E₄. The later block can encode contextual structure that is less explicit in the earlier representation. The matching objective encourages the earlier block to recover some of that structure while continuing to support the supervised task.

The interaction is reciprocal in a limited architectural sense. E₄ does not receive a target from a later ENet block in this arrangement. Nonetheless, it consumes representations produced upstream. If those representations improve, E₄’s own responses can improve as well. The authors use this dependence to explain why the final block’s attention becomes clearer even without a direct distillation target.

The selected paths receive equal weighting. The authors note that separate path weights are possible, but their experiments use a uniform arrangement. This keeps the tested method relatively simple and limits the number of additional choices needed to introduce it.

#### Combine attention matching with task losses

The full training objective includes segmentation, overlap, lane-existence, and distillation terms:

```
ℒ = ℒ_seg(s, ŝ) + αℒ_IoU(s, ŝ) + βℒ_exist(b, b̂) + γℒ_distill
```

ℒ is the overall objective. s is the annotated segmentation map and ŝ is the predicted map. ℒ_seg is the pixelwise cross-entropy loss. ℒ_IoU is an additional overlap-oriented segmentation loss. b contains annotated lane-existence indicators, while b̂ contains their predictions. ℒ_exist is binary cross-entropy for those indicators. ℒ_distill is the attention-matching term.

The coefficients α, β, and γ determine the relative influence of the auxiliary losses. In the reported implementation, the authors set each of these coefficients to 0.1. Where the lane-existence branch is removed, as in BDD100K, its corresponding prediction task is absent.

The paper writes its IoU-loss expression as:

```
ℒ_IoU = 1 − Nₚ / (Nₚ + Nɡ − Nₒ)
```

Nₚ is defined in the paper as the count of predicted lane pixels. Nɡ is the count of annotated lane pixels, and Nₒ counts pixels shared by the prediction and annotation. The denominator therefore has the form of a union count.

There is a substantive notation issue here. With those definitions, the numerator is the predicted-pixel count rather than the overlap count. That does not match the intersection-over-union quantity described in the accompanying explanation. The expression above preserves the paper’s formula; it should not be silently treated as an unambiguous specification of the intended implementation.

Conceptually, the stated purpose of this extra loss is clear: encourage better overlap between the predicted and annotated lane areas. The attention objective addresses a different problem. It influences internal spatial representations, while the segmentation objectives evaluate the output against the target.

#### Choose when to introduce SAD

The method is motivated by attention that emerges after ordinary supervised learning has made progress. A deeper block that has not yet learned useful road structure is a poor source of contextual guidance. The authors therefore illustrate SAD by first training ENet to 40K episodes and then continuing with the attention objective.

Their attention comparison follows networks trained to 60K episodes. Without SAD, further training produces relatively little change in the illustrated internal maps. With SAD introduced at 40K, the maps become more selective for useful scene structure, and the authors report corresponding detection improvements.

This schedule is a tested example instead of a universal threshold. The timing ablation varies the introduction point and finds similar eventual performance, with differences in convergence speed. The practical interpretation is that the target’s quality evolves during training. Starting the auxiliary objective earlier does not automatically provide more useful teaching.

The paper uses the term episodes for its training duration. It does not provide a conversion that would justify replacing those counts with a different training-unit interpretation. The reported schedules are best understood in the authors’ own terminology.

#### Adapt ENet for lane prediction

The principal architecture begins with ENet’s encoder and decoder. The encoder contains E₁ through E₄, and the decoder contains D₁ and D₂. A small branch, P₁, predicts lane existence. It shares the encoder with segmentation rather than requiring a separate image-processing network.

The authors make additional lane-specific changes. In the existence branch, dilated convolution replaces ordinary convolution to broaden the receptive field without increasing the parameter count. This gives that branch access to a wider spatial context for deciding whether a lane is present.

They also combine features from E₃ and E₄ by concatenation. Their motivation is the loss of detail in the final encoder representation: for CULane, the original E₄ feature resolution is 36 × 100. Combining it with an earlier representation lets the decoder use information that may be less accessible after the final encoding stage.

These modifications matter when interpreting the final detector. ENet-SAD is not merely an untouched ENet with a new loss attached. It is a complete lane-detection configuration incorporating architectural and training choices. Experiments on other backbones and the attention-specific ablations provide additional evidence about the contribution of SAD itself.

For ResNet-18 and ResNet-34, the appendix describes replacing convolutional operations in the last two blocks with dilated versions. Their decoding is based on spatial upsampling. The authors later identify that simpler decoder as a reason these larger backbones can perform slightly below ENet-SAD.

#### Prepare training images and annotations

The experiments resize TuSimple images to 368 × 640 and CULane images to 288 × 800. BDD100K images are resized to 360 × 640 to reduce memory requirements. These settings define the image scale at which the networks learn and are therefore part of the experimental conditions.

BDD100K requires additional target preparation. Its lane markings are represented by paired lines. The authors derive center lines from those annotations and use the center lines as their lane targets. This adapts the data to the binary segmentation formulation used in the paper.

For BDD100K training, the target lanes are dilated to 8 pixels. Test annotations remain 2 pixels wide. The training target is therefore deliberately denser than the evaluation target. That supplies more positive supervision during learning while preserving a narrower test criterion.

Optimization uses stochastic gradient descent with a learning rate of 0.01 and a batch size of 12. Training runs for 1800 episodes on TuSimple, while CULane and BDD100K each require 60K training episodes. The background contribution to cross-entropy is multiplied by 0.4, reducing its influence relative to the lane signal.

The augmentation procedure includes rotation, cropping, and horizontal reflection, with the transformations sampled randomly. The authors apply the same augmentation and segmentation-loss setup to their method, SCNN, the ResNet baselines, and the deep-supervision comparisons. Their official code is made available in the project repository named Codes-for-Lane-Detection.

#### Convert CULane probability maps into lanes

The prediction procedure depends on the dataset. TuSimple and BDD100K do not receive the CULane post-processing pipeline. For CULane, the network produces per-lane probability maps together with the lane-existence vector, and these outputs are converted into continuous lane curves.

First, the probability maps are smoothed using a 9 × 9 kernel. A lane is considered for reconstruction when its existence probability exceeds 0.5. The corresponding map is sampled every 20 rows, selecting the location with the largest probability on each sampled row.

Cubic splines then connect the selected locations. This converts a noisy probability field into a structured lane prediction. The appendix describes the procedure as a way to suppress noise, and the illustrated stages move from image to probabilities, then points, then reconstructed lanes.

This distinction limits a common interpretation of the efficiency claim. SAD itself adds no prediction-time attention matching, but the overall CULane system still includes ordinary output reconstruction. Training-time simplicity and the complete evaluation pipeline are separate aspects of the detector.

### Experiments and results

#### What each dataset tests

The evaluation spans datasets with different road conditions and output requirements. TuSimple is described as the relatively easier benchmark. CULane contains more difficult scenes, including crowded traffic and poor illumination. BDD100K also provides challenging road imagery and frequently contains many nearby lanes.

The paper states that TuSimple and CULane images contain no more than 5 lanes, whereas BDD100K commonly contains more than 8. That difference influences the chosen formulation. For BDD100K, the authors detect lane pixels without assigning them to separate lane instances.

This adaptation is consequential. The BDD100K results measure how well a system identifies lane regions under the paper’s target conversion and evaluation procedure. They do not establish performance on the dataset’s original lane-instance classification problem. A detector could improve binary segmentation while still leaving the identity of neighboring lanes unresolved.

The original BDD100K organization includes 100K frames: 70K assigned to training, 10K to validation, and 20K to testing. Because the test annotations are unavailable to the authors, they use the original validation partition for their test evaluation. They also allocate a separate validation partition from the training data.

This is a legitimate experimental adaptation, but the resulting test designation needs to remain explicit. The reported BDD100K evaluation uses the original validation images, not the original test partition. Its results should be compared under that same condition.

#### Understand the metrics before comparing results

TuSimple uses an accuracy measure based on correctly predicted lane points:

```
Accuracy = N_pred / N_gt
```

N_pred counts lane points judged correct, and N_gt counts annotated lane points. This is a point-based lane metric rather than a general image-classification accuracy. The authors additionally report false positives, abbreviated FP, and false negatives, abbreviated FN.

CULane evaluates complete lane detections through an overlap criterion. Each lane is represented with a width of 30 pixels. A predicted lane is accepted as a true positive when its overlap with the annotation exceeds an IoU of 0.5.

Precision is defined as:

```
Precision = TP / (TP + FP)
```

TP is the number of accepted detections, and FP is the number of incorrect detections. Precision therefore describes the proportion of predicted lanes that satisfy the acceptance criterion.

Recall is defined separately:

```
Recall = TP / (TP + FN)
```

FN counts annotated lanes that were missed. Recall describes how much of the annotated lane set the predictions recover. Both quantities depend on the lane-level matching procedure.

CULane combines them into F₁:

```
F₁ = (2 × Precision × Recall) / (Precision + Recall)
```

F₁ is the harmonic combination of precision and recall. The multiplication signs indicate products. Higher F₁ represents a better balance between accepted predictions and recovered annotations. For the crossroad category, the paper reports false positives rather than the usual category F₁ value.

BDD100K uses lane-pixel accuracy and lane IoU. These evaluate the binary segmentation output. A BDD100K accuracy value should therefore not be interpreted as the same measurement as TuSimple’s lane-point accuracy, even though both are called accuracy.

The different metrics make a cross-dataset ranking inappropriate. The useful comparisons are between systems evaluated on the same dataset with the same target preparation and metric. The paper’s breadth comes from improvement across different evaluation settings, not from treating their scores as interchangeable.

#### The main lightweight result

The principal comparison includes ENet-SAD, SAD-equipped ResNet-18 and ResNet-34, and existing lane detectors. The authors report that ENet-SAD leads the compared systems on BDD100K while remaining competitive on TuSimple and CULane. Their discussion emphasizes the combination of detection quality and a small deployment footprint.

For the CULane comparison with SCNN, the paper reports 20 × fewer parameters for ENet-SAD and a 10 × runtime advantage. These are the authors’ reported factors. Runtime is measured on a single GeForce GTX TITAN X, using an average over 100 samples.

That hardware and averaging procedure define the scope of the timing evidence. The comparison supports efficiency under the reported measurement conditions. It does not supply a general latency guarantee for every image-processing pipeline or deployment platform.

The larger ResNet-18-SAD and ResNet-34-SAD systems do not automatically outperform ENet-SAD. The authors attribute their slightly weaker performance to decoding: the ResNet configurations rely on spatial upsampling, while ENet includes a decoder designed for segmentation. Capacity alone is therefore an incomplete explanation of the benchmark behavior.

The central result is not that the smallest network must always win. It is that the chosen compact encoder–decoder, strengthened by SAD and the other stated lane-detection choices, offers a favorable combination of accuracy and computation in these experiments.

#### SAD also helps a deeper backbone

The paper gives explicit before-and-after measurements for ResNet-101. On the CULane test evaluation, adding SAD changes F₁ from 70.8 to 71.8.

ResNet-101 on the CULane test set, F₁ Self attention distillation improves the deeper backbone on lane detection.

**The numbers**

| System or setting | F₁ |
| --- | --- |
| ResNet-101 | 70.8 |
| ResNet-101 with SAD (this paper) | 71.8 |

This comparison broadens the mechanism beyond the lightest detector. SAD is useful even when applied to a deeper backbone, so its contribution cannot be reduced to compensating for ENet’s small capacity. At the same time, the experiment does not establish that the benefit grows with depth or that a deeper architecture offers the best efficiency tradeoff.

For the paper’s BDD100K evaluation, ResNet-101 accuracy changes from 34.45% to 35.56% after SAD is added.

ResNet-101 on the adapted BDD100K test evaluation, lane-pixel accuracy The same internal distillation method also improves binary lane segmentation.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| ResNet-101 | 34.45 |
| ResNet-101 with SAD (this paper) | 35.56 |

These BDD100K values belong to the binary lane task evaluated on the original validation partition. They should not be read as instance-classification results or official test-partition scores. Keeping that condition attached to the numbers is necessary to understand what improved.

#### What the qualitative results add

The TuSimple and CULane visual examples show ENet-SAD recovering lanes more accurately than the ENet baseline. Additional examples suggest that irrelevant road objects interfere less with its predictions than with SCNN’s. These images provide concrete illustrations of the behavior behind the aggregate evaluation.

For BDD100K, the paper visualizes lane probabilities rather than only final curves. ENet-SAD’s maps are described as more concentrated and less noisy under weak lighting. That observation fits the proposed mechanism: stronger contextual representations should help distinguish meaningful lane structure from visually confusing background.

The attention visualizations offer a related internal view. With SAD, responses become more focused around lanes and contextually useful objects such as vehicles and road curbs. The authors interpret these maps as evidence that the auxiliary objective helps representations capture scene structure.

These demonstrations remain selected examples. They make the proposed effect easier to understand, but do not replace the benchmark metrics. The paper also acknowledges that BDD100K performance remains inadequate in difficult scenes, including heavy occlusion and poor illumination. Improvement and unresolved failure coexist in its own assessment.

### What the ablations show

#### Transfer direction is part of the method

SAD is not simply a request for every layer to resemble every other layer. Its useful direction is from a deeper source towards a shallower recipient. The authors test the reverse arrangement, making higher-level attention imitate lower-level attention, and report a deterioration on TuSimple.

In that experiment, ENet accuracy changes from 93.02% to 91.26%. The higher value is the original ENet setting in this comparison; the lower value belongs to backward distillation.

Transfer direction in the TuSimple ENet experiment, accuracy Making deeper attention imitate shallower attention reduces accuracy.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| ENet reference setting (this paper) | 93.02 |
| ENet with backward distillation | 91.26 |

The authors explain this through the distinction between local detail and global context. Earlier maps contain fine visual information and more noise. Making a later representation reproduce those maps can interfere with the broader organization it has learned.

The numerical result establishes that the tested reverse scheme is harmful. The accompanying mechanism is an interpretation consistent with the architecture and visualizations. The experiment does not isolate every possible property of early attention, but it does reject the idea that transfer direction is an incidental implementation choice.

#### Early blocks should retain their local role

The path ablations also vary which ENet blocks participate. Matching attention among intermediate and later blocks works well. Introducing the same kind of constraint into low-level blocks reduces performance.

The proposed explanation is functional specialization. Early processing needs to preserve edges, textures, and other local evidence. Later processing combines information over a broader context. A loss that demands later-style attention too early can weaken the local information that the whole network depends on.

This result helps define the successful method more narrowly. The phrase layer-wise distillation does not imply uniform supervision at every depth. The useful configuration selects a subset of stages where the representations are sufficiently compatible.

It also gives a reason to distinguish internal attention matching from ordinary extra labels. The loss does not merely provide more examples of the same target. It changes what a block is encouraged to represent. Whether that change is helpful depends on the block’s role in the computation.

#### Neighboring blocks are better teachers in the tested paths

The paper compares successive transfer with transfer that skips an intermediate block. Using its notation, Pᵢⱼ means that block i is trained to imitate block j. The combination P₂₃ with P₃₄ performs better than P₂₄ with P₃₄.

The authors conjecture that adjacent representations are more compatible in semantic terms. Their attention maps need not be identical before distillation, but the gap between them may be easier to bridge without discarding useful information.

The general set of potential deeper-to-shallower paths is described by:

```
Number of possible paths = M(M − 1) / 2
```

M is the number of ordered stages. The expression counts all pairs in which an earlier stage could learn from a later one. It describes the available design space, not a recommendation to activate all those connections.

The experimental result favors selected, successive paths over simply adding longer-range matching. A larger set of auxiliary relationships is therefore not automatically a better training signal. The arrangement of the relationships matters.

#### SAD outperforms direct intermediate supervision

The authors compare attention matching with deep supervision. In their implementation of deep supervision, intermediate features are converted into segmentation predictions using a 1x1 convolution and bilinear resizing. Cross-entropy then compares those predictions directly with the annotations.

They find the most effective deep-supervision placement among blocks 2 through 4. Even with that placement, SAD provides larger improvements across the tested benchmarks. This comparison is useful because both methods add training pressure inside the network.

Their targets differ. Deep supervision asks an intermediate stage to predict the final label structure. SAD asks it to match a spatial pattern that has emerged in later processing. The latter can include contextual regions outside the narrow lane annotations.

The authors offer two explanations. First, attention targets contain softer contextual information than sparse segmentation labels. Second, the deeper-to-shallower constraint establishes an additional relationship between successive representations, while improvements upstream can subsequently benefit downstream processing.

Those explanations are plausible accounts of the observed comparison. They do not show that direct intermediate supervision is always inferior. The evidence concerns the tested prediction heads, losses, placements, and lane-detection settings.

#### The lane-existence branch does not explain most of the benefit

Because the existence branch shares the encoder, its supervision could improve the representations used for segmentation. The authors therefore test a configuration in which gradients from P₁ are blocked from reaching the main branch.

With that influence removed, ENet-SAD still reaches 96.61% on TuSimple, 70.8 on CULane, and 36.54% on BDD100K. The dataset-specific meanings remain important: TuSimple uses lane-point accuracy, CULane uses F₁, and the BDD100K evaluation uses lane-pixel accuracy.

The authors interpret this as evidence that the main benefit comes from SAD rather than from extra supervision supplied by the existence branch. It is a targeted control because it interrupts the proposed alternative learning route while retaining the attention-based training idea.

The conclusion should retain that scope. Blocking this branch does not separately remove feature concatenation, augmentation, or every other design decision. It addresses one particular explanation for the observed gains.

#### Target maturity affects convergence

The timing experiment introduces SAD at different points in training. Its key finding is that the final performance is nearly the same across the tested introduction times, while the convergence trajectories differ.

The authors attribute this to target maturity. Early in learning, deeper attention has not yet acquired reliable structure. Asking earlier blocks to match it supplies weaker guidance. Later in learning, the same architectural relationship can convey more useful contextual information.

This finding supports a scheduling consideration instead of a unique mandatory start point. The 40K introduction used in the illustrated ENet experiment is a concrete successful choice. The timing analysis does not establish that this number should be reused for another dataset or architecture.

It also moderates a simple intuition about auxiliary learning. More time under an extra objective does not necessarily mean faster improvement. The objective becomes useful when the signal it supplies becomes useful, and those are different questions.

### Limitations

#### Limits the authors explicitly acknowledge

The authors state that difficult BDD100K scenes remain poorly solved. Heavy occlusion, poor lighting, and the presence of many lanes challenge every compared system. SAD improves the reported results, but the paper does not present that improvement as sufficient for reliable lane understanding under those conditions.

They also identify limits within the method itself. Low-level blocks can be harmed by the attention constraint, and backward transfer reduces performance in the reported TuSimple experiment. These failures show that internal supervision has to be chosen carefully. A target generated within the same network is not automatically useful to every part of it.

The activation-versus-gradient comparison places another boundary around the successful recipe. The paper reports useful gains from activation-derived attention but little benefit from the gradient-derived alternative. Its positive conclusions therefore concern a particular attention construction, rather than all possible ways of extracting an internal importance signal.

Finally, the discussion proposes saliency detection and image matting as possible extensions. These are future directions in the paper, not demonstrated applications. The experiments establish lane-detection results across several convolutional architectures; they do not establish general effectiveness across all tasks requiring detailed visual prediction.

#### Limits of the evaluation setup

A careful reader should distinguish the adapted BDD100K task from its original instance-oriented purpose. The authors derive center-line targets, train with dilated annotations, and evaluate binary lane segmentation. This makes the task suitable for their comparison, but it removes the requirement to distinguish individual nearby lanes.

The test partition also differs from the original dataset designation. The BDD100K measurements use the original validation images because the original test labels were unavailable. Those results are meaningful under the stated protocol, but they cannot be silently equated with results on a different partition.

Annotation width deserves attention as well. BDD100K training uses 8-pixel targets while evaluation preserves 2-pixel targets. The method is therefore tested with a particular form of target densification alongside SAD. Its success does not show that sparse annotations become irrelevant or that label preparation has no influence.

Cross-dataset metrics measure different things. TuSimple counts correct lane points, CULane evaluates accepted lane detections, and BDD100K evaluates lane pixels. Evidence across all of them supports breadth, but their numerical values cannot be compared as if they shared a common scale.

#### Limits of attribution and mechanism

The complete ENet-SAD system combines several changes. Feature concatenation, the existence branch, dilated convolution, overlap-oriented training, augmentation, and attention matching all belong to the experimental configuration. The paper takes useful steps to test SAD separately, but the headline detector should still be understood as that complete configuration.

The comparisons with LaneNet and EL-GAN have a further qualification. Their results are taken from their publications because their source code was unavailable to the authors. By contrast, several other systems are trained with the common segmentation-loss and augmentation setup. The comparison therefore does not place every named method under an identical retraining procedure.

Attention visualizations support an interpretation of improved context use, but they do not establish a complete causal account. A map that highlights a vehicle or curb may be consistent with useful scene understanding. It does not, on its own, prove which highlighted information determines a particular prediction.

Likewise, describing a deeper map as a target does not make it ground truth. The network can produce mistaken or unhelpful patterns. The timing and path ablations demonstrate practical consequences of that issue, but the paper does not provide a general test that certifies the quality of an attention target.

#### Limits of efficiency and reproducibility claims

The no-extra-inference-cost claim concerns SAD’s auxiliary training mechanism. It does not mean training has no additional work. Attention generation and loss evaluation are part of optimization, and the paper does not quantify their complete training-resource cost.

The runtime comparison also belongs to the reported hardware and measurement procedure. A parameter advantage and a measured speed advantage are valuable evidence, but they do not establish identical behavior across processors, image resolutions, or surrounding application code.

The IoU-loss notation creates a separate reproducibility concern. The written numerator and the stated variable definitions do not describe ordinary intersection-over-union consistently. A precise reconstruction would need to resolve that ambiguity rather than assume the formula and prose are interchangeable.

Finally, these benchmarks do not establish deployment safety. The reported metrics and examples describe detection behavior on the tested data. They do not evaluate every consequence of a missed lane, characterize all unfamiliar road conditions, or demonstrate a complete driving system. That is a limit of what is measured, instead of an additional claim the authors make.

### What came after

A specific account of later papers building on SAD cannot be established from this paper alone. The references describe its predecessors, and the discussion identifies possible next applications, but neither supplies evidence about subsequent outcomes. There is therefore no supported later-work lineage to name or rank here.

The authors’ clearest forward-looking proposal is to test internal attention distillation on saliency detection and image matting. Their reasoning is that these tasks also require detailed spatial representations. The lane-detection experiments make that proposal understandable: a later representation can contain useful context that is only weakly expressed by sparse local supervision. Whether the same training relationship helps those other tasks remains an open empirical question in this paper.

Another proposed direction concerns the choice of transfer relationships. SAD permits more connections than the successful neighboring-block configuration uses, and the authors note the possibility of assigning different weights to different paths. Their own ablations caution that expanding this design space is not automatically beneficial. Future work would need to preserve useful differences between stages while deciding which information should be shared.

The durable research question is consequently narrower and more useful than a universal claim about self-teaching. When does a network develop an internal representation that can guide another part of the same computation, and what should be compared between them? This paper answers that question for a concrete lane-detection setting: selected deeper activation summaries provide effective training targets for selected earlier blocks. Its strongest contribution is the combination of that simple mechanism, a deployment-friendly implementation, and experiments that show both where the mechanism helps and where it fails.

## Cite

Cite as Yuenan Hou, Zheng Ma, Chunxiao Liu and Chen Change Loy. 2019. Learning Lightweight Lane Detection CNNs by Self Attention Distillation. IEEE/CVF International Conference on Computer Vision (ICCV).

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.1109/iccv.2019.00110](https://doi.org/10.1109/iccv.2019.00110) · [arXiv 1908.00821](https://arxiv.org/abs/1908.00821)

```bibtex
@inproceedings{hou2019learning,
  title = {{Learning Lightweight Lane Detection CNNs by Self Attention Distillation}},
  author = {Yuenan Hou, Zheng Ma, Chunxiao Liu and Chen Change Loy},
  booktitle = {IEEE/CVF International Conference on Computer Vision (ICCV)},
  year = {2019},
  doi = {10.1109/iccv.2019.00110},
  eprint = {1908.00821},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1109/iccv.2019.00110}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
