Skip to content
AI.info

Deep architectures

Deep Learning Architectures as Information Routing

Build a decision-oriented map of deep architectures by tracing how information moves, mixes, persists, and becomes an output.

By the end you can

Architecture begins with a traffic question

A deep network is more than a stack of layers. Its architecture decides which pieces of information can meet, how often they interact, and what must pass through a bottleneck.

A convolution routes evidence through local neighborhoods. Recurrence carries a state forward. Attention creates content-dependent routes. A graph network follows observed relationships. A generative model organizes a path from randomness, or from partial observations, to a structured sample.

Those routes have lengths and costs. Both have been measured and published. The rest of this lesson compares them with the numbers their authors reported, not with adjectives.

Architecture is the topology of possible computation before training decides the parameter values.

Case

AlexNet won ILSVRC-2012 by nearly eleven points of top-5 error

Routing choices have decided competitions. In 2012 a convolutional network entered the ILSVRC classification task and won it. Its authors state the outcome flatly in their abstract: they “entered a variant of this model in the ILSVRC-2012 competition and achieved a winning top-5 test error rate of 15.3%, compared to 26.2% achieved by the second-best entry”.

The organisers' own Task 1 results table records the same two submissions to five decimal places. SuperVision, which used extra ImageNet Fall 2011 training data, scored 0.15315. ISI scored 0.26172. The table describes the ISI system as a “Weighted sum of scores from each classifier with SIFT+FV, LBP+FV, GIST+FV, and CSIFT+FV”. The runner-up was a carefully engineered combination of hand-designed descriptors. The winner was a routing plan.

That plan fits in one sentence of the same abstract. The network “has 60 million parameters and 650,000 neurons, consists of five convolutional layers, some of which are followed by max-pooling layers, and three fully-connected layers with a final 1000-way softmax”. Training found the parameters. A person chose the arrangement.

Figure

Depth and cost stopped moving together. The error rates are the official ILSVRC results tables and the ResNet paper’s own 3.57 per cent; the FLOPs are its section 4.1.

Visual

Six recurring information-routing patterns

Most modern models combine several of these patterns rather than belonging to one box.

The last node, conditional routing, carries the sharpest published numbers. A gate makes the difference between parameters stored and parameters spent visible in a single figure. The Switch Transformer paper put it this way in 2022: “The result is a sparsely-activated model—with an outrageous number of parameters—but a constant computational cost.” It reports up to 7x faster pre-training at equal compute, gains across all 101 languages of mT5, and a 4x speedup over T5-XXL, while scaling to trillion-parameter models.

A shipped product gives the same mechanism a concrete gate. Mixtral 8x7B routes each token, at each layer, to 2 of 8 feed-forward experts. Mistral AI discloses what that costs. Each token has access to 47B parameters and uses only 13B active parameters during inference, over a 32k-token context. Two numbers, one architecture: 47B stored, 13B spent.

FigureHierarchy · 6 levels
  • Local routing

    Nearby elements interact through shared operations, as in convolutional stages.

    • Stateful routing

      A compact state carries selected information across ordered steps.

      • Global or sparse routing

        Elements exchange information through attention or selected long-range links.

        • Relational routing

          Messages follow edges between entities rather than positions on a grid.

          • Latent routing

            An encoder maps observations into a compressed or probabilistic representation.

            • Conditional routing

              A gate activates different parameters, experts, or memory locations for different inputs.

Comparison

The questions that expose an architecture’s real design

Names such as Transformer or U-Net are shorthand. These questions reveal what a design actually assumes. Each of them has an answer someone has already tabulated.

Who can communicate, and across what distance? In 2017 the Transformer's authors did not argue that point. They tabulated it. Maximum path length between any two positions: O(1) for self-attention, O(n) for a recurrent layer, O(log_k(n)) for dilated convolutions, and O(n/r) for self-attention restricted to a neighbourhood of size r. The per-layer costs are O(n^2*d), O(n*d^2) and O(k*n*d^2) respectively. Why put that column in the paper at all? Because “One key factor affecting the ability to learn such dependencies is the length of the paths forward and backward signals have to traverse in the network.” The textbook Dive into Deep Learning derives the same quantities independently, and states the maximum path length as O(n/k) for a k-kernel CNN, O(n) for an RNN and O(1) for self-attention. Connectivity is not a style. It is an exponent.

