SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2202.08557 · AAAI · 2022

CADRE: A Cascade Deep Reinforcement Learning Framework for Vision-Based Autonomous Urban Driving

Jian Tang, Chi Liu, Zhengping Che, Kun Wu, Zhiyuan Xu, Qi Lu, Yinuo Zhao

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (7 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 8 have no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2202.08557.json · badge: /api/ran/2202.08557.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
BIT-MCS/Cadre marked official in Papers with Code
Papers with Code archive
8 ran · 1 no recorded run
FunctionStatusWhere it lives
BCBranch Ran
ran on a synthesized input · constructed an object; no result was computed
BIT-MCS/Cadre/carla_perception/Networks/danet.py
code served (permissive licence) · get_code("c5c3e852207e4c0f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, BCBranch: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class Flatten(nn.Module):
    def forward(self, x):
        return x.view(x.size(0), -1)

# Define net_params configuration
net_params = {
    'z_dims': 16
}

# Define ARGS mapping
ARGS = {
    'net_params': net_params
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BCBranch — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BCBranch output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
BasicBlock Ran
ran on a synthesized input · constructed an object; no result was computed
BIT-MCS/Cadre/carla_perception/Networks/danet.py
code served (permissive licence) · get_code("e43df4e3aec06998")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, BasicBlock: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

def conv3x3(in_planes, out_planes, stride=1):
    """3x3 convolution with padding"""
    return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False)

class BasicBlock(nn.Module):
    expansion = 1

    def __init__(self, inplanes, planes, stride=1, downsample=None):
        super(BasicBlock, self).__init__()
        self.conv1 = conv3x3(inplanes, planes, stride)
        self.bn1 = nn.BatchNorm2d(planes)
        self.relu = nn.ReLU(inplace=False)
        self.conv2 = conv3x3(planes, planes)
        self.bn2 = nn.BatchNorm2d(planes)
        self.downsample = downsample
        self.stride = stride

    def forward(self, x):
        identity = x
        out = self.conv1(x)
        out = self.bn1(out)
        out = self.relu(out)
        out = self.conv2(out)
        out = self.bn2(out)
        if self.downsample is not None:
            identity = self.downsample(x)
        out += identity
        out = self.relu(out)
        return out

downsample_module = nn.Sequential(
    nn.Conv2d(3, 4, kernel_size=1, stride=2, bias=False),
    nn.BatchNorm2d(4)
)

ARGS = {
    "inplanes": 3,
    "planes": 4,
    "stride": 2,
    "downsample": downsample_module
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BasicBlock — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BasicBlock output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Bottleneck Ran
ran on a synthesized input · constructed an object; no result was computed
BIT-MCS/Cadre/carla_perception/Networks/danet.py
code served (permissive licence) · get_code("c0887ec4580aa5e6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Bottleneck: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The Bottleneck forward method expects:
# - x: input tensor of shape (batch, inplanes, height, width)
# - It uses self.downsample which can be None or a callable nn.Module
# - All conv layers and batch norms are already defined in __init__

# Create a simple downsample module that the forward method may use
downsample_module = nn.Sequential(
    nn.Conv2d(64, 256, kernel_size=1, stride=2, bias=False),
    nn.BatchNorm2d(256)
)

ARGS = {
    "inplanes": 64,
    "planes": 64,
    "stride": 2,
    "downsample": downsample_module
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Bottleneck — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Bottleneck output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
DANetHead Ran
ran on a synthesized input · constructed an object; no result was computed
BIT-MCS/Cadre/carla_perception/Networks/danet.py
code served (permissive licence) · get_code("941343f2a32b7c4d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, DANetHead: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "in_channels": 64,
    "out_channels": 19,
    "norm_layer": nn.BatchNorm2d
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DANetHead — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DANetHead output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
InterTaskAtt Ran
ran on a synthesized input · constructed an object; no result was computed
BIT-MCS/Cadre/carla_perception/Networks/danet.py
code served (permissive licence) · get_code("dc6c8f7c0c917429")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, InterTaskAtt: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class Flatten(nn.Module):
    def forward(self, x):
        return x.view(x.size(0), -1)

class InterTaskAtt(nn.Module):
    def __init__(self, net_params):
        super(InterTaskAtt, self).__init__()
        self.input_h = 5
        self.input_w = 8
        self.da_feature_channel = net_params['da_feature_channel']
        self.inter_att_dims = net_params['inter_att_dims']
        self.model_name = net_params['model_name']
        if self.model_name == 'danet':
            self.z_dims = net_params['z_dims']
        elif self.model_name == 'da_beta_vae':
            self.z_dims = net_params['inter_att_dims']
        self.att_type = net_params['att_type']
        if self.att_type == 'transformer':
            self.input_dim = self.da_feature_channel * self.input_h * self.input_w
            self.temperature = self.z_dims ** 0.5
            self.visual_query_layer = nn.Sequential(Flatten(), nn.Linear(in_features=self.input_dim, out_features=self.inter_att_dims), nn.LeakyReLU(), nn.Linear(in_features=self.inter_att_dims, out_features=self.z_dims))
            self.bc_query_layer = nn.Sequential(Flatten(), nn.Linear(in_features=self.input_dim, out_features=self.inter_att_dims), nn.LeakyReLU(), nn.Linear(in_features=self.inter_att_dims, out_features=self.z_dims))
            self.visual_key_layer = nn.Sequential(Flatten(), nn.Linear(in_features=self.input_dim, out_features=self.inter_att_dims), nn.LeakyReLU(), nn.Linear(in_features=self.inter_att_dims, out_features=self.z_dims))
            self.bc_key_layer = nn.Sequential(Flatten(), nn.Linear(in_features=self.input_dim, out_features=self.inter_att_dims), nn.LeakyReLU(), nn.Linear(in_features=self.inter_att_dims, out_features=self.z_dims))
            self.visual_value_layer = nn.Sequential(Flatten(), nn.Linear(in_features=self.input_dim, out_features=self.inter_att_dims), nn.LeakyReLU(), nn.Linear(in_features=self.inter_att_dims, out_features=self.z_dims))
            self.bc_value_layer = nn.Sequential(Flatten(), nn.Linear(in_features=self.input_dim, out_features=self.inter_att_dims), nn.LeakyReLU(), nn.Linear(in_features=self.inter_att_dims, out_features=self.z_dims))
            self.dropout = nn.Dropout(0.1)
            self.softmax = nn.Softmax(dim=-1)

    def forward(self, da_visual_x, da_bc_x):
        b, c, h, w = da_visual_x.size()
        if self.att_type == 'transformer':
            da_visual_x = da_visual_x.view(b, -1)
            da_bc_x = da_bc_x.view(b, -1)
            da_visual_q = self.visual_query_layer(da_visual_x)
            da_visual_k = self.visual_key_layer(da_visual_x)
            da_visual_v = self.visual_value_layer(da_visual_x)
            da_bc_q = self.bc_query_layer(da_bc_x)
            da_bc_k = self.bc_key_layer(da_bc_x)
            da_bc_v = self.bc_value_layer(da_bc_x)
            da_visual_q = da_visual_q.view(b, 1, self.z_dims).permute(0, 2, 1)
            da_bc_k = da_bc_k.view(b, 1, self.z_dims)
            visual2bc_energy = torch.bmm(da_visual_q / self.temperature, da_bc_k)
            visual2bc_att = self.dropout(self.softmax(visual2bc_energy))
            da_bc_v = da_bc_v.view(b, 1, self.z_dims)
            att_bc_out = torch.bmm(da_bc_v, visual2bc_att.permute(0, 2, 1))
            att_bc_out = att_bc_out.view(b, -1)
            da_bc_v = da_bc_v.view(b, -1)
            att_bc_out = att_bc_out + da_bc_v
            return att_bc_out

ARGS = {
    'net_params': {
        'da_feature_channel': 4,
        'inter_att_dims': 8,
        'model_name': 'danet',
        'z_dims': 6,
        'att_type': 'transformer'
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type InterTaskAtt — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a InterTaskAtt output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ResNet Ran
ran on a synthesized input · constructed an object; no result was computed
BIT-MCS/Cadre/carla_perception/Networks/danet.py
code served (permissive licence) · get_code("09ccd87f987a4776")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, ResNet: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Define a minimal block class that matches how _make_layer uses it
class BasicBlock(nn.Module):
    expansion = 1
    
    def __init__(self, inplanes, planes, stride=1, downsample=None):
        super(BasicBlock, self).__init__()
        self.conv1 = nn.Conv2d(inplanes, planes, kernel_size=3, stride=stride, padding=1, bias=False)
        self.bn1 = nn.BatchNorm2d(planes)
        self.relu = nn.ReLU(inplace=False)
        self.conv2 = nn.Conv2d(planes, planes, kernel_size=3, stride=1, padding=1, bias=False)
        self.bn2 = nn.BatchNorm2d(planes)
        self.downsample = downsample
        self.stride = stride
    
    def forward(self, x):
        identity = x
        out = self.conv1(x)
        out = self.bn1(out)
        out = self.relu(out)
        out = self.conv2(out)
        out = self.bn2(out)
        if self.downsample is not None:
            identity = self.downsample(x)
        out += identity
        out = self.relu(out)
        return out

ARGS = {
    'block': BasicBlock,
    'layers': [2, 2, 2, 2],
    'input_channel': 3,
    'classes_num': 1000,
    'zero_init_residual': False,
    'bias_first': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResNet — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ResNet output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Reshape Ran
ran on a synthesized input
BIT-MCS/Cadre/carla_perception/Networks/danet.py
code served (permissive licence) · get_code("28a1013ec99dc908")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

class Reshape(nn.Module):

    def __init__(self, c, h, w):
        super(Reshape, self).__init__()
        self.c = c
        self.h = h
        self.w = w

    def forward(self, x):
        return x.view(-1, self.c, self.h, self.w)


INIT_ARGS = {
    'c': 3,
    'h': 4,
    'w': 5,
}

ARGS = {
    'x': torch.randn(2, 60),
}

if __name__ == '__main__':
    reshape_module = Reshape(**INIT_ARGS)
    output = reshape_module(**ARGS)
    print(f"Input shape: {ARGS['x'].shape}")
    print(f"Output shape: {output.shape}")
    print(f"Expected shape: (2, {INIT_ARGS['c']}, {INIT_ARGS['h']}, {INIT_ARGS['w']})")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
VisualBranch Ran
ran on a synthesized input · constructed an object; no result was computed
BIT-MCS/Cadre/carla_perception/Networks/danet.py
code served (permissive licence) · get_code("2bd03eea7e216afb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, VisualBranch: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'net_params': {
        'net_name': 'test_net',
        'model_name': 'test_model',
        'input_channel': 3,
        'camera_output_channel': 3,
        'left_camera_output_channel': 3,
        'right_camera_output_channel': 3,
        'light_classes_num': 4,
        'z_dims': 128,
        'pred_light_state': True,
        'pred_light_dist': True,
        'pred_lidar': True,
        'pred_topdown_rgb': True,
        'pred_topdown_seg': True,
        'pred_route': True,
        'pred_camera_seg': True,
        'pred_left_camera_seg': True,
        'pred_right_camera_seg': True,
        'pred_bc': False,
        'da_feature_channel': 512,
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type VisualBranch — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a VisualBranch output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
DANet Not yet run
unverified (harvested, no recorded run)
BIT-MCS/Cadre/carla_perception/Networks/danet.py
code served (permissive licence) · get_code("b93a125692583c0a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Vision-based autonomous urban driving in dense traffic is quite challenging due to the complicated urban environment and the dynamics of the driving behaviors. Widely-applied methods either heavily rely on hand-crafted rules or learn from limited human experience, which makes them hard to generalize to rare but critical scenarios. In this paper, we present a novel CAscade Deep REinforcement learning framework, CADRE, to achieve model-free vision-based autonomous urban driving. In CADRE, to derive representative latent features from raw observations, we first offline train a Co-attention Perception Module (CoPM) that leverages the co-attention mechanism to learn the inter-relationships between the visual and control information from a pre-collected driving dataset. Cascaded by the frozen CoPM, we then present an efficient distributed proximal policy optimization framework to online learn the driving policy under the guidance of particularly designed reward functions. We perform a comprehensive empirical study with the CARLA NoCrash benchmark as well as specific obstacle avoidance scenarios in autonomous urban driving tasks. The experimental results well justify the effectiveness of CADRE and its superiority over the state-of-the-art by a wide margin.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2202.08557")
get_code_for_paper("2202.08557")
have("2202.08557")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2202.08557.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2202.08557.svg)](https://syntology.ai/paper/2202.08557)

Connect an agent — have() is free.