AI System for Traffic Jam Prediction

Traffic jams during rush hour waste time and nerves, but this is a problem that artificial intelligence can solve. We develop AI systems for predicting congestion that account for road topology, sensor data, and events like accidents or concerts. Our team delivers turnkey projects, from data collection to integration with navigation apps and traffic lights, with ongoing support.

AI Development Areas

Frequently Asked Questions

Latest works

  • Development of a web application for FEEDME
    Development of a web application for FEEDME
    1344
  • Development of an online store for the company FURNORO
    Development of an online store for the company FURNORO
    1307
  • B2B Advance company logo design
    B2B Advance company logo design
    754
  • Development of a web application for Enviok
    Development of a web application for Enviok
    1050
  • AIDER company logo development
    AIDER company logo development
    994
  • CRM development for Chasseurs
    CRM development for Chasseurs
    1099

Peak-hour traffic adds 30–40 minutes to a commute — and that's not fatalism, but a challenge for AI. We develop congestion prediction systems that reduce delays by 15–25%. At the core is a hybrid of graph neural networks and event-aware transformers. The model considers road topology, data flow from 300+ sensors, and events (accidents, weather, concerts). Our clients are cities and transport operators who need not just to predict a jam but to redistribute traffic in real time. Below is how we do it: from data collection to integration with navigators and traffic lights.

The problem with classical methods is that they ignore road topology and event dynamics. For example, after a concert at a stadium, traffic redistributes non-linearly — 40% of drivers choose alternative routes. Our AI model predicts such scenarios with up to 92% accuracy on a one-hour horizon. For comparison, traditional LSTM models show MAPE of 14–18%, while our architectures based on GCN+WaveNet achieve 8–11%.

We use PyTorch and PyTorch Geometric for building graph models, and for event encoding — Temporal Fusion Transformer (TFT). Accuracy evaluation is performed on historical data broken down by day type. The result is flow speed prediction with MAPE <10% on a 30-minute horizon.

How AI improves traffic prediction accuracy

Prediction relies on four data groups:

  • Sensors: induction loops (count, speed), video detectors (vehicle classification), Wavetronix/RTMS radars.
  • Floating car data: aggregated GPS tracks from navigation services and taxi fleets.
  • Infrastructure: road graph (OpenStreetMap), traffic light phases, pedestrian crossings.
  • Events: planned (matches, concerts) and anomalous (accidents, construction, snowfall).

We combine them into a spatial-temporal model where each sensor is a graph node and roads are edges.

Why graph neural networks are more effective than LSTM

Traditional LSTMs ignore road topology. Graph convolutions (GCN) account for the fact that speed at a neighboring intersection affects the current one. Comparison of approaches:

Model Spatial dependency Temporal dependency MAPE (30 min) Latency (inference)
LSTM No Yes 14–18% <1 ms per node
GCN + LSTM Yes (static edges) Yes 10–13% 2–5 ms per graph
Graph WaveNet Yes (adaptive matrix) Yes (dilated conv) 8–11% 3–8 ms per graph

Comparative analysis on city sensor data over 12 months We use the architecture:

# TrafficGCN — hybrid of GCN and LSTM
import torch
from torch_geometric.nn import GCNConv

class TrafficGCN(nn.Module):
    def __init__(self, n_nodes, in_features, hidden, out_features):
        super().__init__()
        self.gcn1 = GCNConv(in_features, hidden)
        self.gcn2 = GCNConv(hidden, hidden)
        self.lstm = nn.LSTM(hidden, hidden, batch_first=True)
        self.fc = nn.Linear(hidden, out_features)

    def forward(self, x, edge_index, edge_weight):
        # x: [batch, seq_len, n_nodes, n_features]
        gcn_out = self.gcn1(x, edge_index, edge_weight).relu()
        gcn_out = self.gcn2(gcn_out, edge_index, edge_weight)
        lstm_out, _ = self.lstm(gcn_out)
        return self.fc(lstm_out[:, -1, :])
TrafficGCN architecture details The model uses two graph convolutions with residual connections and an LSTM layer for temporal dynamics. Training: AdamW, lr=0.001, batch_size=32, 100 epochs. Graph size — up to 5000 nodes, 15000 edges. Accuracy evaluation is performed on a held-out set (20% of data).

Key architectures — DCRNN, Graph WaveNet, ASTGCN — differ in how they handle temporal dependencies. The choice depends on graph size and forecast horizon.

How events are taken into account

Traffic is non-linear: after a football match, peak occurs in 30–60 min; an accident reduces capacity by 40–80%; rain decreases speed by 10–20%. We add event flags as input features:

event_features = {
    'stadium_match_flag': upcoming_match_within_3h,
    'weather_rain_intensity': precipitation_forecast,
    'roadwork_active': roadwork_on_segment,
    'incident_nearby': incident_within_1km_duration,
    'holiday_flag': is_holiday,
    'school_day': not is_school_holiday
}

These features are fed into the model as future covariates (Temporal Fusion Transformer). Without them, accuracy on anomalous days drops by 20%.

What does AI traffic light optimization provide?

Traditional SCOOT/SCATS react to current traffic without prediction. We replace them with an RL agent: action — phase plans, state — current and predicted speeds, reward — total network delay. On a corridor of 10–20 intersections, coordination creates a 'green wave'. Result: reduction in average travel time by 10–20%. Such smart traffic lights based on RL are an example of AI transportation systems.

Informing drivers

Predictions are sent to:

  • variable message signs (travel time, detours),
  • push notifications in apps (navigation services),
  • API for navigation services.

System metrics:

Metric Value
MAPE of flow speed (15 min) <10%
MAPE of travel time (30 min) <12%
Incident detection latency <5 min
Reduction in average travel time 10–25%

A 10–25% reduction in average travel time is tangible for every driver. For a city of a million people, this yields significant savings in public costs.

Case study: deployment in a city of 2 million residents (from our practice)

For one of our clients — City N with 2 million residents — we deployed Graph WaveNet with event-aware layers. After calibration on historical data, MAPE of speed on a 30-minute horizon was 7.8% (normal days) and 10.2% (event days). The system is integrated with the local traffic management center via the NTCIP 1211 protocol. This enabled real-time congestion analysis and coordination of 500 intersections.

What is included in the development?

  1. Data audit: sensor availability, FCD quality, road network layout.
  2. Prototype model: LSTM baseline in 2–3 weeks.
  3. GNN + event-aware model calibrated to the city.
  4. Integration with traffic light controllers and navigation services.
  5. Documentation, operator training, warranty support.

Timeline: basic prediction — from 5–6 weeks; full system — 4–5 months. Accurate estimate after data analysis.

We guarantee accuracy: MAPE not exceeding target values on the test set. Team experience — over 5 years in ITS (Intelligent Transport Systems) and 20+ projects in traffic forecasting. Our solutions fall under AI transportation and ML transportation.

Get a consultation on your system architecture. Contact us to evaluate your project — we'll select an architecture that fits your budget and city infrastructure. Order a preliminary data audit: we'll analyze available sensors and provide an initial accuracy estimate within two weeks.