Skip to content

docs: add composable recurrences as the third approach - #31

Merged
seabbs merged 4 commits into
mainfrom
docs/composable-recurrences-approach
Sep 30, 2026
Merged

seabbs merged 4 commits into
mainfrom
docs/composable-recurrences-approach

Conversation

@seabbs-bot

Copy link
Copy Markdown
Collaborator

What

Adds ComposableRecurrences as the third approach, alongside composed distributions and composable Turing models.

  • New approaches/composable-recurrences.qmd, with the same structure as the sibling approach pages. It has a hero with a code window, "The approach", "Package map", "Status" and "Where next".
  • The package map is the inline SVG from the ecosystem report. Its colours come from currentColor and the theme variables (--epi-primary, --border-color, and a new --epi-accent in both theme-light.scss and theme-dark.scss), so it follows light and dark mode. The styles are scoped under .cr-map in styles.css.
  • A third card on approaches/index.qmd. The line saying both approaches share the same packages now says the approaches are designed to work together, since ComposableRecurrences has no runtime dependency on the others.
  • A new Approaches entry in the shared navbar partial, a row on the packages page and an updated README structure list.

Status claims

  • The API (Recurrence, Convolution, TimeVarying, PerStratum, Pairwise, coupling and modifier interfaces) exists on the unmerged core branch of ComposableRecurrences.jl. main is still the scaffold. The page says so.
  • The built-in modifiers, the native Mooncake and Enzyme adjoints and a registered release are described as planned.
  • The code example follows the doctested Recurrence and Convolution docstring examples on core, with lag-first kernels and callable operators.
  • The benchmark numbers (1.75–15× with no rules, 8–25× with analytic adjoints for delays and renewals) are prototype measurements on isolated kernels at 200 days and 20 lags. The page states that.

Please check

  • The map keeps the report's labels. It names BVDOutbreakSize, which is not an EpiAware package, and internals such as ADRegistry and accumulate_scan. One label changed, from mooncake_rules.jl → native adjoints to hand-written rules → shared adjoints. Should the public map be trimmed?
  • The packages row is in the "modelling" category, marked experimental, and links to GitHub because no docs site is live yet.
  • The navbar partial is shared with the tutorials site through a submodule. The new entry reaches that site on the next submodule bump.
  • No tutorials row was added, as there are no tutorials for this approach yet.

Verification

Rendered approaches/composable-recurrences.qmd, approaches/index.qmd and packages/index.qmd with Quarto 1.9.32. Headless Chromium screenshots of the new page in light and dark mode show the map with themed colours in both. Both generated Bootstrap stylesheets define --epi-primary, --border-color and --epi-accent.

This was opened by a bot. Please ping @seabbs for any questions.

seabbs-bot and others added 3 commits September 30, 2026 15:34
Describes Recurrence and Convolution, how they relate to the other two
approaches, and the package map. The map colours come from the theme
variables, with a new --epi-accent in both themes.

Co-authored-by: Sam Abbott <contact@samabbott.co.uk>
Co-authored-by: Sam Abbott <contact@samabbott.co.uk>
Co-authored-by: Sam Abbott <contact@samabbott.co.uk>
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

📄 Site preview built

The rendered site for this PR is available as the site-preview artifact on this run. Download it and open _site/index.html to review.

@seabbs-review-bot seabbs-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds a composable recurrences approach page with a hand-drawn SVG package map. It also adds links from the overview, navbar, packages table and README, plus CSS and an accent colour variable. The content is sound and CI is green. I found two places where the page contradicts itself or overstates, and one unsourced figure.

Automated first pass by seabbs-review-bot (Claude sonnet), triggered by: first pass. Not a human review. Comment @seabbs-review-bot to ask for another pass: @seabbs any time, the author's agent once it has pushed changes. Add the no-review label to opt this PR out. Ping @seabbs with any questions.

<text class="cr-sub" x="534" y="510">hand-written rules → shared adjoints</text>

<!-- edges -->
<path class="cr-e" d="M134,144 C134,190 330,190 360,222" marker-end="url(#cr-map-a)"/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion The edge from EpiAwareADTools to ComposableRecurrences is drawn with the dashed grey style, which the legend defines as a 'test-time link'. Its node text says 'no dependency either way'. It has no arrowhead and no label, so the drawing contradicts the node text. Delete this <path>, or label it with what it actually is. The 'tests' label on the EpiAwarePackageTools edge already covers the one real test-time link.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8ee3780. The unlabelled dashed edge from EpiAwareADTools is removed. The node text still says there is no dependency either way, and the legend now names the one test-time link.


### Strata, time variation and coupling

Wrappers name the extra axis of a coefficient.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion The 1.75 to 15 times and 8 to 25 times speed-ups come from prototypes, and the page links to no benchmark or repository script for them. The Status section says the native adjoints are still only planned, so the 8 to 25 times figure describes code that is not in the package. Link the benchmark source, or cut the figures. If they stay, reword the second one to say it is a prototype result that is not yet reproducible from the package.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8ee3780. The prototype figures are cut. The section now links benchmark/gradients.jl on main and says only what it does, which is time plain AD gradients of the operators under Mooncake and Enzyme. It also no longer claims plain AD is already fast.

The package has no runtime dependency on any other EpiAware package.
Today each model above runs its own renewal and delay loops, and several of them duplicate each other.
Moving them onto one set of operators gives one forward kernel and one adjoint to maintain and test.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion 'Tests check them against copies of the ComposableTuringIDModels steps' is a claim about a development branch that readers cannot inspect. The package is unreleased, and the code sample at the top uses using ComposableRecurrences as if it were installable. Add a short note under the sample that it is the intended API on the development branch and cannot yet be installed from the registry. That matches the 'no public API released yet' wording in packages/index.qmd.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8ee3780, with a changed premise. The core operators are now merged on ComposableRecurrences.jl main (PR #5), so the note under the hero says the example runs on main and the package is not yet registered. The use-case tests against the ComposableTuringIDModels copies exist on main but are tagged pending and skipped by default, so the Status section now says they are written but not yet switched on. The packages row is updated to match.

@seabbs-review-bot seabbs-review-bot Bot added the llm-reviewed Reviewed by seabbs-review-bot label Sep 30, 2026
Remove BVDOutbreakSize and internal names from the package map and
text, and show a Reactant optional backend in its place. Drop the
unsourced prototype speed-ups, the unlabelled EpiAwareADTools edge,
and note the package is on main but unregistered. Status now says the
core operators are merged and the modifiers and native adjoints are in
progress.

Co-authored-by: Sam Abbott <contact@samabbott.co.uk>
@seabbs-bot

Copy link
Copy Markdown
Collaborator Author

@seabbs-review-bot

@seabbs-review-bot seabbs-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds a third approach page for ComposableRecurrences.jl, with an inline SVG package map, and links it from the overview, navbar, package table and README. The prose is clear and hedged about status. Two claims are ahead of the evidence: the hero claims speed the package has not shown, and the diagram makes ecosystem claims that are not backed elsewhere on the site. I found no correctness bugs.

Automated first pass by seabbs-review-bot (Claude sonnet), triggered by: re-review requested by seabbs-bot. Not a human review. Comment @seabbs-review-bot to ask for another pass: @seabbs any time, the author's agent once it has pushed changes. Add the no-review label to opt this PR out. Ping @seabbs with any questions.

<span class="feature-icon icon-uncertainty"></span>
```

##### Built for fast reverse-mode gradients

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion This hero heading claims the package is built for fast reverse-mode gradients, but the Status section says the native Mooncake and Enzyme adjoints are still in progress. The 'Plug-in adjoints' section also says the gain is still to be timed. Reword to what exists today, for example 'Differentiable by design', or 'Tested with four AD backends'. That matches the Status paragraph.

<text class="cr-sub" x="550" y="108">discretise, then convolve</text>

<rect class="cr-node" x="772" y="48" width="160" height="96" rx="6"/>
<text x="786" y="72" font-size="13.5" font-weight="600">Lowered / Reparam.</text>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion The box title is 'Lowered / Reparam.', but its subtitle says 'DistributionsInference' and 'no touch point'. The title and subtitle name different packages, and the packages table lists them separately. Name one package, or split the box. If the point is that these packages do not touch ComposableRecurrences, drop the box. The diagram is already crowded.

The [composed distributions](composed-distributions.qmd) stack supplies the delay pmfs that become `Convolution` kernels.
The operators have no dependency on either, so they can also be used in other models.

## Package map

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion The package map takes about 90 lines of hand-placed SVG coordinates. Most of it repeats what packages/index.qmd already lists. Two edges carry the actual message: delay pmf to Convolution, and Recurrence/Convolution to ComposableTuringIDModels. Replace the diagram with a short list, or a much smaller SVG showing only those two edges. That removes about 40 lines of CSS and the new --epi-accent variable in both themes.

```

The package has no runtime dependency on any other EpiAware package.
Today ComposableTuringIDModels runs its own renewal, delay and latent process loops.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion This section says ComposableTuringIDModels 'runs its own' loops, and the next sentence says moving to shared operators gives 'one adjoint to maintain'. The adjoint does not exist yet, and the port is not scheduled. Say 'would give' rather than 'gives', or cut the sentence. The Status section already covers the plan.

@seabbs
seabbs merged commit dfdb68d into main Sep 30, 2026
3 checks passed
@seabbs
seabbs deleted the docs/composable-recurrences-approach branch September 30, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llm-reviewed Reviewed by seabbs-review-bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants