Catalog PyPI
PACKAGE EXPLORERView in registry

aftab

PyPI

A highly configurable implementation of Aftab framework, benchmarking different convolutional neural networks and the effects of advanced value functions on parallelized deep Q-networks.

aftabcnndeepdqndrllearningpqnreinforcement
Versions collected1
Direct dependencies5From release 1.0.6
Last observed20 Oct, 21:13 UTC

README

Version 1.0.6 documentation
Aftab Header



🇪🇸🇲🇽🇨🇺 Español | 🇮🇷🇦🇫🇹🇯 فارسی | 🇮🇹🇨🇭 Italiano | 🇫🇷🇧🇪🇨🇭 Français | 🇩🇪🇦🇹🇨🇭 Deutsch | 🇳🇱🇧🇪🇸🇷 Nederlands | 🇵🇹🇧🇷🇦🇴 Português | 🇸🇦🇱🇧🇮🇶 العربية | 🇷🇺🇧🇾🇰🇿 Русский | 🇨🇳🇸🇬🇹🇼 中文 | 🇯🇵 日本語 | 🇰🇷 한국어 | 🇮🇳 हिन्दी | 🇮🇩 Bahasa Indonesia | 🇧🇩🇮🇳 বাংলা | 🇻🇳 Tiếng Việt | 🇹🇷 Türkçe

Overview

Aftab (Persian: آفتاب, meaning "sun" or "sun rays") is a benchmarking framework for evaluating CNN-based encoders in PQN across Atari games. It provides standardized training, evaluation, and reproducibility tools for deep reinforcement learning research.

See how the Aftab architecture compares to standard PQN baselines in these video demonstrations.

This research was done without receiving any funds; therefore, if you found our work useful, please consider sponsoring on GitHub 💛.

Encoder Experiments

IQM HNS
IQM HNS (Last 50M Frames)

Hadamax Experiments

IQM HNS
IQM HNS (Last 50M Frames)

References:

Q-Values Experiments

IQM HNS
IQM HNS (Last 50M Frames)

References:

Procgen (Overfitting Prevention) Experiments

Since there are no public benchmarks comparing human-normalized-scores of Procgen environments, we created PNS (Procgen Normalized Score) that is a minimal min-max normalization of scores across seeds.

IQM PNS
IQM PNS (Last 50M Frames)

Installation

Install via pip:

pip install aftab

Alternatively, you can clone the repository and install in editable mode.

git clone https://github.com/tahashieenavaz/aftab.git aftab_source
pip install -e aftab_source

We highly recommend using Micromamba for creating virtual environments with instructions detailed here.

Training Agents

Currently JAX API is under development and is planned to be finished by the end of 2026. Contributions are highly encouraged.

from aftab import Aftab
from aftab import aftab_environments

seeds = [1, 2, 3, 4]

for environment in aftab_environments:
    agent = Aftab(encoder="gamma", frames="pilot")
    for seed in seeds:
        agent.train(environment=environment, seed=seed)
        agent.log()

Custom Encoder Injection

You can define your own encoder as a PyTorch module and pass it to the agent:

import torch
from aftab import Aftab

class CustomImageEncoder(torch.nn.Module):
    pass

agent = Aftab(encoder=CustomImageEncoder)

Results

All experimental results are organized by experiment category. Each section contains:

  • Tables: numerical results (HNS/PHS and raw scores)
  • Charts: IQM normalized scores and training curves

Encoder Experiments

Tables

Charts


Hadamax Experiments

Tables

Charts


Q-Value Experiments

Tables

Charts


Procgen Experiments

Tables

Charts

Model Complexity

Base Variants

VariantEncoder ParametersRegression Head ParametersTotal ParametersEncoder FLOPsRegression Head FLOPsTotal FLOPs
PQN78,3041,686,5001,764,8047.7341.6109.347
Alpha174,7521,782,9481,957,70027.5411.61029.151
Beta89,0081,782,9481,871,95661.5151.61063.126
Gamma117,1681,725,3641,842,53222.9011.61024.512
Delta78,5521,850,5881,929,1406.1431.7747.917
Epsilon80,1122,179,8282,259,94013.2522.10115.354
Zeta77,2322,537,3962,614,62825.3622.46227.824
Eta78,40023,739,46023,817,86028.42223.66352.085
Theta76,2881,127,4281,203,7169.0651.05310.118

