Skip to content

Repository files navigation

FFAformer: Frequency-Filtered Attention Transformer for fMRI Time Series Prediction

📌 Overview

This repository provides the official implementation of FFAformer, a Transformer-based framework for fMRI time series prediction.

Functional magnetic resonance imaging (fMRI) signals exhibit long-range temporal dependencies and relatively stable functional connectivity (FC) structures. FFAformer integrates frequency-domain modeling and biologically informed constraints to improve prediction accuracy while preserving brain network structure.


🚀 Key Features

  • 📊 fMRI time series prediction model based on Transformer
  • 🧠 Preserves functional connectivity (FC) structure
  • 🌐 Supports cross-species datasets (mouse, macaque, human)
  • 📉 Robust under small-sample learning
  • 🔬 Captures low-dimensional neural manifolds

## 📁 Project Structure

├── experiments/        # Experiment scripts
├── model/              # FFAformer model implementation
├── layers/             # Custom layers (attention, filter, etc.)
├── utils/              # Utility functions
├── hum_normal.py       # Human resting-state experiment
├── hum_task.py         # Human task-state experiment
├── mac_normal.py       # Macaque resting-state experiment
├── mac_task.py         # Macaque task-state experiment
├── mou_normal.py       # Mouse resting-state experiment
├── mou_task.py         # Mouse task-state experiment

⚙️ Installation

1. Clone the repository

git clone https://github.com/Brain-Cog-Lab/FFAformer.git cd FFAformer

2. Install dependencies

pip install -r requirements.txt

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages