Conceptual Guides

This section gives feature-area introductions to the mathematical and computational foundations of quivers. The guides assume familiarity with basic category theory or a willingness to learn it alongside the material. For a more discursive treatment, see the tutorial; for the formal denotational semantics, see Semantics.

The guides are organized in seven thematic sections; each section's pages stand alone, but reading them in order gives the clearest picture of how the pieces fit together.

Foundations

The categorical primitives every other layer is built on.

  1. Core Types & Algebras. Finite sets (the SetObject hierarchy), algebras as enrichment algebras, and the algebraic primitives that underpin all morphism composition.
  2. Transformations & Composition Rules. First-class change-of-base transformations, the >>> composition operator, and the CompositionRule → Semigroupoid → Algebra hierarchy.
  3. Morphisms & Composition. What a morphism is as a tensor in \(\mathcal{V}^{|A| \times |B|}\), the morphism hierarchy, composition, tensor product, marginalization, and the compact-closed surface (dagger, trace, cup, cap).

DSL

Writing programs in the typed .qvr language.

  1. DSL Overview. File format, grammar, doc comments, compilation pipeline, error handling.
  2. DSL Declarations. composition, object, morphism (with the [role=...] option block selecting latent / observed / kernel / embed / discretize), bundle, the fan / repeat / stack / scan / curry combinators, and export.
  3. DSL Programs and Let-Expressions. program blocks, bind / observe / marginalize / let steps, the axis-role clause, factor expressions, the let-expression primitive surface, and inline distributions.
  4. DSL Contractions. Operadic n-ary contractions, type-driven wiring inference, share clause, explicit wiring escape hatch.

Probabilistic Programming

The runtime semantics of programs and distributions.

  1. Monadic Programs. Probabilistic programming via sequential bind, let, observe, and return steps; ancestral sampling; log-joint computation.
  2. Hierarchical Programs. Parametric templates for crossed random intercepts, monotone-spline coefficients, and grouped marginalization over fibred discrete latents.
  3. Continuous Spaces and Morphisms. The ContinuousSpace hierarchy, the ContinuousMorphism interface, sampled composition, the discrete / continuous boundary, normalizing flows.
  4. Continuous Families. The 30+ parameterized distribution registry, event ranks, and the structured priors (MatrixNormal, InverseWishart, GP, Horseshoe, LKJ) that interact with the axis-role surface.
  5. Stochastic Morphisms. The FinStoch category: Markov kernels, conditioning, queries, the Giry monad.

Inference

Fitting models to data.

  1. Inference Foundations. The six-layer inference stack, trace and sample-site interface, conditioning.
  2. Variational Inference: Guides, Objectives, and SVI. The Auto*Guide family, ELBO / IWAE / Rényi / VR-IWAE objectives, gradient estimators, SVI loop, predictive sampling.
  3. Variational Inference: MCMC and Hybrid Samplers. HMC and NUTS kernels, AutoDAIS, WarmupThenHMC, predictive sampling from MCMC chains.

Categorical Structures

Higher-order categorical machinery the rest of the library is built on or reuses.

  1. Categorical Structures. Functors, natural transformations, adjunctions, monoidal structures, base change.
  2. Monads & Comonads. Monadic abstractions, Kleisli / coKleisli categories, algebras, coalgebras, distributive laws.
  3. Enriched Category Theory. Ends, coends, Kan extensions, weighted limits, profunctors, Yoneda, Day convolution, optics.
  4. Compositional Effects. Algebraic-effects framework over the residuated category universe.

Structured Prediction

The chart-parser and structural-compression substrate.

  1. Weighted Deduction Systems. Agenda-engine runtime, semirings, charts as differentiable values, the seven canonical parameters.
  2. Structural Compression: Signatures and Encoders. signature and encoder blocks; F-algebra surface for compressing structured objects; factory form and sequence / graph sugar.
  3. Structural Compression: Decoders and Losses. Kleisli-coalgebra decoder blocks, loss declarations, deduction and Bayesian integration.

Analysis

Workflow surface around inference.

  1. Analysis: Data and Formulas. DatasetSchema, brms-style formulas, the formula-to-QVR compile lens, family registry.
  2. Analysis: Fitting and Diagnostics. One-line fit, ArviZ-based diagnostics, algebra-guided training tooling (ChainShape, recommend_init, saturation_warnings), autograd-safe morphism transforms.

Quick navigation