FlyNet Robustness
This repository contains the trained decoders and selected model checkpoints associated with the paper:
The study investigates the robustness and computational efficiency of a connectome-constrained model of the Drosophila visual system (FlyNet) compared with artificial neural network architectures on a looming-based collision-detection task. The models are evaluated under adversarial attacks and common video perturbations to examine the contributions of network architecture, recurrence, and connectome-derived connectivity.
The model implementations, collision-detection pipeline, adversarial attacks, common video perturbations, and evaluation procedures are maintained in the accompanying source-code repository.
Code Repository: flynet-robustness.
The released checkpoints are intended to support reproduction of the evaluations reported in the paper.
Model architectures
The benchmark includes 14 models organized into four families:
| Family | Models |
|---|---|
| CTRNNs | FlyNet, CTRNN, SCTRNN |
| CNNs | vCNN-2f, vCNN-5f, vCNN-10f, gCNN-2f |
| hexRAFTs | hexRAFT-1, hexRAFT-6, hexRAFT-12 |
| RAFTs | RAFT-1, RAFT-6, RAFT-12, RAFTsm-12 |
To avoid duplicating pretrained weights available elsewhere, this repository provides the task-specific decoders, CNN checkpoints, and Sintel-trained hexRAFT model used in our benchmark.
Other pretrained models are available from their original repositories:
- FlyVis: Lappalainen et al. (2024) — GitHub.
- RAFT: Teed and Deng (2020) — GitHub.
The Sintel-trained hexRAFT model was trained using our RAFT-Sintel fork.
Repository structure
flynet-robustness/
├── decoders/
│ ├── flynet/
│ │ ├── hit.pkl
│ │ ├── position.pth
│ │ └── velocity.pth
│ ├── ctrnn/
│ │ └── hit.pkl
│ ├── sctrnn/
│ │ └── hit.pkl
│ ├── vcnn_2frames/
│ │ └── hit.pkl
│ ├── vcnn_5frames/
│ │ └── hit.pkl
│ ├── vcnn_10frames/
│ │ └── hit.pkl
│ ├── gcnn_2frames/
│ │ └── hit.pkl
│ ├── raft_small_12/
│ │ └── hit.pkl
│ ├── raft_1/
│ │ └── hit.pkl
│ ├── raft_6/
│ │ └── hit.pkl
│ ├── raft_12/
│ │ └── hit.pkl
│ ├── hexraft_1/
│ │ └── hit.pkl
│ ├── hexraft_6/
│ │ └── hit.pkl
│ ├── hexraft_12/
│ │ └── hit.pkl
│ ├── hexraft_1_sintel/
│ │ └── hit.pkl
│ ├── hexraft_6_sintel/
│ │ └── hit.pkl
│ └── hexraft_12_sintel/
│ └── hit.pkl
│
├── models/
│ ├── cnns/
│ │ ├── vcnn_2frames/
│ │ │ └── network_000.chkpt
│ │ ├── vcnn_5frames/
│ │ │ └── network_000
│ │ ├── vcnn_10frames/
│ │ │ └── network_000
│ │ └── gcnn_2frames/
│ │ └── network_000.chkpt
│ └── hexraft_sintel/
│ └── checkpoint.pth
│
└── README.md
Downloading checkpoints
Checkpoints can be downloaded individually or by model family using the Hugging Face Hub client.
pip install huggingface_hub
Download all decoders for a model:
from huggingface_hub import snapshot_download
snapshot_download(
repo_id="alejandrorg00/flynet-robustness",
allow_patterns="decoders/flynet/*",
local_dir=".",
)
Download all hit/miss decoders:
snapshot_download(
repo_id="alejandrorg00/flynet-robustness",
allow_patterns="decoders/*/hit.pkl",
local_dir=".",
)
Download a particular decoder:
from huggingface_hub import hf_hub_download
checkpoint = hf_hub_download(
repo_id="alejandrorg00/flynet-robustness",
filename="decoders/flynet/hit.pkl",ç
local_dir=".",
)
Download the Sintel-trained hexRAFT model:
checkpoint = hf_hub_download(
repo_id="alejandrorg00/flynet-robustness",
filename="models/hexraft_sintel/checkpoint.pth",
local_dir=".",
)
The checkpoints require the corresponding model implementations and preprocessing pipelines.
Citation
If you use these models or decoders, please cite:
@inproceedings{garciaduran2026flyillusions,
title = {Measuring Robustness and Efficiency in a Connectome-Constrained Fly Visual System Model on a Collision-Detection Task},
author = {Garcia-Duran, Alexandre and Rodriguez-Garcia, Alejandro and
Molano-Mazón, Manuel and Hyafil, Alexandre and
Ramaswamy, Srikanth and Lappalainen, Janne K.},
booktitle = {The Fortieth Annual Conference on Neural Information Processing Systems},
year = {2026},
url = {TBA}
}