Deep architectures
Deep Architecture Capstone: Design, Defend, and De-Risk a System
Design a multimodal monitoring architecture with explicit tensor contracts, routing choices, ablations, operating constraints, and failure-handling plans.
By the end you can
- Translate a product requirement into architecture-specific evidence paths
- Produce tensor, state, memory, and output contracts for a composite model
- Justify architecture choices through alternatives and decisive ablations
- Define evaluation, deployment, safety, and rollback criteria before implementation
Key idea
The capstone brief: early warning for cold-storage failures
A logistics company wants a system that predicts refrigeration failures twelve hours ahead. The inputs are multirate sensors, short maintenance notes, equipment graphs, and occasional thermal images.
The product must run at the edge during network outages, explain which evidence changed the alert, and abstain when critical sensors are missing. False alarms are costly. Missed failures destroy inventory.
Hold on to that last trade. It is not a rhetorical balance to gesture at in a design review. It is a pair of numbers, and a deployed early-warning model either survives them or does not. Later in this lesson, one such model gets measured by people who did not build it.
The task is deliberately composite: no single fashionable architecture solves every evidence path.
Example
Translate the brief into architectural requirements
Each requirement should connect to one proposed route or control.
The edge line is the one that usually stays vague. It does not have to. MLPerf Tiny fixes four tasks with named models, sizes and quality targets: keyword spotting (DS-CNN, 52.5 KB, 90% top-1), visual wake words (MobileNetV1, 325 KB, 80% top-1), image classification (ResNet, 96 KB, 85% top-1) and anomaly detection (FC-AutoEncoder, 270 KB, 0.85 AUC). It describes itself as “the collaborative effort of more than 50 organizations from industry and academia”. That was 2021.
It fixes how those models are timed, too. MLCommons, the consortium that runs the benchmark, states the rule in one line: “All MLPerf Tiny benchmarks are single stream, meaning they measure the latency of a single inference.”
So batch size one is not a hardship this brief invented. A KB budget is not an arbitrary constraint from a nervous platform team. Both are measurement conditions an industry consortium already scores against, with published quality targets attached. Write your edge requirement as a number in those units, not as an aspiration.
- Temporal history: retain slow degradation trends and rare abrupt changes across irregular sensor streams.
- Local visual evidence: detect small hot regions while preserving enough resolution for maintenance review.
- Relational context: use shared compressor, room, and power-supply connections without leaking future maintenance edges.
- Text evidence: encode terse notes and timestamps, while preventing post-failure notes from entering the forecast window.
- Edge operation: bound memory, latency, and power under batch size one with intermittent connectivity. State the bound in MLPerf Tiny's units, where the reference tasks run from a 52.5 KB DS-CNN to a 325 KB MobileNetV1, each at a named accuracy target.
- Abstention: expose missing-modality and out-of-support conditions rather than fabricating complete confidence. A left-versus-right sensor disagreement of about 59 degrees is an out-of-support condition, not a low-confidence prediction.
Visual
One defensible composite architecture
This is a starting hypothesis to test, not the required answer. Five of its six nodes name a route. The bottleneck fusion layer names a budget, and a budget is not a design decision until it is a number.
A published system fixed that number and measured what it bought. In 2021 the Multimodal Bottleneck Transformer sent all cross-modal attention through B = 4 bottleneck tokens. The alternative was letting every token of one modality attend to every token of the other. Nagrani and colleagues measured both: “We note that for early fusion (Lf = 0), bottleneck fusion outperforms vanilla cross-attention by over 2 mAP, with less than half the computational cost.” The resulting model beat the prior AudioSet state of the art by 5.9 mAP, a 12.7% relative improvement. The authors' own institution put the cost side on the Google Research blog as a “50% reduction in FLOPs compared to a vanilla multimodal transformer model”, with “four bottleneck tokens used in our experiments”.
Four tokens is not a magic constant to copy into a cold-storage system. The modalities there were not sensors and thermal images. What transfers is the shape of the claim: a specific bound, a measured accuracy difference against the unbounded alternative, and a measured cost difference. Your fusion node has to produce all three before anyone approves it.
The branches around it are hypotheses of the same kind, and each owes the same evidence. A sensor state-space branch with explicit missingness channels. A multiscale thermal branch. An equipment-graph branch restricted to edges available at the forecast cutoff. A time-aware maintenance-note encoder. Separate risk and abstention heads.
Sensor state-space branch
Process long streams with selective state and explicit missingness channels.
Thermal multiscale branch
Use local convolution or hierarchical visual attention for small and broad heat patterns.
Equipment graph branch
Aggregate only edges available at the forecast cutoff.
Maintenance-note encoder
Produce time-aware text embeddings from legal notes.
Bottleneck fusion layer
Exchange a bounded number of tokens across available modalities.
Risk and abstention heads
Predict calibrated risk, horizon, evidence quality, and review recommendation.
Comparison
Architecture alternatives worth defending against
A serious proposal names credible simpler and competing designs.
The first row is not a courtesy. Tree ensembles have been benchmarked head to head against standard and novel deep-learning methods on “a standard set of 45 datasets from varied domains with clear characteristics of tabular data”. The 2022 finding: “tree-based models remain state-of-the-art on medium-sized data (~10K samples) even without accounting for their superior speed”. The authors also released “every point of a 20 000 compute hours hyperparameter search for each learner”. That is what makes the comparison checkable rather than merely quotable.
So there are four rows to defend against. A feature-engineered gradient boosting model over aggregated sensors, graph summaries, note embeddings and image scores. A dense multimodal Transformer that tokenizes every stream into one global sequence. Late-fusion specialists trained per modality and combined through calibrated outputs. And the proposed hybrid.
Each buys something and costs something. Boosting is a strong tabular baseline that deploys easily, and it sees little raw cross-modal interaction. The dense Transformer is flexible and conceptually simple, and expensive at the edge over long sensor history. Late fusion is modular and independently debuggable, and weak at fine-grained fusion. The hybrid matches modality geometry and controls interaction cost, at the price of more interfaces to test and more integration risk.
Feature-engineered gradient boosting
Aggregate sensors, graph summaries, note embeddings, and image scores.
- Strong tabular baseline
- Easy deployment
- Limited raw cross-modal interaction
- Excellent sanity check
Dense multimodal Transformer
Tokenize every stream into one global sequence.
- Flexible interaction
- Simple conceptual interface
- High edge cost
- Long sensor history is expensive
Late-fusion specialists
Train separate modality models and combine calibrated outputs.
- Modular fallback
- Independent debugging
- Weak fine-grained fusion
- Robust operational baseline
Proposed hybrid
Use specialized routes plus bounded fusion.
- Matches modality geometry
- Controls interaction cost
- More interfaces to test
- Integration risk
Steps
Write the architecture contracts before drawing boxes
Every tensor and state should have a declared unit, axis, timestamp, and ownership boundary. That reads like a counsel of perfection. Then look at what already governs monitoring in this exact domain.
A vaccine refrigerator's thermometer is specified to the clause. WHO's performance specification for a 30-day electronic refrigerator temperature logger requires Type 1 accuracy of plus or minus 0.5 degrees Celsius. It sets the sampling contract in one sentence: “The device must measure the storage temperature at intervals not exceeding 10 minutes and log all relevant data at intervals not exceeding one hour.” Its factory-programmed alarms are defined by magnitude and dwell time together, never by a threshold alone. For Type 1: -0.5 C or below for 60 minutes, and +8 C or above for 10 hours.
The band those loggers watch is set elsewhere. CDC's Vaccine Storage and Handling Toolkit requires that “Storage units must maintain the following temperature ranges at all times: Refrigerators between 2 C and 8 C (36 F and 46 F)”, and prescribes a numbered, documented response to any temperature excursion.
Read that as a template, not as background. It specifies a measurement interval, a logging interval, a precision, an alarm defined as magnitude and duration, and the human procedure that follows an excursion. A model that consumes this data and emits an alert is joining an existing contract. Your ledger owes at least the same fields.
The five steps of this section stand. Define one prediction event, with its equipment, forecast origin, horizon and legal evidence cutoff. Write branch inputs down to sensor channels, image resolution, graph snapshot, note window and missingness masks. Declare intermediate states with dimensions, update frequency, cache lifetime and precision. Specify fusion behavior: available modalities, token budget, attention direction, fallback path. Separate the outputs into risk score, horizon, uncertainty, abstention reason and evidence summary.
Imitate the alarm clause hardest. Your alert threshold, like WHO's, should carry a duration as well as a level.
1. Define one prediction event
Specify equipment, forecast origin, horizon, and legal evidence cutoff.
2. Write branch inputs
Record sensor channels, image resolution, graph snapshot, note window, and missingness masks.
3. Declare intermediate states
Document dimensions, update frequency, cache lifetime, and precision.
4. Specify fusion behavior
State available modalities, token budget, attention direction, and fallback path.
5. Define outputs
Separate risk score, horizon, uncertainty, abstention reason, and evidence summary.
Analogy
An investigation team with specialist reports and a bounded briefing
Sensor analysts, thermal inspectors, network engineers, and maintenance readers each prepare a specialist report. A coordinator receives a limited briefing. The coordinator decides whether the evidence supports an alert.
Each analyst keeps their own findings and hands over a written summary. Neural branches instead learn distributed representations and may share gradients, so specialization, interface budgets, and fallback rules have to be designed explicitly. The briefing length is the analogue of the fusion budget. Someone has to choose it, and then show what the choice cost.
A composite architecture is only as reliable as the contracts between its specialist branches.
Example
Ablations that can change the architecture decision
Each experiment should distinguish value from complexity. The list is long because matched-condition re-evaluation reverses architecture decisions far more often than the original papers suggest.
A large set of proposed Transformer architecture modifications has already been re-run in one shared experimental setting, covering most common NLP uses of the Transformer. Narang and colleagues did it in 2021. The abstract reports the outcome plainly: “Surprisingly, we find that most modifications do not meaningfully improve performance.” The variants that did survive were concentrated among those developed in the same codebase, or amounted to relatively minor changes.
That is the standing prior against every branch in the proposed hybrid. A modification that helped in its own paper, in its own codebase, is not evidence that it will help in yours. The ablations below exist to generate that evidence, at matched latency and matched conditions. A result showing no meaningful improvement is a successful ablation, not a failed one.
- Remove graph propagation but keep graph-derived degree and load summaries to test whether message passing adds value.
- Replace state-space sensor processing with a causal convolution and a gated recurrent baseline at matched latency.
- Drop thermal images during training and evaluation to measure whether fusion helps beyond sensor shortcuts.
- Replace bottleneck cross-attention with late fusion to quantify the value of fine-grained multimodal interaction. Nagrani and colleagues put that gap at over 2 mAP for under half the computational cost. That is the shape of answer this ablation owes.
- Freeze the note encoder and compare simple pooled embeddings with token-level cross-attention.
- Reduce visual resolution until small hot spots fail, then locate the minimum acceptable token or feature scale.
Key idea
A production architecture needs a failure policy, not just a prediction
If thermal images are absent, the system may continue with reduced confidence. If key sensors are stale or the equipment graph is inconsistent, abstention may be safer. Define which failures trigger fallback, human review, retry, or no alert. The model should not silently substitute learned averages for missing evidence when the decision is safety-critical.
The cost of the opposite policy is on the public record, documented by two independent government bodies. A single wrong sensor reading was enough. The FAA issued Emergency Airworthiness Directive 2018-23-51 against the Boeing 737 MAX on 7 November 2018, and adopted it as a final rule the following month. The directive says what prompted it: “This AD was prompted by analysis performed by the manufacturer showing that if an erroneously high single angle of attack (AOA) sensor input is received by the flight control system, there is a potential for repeated nose-down trim commands of the horizontal stabilizer.” One sensor, taken as ground truth. No declared behavior for the case where it is wrong.
The second body examined the assumption underneath. The NTSB's Safety Recommendation Report ASR-19-01 issued seven recommendations in 2019, because the hazard assessment had assumed a pilot response that did not occur. The flight recorders show how far outside support the input had gone: left-side AOA readings about 20 degrees higher than the right on the Lion Air accident flight, and about 59 degrees higher on the Ethiopian Airlines accident flight.
A left-right disagreement of that size is not a hard case for a model to score. It is a case a model should never have been asked to score. That is the whole content of a failure policy: detect that the evidence is inconsistent, and hold a declared, tested route that is not "predict anyway". Note also which assumption failed at the system level. Not the sensor model, but the belief about what a human operator would do with the resulting alerts. Your abstention path has the same dependency. It is testable in the same way.
Missing evidence must change system behavior in a declared and testable way.
Steps
Build the evidence package for approval
The final submission should let another team reproduce the design decision without reading the designer's mind. Steps 1 and 4 — matched performance, and thresholds calibrated against cost — are where deployed early-warning systems have actually failed. There is a measured case of exactly that shape.
A hospital forecasting system with a costly false-alarm side and a catastrophic missed-event side is the capstone's trade under a different name. The Epic Sepsis Model is one, widely deployed and proprietary. An external validation across 38,455 hospitalizations put its AUC at 0.63, in JAMA Internal Medicine in 2021. Wong and colleagues report it in a single sentence: “The ESM also did not identify 1709 patients with sepsis (67%) despite generating alerts for an ESM score of 6 or higher for 6971 of all 38 455 hospitalized patients (18%), thus creating a large burden of alert fatigue.”
Both halves of the trade are in that sentence. Sixty-seven per cent of the events missed, while alerting on 18% of all hospitalizations. It was not a single-site anomaly either. Ostermayer and colleagues evaluated the same model across 145,885 emergency-department encounters and reported 14.7% sensitivity, 95.3% specificity, 7.6% positive predictive value and 97.7% negative predictive value within a six-hour window, in JAMIA Open in 2024. Two independent groups, two settings, and a vendor-reported quality claim that survived neither.
So build the package accordingly. Report matched performance by failure horizon, equipment family, site and missingness, and expect the pooled number to flatter you. Measure operating cost the way MLPerf Tiny does: latency of a single inference, energy, and model size against a stated quality target. A throughput average is not that, and batch size one will never see it.
Calibrate alert and abstention thresholds explicitly against inventory loss and technician workload. Use the units the sepsis validations used: how many events missed, and how many alerts issued per hundred units monitored. Then define release gates requiring improvement, stability, failure coverage, rollback and monitoring readiness. Make an independent external evaluation one of them. That is the test both sepsis papers were, and it is the only one the model's own builders cannot grade.
1. Report matched performance
Compare baselines by failure horizon, equipment family, site, and missingness.
2. Measure operating cost
Profile edge latency, memory, power, model size, and update bandwidth.
3. Stress shift and corruption
Test sensor drift, image blur, note delay, topology changes, and unseen equipment.
4. Calibrate decisions
Set alert and abstention thresholds against inventory loss and technician workload.
5. Define release gates
Require improvement, stability, failure coverage, rollback, and monitoring readiness.
Case
Rebuilt CIFAR-10 and ImageNet test sets cost every model accuracy points
Step one is where an evidence package usually goes wrong, and the size of the error has been measured. In 2019 the CIFAR-10 and ImageNet test sets were rebuilt from scratch, “closely following the original dataset creation processes”. Every model got worse. Recht and colleagues report “accuracy drops of 3% - 15% on CIFAR-10 and 11% - 14% on ImageNet”. They attribute the drops not to adaptivity but to “the models’ inability to generalize to slightly ‘harder’ images than those found in the original test sets”. A held-out split is a sample of one collection process, not of the world.
Set that next to the sepsis figures and the pattern is one pattern. A number produced inside the process that produced the data is an optimistic number. It makes no difference whether the process is a labeling pipeline or a vendor's own validation.
The capstone deliverable is an argument supported by experiments
Submit a system diagram, tensor ledger, architecture rationale, baseline matrix, ablation plan, cost profile, risk register, and release recommendation. Mark the assumptions that remain untested.
A defensible conclusion may reject the complex hybrid, if late fusion or gradient boosting meets the quality target more reliably. Architecture literacy includes knowing when not to reach for a clever architecture. There is published cover for that conclusion: tree ensembles that remained state of the art on medium-sized tabular data, and a shared-setting re-evaluation in which most Transformer modifications did not meaningfully improve performance.
The test of the deliverable is whether a stranger can check it. Every design claim should read like the ones this lesson quotes: a named bound, a measured difference, a stated cost, and a source someone else can open.
The strongest capstone chooses the simplest design that survives the required evidence and operating constraints.
What this path should leave behind
You should now be able to read an architecture diagram as a set of information routes, bottlenecks, state transitions, and operating costs. You should also recognize where data, objectives, training, and product controls begin.
The next specialized paths apply these primitives inside language, vision, optimization, generative systems, and production workflows. Carry the same demand for matched baselines and failure evidence into each domain. Carry the citations too. The habit that separates a design review from a design opinion is that every number in it came from somewhere a reader can go.
Architecture is a testable hypothesis about computation, not a substitute for the rest of the system.
Key takeaways
- A capstone architecture begins with a precise prediction event, evidence cutoff, tensor contract, and failure policy. WHO's logger specification sets the standard: a stated accuracy, measurement at intervals not exceeding 10 minutes, and alarms defined by magnitude and dwell time together.
- Specialized branches should match temporal, visual, relational, and textual evidence rather than forcing one uniform representation too early. Every fusion budget needs a number: the Multimodal Bottleneck Transformer fixed B = 4 bottleneck tokens, then measured what that bought.
- Simple tabular and late-fusion baselines test whether expensive cross-modal interaction is necessary. Across 45 tabular datasets, tree-based models remained state of the art on medium-sized data.
- Ablations should isolate graph propagation, memory mechanism, visual resolution, fusion depth, and text interaction — because in one shared experimental setting, most proposed Transformer modifications did not meaningfully improve performance.
- Missing evidence, distribution shift, latency, memory, power, and rollback belong inside architecture approval. The FAA's Emergency AD 2018-23-51 and the NTSB's report ASR-19-01 document what a single-sensor input with no abstention path costs.
- The best design is the simplest architecture that meets quality, risk, and operating requirements under reproducible external tests. The Epic Sepsis Model scored an AUC of 0.63, missing 67% of sepsis patients while alerting on 18% of hospitalizations — and only when someone outside measured it.