Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add ResNet50 dendritic optimization example#97

Open
PioGodwin-M wants to merge 8 commits into
PerforatedAI:mainPerforatedAI/PerforatedAI:mainfrom
PioGodwin-M:mainPioGodwin-M/PerforatedAI-Resnet:mainCopy head branch name to clipboard
Open

Add ResNet50 dendritic optimization example#97
PioGodwin-M wants to merge 8 commits into
PerforatedAI:mainPerforatedAI/PerforatedAI:mainfrom
PioGodwin-M:mainPioGodwin-M/PerforatedAI-Resnet:mainCopy head branch name to clipboard

Conversation

@PioGodwin-M

Copy link
Copy Markdown

ResNet50 Dendritic Optimization Case Study
Project Overview
This project implements a dendritic optimization strategy for the ResNet50 architecture trained on CIFAR-10/100. utilizing the PerforatedAI framework. It demonstrates how dynamic parameter allocation (artificial dendrites) can improve model efficiency and overcome training plateaus by adding capacity only where needed.

Key Features
Dynamic Growth: Starts with a baseline ResNet50 and automatically grows new connections (dendrites) based on validation performance metrics.
PerforatedAI Integration: Seamlessly wraps PyTorch modules to manage dendritic candidates and structural adaptation.
Optimized Training Loop: Custom training pipeline with automated optimizer resets and learning rate scheduling upon structural changes.
Experiment Tracking: Integrated with Weights & Biases (W&B) for real-time visualization of loss, accuracy, and parameter growth.
Results
Demonstrated autonomous parameter growth (e.g., from ~23.7M to 24.3M parameters) in response to training needs.
Successfully applied dendritic connections to both convolutional and fully connected layers.
Repository Structure
src/train.py: Core training script with PerforatedAI hooks.
src/model.py: ResNet50 model definition.
PAI/: Optimization logs and growth visualization graphs.

Screenshot 2026-01-26 172407

This i my PAI.png. kindly review the project and let me know if any changes to be made sir.

@RorryB

RorryB commented Jan 26, 2026

Copy link
Copy Markdown
Contributor

Thanks for the submission!

  • This looks like graph problem 1 (https://docs.google.com/document/d/1HygopGvDopYEF_rBlQvSbifgK-3GgQqnerX7yVngvHs/edit?tab=t.0#heading=h.dnt5fjkjhxgb). Looking at your code, when you call add_validation_score, reinitializing the optimizer is not optional. When dendrites get added you do have to do that or the optimizer will be pointing at only the non-dendritic parameters and so the dendrites will not be able to learn.
  • 2 is also a very small number for fixed switch num. You may still run into the same graph problem 1 after doing that.
  • Please move the example into hackathonProjects, out of the main Examples folder
  • Once you get that done also upload your full PAI folder and I can give more detailed suggestions.

Thanks for the submission!

@PioGodwin-M

PioGodwin-M commented Jan 29, 2026

Copy link
Copy Markdown
Author

"Thanks for the feedback! Sorry for the late reply.

I’ve fixed the optimizer issue (re-initializing it now prevents the zombie dendrites) and bumped the switch epoch to 10. I also moved the files to the correct folder.

I couldn't upload the full PAI folder due to the file size limit, but I've attached the resulting PAI.png graph which shows the learning and drive link of PAI folder : https://drive.google.com/drive/folders/1iFlAc9J2Q7Onsi9eACR5WuoPj_Dw4qLh?usp=drive_link."
image

@RorryB

RorryB commented Feb 1, 2026

Copy link
Copy Markdown
Contributor

Cool, looks better, but still looks like dendrites are being added early. You want the network to train until plateau before dendrites are added. I'd raise it to at least 25.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.