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.
翻译:现代信息物理系统(CPS)集成了物理、计算与学习,要求建模框架同时具备可组合性、可学习性与可验证性。然而,现有方法往往孤立地处理这些目标:因果框图(CBDs)支持模块化系统互连,但缺乏用于学习的可微性;可微分编程(DP)支持端到端的基于梯度的优化,但提供的正确性保证有限;而基于合约的验证框架则大多与数据驱动的模型精炼相脱节。为应对这些局限,我们引入了可微分因果框图($\partial$CBDs),这是一种整合了上述三种视角的统一形式化方法。我们的方法(i)保留了CBDs的组合结构与执行语义,(ii)融入了假设-保证(A--G)合约以支持模块化的正确性推理,以及(iii)引入了基于残差的合约作为可微的、轨迹级的证书,与自动微分(AD)兼容,从而支持基于梯度的优化与学习。这些要素共同实现了一个可扩展、可验证且可训练的建模流程,该流程在保持因果性与模块化的同时,支持面向CPS的基于数据、物理及约束的优化。