Inferring Iterated Function Systems Approximately from Fractal Images

Haotian Liu, Dixin Luo, Hongteng Xu

Abstract

Fractal geometry offers a powerful framework for modeling complex natural structures, yet inferring the underlying mathematical rules from a given image—the inverse problem—remains a significant challenge. This paper presents a novel multi-head autoencoder architecture designed to solve this problem across diverse fractal families, including Julia sets and L-systems. By employing a semi-supervised learning strategy that integrates labeled simulations with large-scale unlabeled datasets, the model learns a universal representation of fractal structures. Our results demonstrate high accuracy in parameter estimation and rule generation, outperforming traditional vision transformers and showing promise for applications in biological modeling and digital art.

Introduction

Fractals are complex geometric structures characterized by self-similarity across scales, appearing in everything from the branching of trees to the intricate patterns of snowflakes. While generating a fractal from a set of mathematical rules—such as an Iterated Function System (IFS)—is computationally straightforward, the "inverse problem" of inferring those rules from a visual representation is notoriously difficult.

The challenge stems from three primary factors: an effectively infinite search space of parameter combinations, the heterogeneity of mathematical languages (e.g., continuous Julia sets vs. discrete L-system grammars), and extreme sensitivity, where minute parameter shifts result in drastically different visual outputs. This research introduces a unified framework to bridge the gap between visual form and mathematical origin.

Proposed Architecture

To address the diversity of fractal types, the authors propose a multi-head auto-encoding architecture. At its core is a shared convolutional encoder that maps input images into a d-dimensional latent space, capturing a universal representation of "fractal-ness."

The multi-head autoencoder architecture for fractal rule inference.

As shown in Figure 1, the architecture utilizes three specialized decoders:

  1. Sequential Predictor: A Transformer-based head that decodes latent vectors into discrete grammatical rules for L-systems.
  2. Non-sequential Predictor: A regression network that estimates numerical parameters, such as the complex constant $c$ for Julia sets.
  3. Image Decoder: A reconstruction head that rebuilds the original image, facilitating semi-supervised learning.

Semi-Supervised Learning and Datasets

A key innovation of this work is the use of semi-supervised learning to overcome the scarcity of labeled data. The model was trained on a combination of 20,000 labeled synthetic images (Julia sets and L-systems) and 12,000 unlabeled images from the FractalDB60 benchmark. The image reconstruction task acts as a regularizer, ensuring the latent space captures meaningful structural information rather than just memorizing specific labels.

Key Insights and Results

The study yielded several significant findings:

  • CNN Superiority: DenseNet architectures outperformed Vision Transformers (ViTs). The authors suggest that CNNs better preserve the global spatial patterns and self-similarity critical to fractal identification, which patch-based ViT tokenization may disrupt.
  • Latent Space Continuity: t-SNE visualizations revealed that the inclusion of unlabeled data "filled the gaps" between disparate fractal families, creating a continuous manifold that significantly improved generalization.
  • Performance Metrics: The model achieved a Mean Absolute Error (MAE) as low as 0.0497 for Julia set parameters and high BLEU/ROUGE scores for L-system rule generation. Visual similarity tests (SSIM and LPIPS) confirmed that images generated from inferred rules were nearly indistinguishable from the originals.
Examples of complex fractal structures processed by the model.

Conclusion

This multi-head approach successfully demonstrates that deep learning can decode the complex mathematical "DNA" of fractals directly from images. By unifying discrete and continuous fractal families within a single latent space, the model opens new avenues for biological modeling and the automated analysis of complex natural patterns. Future work will focus on expanding the model's vocabulary to handle even more randomized and complex rule sets.

This summary is based on research presented at IJCAI-24.

Summary updated

BibTeX
@inproceedings{liu2024inferring,
  author = {Haotian Liu and Dixin Luo and Hongteng Xu},
  title = {{Inferring Iterated Function Systems Approximately from Fractal Images}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2024},
}
Figure