SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1711.05847 · 2017

AOGNets: Compositional Grammatical Architectures for Deep Learning

arXiv · PDF · Open in the Atlas

Code that ran

3 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 0 failures of our instrument; 5 no recorded run), measured 2026-11-23; 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/1711.05847.json · badge: /api/ran/1711.05847.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
iVMCL/AOGNets canonical (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
xilaili/AOGNet community (classifier label)
classifier basis not recorded on the link
3 ran · 4 no recorded run
FunctionStatusWhere it lives
is_param Ran
ran on a synthesized input
xilaili/AOGNet/aognet/utils/memonger.py
code served (permissive licence) · get_code("5561884c30661353")
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 bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

torch.manual_seed(0)

ARGS = {
    'name': 'layer.weight'
}
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 bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
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: none by the harness; any seed is in the setup block
make_mirror_plan Ran
ran on a synthesized input
xilaili/AOGNet/aognet/utils/memonger.py
code served (permissive licence) · get_code("9111a4430576d5c3")
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 MockSymbol. 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
from collections import namedtuple

torch.manual_seed(0)

# Create a mock symbol class that mimics MXNet symbol behavior
class MockSymbol:
    def __init__(self):
        self.nodes = []
        self.node_attrs = {}
        self.outputs = []
        self.output_shapes = []
    
    def __copy__(self):
        new_sym = MockSymbol()
        new_sym.nodes = self.nodes.copy()
        new_sym.node_attrs = self.node_attrs.copy()
        new_sym.outputs = self.outputs.copy()
        new_sym.output_shapes = self.output_shapes.copy()
        return new_sym
    
    def get_internals(self):
        return self
    
    def infer_shape(self, **kwargs):
        # Returns (arg_shapes, out_shapes, aux_shapes)
        return ([], self.output_shapes, [])
    
    def list_outputs(self):
        return self.outputs
    
    def __getitem__(self, idx):
        return self.nodes[idx]
    
    def __len__(self):
        return len(self.nodes)


class MockNode:
    def __init__(self, name, has_mirror_stage=False):
        self.name = name
        self.attributes = {}
        if has_mirror_stage:
            self.attributes['mirror_stage'] = 'True'
    
    def attr(self, key):
        return self.attributes.get(key)
    
    def _set_attr(self, **kwargs):
        self.attributes.update(kwargs)


# Build a mock symbol with nodes that have various output shapes
sym = MockSymbol()

# Create nodes with different names and shapes
# Parameters (should be skipped in mirror calculation)
param_node1 = MockNode("conv1_weight", has_mirror_stage=False)
param_node2 = MockNode("bn1_gamma", has_mirror_stage=False)

# Non-parameter nodes with mirror_stage attribute
data_node = MockNode("data", has_mirror_stage=False)
stage1_node = MockNode("conv1_output", has_mirror_stage=True)
stage1_node.attributes['mirror_stage'] = 'stage1'

stage2_node = MockNode("conv2_output", has_mirror_stage=True)
stage2_node.attributes['mirror_stage'] = 'stage2'

stage3_node = MockNode("bn2_output", has_mirror_stage=True)
stage3_node.attributes['mirror_stage'] = 'stage2'

sym.nodes = [param_node1, param_node2, data_node, stage1_node, stage2_node, stage3_node]
sym.outputs = [
    "conv1_weight",
    "bn1_gamma",
    "data",
    "conv1_output",
    "conv2_output",
    "bn2_output"
]

# Output shapes: (batch, channels, height, width) - small sizes
sym.output_shapes = [
    (32, 64),           # conv1_weight: param
    (64,),              # bn1_gamma: param
    (2, 3, 4, 5),       # data
    (2, 32, 4, 5),      # conv1_output
    (2, 64, 4, 5),      # conv2_output
    (2, 64, 4, 5),      # bn2_output
]

plan_info_dict = {}

ARGS = {
    'sym': sym,
    'threshold': 1,  # 1 MB threshold
    'plan_info': plan_info_dict,
}
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 MockSymbol — a MockSymbol output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockSymbol output the recorded ndim 1 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
prod Ran
ran on a synthesized input
xilaili/AOGNet/aognet/utils/memonger.py
code served (permissive licence) · get_code("d4bf79898fff9b84")
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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 numpy as np

torch.manual_seed(0)

# The function prod(shape) takes a shape (iterable of integers) and returns their product
# It iterates through each element in shape and multiplies them together

ARGS = {
    "shape": (2, 3, 4, 5)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
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: none by the harness; any seed is in the setup block
aog_block Not yet run
unverified (harvested, no recorded run)
xilaili/AOGNet/symbol/symbol_aognet.py
code served (permissive licence) · get_code("501b6fc8579e0ee3")
How it ran

no invocation recorded.

aog_unit Not yet run
unverified (harvested, no recorded run)
xilaili/AOGNet/symbol/symbol_aognet.py
code served (permissive licence) · get_code("bd0445711ecccc1e")
How it ran

no invocation recorded.

get_aog Not yet run
unverified (harvested, no recorded run)
iVMCL/AOGNets/backbones/aognet/AOG.py
pointer only (licence: NOASSERTION) · get_code("cb9ecf3a1a2ecb5a")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, iVMCL/AOGNets (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_aog Not yet run
unverified (harvested, no recorded run)
xilaili/AOGNet/aognet/aog/aog_1d.py
code served (permissive licence) · get_code("1f051511be4bd045")
How it ran

no invocation recorded.

get_symbol Not yet run
unverified (harvested, no recorded run)
xilaili/AOGNet/symbol/symbol_aognet.py
code served (permissive licence) · get_code("4797e867dbe4c93c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 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 8 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-23.

Repositories linked to this paper

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

Abstract

Neural architectures are the foundation for improving performance of deep neural networks (DNNs). This paper presents deep compositional grammatical architectures which harness the best of two worlds: grammar models and DNNs. The proposed architectures integrate compositionality and reconfigurability of the former and the capability of learning rich features of the latter in a principled way. We utilize AND-OR Grammar (AOG) as network generator in this paper and call the resulting networks AOGNets. An AOGNet consists of a number of stages each of which is composed of a number of AOG building blocks. An AOG building block splits its input feature map into N groups along feature channels and then treat it as a sentence of N words. It then jointly realizes a phrase structure grammar and a dependency grammar in bottom-up parsing the "sentence" for better feature exploration and reuse. It provides a unified framework for the best practices developed in state-of-the-art DNNs. In experiments, AOGNet is tested in the CIFAR-10, CIFAR-100 and ImageNet-1K classification benchmark and the MS-COCO object detection and segmentation benchmark. In CIFAR-10, CIFAR-100 and ImageNet-1K, AOGNet obtains better performance than ResNet and most of its variants, ResNeXt and its attention based variants such as SENet, DenseNet and DualPathNet. AOGNet also obtains the best model interpretability score using network dissection. AOGNet further shows better potential in adversarial defense. In MS-COCO, AOGNet obtains better performance than the ResNet and ResNeXt backbones in Mask R-CNN.

For agents

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

get_harvested_code_for_paper("1711.05847")
get_code_for_paper("1711.05847")
have("1711.05847")

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

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

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

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

Connect an agent — have() is free.