Note: The Eta variant has significantly more parameters than other variants, primarily due to the encoder producing a large number of features.


Hadamax Variants

VariantEncoder ParametersRegression Head ParametersTotal ParametersEncoder FLOPsRegression Head FLOPsTotal FLOPs
Hadamax156,6083,968,5164,125,124159.0143.969162.984
Gamma-Hadamax-Valid234,3361,609,2201,843,556122.0011.610123.611
Gamma-Hadamax-Same234,3363,280,3883,514,724129.3003.281132.581

Hyperparameters

The following tables reflect the defaults defined by Aftab. The experiment_name argument is required and has no default.

Training and Environment

Hyperparameter (Aftab argument)Default
Encoder (encoder)Gamma-Hadamax-Valid
Network (network)Distributional Bootstrapped (Ensemble) Dueling
Total frames (frames)200,000,000
Frame skip (frame_skip)4
Frame stack (frame_stack)4
No-op maximum (noop)30
Learning rate (lr)$2.5 \times 10^{-4}$
Training environments (train_environments)128
Test environments (test_environments)8
Steps per update (steps_per_update)32
Batch size (derived)4,096
Mini-batches (mini_batches)32
Mini-batch size (derived)128
Discount factor ($\gamma$)0.99
Return $\lambda$ (return_lambda)0.65
Epochs (epochs)2
Gradient norm (gradient_norm)10.0
Embedding dimension (embedding_dimension)512
Training episodic life (train_episodic_life)True
Test episodic life (test_episodic_life)False
Training reward clipping (train_reward_clip)True
Test reward clipping (test_reward_clip)True
Epsilon ScheduleLinear
Epsilon Annealing Ratio10%

Optimizer

Hyperparameter (Aftab argument)Default
Optimizer (optimizer)Rectified Adam ("radam")
Epsilon (optimizer_epsilon)$1 \times 10^{-5}$
Weight decay (optimizer_weight_decay)0.0
$\beta_1$ (optimizer_first_beta)0.9
$\beta_2$ (optimizer_second_beta)0.999

Distributional and Bootstrapped (Ensemble) Q-Values

Hyperparameter (Aftab argument)Default
Distributional bins (distributional_bins)51
Distributional minimum (distributional_min_value)-10.0
Distributional maximum (distributional_max_value)10.0
Distributional sigma (distributional_sigma)None (derived from the sigma ratio)
Distributional sigma ratio (distributional_sigma_ratio)0.75
Distributional value clip (distributional_value_clip)0.0
Bootstrap heads (bootstrap_heads)10
Bootstrap probability (bootstrap_probability)1.0

Procgen Overrides

HyperparameterDefaultProcgen
Training environments12864 (procgen_train_environments)
Steps per update32256 (procgen_steps_per_update)
Batch size4,09616,384
Mini-batch size128512

For Procgen environments, Aftab automatically applies the two overrides above; other defaults remain unchanged.

Statistical Significance

Encoder Experiments

Wilcoxon Signed Rank TestWilcoxon Signed Rank Test (Corrected)
Probability of Improvement

Hadamax Experiments

Wilcoxon Signed Rank TestWilcoxon Signed Rank Test (Corrected)
Probability of Improvement

Q-Value Experiments

Wilcoxon Signed Rank TestWilcoxon Signed Rank Test (Corrected)
Probability of Improvement

Reproducibility

Due to the stochastic nature of deep reinforcement learning, exact reproducibility via fixed datasets is not feasible.
Instead, we provide a set of random seeds used in our experiments.

from aftab import aftab_seeds

print(aftab_seeds)

Full experiment replication:

from aftab import Aftab
from aftab import aftab_environments
from aftab import aftab_seeds

for environment in aftab_environments:
    agent = Aftab()
    for seed in aftab_seeds:
        agent.train(environment=environment, seed=seed)
        agent.log()

A comprehensive set of Atari environments is available via EnvPool:
https://envpool.readthedocs.io/en/latest/env/atari.html#available-tasks

Procgen environments use their native RGB observations with shape (3, 64, 64). Aftab reads each task's EnvPool configuration and only applies supported options. Atari-only options such as noop, frame_skip, frame_stack, train_episodic_life, and EnvPool reward clipping are therefore not passed to Procgen.

