Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Chapter 10 pilot: learning path and worked exercises

Use this page to work through the complete introductory pilot and decide when you are ready to extend it. The pilot combines graduate-level problem formulation with a deliberately small calculation whose assumptions and errors can be inspected.

The learning path

StepActivityEvidence you should produce
1. PredictRead Chapter 10 Sections 10.1-10.4; derive the resonant-sheet limitsA forward/inverse problem statement and a geometry-level split diagram
2. Learn a baselineRun the starter notebookGenerator checks, validation choice, held-out errors, and verified inverse proposal
3. Compare modelsRead Section 10.5 and run the neural comparisonFour-method comparison, three neural initializations, phase masking, and power diagnostics
4. Challenge the resultRead Sections 10.6-10.9 and work the examples belowExplanation of inverse ambiguity, optimization risk, and the limits of the evidence
5. ReportComplete Lab AA reproducible notebook and a short scientific interpretation
6. Plan a device studyReview Lab B-D outlinesA proposed full-wave dataset, constraints, validation protocol, and solver budget

Suggested teaching use: one session for the physical model, splitting, and kernel notebook; a second for neural comparison and inverse verification. Assign reading and the written interpretation between or after sessions. This is a planning suggestion, not a fixed course timetable.

Before full-wave Lab B, complete the wave, unit-cell, diffraction, and numerical-verification material in Chapters 2, 3, 4, and 6. Before fabrication-aware Lab C, connect the synthesis and experimental/material considerations in Chapters 5 and 9. The analytical Stage A can be completed first if its stated model assumptions are understood.

Before opening Python

Try these four predictions:

  1. At resonance, will the synthetic sheet transmit or reflect? What happens to transmission phase there?

  2. If a retrieved spectrum conserves power perfectly, does it necessarily predict the requested geometry accurately?

  3. Will a more flexible network necessarily beat interpolation with 40 smooth, one-dimensional training examples?

  4. Can an optimizer find a model’s errors more effectively than a random test set does?

Return to your answers after inspecting the actual numerical tables. The value of the pilot is the reasoning that connects a calculation to its claim.

Worked example 1: conservation and resonance

Starting from r=−γ/(γ−iΔ)r=-\gamma/(\gamma-i\Delta) and t=−iΔ/(γ−iΔ)t=-i\Delta/(\gamma-i\Delta),

∣r∣2+∣t∣2=γ2+Δ2γ2+Δ2=1.|r|^2+|t|^2=\frac{\gamma^2+\Delta^2}{\gamma^2+\Delta^2}=1.

At Δ=0\Delta=0, r=−1r=-1 and t=0t=0: total reflection with a phase reversal. At ∣Δ∣=γ|\Delta|=\gamma, both power fractions are 1/21/2. As ∣Δ∣/γ|\Delta|/\gamma grows, r→0r\to0 and t→1t\to1.

For the complete symmetric two-port matrix, also check r∗t+t∗r=0r^*t+t^*r=0. The product r∗t=iγΔ/(γ2+Δ2)r^*t=i\gamma\Delta/(\gamma^2+\Delta^2) has zero real part, so the off-diagonal terms vanish. This verifies unitarity for the analytical model. It does not prove that an arbitrary learned output obeys it.

Interpretation: transmission phase is undefined at its exact zero. A numerical phase reported there is not a usable physical target. Phase metrics must state an amplitude threshold and the excluded fraction.

Worked example 2: the phase branch cut

Let t=ei179∘t=e^{i179^\circ} and t^=e−i179∘\widehat t=e^{-i179^\circ}. Ordinary subtraction gives −358∘-358^\circ. The circular difference is

arg⁡(t^t∗)=2∘.\arg(\widehat t t^*)=2^\circ.

The complex-amplitude error is

∣t^−t∣=2sin⁡(1∘)≈0.03490.|\widehat t-t|=2\sin(1^\circ)\approx0.03490.

Both amplitudes are one, so the example is well away from a transmission zero. A regression target that stores real and imaginary parts has no discontinuity at this branch cut. It still needs enough data to learn the response.

