/ Модель

Характеристики

Лицензия
Apache 2.0
Библиотека
pytorch
Опубликована
14 июл 2026

BanTRel-v1.0.0

Обучение с подкреплением3 профессии

BanTRel — агент PPO для адаптивного управления фазами светофора на смоделированном четырёхстороннем перекрёстке в условиях трафика Бангалора.

16скачиваний за 30 дней1лайквеса обновлены5 сен 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

BanTRel — разработанный Bindupautra Jyotibrat агент обучения с подкреплением для управления светофором на одном четырёхстороннем перекрёстке в симуляторе SUMO. Модель обучена с нуля методом PPO на синтетическом профиле трафика Бангалора и сравнивалась с фиксированным циклом переключения фаз. Архитектура — актор-критик с общим полносвязным блоком: входной вектор состояния из 8 измерений, два скрытых слоя по 64 нейрона с Tanh, отдельные головы актора на 2 действия и критика на оценку состояния. На каждом шаге агент выбирает фазу NS-green или EW-green, стремясь сократить ожидание и задержки транспорта.

Модель предназначена для исследований и обучения управлению транспортными потоками, а также для экспериментов с адаптивным управлением сигналом на перекрёстке, соответствующем обучающей топологии. Трафик смоделирован для 16 400 автомобилей в сутки с распределением типов транспорта и периодов дня. Доступен экспорт ONNX; README также показывает загрузку TorchScript-модели. Лицензия — Apache 2.0.

Результаты ограничены одной синтетической конфигурацией перекрёстка и оценкой в той же среде SUMO. Модель не проверена на других схемах дорог, многоперекрёстковых сетях или реальных сенсорных данных и не предназначена для непосредственного управления физической инфраструктурой без дополнительной адаптации и проверки безопасности.

Сценарии применения

  • выбор фазы светофора на перекрёстке в симуляторе SUMO
  • сравнение адаптивного управления светофором с фиксированным циклом
  • обучение методам PPO и actor-critic на задаче управления трафиком
  • исследование влияния управления сигналом на очереди и время ожидания

Ограничения

Модель обучена и оценена только на одной синтетической конфигурации перекрёстка в SUMO; перенос на другие схемы и реальные данные не проверен. Она не предназначена для прямого управления физическими светофорами без адаптации и проверки безопасности.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

BanTRel (Bangalore Traffic Reinforcement Learning)

A Proximal Policy Optimization (PPO) agent trained to adaptively control a 4-way traffic signal intersection under simulated Bangalore traffic conditions, benchmarked against a fixed-cycle baseline using SUMO.

Model Details

Model Description

BanTRel is a reinforcement learning agent that learns to control a single 4-way traffic intersection (12 turning movements, 2 lanes per approach) to minimize vehicle waiting time and delay. It uses a shared-backbone actor-critic network trained with PPO (clipped surrogate objective + Generalized Advantage Estimation) inside a custom SUMO (Simulation of Urban MObility) environment modeling realistic Bangalore traffic volumes — 16,400 vehicles/day across night, morning rush, mid-morning, afternoon, evening rush, and evening periods, with a 60% car / 30% motorcycle / 10% auto-rickshaw vehicle mix.

The agent selects between 2 discrete actions (NS-green / EW-green phase) based on an 8-dimensional state vector, and was evaluated against a fixed-cycle baseline policy across 9 traffic performance metrics.

  • Developed by: Bindupautra Jyotibrat (BJyotibrat)
  • Model type: Reinforcement learning — Proximal Policy Optimization (PPO), actor-critic, discrete action space
  • License: Apache 2.0
  • Trained from scratch: Yes (no pretrained base model)

Model Sources

Uses

Direct Use

The model can be used directly for inference in a SUMO-simulated 4-way intersection matching the training topology (8-dim state, 2 discrete actions), to select traffic signal phases at each control step. It is intended for research and educational use in traffic signal control and reinforcement learning, not for deployment on real, physical traffic infrastructure.

Out-of-Scope Use

  • Not validated on multi-intersection networks, different intersection geometries, or real-world traffic sensor data.
  • Not suitable for direct deployment to physical traffic signal hardware without further validation, safety testing, and regulatory review.
  • Not intended for any safety-critical decision-making outside of simulation.

Bias, Risks, and Limitations

  • Trained and evaluated on a single synthetic 4-way intersection topology; performance on different intersection layouts or real-world networks is untested.
  • Traffic demand is derived from aggregate daily volume estimates for Bangalore rather than granular real-world traffic count data, so learned behavior reflects the assumptions of this synthetic schedule.
  • As with any RL policy trained in simulation, there is a sim-to-real gap — real-world deployment would require retraining or fine-tuning against real sensor data and safety constraints.

Recommendations

Users should treat this as a research artifact demonstrating RL-based traffic signal control, not a production-ready traffic control system. Any real-world application would need domain adaptation, safety validation, and traffic engineering sign-off.

How to Get Started with the Model

import torch
import torch.nn as nn

class ActorCritic(nn.Module):
    def __init__(self, state_dim=8, action_dim=2, hidden=64):
        super().__init__()
        self.backbone = nn.Sequential(
            nn.Linear(state_dim, hidden), nn.Tanh(),
            nn.Linear(hidden, hidden), nn.Tanh(),
        )
        self.actor = nn.Linear(hidden, action_dim)
        self.critic = nn.Linear(hidden, 1)

    def forward(self, x):
        features = self.backbone(x)
        return self.actor(features), self.critic(features)

model = ActorCritic()
model.load_state_dict(
    torch.load("Model/Phase 2/PyTorch Model/ppo_bangalore.pt", map_location="cpu")
)
model.eval()

state = torch.randn(1, 8)  # replace with a real 8-dim state from your SUMO env
with torch.no_grad():
    logits, value = model(state)
    action = torch.argmax(logits, dim=-1).item()  # 0 = NS-green, 1 = EW-green

Or, without needing the class definition, using the TorchScript export:

import torch
model = torch.jit.load("Model/Phase 2/PyTorch Model/ppo_bangalore_scripted.pt")
model.eval()

Or, you can use the onnx model:

import onnxruntime as ort
import numpy as np

session = ort.InferenceSession("ppo_bangalore.onnx")
state = np.random.randn(1, 8).astype(np.float32)
logits, value = session.run(None, {"state": state})
action = int(np.argmax(logits, axis=-1)[0])

Training Details

Training Data

No external dataset — training data is generated on-the-fly through interaction with a custom SUMO simulation environment. Traffic demand is derived from observed Bangalore intersection vehicle counts (16,400 vehicles/day), converted into SUMO flow definitions across 7 time-of-day periods.

Training Procedure

Two-phase on-policy training: 100 episodes of initial training (Phase 1), followed by 50 episodes of fine-tuning from the best Phase 1 checkpoint (Phase 2), for 150 episodes total. Rollouts of 1,024 steps were collected before each PPO update, with 8 epochs of mini-batch (256) updates per rollout. The learning rate was linearly annealed from 3e-4 to 3e-5 over training. Rewards (negative sum of edge waiting times) were normalized by dividing by 1,000 and clipping to [-10, 0] for training stability.

Training Hyperparameters

HyperparameterValue
AlgorithmPPO (clipped surrogate + GAE)
Discount factor (gamma)0.95
GAE lambda0.95
Clip epsilon0.2
Learning rate3e-4 → 3e-5 (linear anneal)
OptimizerAdam (eps=1e-5)
Epochs per update8
Rollout length1,024 steps
Mini-batch size256
Entropy coefficient0.05
Value function coefficient0.5
Gradient clip norm0.5
Weight initializationOrthogonal (gain=√2 backbone, 0.01 actor, 1.0 critic)
Training regimefp32

Speeds, Sizes, Times

  • Total training episodes: 150 (100 Phase 1 + 50 Phase 2)
  • Checkpoint size (state_dict): See Model/Phase 2/PyTorch Model/ppo_bangalore.pt in the repository

Evaluation

Testing Data, Factors & Metrics

Testing Data

Evaluation was run in the same custom SUMO environment as training, over the full 24-hour simulated traffic schedule, comparing the trained PPO policy against a Fixed-Cycle baseline policy.

Metrics

Nine metrics were evaluated, following the 2WSI-RL benchmark protocol plus additional traffic-flow metrics: total stopped vehicles, total waiting time, mean waiting time, mean speed, average waiting time, average travel time, queue length, throughput, and delay vs. free-flow. A tie threshold was applied per metric so that negligible differences aren't misattributed as a win for either policy.

Results

See the full results table and per-metric figures in the GitHub repository (Results/final_results_table.txt, Results/Phase 2/).

Summary

PPO was compared against a Fixed-Cycle baseline across all 9 metrics; see the repository results table for the win/loss/tie breakdown and per-metric mean values.

Environmental Impact

Training was run entirely on CPU (Google Colab, CPU-only runtime), not GPU/TPU. Standard carbon-estimation tools such as the ML CO2 Impact calculator are built around GPU/TPU instance types and don't currently offer a CPU-only Colab option, so a standardized emissions estimate isn't available for this run. CPU-only training draws substantially less power than GPU/TPU training, so the impact is expected to be comparatively low, but no formal figure is reported here.

  • Hardware Type: CPU (Google Colab, CPU-only runtime)
  • Cloud Provider: Google Colab
  • Carbon Emitted: Not formally estimated — see note above

Technical Specifications

Model Architecture and Objective

Shared-backbone actor-critic network: Linear(8, 64) → Tanh → Linear(64, 64) → Tanh, with a separate actor head (Linear(64, 2)) producing action logits and a critic head (Linear(64, 1)) producing the state-value estimate. Trained with the PPO clipped surrogate objective combined with a value function loss and an entropy bonus for exploration.

Compute Infrastructure

Hardware

CPU only (Google Colab CPU runtime) — no GPU/TPU used.

Software

  • Python 3.12.13
  • PyTorch 2.11.0+cpu
  • SUMO (Simulation of Urban MObility)
  • traci, sumolib

Citation

If you use this model, please cite the GitHub repository:

@misc{bantrel2026,
  author = {Bindupautra Jyotibrat},
  title = {BanTRel: PPO-based Adaptive Traffic Signal Control for Bangalore Traffic},
  year = {2026},
  publisher = {GitHub},
  howpublished = {\url{https://github.com/Jyotibrat/BanTRel}}
}

Model Card Contact

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · pytorch

Нельзя запустить

RL-агенты не запускаются как сервис инференса.

Ревизия весов
d18d5e0

0 моделей