Dense Connections vs. Residual Paths: How DenseNet-121 Outperforms ResNet-50 in Brain Cancer Detection ✛

Original: "Evaluation and optimization of deep learning models for enhanced detection of brain cancer using transmission optical microscopy of thin brain tissue samples"
arXiv:2505.11735 · 2025-05-16 · CC BY 4.0 · 2 min
Comparing two neural networks on thin brain slice images shows that dense connections between layers yield 88.35% accuracy versus 82.12% for a network with skip connections.

A brain tissue slice is just 5 microns thick, twenty times thinner than a human hair. On such a slice, a pathologist looks for signs of a tumor: altered nuclear shapes, cell crowding, abnormal blood vessels. It is painstaking work, and two specialists can disagree on the same image. In this context, a neural network is not a replacement for the doctor but a second pair of eyes that examines the image with machine-like persistence and accuracy measured to fractions of a percent.

A densely connected network is like a team where every layer hears from all previous layers, not just its immediate neighbor. In DenseNet-121, each block receives as input not only the output of the previous block but also all earlier feature maps. Information does not get lost along the way, as in the game of telephone, but accumulates into a comprehensive picture. ResNet-50 has shorter connections: skip connections jump over one or two layers, so distant layers must pass messages through intermediaries. When transferring knowledge from a large task to a small one, transfer learning, the dense team proves more cohesive: it finds patterns in the small set of 2931 images more quickly.

DenseNet-121 produced only 12 false positives out of 498. This means that out of a hundred healthy slices, the network mistakenly calls fewer than three cancerous. For clinical use, such caution matters more than catching every diseased sample.

The two-stage fine-tuning with freezing and subsequent unfreezing of deep blocks, along with aggressive data augmentation, which artificially expands the dataset through random rotations, reflections, and shifts, prevented overfitting. The network learned not to memorize specific images but to extract stable disease features. On the held-out test set, DenseNet-121 achieved 88.35% accuracy, while ResNet-50 achieved 82.12%. The difference of 6.23 percentage points is statistically significant: the probability of a random discrepancy is less than half a percent.

What does this mean for practice? Previously, it was unclear which popular architecture is better suited for classifying brain tissue images with a limited set of labeled data. Now it is clear: dense connections provide an advantage. The training protocol can be directly transferred to other binary classification tasks on histological images, such as detecting metastases in lymph nodes or assessing tumor malignancy grade. The next step is multiclass grading and explainability maps that show the doctor which parts of the image the network relied on. Then the second pair of eyes will be not only accurate but also transparent.

The brain tissue slices in the study are just 5 microns thick, about 20 times thinner than a human hair. Meanwhile, the DenseNet-121 network contains about 8 million trainable parameters, which is one parameter for every 0.37 images in the dataset.

Concepts
brain cancer detection deep learning in medical imaging deep neural network Convolutional Neural Networks transfer learning medical image analysis tumor segmentation pattern recognition speech recognition brain scan transformers retina tumor imaging characterization cancer drug discovery training data Large Language Models training protein language model predictive model computed tomography