D_RTRL#
- class braintrace.D_RTRL(model, name=None, vjp_method='single-step', fast_solve=True, normalize_matrix_spectrum=False, trace_dtype=None, **kwargs)[source]#
The Diagonal RTRL (D-RTRL) online gradient computation algorithm.
D_RTRLis the canonical name for the parameter-dimension eligibility trace algorithm implemented byParamDimVjpAlgorithm. It computes the gradients of the weights with the diagonal approximation and the parameter dimension complexity, following the learning rule:\[\begin{split} \begin{aligned} &\boldsymbol{\epsilon}^t \approx \mathbf{D}^t \boldsymbol{\epsilon}^{t-1}+\operatorname{diag}\left(\mathbf{D}_f^t\right) \otimes \mathbf{x}^t \\ & \nabla_{\boldsymbol{\theta}} \mathcal{L}=\sum_{t^{\prime} \in \mathcal{T}} \frac{\partial \mathcal{L}^{t^{\prime}}}{\partial \mathbf{h}^{t^{\prime}}} \circ \boldsymbol{\epsilon}^{t^{\prime}} \end{aligned} \end{split}\]For more details, please see the D-RTRL algorithm presented in our manuscript.
This subclass inherits all behavior from
ParamDimVjpAlgorithmwithout modification; it exists to provide the canonicalD_RTRLname. SeeParamDimVjpAlgorithmfor the full parameter list and a usage example.References