Try next: reduce one amplitude to 0.01 while keeping its phase. Explain why a small circular phase error would now hide a large amplitude error.

Worked example 3: what counts as an unseen example?

Suppose 80 geometries each contribute 101 frequencies. Randomly splitting all 8080 frequency rows can put the same geometry in every set. A test frequency near a training frequency may then be easy to predict without learning how an unseen geometry behaves.

For a new-geometry claim, shuffle the 80 geometry IDs and allocate 40 complete spectra to training, 20 to validation, and 20 to testing. Fit normalization on the 40 training geometries; choose model settings using validation error; report test results after choices are frozen. The model can still interpolate within the geometric range, so call this a held-out geometry test, not evidence for arbitrary shapes or materials.

A harder, distinct experiment can reserve a contiguous interval of gg. An interior withheld interval tests interpolation across a gap; a withheld interval beyond the training range tests extrapolation. Specify the interval and the remaining training/validation rules in advance. Keep all results from that experiment separate from the pilot’s reference split.

Interpretation: split design is part of the scientific question, not merely a data-processing convenience.

Worked example 4: inverse ambiguity and surrogate error

For y=x2y=x^2, both x=−1x=-1 and x=1x=1 produce y=1y=1. A deterministic inverse predictor trained with squared design error on equally common labels minimizes

12[(x^−1)2+(x^+1)2]=x^2+1\tfrac12[(\widehat x-1)^2+(\widehat x+1)^2]=\widehat x^2+1

at x^=0\widehat x=0. Yet its forward response is zero. Averaging valid inverse solutions can produce an invalid solution.

A tandem model instead penalizes a proposed design’s response through a fixed forward surrogate. This avoids directly averaging conflicting labels, but it introduces another question: is the surrogate correct at the proposed design? If it predicts F^(x)=1\widehat F(x)=1 while the actual response is F(x)=0.6F(x)=0.6, a zero surrogate loss still leaves a response error of 0.4.

Verification procedure: enforce design bounds, retain several candidate designs, evaluate each with the original physical model, and compare the same objective before and after verification. For a full-wave claim, establish convergence and check the relevant output channels. Adding new training examples does not justify reusing a previously inspected test set for model selection.

Worked example 5: when does the training library pay for itself?

Use a hypothetical cost model, with all times measured in seconds:

CostAssumption
Initial library2000 solver calls at 30 s each: 60000 s
Training600 s
Conventional design task200 solver calls: 6000 s per task
Surrogate search per task60 s
Independent verification per task5 solver calls: 150 s

For QQ repeated tasks using the same valid library, the surrogate workflow costs 60600+210Q60600+210Q, whereas conventional search costs 6000Q6000Q. The former is cheaper when

Q>606006000−210≈10.47.Q>\frac{60600}{6000-210}\approx10.47.

Under these assumptions, the first integer break-even is 11 tasks. These are invented teaching costs, not timings from the notebook. If materials change, the target lies outside the library’s domain, or retraining is required, the calculation changes. Failed simulations and additional verification belong in the cost ledger. Equal time budgets also do not guarantee equal solution quality: compare verified target performance.

Pilot report and review criteria

Submit the two notebooks with saved outputs and a short interpretation, or one combined report that links to both. A reviewer should be able to locate:

A high-quality report can conclude that a neural network was unnecessary for this small task. A model ranking without split information or verification is incomplete. A convergence warning should be explained, not removed from the saved record.

What is complete, and what comes next?

The Chapter 10 introductory pilot comprises the chapter, these worked exercises, both executed analytical notebooks, and the four detailed lab outlines. Full-wave dataset generation, fabricated-device validation, tandem/generative implementations, and active-learning experiments are future work described in Labs B-D.

Chapter 4 provides the Floquet-channel foundation that those labs need, with a browser explorer and an analytical notebook. Chapter 3 now supplies a first validated full-wave TE ridge library and reproducible solver. It is a single-wavelength teaching dataset; the Chapter 10 full-wave learning, inverse-design, and active-learning stages still require a broader chosen dataset and their own execution. The syllabus keeps the ten-chapter course map visible while the chapters are developed.