The dual-number semiring: ⊕/⊗ are ordinary dual-number addition/multiplication (sum rule / product rule), zero = (0, 0), one = (1, 0) – the multiplicative identity carries no derivative of its own, matching the fact that a constant contributes nothing to any derivative.
More...
#include <datalog_dual_semiring.hpp>
template<typename T>
struct pulsatrix::datalog::DualSemiring< T >
The dual-number semiring: ⊕/⊗ are ordinary dual-number addition/multiplication (sum rule / product rule), zero = (0, 0), one = (1, 0) – the multiplicative identity carries no derivative of its own, matching the fact that a constant contributes nothing to any derivative.
- Note
- Stage 3 design decision 2 (this mission): differentiability flows through the Datalog evaluation via this closed-form/algebraic dual-number construction, not via
ComputationGraph/Autograd node-level wiring – see this file's own header comment and the mission file's Stage 3 write-up for the recon that established this is the only structurally sound option (Node/OpType carry no value payload and have no shape for a variable-arity, substitution-joined Datalog rule body; Autograd is scoped to single-parent Module-shaped nodes). The transitive half of the requirement – flowing the resulting derivative into the neural predicate's own Module (LinearModule) parameters – is handled separately, by seeding a real Tensor gradient and calling that Module's own real backward(), exactly mirroring this codebase's own ToyKnowledgeBase::backward() precedent (hand-chained Module::backward() calls, no ComputationGraph/Autograd object involved there either).
◆ Value
◆ add()
◆ mul()
◆ one()
◆ zero()
The documentation for this struct was generated from the following file: