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}
}