A comprehensive set of Procgen environments is available via EnvPool:

https://envpool.readthedocs.io/en/latest/env/procgen.html#available-tasks

Hardware

Nvidia A40 GPUs were used to run all the experiments in this experiment.

SpecificationDetails
GPU Memory48 GB GDDR6 with error-correcting code (ECC)
GPU Memory Bandwidth696 GB/s
InterconnectNVIDIA NVLink 112.5 GB/s (bidirectional); PCIe Gen4: 64 GB/s
NVLink2-way low profile (2-slot)
Display Ports3x DisplayPort 1.4*
Max Power Consumption300 W
Form Factor4.4" (H) x 10.5" (L), Dual Slot
ThermalPassive
vGPU Software SupportNVIDIA Virtual PC, NVIDIA Virtual Applications, NVIDIA RTX Virtual Workstation, NVIDIA Virtual Compute Server, NVIDIA AI Enterprise
vGPU Profiles SupportedSee the Virtual GPU Licensing Guide
NVENC / NVDEC1x / 2x (includes AV1 decode)
Secure BootSecure and Measured Boot with Hardware Root of Trust (optional)
NEBS ReadyLevel 3
Power Connector8-pin CPU

Citation

Repository:

@software{aftab2026,
  author = {Taha Shieenavaz},
  title = {Aftab: A Progressive Design Study of Visual Encoders and Value Estimation for Replay-Free Parallelized Q-Learning},
  year = {2026},
  publisher = {GitHub},
  journal = {GitHub Repository},
  howpublished = {\url{https://github.com/tahashieenavaz/aftab}},
}

Preprint:

@misc{2608.07335,
  Author = {Taha Shieenavaz and Shabnam Zareshahraki and Loris Nanni},
  Title = {Aftab: A Progressive Design Study of Visual Encoders and Value Estimation for Replay-Free Parallelized Q-Learning},
  Year = {2026},
  Eprint = {arXiv:2608.07335},
}
@misc{2407.04811,
  Title = {Simplifying Deep Temporal Difference Learning},
  Author = {Matteo Gallici and Mattie Fellows and Benjamin Ellis and Bartomeu Pou and Ivan Masmitja and Jakob Nicolaus Foerster and Mario Martin},
  Year = {2024},
  Eprint = {arXiv:2407.04811},
}
@misc{2403.03950,
  Title = {Stop Regressing: Training Value Functions via Classification for Scalable Deep RL},
  Author = {Jesse Farebrother and Jordi Orbay and Quan Vuong and Adrien Ali Taïga and Yevgen Chebotar and Ted Xiao and Alex Irpan and Sergey Levine and Pablo Samuel Castro and Aleksandra Faust and Aviral Kumar and Rishabh Agarwal},
  Year = {2024},
  Eprint = {arXiv:2403.03950},
}
@misc{1511.06581,
  Title = {Dueling Network Architectures for Deep Reinforcement Learning},
  Author = {Ziyu Wang and Tom Schaul and Matteo Hessel and Hado van Hasselt and Marc Lanctot and Nando de Freitas},
  Year = {2015},
  Eprint = {arXiv:1511.06581},
}
@misc{1806.04613,
  Title = {Improving Regression Performance with Distributional Losses},
  Author = {Ehsan Imani and Martha White},
  Year = {2018},
  Eprint = {arXiv:1806.04613},
}
@misc{1602.04621,
  Title = {Deep Exploration via Bootstrapped DQN},
  Author = {Ian Osband and Charles Blundell and Alexander Pritzel and Benjamin Van Roy},
  Year = {2016},
  Eprint = {arXiv:1602.04621},
}

Font

The Vazirmatn font is used for both Persian and English text throughout the GitHub repository header and the project's landing page.

GitHub | Google Fonts

Translations

Translations were generated by AI using GPT-5.6 Sol @ Wednesday August 19th, ~14:00.

License

© 2025 Taha Shieenavaz.
Licensed under CC BY-NC 4.0: https://creativecommons.org/licenses/by-nc/4.0/

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.617 Sept 20265

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
tahashieenavaz/aftab

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:13 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:cc75e8f80e6cbcf75cb8d262b0db7cd37012933988ab2bc3f6c9faa6c4614d89