Learning from Pattern Completion: Self-supervised Controllable Generation

Zhiqiang Chen, Guofan Fan, Jinying Gao, Lei Ma, Bo Lei, Tiejun Huang, Shan Yu

Abstract

Traditional controllable image generation models rely heavily on large-scale, manually annotated datasets, creating a significant bottleneck for scalability and generalization. This paper introduces the Self-supervised Controllable Generation (SCG) framework, which leverages modular autoencoders and equivariance constraints to learn visual representations without explicit labels. By mimicking the human brain's ability to perform pattern completion, the SCG framework spontaneously develops features such as orientation selectivity and color antagonism. Experimental results demonstrate that SCG outperforms supervised baselines like ControlNet in structural and semantic fidelity, while showing remarkable zero-shot generalization to "in-the-wild" data, including ancient rock art and sketches.

Introduction

Current state-of-the-art controllable generation models, such as ControlNet, have revolutionized image synthesis by allowing users to guide the generative process with spatial conditions like depth maps or sketches. However, these models are inherently "data-hungry," requiring massive paired datasets where every image is matched with a specific control signal. This dependency limits their application to domains where labels are scarce and hinders their ability to handle novel, unannotated control signals.

In contrast, the human visual system exhibits a remarkable capacity for associative generation. We can perceive a simple charcoal sketch or ancient rock graffiti and immediately visualize the complex, real-world object it represents. This ability stems from the brain's modular architecture and its capacity for pattern completion. Inspired by these biological principles, we propose the Self-supervised Controllable Generation (SCG) framework, which learns to associate visual attributes through self-supervision rather than manual annotation.

Methodology

The SCG framework is built upon two core components designed to facilitate the emergence of controllable features from raw data.

1. Modular Autoencoder with Equivariance Constraints

To achieve feature separation without labels, we utilize a modular autoencoder where the latent space is partitioned into independent modules. To force these modules to specialize in specific visual attributes (e.g., color, brightness, or edges), we introduce a modular equivariance constraint.

During training, simple geometric transformations—such as rotation or translation—are applied to the input images. The network is then tasked with predicting how these transformations affect the representations within specific modules. This process encourages "inter-module independence" and "intra-module correlation." Consequently, the system spontaneously learns to disentangle fundamental visual properties, mirroring the functional specialization found in the biological primary visual cortex (V1).

2. Pattern Completion Module

Once the autoencoder has learned to extract specialized features, the framework treats the task of controllable generation as a "pattern completion" problem. These self-supervised features serve as the control conditions for a diffusion model. By leveraging a generative adapter (similar to the ControlNet architecture), the model learns to map these abstract modular representations back into high-fidelity images. Because the initial feature extraction is entirely self-supervised, the entire pipeline can be trained on raw, unlabelled image repositories.

Experimental Results

Quantitative Performance

The SCG framework was evaluated on standard benchmarks, including MNIST, ImageNet, and MS-COCO. On the MS-COCO dataset, SCG demonstrated superior performance compared to supervised ControlNet models. Specifically, SCG achieved a CLIP score of 0.958, significantly higher than the 0.846 achieved by the supervised baseline. This indicates that the images generated by SCG maintain higher semantic consistency with the input conditions. Furthermore, SCG showed improved structural similarity (SSIM) across various test sets.

Biological Plausibility and Robustness

A striking result of the modular equivariance constraint is the spontaneous emergence of brain-like features. Without any human guidance, the autoencoder developed Gabor-like orientation selectivity and center-surround receptive fields.

This biological inspiration also translates to increased robustness. When processing "in-the-wild" data—such as ancient rock graffiti or rough sketches—SCG proved more resilient to visual noise than traditional supervised methods. For example, while a standard Canny edge detector might be confused by the rough texture of a rock surface, the SCG framework successfully ignores the "noise" of the medium to focus on the underlying structural pattern.

Zero-Shot Generalization

The model's ability to generalize was tested on diverse artistic styles, including oil paintings, ink paintings, and manual sketches. In human preference studies, SCG-generated images were consistently rated higher for aesthetics and fidelity than those produced by supervised models, despite SCG never having seen these specific artistic domains during training.

Conclusion and Future Work

The SCG framework represents a significant step toward more efficient and biologically inspired generative AI. By replacing manual labels with self-supervised equivariance constraints, we demonstrate that models can learn complex control signals directly from raw data.

While the current version of SCG excels at capturing low-level visual features like edges and color, future research will aim to induce higher-level semantic hierarchies, such as 3D depth, motion, and complex object parts. By scaling these modular structures within larger generative architectures, we hope to move closer to a truly universal system for controllable image synthesis.

Summary updated

BibTeX
@inproceedings{chen2024learning,
  author = {Zhiqiang Chen and Guofan Fan and Jinying Gao and Lei Ma and Bo Lei and Tiejun Huang and Shan Yu},
  title = {{Learning from Pattern Completion: Self-supervised Controllable Generation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=83pV20DD2s},
}
Figure