What is shared, and what does sharing buy? Three stacked 3x3 convolutions have the same 7x7 effective receptive field as one 7x7 layer. Simonyan and Zisserman priced that in 2015. The stack carries 27C^2 weights against the wide layer's 49C^2 — the single wide layer needs 81% more, the stack 45% fewer, for the same reach. Sharing does not by itself make a network small. Their own table still gives 138 million parameters for the 16-layer configuration D and 144 million for the 19-layer E. Szegedy and four colleagues carried the same factorisation further in 2016: “Still the two-layer solution is 33% cheaper for the same number of output filters, if the number of input and output filters is equal.” Their network reached 21.2% top-1 and 5.6% top-5 error on the ILSVRC 2012 validation set, with under 25 million parameters and 5 billion multiply-adds per inference. Better accuracy than VGG's configurations, on a fraction of the parameters.

What persists across a bottleneck, and what shape leaves the network? The U-Net answered both with one topology: “The architecture consists of a contracting path to capture context and a symmetric expanding path that enables precise localization.” The test was the ISBI 2012 EM segmentation challenge. Training data was 30 consecutive 512x512 serial-section TEM images of the Drosophila first instar larva ventral nerve cord, with the test ground truth withheld. The U-Net used no pre- or post-processing. It recorded a warping error of 0.0003529 and a Rand error of 0.0382. That ranked first on the challenge's warping-error leaderboard of 6 March 2015, ahead of the sliding-window ConvNet of IDSIA at 0.000420 and 0.0504. The qualifier belongs in the same breath. The organisers' own official ranking metric was the foreground-restricted Rand F-score, and on that metric two entries using dataset-specific post-processing scored better. On the ISBI cell tracking challenge 2015 the margins are wider: an average IOU of 0.9203 on PhC-U373 against 0.83 for the second best, and 0.7756 on DIC-HeLa against 0.46. Skip connections are what let a dense spatial map come out the far side of a compression path.

FigureComparison · 4 columns

Who can communicate?

The connectivity pattern determines the immediate receptive field.

  • Adjacent pixels or samples
  • Earlier recurrent states
  • All tokens or selected blocks
  • Graph neighbors or retrieved memory

What persists?

Some architectures preserve state, resolution, uncertainty, or external memory.

  • Hidden state
  • Skip-connected detail
  • Latent variables
  • Cached or addressable records

What is shared?

Parameter sharing controls efficiency and inductive bias.

  • Kernel across positions
  • Recurrent transition across time
  • Expert across routed tokens
  • Encoder across modalities

What is the output path?

The decoder or head determines how representations become decisions or samples.

  • One pooled prediction
  • Dense spatial map
  • Autoregressive sequence
  • Iterative denoising trajectory

Example

Real systems are architectural composites

A useful design review decomposes the system instead of assigning it one fashionable label. The best-documented composites let you check that decomposition against someone else's scoring.

AlphaFold2's margin at CASP14 was measured by an independent assessor. The official final tertiary-structure group ranking lists group 427, AlphaFold2, assessed on 92 domains, with a summed z-score of 244.0217 and an average z-score of 2.6524. The second-placed group, 473 (BAKER), scored 90.8241 and 0.9872. The 2021 paper in Nature locates the source of that margin: “Underpinning the latest version of AlphaFold is a novel machine learning approach that incorporates physical and biological knowledge about protein structure, leveraging multi-sequence alignments, into the design of the deep learning algorithm.” The routing is nameable piece by piece. An MSA representation and a pairwise-residue representation, exchanged through the Evoformer, then a structure module.

The text-to-image composite is equally decomposable, and its costs are published. One sentence of the latent-diffusion paper of 2022 gives the conditioning mechanism: “By introducing cross-attention layers into the model architecture, we turn diffusion models into powerful and flexible generators for general conditioning inputs such as text or bounding boxes and high-resolution synthesis becomes possible in a convolutional manner.” It describes a 1.45-billion-parameter text-to-image model trained on LAION-400M. On unconditional LSUN-Bedrooms that model scored close to ADM “despite utilizing half its parameters and requiring 4-times less train resources”, in a field where pixel-space diffusion models cost 150-1000 V100 days. The bottleneck is not a detail of the design. It is the reason the system is trainable at all.

  • Warehouse inspection: a convolutional backbone extracts local visual evidence, a feature pyramid preserves multiple scales, and a small head predicts defects.
  • Clinical forecasting: an encoder processes irregular measurements, a state model summarizes history, and separate heads estimate risk and uncertainty.
  • Image–text retrieval: two encoders produce comparable embeddings, while a contrastive objective shapes the shared space.
  • Conditional image synthesis: Stability AI's SDXL keeps the latent-diffusion composition — text encoder, cross-attention, latent decoder — and scales the routed part. Its UNet rises from 860M parameters in Stable Diffusion 1.4/1.5 to 2.6B, with a cross-attention context of 2048 against 768 and a further 817M parameters in the text encoders themselves.
  • Protein structure prediction: AlphaFold2 combines relational routing over residue pairs, a latent MSA representation exchanged with it through the Evoformer, and a structure module as the output head — three families in one system, scored on 92 domains at 244.0217 against the runner-up's 90.8241.

Analogy

A city plan, not a list of buildings

A city is planned before the businesses that will occupy it are chosen. Roads decide which districts can interact. Bridges determine bottlenecks. Zoning controls which activities share infrastructure.

Roads are physical; neural routes are learned numeric transformations. But a poor connectivity plan cannot be repaired merely by adding more parameters. A plan that puts n intersections between two districts stays an O(n) plan, however much traffic you pour into it.

Architecture controls the paths available to learning; optimization only tunes what travels along them.

Key idea

A larger architecture is not a more appropriate architecture

Parameter count measures capacity only imperfectly. A model can be large and still poorly matched to the geometry, timescale, or output constraints of its task. Operating costs matter too. Memory traffic, sequential dependencies, activation size, routing imbalance and sampling steps can each dominate the nominal number of parameters.

The residual-network paper made that point arithmetically in 2016. It reported residual nets “with a depth of up to 152 layers—8x deeper than VGG nets but still having lower complexity”. Then it supplied the arithmetic behind the claim: “the 152-layer ResNet (11.3 billion FLOPs) still has lower complexity than VGG-16/19 nets (15.3/19.6 billion FLOPs)”. An ensemble of these networks reached “3.57% error on the ImageNet test set” and took “1st place on the ILSVRC 2015 classification task”. Depth was the winning variable. Depth is not what a FLOP budget or a parameter count measures.

The same lesson repeats where the cost is measured in machine-days rather than FLOPs. The Transformer's abstract reports: “On the WMT 2014 English-to-French translation task, our model establishes a new single-model state-of-the-art BLEU score of 41.0 after training for 3.5 days on eight GPUs, a small fraction of the training costs of the best models from the literature.” The big model also reached 28.4 BLEU on WMT 2014 English-to-German, after 300,000 steps at 1.0 s per step on one machine with 8 NVIDIA P100 GPUs. Then Facebook AI Research took the same architecture and changed the schedule. Its table lists the 28.4 and 41.0 on newstest2014 as the reference row. Its abstract reports matching that English-to-German accuracy in under 5 hours on 8 GPUs, and reaching 29.3 BLEU in 85 minutes on 128 GPUs. One topology, one score, and an operating cost that moved by orders of magnitude. Not one line of the architecture changed.

Compare architectures by the whole computation graph and operating regime, not by parameter count alone.

Steps

A first architecture triage

Use this pass before you build anything or choose a benchmark. Each step asks for a number that someone will eventually publish about your system: a path length, a parameter count, a FLOP budget, a wall-clock training time, an error on a named benchmark.

FigureProcess · 5 steps
  1. 1. Write the tensor contracts

    Specify input axes, variable lengths, missing values, and required output shapes.

  2. 2. Mark essential relationships

    Separate local, long-range, temporal, hierarchical, and relational dependencies.

  3. 3. Locate irreversible bottlenecks

    Identify pooling, compression, sampling, quantization, or causal masks that discard access.

  4. 4. Add operating constraints

    State latency, memory, throughput, batch, and update requirements.

  5. 5. Define decisive ablations

    Plan comparisons that isolate the value of each routing choice.

This path studies architecture, not every downstream recipe

Later paths treat vision, language, audio, optimization and generative products in their own contexts. Here the goal is to understand reusable architectural patterns and their failure modes.

That separation matters. A Transformer block is an architecture; prompt engineering is not. A diffusion denoiser is an architecture; a content-moderation policy is a product control. The under 5 hours that Facebook AI Research needed for 28.4 BLEU belong to the training procedure, not to the topology that scored it.

Keep model topology distinct from data, objective, training procedure, and product workflow.

Key takeaways