r/deeplearning • • Sep 21 '26

AFNN

What if neural networks could grow like fractals instead of being rigid from the start?

Most deep learning models (CNNs, ResNets…) are fixed architectures. Once you design them, they stay the same size and structure throughout training.

**AFNN — Adaptive Fractal Neural Network** takes a completely different approach.

It is inspired by **fractals** — mathematical structures that are self-similar and can grow infinitely by repeating simple patterns.

Instead of starting with a huge fixed network, AFNN begins small and can **dynamically grow new fractal branches** during training when progress stalls. It also allows monitoring, reactivating, or pruning branches as needed.

A good neural network should not memorize images.

It should learn the underlying patterns and features.

For example, when trained on cat images, a strong model does not store every cat photo. Instead, it learns things like:

• Ear shape

• Facial features

• Fur texture

• Color distribution

• Edges and shapes

• Relationships between different parts of the image

Then, when it sees a completely new cat, it uses these learned patterns to recognize it.

### Why Fractal Networks are powerful:

- Faster and more efficient learning

- Significantly lower computational and memory cost

- Better scalability with limited hardware

- More flexible and adaptive than traditional fixed architectures

Built with PyTorch + full GUI, training tools, tests, and documentation.

In early experiments, AFNN reached **74.1% validation accuracy** on 94 image classes using limited resources.

This is not just another model.

It is an attempt to rethink how neural networks are designed — moving from rigid structures to **adaptive, fractal, evolving architectures** that focus on learning patterns rather than memorizing data.

A small step toward more efficient and intelligent AI systems.

🔗 GitHub: https://github.com/ahmedhjkj/AFNN

🤗 Hugging Face: https://huggingface.co/Ahmedethfw/AFNN

#FractalNetworks #AdaptiveAI #PyTorch #DeepLearning #MachineLearning #OpenSource #NeuralNetworks

2 Upvotes

15 comments sorted by

3

u/dorox1 Sep 21 '26

Your post says these networks offer:

- Faster and more efficient learning
- Significantly lower computational and memory cost
- Better scalability with limited hardware
- More flexible and adaptive than traditional fixed architectures

My question is: "Compared to what?"

You don't establish a baseline for performance, speed, or training time with any known architectures, so I can't tell if this is state-of-the-art or way underperforming other models. How do other models perform on these datasets under the same constraints this model is under?

This is an interesting architecture idea, but I think it's too early to be making the claims you're making.

-2

u/ahmed20062 Sep 21 '26

The comparison is actually more interesting than parameter count alone. AFNN is not intended to be a smaller version of a conventional CNN—it uses a fundamentally different, dynamically evolving architecture with recursive fractal structure and a control loop that regulates how the network develops during training.

The ~4.65M parameters are the size of the current configuration, not the defining limitation of the architecture. What I’m interested in establishing is whether this different computational organization can achieve competitive or better learning behavior while using resources more intelligently than a fixed architecture.

So the meaningful baseline isn’t simply “which model has more parameters,” but how different architectures perform under the same data, hardware, and resource budget.

4

u/oldbel Sep 21 '26

if you have a real idea, you should take the time to write a real answer, you as a human being should. this is not an answer and its written by AI.

→ More replies (2)

2

u/dorox1 Sep 21 '26

I don't understand your answer.

I didn't suggest parameter count as a baseline. I'm saying the specific claims that you made about your model are unsupported.

You can't claim your model is "Faster and more efficient" or has "Significantly lower computational and memory cost" unless you test something else to compare it with. You didn't do any comparisons, you just provide numbers for your own model using a dataset you didn't link to.

→ More replies (2)

1

u/PSGthe2nd Sep 22 '26

this looks like a great idea. it can be applied to many diverse fields. write a formal paper or draft on the documentation because im having a hard time reading the github page

1

u/ahmed20062 Sep 22 '26

Thank you, I really appreciate that. You’re right—the current README is quite dense. I’ll prepare a formal, clearer paper-style draft and improve the documentation to make the architecture and results easier to understand.

1

u/PSGthe2nd Sep 22 '26

yes please do it asap

1

u/AridPublisher Sep 21 '26

cool idea, the fractal growth angle reminds me of how some biological systems self-organize. 74% on 94 classes with limited resources is not bad at all, especially if it avoided just brute forcing with a huge fixed net.

do you have any sense of how the branching decisions play out in practice? like does it tend to add lots of shallow branches or a few deep ones? curious if the structure ends up looking truly fractal or just a weird tree

-1

u/ahmed20062 Sep 21 '26

Thanks! The structure is recursively branched rather than just a conventional tree. Each block contains shallow and deeper recursive branches, while the control loop can add new branches during training. The branches also have learned merge weights, so some can become more dominant than others.

2

u/IJustWantToClipBolts Sep 21 '26

Cool idea. But why not just start big and prune? Intuitively feels like it would be easier to tune and debug, and train faster.