Random Convolutions: A Simple Way to Boost Generalization

SVG Icon Editor

Figure 1: Source: [2]

AI and deep learning have recently transformed medical imaging by enabling automated analysis of complex radiological data, such as detecting lesions, segmenting organs, and predicting disease progression. These methods learn visual representations directly from large datasets and have achieved impressive results across many clinical tasks.

In standard computer vision tasks, deep learning models often suffer from overfitting, where they learn dataset-specific patterns instead of generalizable visual concepts. For example, an object recognition model trained only on images taken with a specific camera or under certain lighting conditions may perform poorly when evaluated on images from a different camera, environment, or background. Although the objects remain the same, subtle changes in image statistics can cause a significant drop in performance.

A similar problem occurs in AI for medical imaging, where domain shift arises when training and test data differ due to variations in scanner vendors, magnetic field strengths, acquisition protocols, or reconstruction pipelines. In clinical tasks such as multiple sclerosis (MS) lesion segmentation, these differences can substantially alter image appearance, leading models to fail when deployed across institutions or imaging centers.

Standard data augmentations like rotations, flips, and intensity perturbations help to some extent, but they often fail to capture realistic variations in imaging characteristics. Random Convolutions (RC) offer a simple yet powerful alternative by exposing models to a wide range of plausible texture and intensity variations while preserving the global structure of anatomical objects [1, 2]. In this blog article, we present our recent work on RC in medical imaging and discuss its practical implications in detail [2].


What Are Random Convolutions and How Are They Used in Practice?

As shown in Figure 1, A convolutional neural network (CNN) is a type of neural network commonly used for image analysis that processes images using small filters (called convolutions) to detect patterns such as edges, textures, and shapes. Random Convolutions (RC) augment an input image by passing it through a shallow convolutional network with randomly sampled filters. The network has depth L, where depth refers to the number of convolutional layers in the CNN, and each convolution uses random kernels of spatial size k × k.

The input image can be viewed as a tensor of size C × H × W, where C denotes the number of channels and H and W denote the spatial dimensions. Each random convolution layer applies a kernel that spans all C channels and has spatial size k × k. The kernel values are randomly sampled from a zero-mean Gaussian distribution with variance σ², and a new set of kernels is drawn for each layer ℓ = 1, …, L.

The RC transformation is obtained by sequentially applying the L random convolution layers to the input image, resulting in a transformed image that preserves the overall anatomical structure but exhibits altered texture statistics. The kernels are re-sampled for each mini-batch, gradients are not propagated through them, and only the parameters of the downstream segmentation network are optimized.

In practice, RC is used as a preprocessing augmentation. The input image is first transformed by the random convolution module and then processed by a standard segmentation framework. At inference time, the RC module is removed and the network operates on the original, unaltered images. Empirically, RC preserves anatomical structures while introducing significant textural variation, improving robustness to domain shift without degrading in-domain performance.


Random Convolutions for Domain Randomization and Improved Generalization

RC can be viewed as a form of implicit domain randomization. Instead of explicitly modeling scanner physics or performing computationally expensive style transfer, RC generates new domains by perturbing texture statistics in a simple and task-agnostic manner. This highlights an important insight: robustness does not require realistic simulations of new domains—often, it is sufficient to prevent the model from relying on spurious appearance cues.

Convolutional neural networks are known to rely heavily on local texture cues. Although this inductive bias can improve performance on in-distribution data, it becomes problematic under domain shift, where texture statistics differ between training and deployment data, as is common in medical imaging. By applying L random convolutions with kernel size k, RC introduces strong textural variability while preserving underlying anatomical structure. This encourages the network to rely more on shape, spatial context, and global morphology, which tend to be more invariant to scanner and protocol variability.


Limitations and Extensions

The effectiveness of RC depends on the choice of depth L and kernel size k. Very large values can distort semantic content, while overly small values may not introduce sufficient variability.

To address this, later work proposed progressive random convolutions, which carefully control the depth and strength of random filtering to balance appearance diversity and structural fidelity.


Key Takeaways

  • Random convolutions use a shallow network of depth L with random kernels of size k as a data augmentation strategy.
  • They introduce strong textural variability while preserving anatomical structure.
  • In medical imaging tasks such as MS lesion segmentation, they significantly improve robustness to domain shift.
  • Their simplicity and low computational cost make them well suited for real-world deployment with heterogeneous data.

Random convolutions show that carefully controlled randomness at the input level can substantially improve how models generalize beyond the data they were trained on.


References

[1] Choi, S., Das, D., Choi, S., Yang, S., Park, H., & Yun, S. (2023).
Progressive Random Convolutions for Single Domain Generalization.
Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 10312–10322.

[2] Varma, A., Scholz, D., Erdur, A. C., Peeken, J. C., Rueckert, D., and Wiestler, B. (2026).
Improving out-of-domain generalization in Multiple Sclerosis detection and segmentation using Random Convolutions.
Pattern Recognition Letters, Elsevier (ScienceDirect).

RELATED

  • Responsible Textual Generative Models (Part I): Generating Truthful Content

    Figure 1: Multimodal illustration (MLLM). Subfigure (a): intrinsic hallucination—the output is inconsistent with the input (no fence appears in the image). Subfigure (b): extrinsic hallucination—the output adds a geographic claim that conflicts with a widely accepted fact (the species is associated with North America, not the United Kingdom). Source: Adapted from Ji et al. (2023). 2 The … Read more

    ... more
  • Neuromorphic Computing: A Brain-inspired Approach to Robot Intelligence

    Figure 1: Depiction of a humanoid robot and brain-inspired neural networks. (Note: The Craiyon tool was used to generate the image of the robot.) Looking to the Brain for Next-Gen AI With the explosive advent of artificial intelligence (AI), from impressively articulate conversational agents to increasingly autonomous robots of various embodiments, it is easy to forget the … Read more

    ... more
  • Introduction to Embodied Instruction Following

    Figure: A home robot helps to place the book following human instruction. The figure is generated by Gemini 2.5 Flash AI model. Imagine asking your home robot: ”Hey, robot – can you go check if there is a blue book on the table? If so, please place it on the shelf.” This isn’t just a scene from … Read more

    ... more
  • From Unlucky Strikers to Statistical Learning Theory

    Figure: A footbal fan excited for his team. Image generated by an AI model. Suppose a new striker joins your favorite Bundesliga team. Fans are excited, the club has paid an enormous transfer fee, and expectations are huge. The new season starts. And then, he only scores a single goal in his first ten games. As a … Read more

    ... more
  • Performative Prediction

    Performative Prediction Machine learning systems are increasingly used to support decision-making processes (Fischer-Abaigar et al., 2024). Yet, these systems do not merely reflect the world—they also reshape it. Once deployed, predictions can influence behaviors, alter policies, and redirect resources, creating feedback loops that change the very data-generating processes they aim to model. Consider a traffic routing application … Read more

    ... more
  • What even is differential privacy?

    Machine learning (ML) technologies are set to revolutionize various fields and sectors. ML models can learn from text, image and various other forms of data by automatically detecting patterns. Their successful application, however, relies heavily on access to extremely large datasets (some state-of-the-art language models are trained on the whole internet). For many interesting applications, such datasets … Read more

    ... more
  • Mitigating Domain shifts

    Deep neural networks often perform well on trained data. However, on unseen data they usually fail to generalize and accompany performance degradation (Vu et al., 2019). This degradation of performance affects systems deployed in real-world environments such as processing images for self-driving cars, processing street views, generating text, and examining cells and tissues through various scanners deployed. … Read more

    ... more
  • A gentle introduction to uncertainty quantification

    Success stories about artificial intelligence (AI) focus on its remarkable predictive power. Take, for instance, your smartphone’s ability to recognize your face on photos and collect them into a “Selfies” folder ready to supply snaps for social media. When it comes to more safety-critical tasks, like using facial recognition for security at a high-stakes research lab, simple … Read more

    ... more
  • Welcome to the relAI Blog

    Welcome to the relAI blog of the Konrad Zuse School of Excellence in Reliable AI (relAI). This blog will serve as a platform to share cutting-edge research and developments from our school, highlighting the significant strides we are making towards making AI systems safer, more trustworthy, and privacy-preserving. The vision of the relAI program is to train … Read more

    ... more