$\partial$CBDs: Differentiable Causal Block Diagrams
Thomas Beckers, Ján Drgoňa, Truong X. Nghiem
TL;DR
This work tackles the challenge of building cyber-physical systems that are simultaneously composable, learnable, and verifiable. It introduces differentiable Causal Block Diagrams ($\partial$CBDs), which integrate CBDs with assume--guarantee contracts and differentiable programming to enable end-to-end gradient-based learning while preserving formal guarantees. The framework provides five architectural layers, supports AD on rate-lifted, loop-unrolled CBD graphs, and embeds contracts as differentiable residuals to guide optimization. Through three contract-guided examples—ISS-based gain tuning, joint policy and Lyapunov learning, and Deep Koopman identification—the authors demonstrate end-to-end differentiable, certifiable learning across physics-based and data-driven components with scalable gradient-based training and verification.
Abstract
Modern cyber-physical systems (CPS) integrate physics, computation, and learning, demanding modeling frameworks that are simultaneously composable, learnable, and verifiable. Yet existing approaches treat these goals in isolation: causal block diagrams (CBDs) support modular system interconnections but lack differentiability for learning; differentiable programming (DP) enables end-to-end gradient-based optimization but provides limited correctness guarantees; while contract-based verification frameworks remain largely disconnected from data-driven model refinement. To address these limitations, we introduce differentiable causal block diagrams ($\partial$CBDs), a unifying formalism that integrates these three perspectives. Our approach (i) retains the compositional structure and execution semantics of CBDs, (ii) incorporates assume--guarantee (A--G) contracts for modular correctness reasoning, and (iii) introduces residual-based contracts as differentiable, trajectory-level certificates compatible with automatic differentiation (AD), enabling gradient-based optimization and learning. Together, these elements enable a scalable, verifiable, and trainable modeling pipeline that preserves causality and modularity while supporting data-, physics-, and constraint-informed optimization for CPS.
