Ω を Rm の領域とします。論文は、Taylor 展開に対応する演算子 T を定義し、関数 f∈Cn(Ω:R) の定義域を、係数 a0 が Ω に属する n 次の超双対数の空間へ拡張しています。a∈Ω と η=(η1,η2,…,ηn)∈{1,2,…,m}n に対して、この演算子は次の関係を与えます。
Tf(a+i=1∑nδηiεi)=α∈Λn∑∂ηαf(a)εα
ここで、δi:=(δi1,δi2,…,δim)T∈{0,1}m(δij は Kronecker のデルタ)、∂η:=(∂η1,∂η2,…,∂ηn)T です。すなわち、∂ηαf(a) は、αi=1 であるすべての i について、ηi 番目の変数についての偏微分 ∂ηi を施した、a における f の偏微分です。このように、偏微分 ∂ηαf(a) が εα の係数として得られます(原論文の式 (4))。演算子 T は、関数の和、積、合成についての代数的な性質ももちます(原論文の式 (3))。このため、いくつかの要素の和、積、合成で表される関数では、各要素とその微分が与えられていれば、n 階までの常微分や偏微分を得ることができます。この性質を利用する高階微分の計算法が、HDN 微分です。
論文は、高階微分の計算法を次のように比べています(原論文 Table 1)。
手法
精度
演算の実装
数値微分(有限差分法)
低い
不要
自動微分
高い
必要
HDN 微分
高い
必要
提案手法(HDN-M 微分)
高い
不要(行列の演算に置き換え)
自動微分は、Leibniz 則や Faà di Bruno の公式などの微分の規則に基づいて厳密な微分を計算しますが、論文は、微分の規則に基づく代数的な構造がかなり複雑で、それが高速化の妨げになると述べています。HDN 微分は、超双対数の演算規則と演算子の実装だけを利用し、微分の規則の実装を必要としません。しかし、超双対数の演算規則に基づく追加の実装が必要です。そこで論文は、超双対数の演算規則の実装を必要としない、新しい微分の計算法を開発しています(重要点 2〜4)。
2. 超双対数の行列表現を帰納的に定義する
論文は、双対数の行列表現の拡張として、超双対数の行列表現を構成しています。k∈N に対して、Mk(R) を R 上の k 次の正方行列全体の集合とし、Ik と Ok を、それぞれ k 次の単位行列と k 次の零行列とします。行列 En,i∈M2n(R)(n≥2、i=1,2,…,n)を、次のように帰納的に定義します。
In numerical analysis, it is often necessary to calculate higher-order derivatives of given functions strictly. For example, numerical simulations of nonlinear materials based on the incremental variational formulation require higher-order derivatives of two potentials, a free energy and a dissipation function. Hyper-dual numbers (HDN) are an extension of dual numbers (DN) and are defined using nilpotent elements that differ from each other. By introducing an operator that extends the domain of functions to the space of HDN based on Taylor expansion, higher-order derivatives can be obtained from the coefficients. The computational method that utilizes this property is referred to as HDN differentiation. HDN differentiation does not require the implementation of derivative rules, but it does require additional implementations based on the operation rules of HDN. The paper points out that dedicated methods therefore have to be developed to enhance its performance, and that the prospects of high-speed or self-validating numerics for HDN differentiation are low.
This paper constructs matrix representations of HDN by an inductive definition, as an extension of the matrix representation of DN, and introduces an operator that extends the domain of functions to the space spanned by these matrix representations. It proves that higher-order derivatives are obtained by referring to appropriate elements of the matrix given by this operator (the fundamental theorem), proposes a numerical method for higher-order derivatives based on the theorem, called HDN-M differentiation, and gives two examples. Because the operation rules of HDN are replaced with those of matrices, HDN-M differentiation computes higher-order derivatives with matrix operation rules, without implementing the operation rules of HDN. The paper also states that HDN-M differentiation can easily be accelerated by utilizing existing libraries for linear algebra.
Key points
1. Higher-order derivatives from the coefficients of hyper-dual numbers, and the issue of implementation
Hyper-dual numbers are defined with n elements ε=(ε1,ε2,…,εn)T that satisfy
The nth-order hyper-dual numbers are the numbers of the form
α∈Λn∑aαεα,aα∈Rm(2)
Here, Λn is the set of n-dimensional multi-indices α whose components are 0 or 1, and εα is the product of εiαi (i=1,2,…,n), where εi0:=1. The coefficients aα are vectors in Rm, where m∈N.
Let Ω be a domain in Rm. The paper defines an operator T that corresponds to the Taylor expansion and extends the domain of a function f∈Cn(Ω:R) to the space of the nth-order hyper-dual numbers whose coefficient a0 belongs to Ω. For a∈Ω and η=(η1,η2,…,ηn)∈{1,2,…,m}n, this operator gives
Tf(a+i=1∑nδηiεi)=α∈Λn∑∂ηαf(a)εα
Here, δi:=(δi1,δi2,…,δim)T∈{0,1}m, where δij is the Kronecker delta, and ∂η:=(∂η1,∂η2,…,∂ηn)T. That is, ∂ηαf(a) is the partial derivative of f at a obtained by applying ∂ηi, the partial derivative with respect to the ηi-th variable, for every i with αi=1. The partial derivative ∂ηαf(a) is thus obtained as the coefficient of εα (Eq. (4) of the paper). The operator T also has algebraic properties for the sum, product, and composition of functions (Eq. (3) of the paper). Therefore, for a function represented by the sum, product, and composition of some components, up to nth-order ordinary or partial derivatives can be obtained if the components and their derivatives are given. The computational method of higher-order derivatives that utilizes this property is HDN differentiation.
The paper compares methods for computing higher-order derivatives as follows (Table 1 of the original paper).
Automatic differentiation computes strict derivatives based on derivative rules such as the Leibniz rule and Faà di Bruno's formula, but the paper notes that the algebraic structures based on derivative rules are quite complex, which disturbs its acceleration. HDN differentiation utilizes only the implementations of the HDN operation rules and the operator, without any implementation of the derivative rules. However, it requires additional implementations based on the HDN operation rules. The paper therefore develops a new derivative method that does not require the implementation of the HDN operation rules (key points 2 to 4).
2. Matrix representations of hyper-dual numbers, defined inductively
The paper constructs matrix representations of HDN as an extension of the matrix representation of DN. For k∈N, let Mk(R) be the set of all k-by-k square matrices over R, and let Ik and Ok be the k-by-k identity matrix and the k-by-k zero matrix, respectively. The matrices En,i∈M2n(R) (n≥2, i=1,2,…,n) are inductively defined as
is a matrix representation of the hyper-dual numbers (2). Here, En:=(En,1,En,2,…,En,n)T, Enα=En,1α1En,2α2…En,nαn, and En,i0=I2n (i=1,2,…,n). The paper denotes by Mn(Ω) the space spanned by the matrices (7) whose coefficient a0 belongs to Ω.
3. An operator that extends the domain of functions to the space of the matrix representations
The paper defines the operator T with respect to f∈Cn(Ω:R) as
Here, the argument (the left side of ↦) is an element of Mn(Ω), and β=(β1,β2,…,βm) is an m-dimensional multi-index; ∣β∣, β!, and ∂β denote the order, the factorial, and the partial derivative for the multi-index β. With aα=(aα,1,aα,2,…,aα,m)T, the power with the multi-index β is the product, over i=1,2,…,m, of the βi-th powers of the matrices ∑α∈Λn∖{0}aα,iEnα.
The operator T has algebraic properties that correspond to those of the operator T in key point 1. For f,g∈Cn(Ω:R),
T(f+g)T(f⋅g)=Tf+Tg;=(Tf)∗(Tg)
Here, ∗ is the matrix product. The paper also gives a property for the composition of functions; in the examples, a composite function f=f2∘f1 is computed as Tf(⋅)=Tf2(Tf1(⋅)).
For implementations, the paper emphasizes that the definition (8) is equivalent to the following matrix-based definition:
Tf:M↦∣β∣≤n∑β!∂βf(x)Q(M)βx=P(M)∈Mn(R)(9)
Here, M:=(M1,M2,…,Mm)T is an element of Mn(Ω), P(M):=((M1)11,(M2)11,…,(Mm)11)T∈Ω, and Q(M):=M−P(M)⊗I2n. Equation (9) has the form of the Taylor expansion of f at the point P(M), which consists of the (1,1) elements of M1,M2,…,Mm, with the increment replaced by the matrix Q(M).
4. The fundamental theorem: higher-order derivatives appear as elements of the matrix
Let Mi,j[B] be the function that picks up the (i,j) element Bij of a matrix B (in the paper, this function is written with a Fraktur letter M). The paper proves the following theorem (Theorem 1). Let n,m∈N, f∈Cn(Ω:R), and η=(η1,η2,…,ηn)∈{1,2,…,m}n. Then, for all a∈Ω and k=1,2,…,n,
Here, δηi and ∂ηi are those defined in key point 1. In other words, when Tf is applied to the matrix a⊗I2n+∑i=1nδηi⊗En,i, the kth-order partial derivative ∂η1∂η2…∂ηkf(a) appears as the (1,2k) element of the resulting 2n-by-2n matrix.
The proof is by mathematical induction on n. For n=1, the matrix in the square brackets on the left-hand side of (10) is
(f(a)0∂η1f(a)f(a))
and (10) holds. Next, from (5), (6), and (8), the matrix for n increased by one is written as a block matrix in which the two diagonal blocks are the matrix for the original n, the lower-left block is the zero matrix, and the upper-right block is the matrix whose coefficients are differentiated once more in the added direction. From this, the paper shows that if (10) holds for some n, it also holds for n increased by one.
From Theorem 1, up to nth-order ordinary or partial derivatives of a function f∈Cn(Ω:R) at a∈Ω can be obtained. The paper calls the method of computing higher-order derivatives from (10) HDN-M differentiation, and states in the concluding remarks that the computability of higher-order derivatives in HDN-M differentiation is ensured by this fundamental theorem. The paper adds the following two notes.
Because the division {f(x)}−1 is represented as h∘f(x) with h(x)=x−1, HDN-M differentiation does not require the division (the inverse matrix operation) when Th is implemented.
The implementation of the proposed method follows the matrix-based definition (9) and the main result (10).
Examples
The paper shows two examples of the computational procedure of HDN-M differentiation.
Second-order derivative of a function of one variable
The first example is the second-order ordinary derivative f(2) at a∈R of f(x)=esin(x), with n=2 and m=1. The function is represented as f=f2∘f1, where f1(x):=sin(x) and f2(x):=ex. Let M0:=aI4+E2,1+E2,2. From Tf(⋅)=Tf2(Tf1(⋅)), the derivative is computed by the following steps.
First, from P(M0)=a, M1:=Tf1(M0) is computed as
Here, s:=esin(a), t:=cos(a)esin(a), and u:=(cos2(a)−sin(a))esin(a). Finally, from Theorem 1, the second-order derivative is obtained as the (1,22) element of M2:
f(2)(a)=M1,22[M2]=u=(cos2(a)−sin(a))esin(a)
Third-order partial derivative of a function of two variables
The second example is the third-order partial derivative ∂12∂2g at a=(a1,a2)T∈R2 of g(x)=esin(x1+2x2) (x=(x1,x2)T), with n=3 and m=2. The function is represented as g=g4∘g3∘(g1+g2), where g1(x1,x2):=x1, g2(x1,x2):=2x2, g3(x):=sin(x), and g4(x):=ex. Let
M0:=a⊗I8+δ1⊗E3,1+δ1⊗E3,2+δ2⊗E3,3
From Tg(⋅)=Tg4(Tg3(Tg1(⋅)+Tg2(⋅))), the derivative is computed by the following steps.
First, based on the matrix-based definition (9), M1:=Tg1(M0) and M2:=Tg2(M0) are obtained as M1=a1I8+E3,1+E3,2 and M2=2a2I8+2E3,3, respectively. Next, from P(M1+M2)=a1+2a2, M3=Tg3(M1+M2) is computed as
The matrix M4 is an 8-by-8 matrix. Finally, from Theorem 1, the third-order partial derivative ∂12∂2g(a1,a2) is obtained as its (1,23) element, M1,23[M4].
From these examples, the paper notes that HDN-M differentiation only requires the implementation of the matrix-based definition (9) with one-dimensional space (m=1) for fundamental functions.
Outlook
In the concluding remarks, the paper states the following prospects.
According to the paper, HDN-M differentiation is simple to implement even for multi-variable functions, and this property poses future issues and opportunities for HDN-M differentiation, such as acceleration by applying existing libraries of linear algebra and the development of acceleration methods specialized for operations for upper triangular matrices.
Likewise, the paper states that self-validating numerics should be explored further, in order to develop a numerical method for higher-order derivatives with high reliability, high accuracy, high versatility, and high speed.