Skip to main content

Backbone-agnostic build and support tools for NeuroFuser-style attention fusion.

Project description

NeuroFixer

NeuroFixer is the public companion demo and library-oriented repository for the Pattern Recognition article:

NeuroFuser: Resource-Aware Neuromodulation of Multi-scale Fusion Attention for Domain Adaptive Segmentation Serdar Erişen and André Borrmann Pattern Recognition, 2026 DOI: 10.1016/j.patcog.2026.114167

NeuroFixer provides a lightweight, backbone-agnostic PyTorch implementation path for NeuroFuser-style attention-fusion modules. It is designed as a public-demo safe repository that can grow toward a future installable package:

pip install neurofixer

The current version provides dependency-light PyTorch implementations of the core NeuroFuser-inspired modules:

  • EncodingGate — per-location/channel gated feature calibration with residual flow.
  • EncodingModule — latent-grid alignment with grouped dilation modulation.
  • FusionBridge — branch-normalized multi-scale fusion for decoder/skip pathways.
  • NeuromodulationController — differentiable resource-aware controls for gates, heads, dilations, and fusion weights.
  • Buildable CNN and ViT demo networks without custom dependencies.

Relation to the paper

The published NeuroFuser paper introduces resource-aware neuromodulation of multi-scale fusion attention for domain-adaptive semantic segmentation. NeuroFixer is a public-facing, lightweight implementation and experimentation repository inspired by the paper’s main design principles: backbone-agnostic fusion, controllable attention modulation, CNN/ViT compatibility, and dependency-light modularity.

This repository is intentionally released as a public demo and development base. It does not include private training assets, pretrained weights, full experimental pipelines, journal submission files, or confidential reviewer-related material.

Design principles

  1. Backbone-agnostic: CNN feature maps and ViT token grids can both use the same EG/EM/FBr interfaces.
  2. Minimal dependencies: PyTorch is the only required runtime dependency.
  3. Public-demo safe: no pretrained weights, no private backbones, and no journal-specific experimental assets are included.
  4. Research extensible: the modules are intentionally modular so user feedback can guide future additions.
  5. Future package-ready: the repository structure is prepared for gradual development toward an installable neurofixer package.

Quick start from source

pip install -e .
python -m neurofixer.demo.run_demo --backbone cnn
python -m neurofixer.demo.run_demo --backbone vit

Expected output:

{'backbone': 'cnn', 'input_shape': (1, 3, 128, 128), 'output_shape': (1, 19, 128, 128)}

Python usage

import torch
from neurofixer import build_cnn_neurofixer, build_vit_neurofixer

x = torch.randn(1, 3, 128, 128)

model = build_cnn_neurofixer(num_classes=19)
logits = model(x)
print(logits.shape)

vit_model = build_vit_neurofixer(num_classes=19, patch_size=8)
vit_logits = vit_model(x)
print(vit_logits.shape)

Repository layout

neurofixer/
  modules/       # EG, EM, FBr, neuromodulation controller
  build/         # CNN and ViT demo builders
  demo/          # CLI demo and smoke-test helpers
  utils/         # token/grid helpers for CNN-ViT interoperability

functions/       # compatibility wrappers for the early folder plan
build/           # compatibility build entry points
neurofuser_demo/ # compatibility demo wrappers
tests/           # smoke tests

Model families

NeuroFixer is organized as a lightweight library for reusable attention-fusion modules and model-family demos. The first model family is:

neurofixer.models.neurofuser_demo

This folder contains lightweight CNN and ViT demonstration networks that use the NeuroFuser-inspired EncodingGate, EncodingModule, FusionBridge, and NeuromodulationController components. Future attention projects can be added under neurofixer/models/ as separate model families without changing the core module API.

Example imports:

from neurofixer.models.neurofuser_demo import build_cnn_neurofixer
from neurofixer.models.neurofuser_demo import build_vit_neurofixer
from neurofixer.models.registry import list_models, build_model

Development roadmap

  • Add config dataclasses for larger CNN/ViT variants.
  • Add optional FlashAttention/xFormers adapters only as optional extras, never as required dependencies.
  • Add palette-alignment utilities for training-free domain transfer.
  • Add public examples for Cityscapes-like and ADE20K-like class counts without releasing private weights.
  • Add GitHub Actions smoke tests for CPU-only import and demo execution.
  • Prepare future package metadata for pip install neurofixer.

Citation

If you use NeuroFixer, NeuroFuser-inspired modules, or the design ideas in this repository, please cite the associated Pattern Recognition article:

@article{erisen2026neurofuser,
  title   = {NeuroFuser: Resource-Aware Neuromodulation of Multi-scale Fusion Attention for Domain Adaptive Segmentation},
  author  = {Eri{\c{s}}en, Serdar and Borrmann, Andr{\'e}},
  journal = {Pattern Recognition},
  year    = {2026},
  doi     = {10.1016/j.patcog.2026.114167}
}

License and rights

Copyright © Serdar Erişen, 2026. All rights reserved.

NeuroFixer is released under a custom Research Preview License.

You may view, clone, run, and evaluate the repository for personal, academic, and non-commercial research purposes. Commercial use, redistribution as a competing library, relicensing, sublicensing, or use of the project names to imply endorsement require prior written permission from the copyright holder.

See LICENSE for the full terms.

Contact

For academic collaboration, licensing, or repository-related questions, please contact the repository owner through GitHub:

GitHub: @serdarch Repository: serdarch/NeuroFixer

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neurofixer-0.1.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neurofixer-0.1.0-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file neurofixer-0.1.0.tar.gz.

File metadata

  • Download URL: neurofixer-0.1.0.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for neurofixer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 11a51a005527329ad2edfa252fda0375da724b8ea8b15b35b0e0c5dd2ca77ff6
MD5 7360cd68bf45f5b4487eb9dd4358f3b8
BLAKE2b-256 2c10dc12bedb0a6df95bc6e23b0e7e80fa04fa1ffb9c57ea9d7b1f2cbfcdfc50

See more details on using hashes here.

File details

Details for the file neurofixer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: neurofixer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for neurofixer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56074191030a8bf17b666038aeb12730c95190a205ce2bb803d26bf9ed2ce253
MD5 64da492311d65a896b92a3247944e27a
BLAKE2b-256 cc3d694796d2ded1736d74d429da9b7eea62c49b3782e5478d5c225c61d61070

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page