跳到主要内容

東京大学 新領域創成科学研究科 メディカル情報生命専攻 2024年8月実施 問題8

Author

KardeniaPoyu, 祭音Myyura

Description

以下で Rn×m\mathbb{R}^{n \times m}nnmm 列实数値行列の集合を表すものとする。 正則行列 ARn×nA \in \mathbb{R}^{n \times n} の特異値分解は以下で与えられる (n2n \ge 2)。

A=UΣVTA = U \Sigma V^T

ここで、URn×n,VRn×nU \in \mathbb{R}^{n \times n}, V \in \mathbb{R}^{n \times n}UTU=In,VTV=InU^T U = I_n, V^T V = I_n をみたし、Σ=diag(σ1,,σn)Rn×n\Sigma = \text{diag}(\sigma_1, \dots, \sigma_n) \in \mathbb{R}^{n \times n} は対角行列でその対角成分は σ1σn>0\sigma_1 \ge \dots \ge \sigma_n > 0 を満たす。ただし、MTM^T は行列 MM の転置を表し、ImRm×mI_m \in \mathbb{R}^{m \times m} は単位行列である。

AA のランク rr 近似 A^\hat{A} を以下で定義する (1r<n1 \le r < n)。

A^=U^Σ^V^T\hat{A} = \hat{U} \hat{\Sigma} \hat{V}^T

ここで、U^Rn×r,V^Rn×r\hat{U} \in \mathbb{R}^{n \times r}, \hat{V} \in \mathbb{R}^{n \times r}U,VU, V の最初の rr 列からなる行列であり、Σ^=diag(σ1,,σr)Rr×r\hat{\Sigma} = \text{diag}(\sigma_1, \dots, \sigma_r) \in \mathbb{R}^{r \times r} である。A^\hat{A} は以下の最適化问题の一つの解 XX を与えることが知られている。

minXAX2subject to XRn×n,rank(X)=r\min_{X} \|A - X\|^2 \quad \text{subject to } X \in \mathbb{R}^{n \times n}, \text{rank}(X) = r

ただし、M2=trace(MTM)=i,j(Mij)2\|M\|^2 = \text{trace}(M^T M) = \sum_{i,j} (M_{ij})^2 である。 以下の問いに導出も含めて答えよ。

(1) A^TA^,A^A^T\hat{A}^T \hat{A}, \hat{A} \hat{A}^T の特異値分解を求めよ。

(2) A^+=V^Σ^1U^T\hat{A}^+ = \hat{V} \hat{\Sigma}^{-1} \hat{U}^T とするとき、AA^+A=A^A \hat{A}^+ A = \hat{A} を示せ。

(3) 次の最適化問題の解を求めよ。

minXAXXTA2subject to XRn×r,XTX=Ir\min_{X} \|A - XX^T A\|^2 \quad \text{subject to } X \in \mathbb{R}^{n \times r}, X^T X = I_r

(4) 次の最適化問題の解を求めよ。

maxXtrace(XTAATX)subject to XRn×r,XTX=Ir\max_{X} \text{trace}(X^T A A^T X) \quad \text{subject to } X \in \mathbb{R}^{n \times r}, X^T X = I_r

(5) BRn×n,CRn×nB \in \mathbb{R}^{n \times n}, C \in \mathbb{R}^{n \times n} を用いて A=BCA = BC と書けるとする。次の最適化問題の解を求めよ。

minXBCBXC2subject to XRn×n,rank(X)=r\min_{X} \|BC - BXC\|^2 \quad \text{subject to } X \in \mathbb{R}^{n \times n}, \text{rank}(X) = r

题目描述

Rn×m\mathbb R^{n\times m}nnmm 列实矩阵集合。对 n2n\ge2 的可逆矩阵 ARn×nA\in\mathbb R^{n\times n},给定奇异值分解

A=UΣVT,A=U\Sigma V^T,

其中 U,VU,V 为正交矩阵,

UTU=VTV=In,U^TU=V^TV=I_n,

Σ=diag(σ1,,σn),σ1σn>0.\Sigma=\operatorname{diag}(\sigma_1,\ldots,\sigma_n), \qquad \sigma_1\ge\cdots\ge\sigma_n>0.

1r<n1\le r<n,取 U,VU,V 的前 rr 列组成 U^,V^\hat U,\hat V,并令

Σ^=diag(σ1,,σr),A^=U^Σ^V^T.\hat\Sigma=\operatorname{diag}(\sigma_1,\ldots,\sigma_r), \qquad \hat A=\hat U\hat\Sigma\hat V^T.

已知 A^\hat A 是秩恰为 rr 的最佳 Frobenius 范数近似之一:

minXRn×nrank(X)=rAX2,M2=trace(MTM)=i,jMij2.\min_{\substack{X\in\mathbb R^{n\times n}\\\operatorname{rank}(X)=r}} \|A-X\|^2, \qquad \|M\|^2=\operatorname{trace}(M^TM)=\sum_{i,j}M_{ij}^2.

要求给出推导并回答:

  1. A^TA^\hat A^T\hat AA^A^T\hat A\hat A^T 的奇异值分解。

  2. 定义

    A^+=V^Σ^1U^T,\hat A^+=\hat V\hat\Sigma^{-1}\hat U^T,

    证明

    AA^+A=A^.A\hat A^+A=\hat A.
  3. 求优化问题

    minXRn×rXTX=IrAXXTA2\min_{\substack{X\in\mathbb R^{n\times r}\\X^TX=I_r}} \|A-XX^TA\|^2

    的解。

  4. 求优化问题

    maxXRn×rXTX=Irtrace(XTAATX)\max_{\substack{X\in\mathbb R^{n\times r}\\X^TX=I_r}} \operatorname{trace}(X^TAA^TX)

    的解。

  5. B,CRn×nB,C\in\mathbb R^{n\times n}A=BCA=BC,求

    minXRn×nrank(X)=rBCBXC2\min_{\substack{X\in\mathbb R^{n\times n}\\\operatorname{rank}(X)=r}} \|BC-BXC\|^2

    的解。

Kai

(1)

定義より、A^=U^Σ^V^T\hat{A} = \hat{U}\hat{\Sigma}\hat{V}^T であり、U^TU^=Ir\hat{U}^T\hat{U} = I_rV^TV^=Ir\hat{V}^T\hat{V} = I_r を満たす。

まず、A^TA^\hat{A}^T\hat{A} について計算する。

A^TA^=(U^Σ^V^T)T(U^Σ^V^T)=V^Σ^TU^TU^Σ^V^T\hat{A}^T\hat{A} = (\hat{U}\hat{\Sigma}\hat{V}^T)^T (\hat{U}\hat{\Sigma}\hat{V}^T) = \hat{V}\hat{\Sigma}^T\hat{U}^T \hat{U}\hat{\Sigma}\hat{V}^T

Σ^\hat{\Sigma} は対角行列であるため Σ^T=Σ^\hat{\Sigma}^T = \hat{\Sigma} であり、U^TU^=Ir\hat{U}^T\hat{U} = I_r より、

A^TA^=V^Σ^IrΣ^V^T=V^Σ^2V^T\hat{A}^T\hat{A} = \hat{V}\hat{\Sigma} I_r \hat{\Sigma}\hat{V}^T = \hat{V}\hat{\Sigma}^2\hat{V}^T

これが A^TA^\hat{A}^T\hat{A} のコンパクト特異値分解(あるいは固有値分解)の形である。n×nn \times n 行列としての完全な特異値分解で表すと、直交行列 VV を用いて以下のようになる。

A^TA^=V(Σ^2000)VT\hat{A}^T\hat{A} = V \begin{pmatrix} \hat{\Sigma}^2 & 0 \\ 0 & 0 \end{pmatrix} V^T

同様に、A^A^T\hat{A}\hat{A}^T について計算する。

A^A^T=(U^Σ^V^T)(U^Σ^V^T)T=U^Σ^V^TV^Σ^U^T\hat{A}\hat{A}^T = (\hat{U}\hat{\Sigma}\hat{V}^T) (\hat{U}\hat{\Sigma}\hat{V}^T)^T = \hat{U}\hat{\Sigma}\hat{V}^T \hat{V}\hat{\Sigma}\hat{U}^T

V^TV^=Ir\hat{V}^T\hat{V} = I_r より、

A^A^T=U^Σ^IrΣ^U^T=U^Σ^2U^T\hat{A}\hat{A}^T = \hat{U}\hat{\Sigma} I_r \hat{\Sigma}\hat{U}^T = \hat{U}\hat{\Sigma}^2\hat{U}^T

完全な特異値分解で表すと、直交行列 UU を用いて以下のようになる。

A^A^T=U(Σ^2000)UT\hat{A}\hat{A}^T = U \begin{pmatrix} \hat{\Sigma}^2 & 0 \\ 0 & 0 \end{pmatrix} U^T

English: By definition, A^=U^Σ^V^T\hat{A} = \hat{U}\hat{\Sigma}\hat{V}^T, satisfying U^TU^=Ir\hat{U}^T\hat{U} = I_r and V^TV^=Ir\hat{V}^T\hat{V} = I_r.

First, we calculate A^TA^\hat{A}^T\hat{A}:

A^TA^=(U^Σ^V^T)T(U^Σ^V^T)=V^Σ^TU^TU^Σ^V^T\hat{A}^T\hat{A} = (\hat{U}\hat{\Sigma}\hat{V}^T)^T (\hat{U}\hat{\Sigma}\hat{V}^T) = \hat{V}\hat{\Sigma}^T\hat{U}^T \hat{U}\hat{\Sigma}\hat{V}^T

Since Σ^\hat{\Sigma} is a diagonal matrix, Σ^T=Σ^\hat{\Sigma}^T = \hat{\Sigma}. Using U^TU^=Ir\hat{U}^T\hat{U} = I_r, we have:

A^TA^=V^Σ^IrΣ^V^T=V^Σ^2V^T\hat{A}^T\hat{A} = \hat{V}\hat{\Sigma} I_r \hat{\Sigma}\hat{V}^T = \hat{V}\hat{\Sigma}^2\hat{V}^T

This is the compact SVD (or eigenvalue decomposition) of A^TA^\hat{A}^T\hat{A}. As a full SVD for an n×nn \times n matrix using the orthogonal matrix VV, it is written as:

A^TA^=V(Σ^2000)VT\hat{A}^T\hat{A} = V \begin{pmatrix} \hat{\Sigma}^2 & 0 \\ 0 & 0 \end{pmatrix} V^T

Similarly, calculating A^A^T\hat{A}\hat{A}^T:

A^A^T=(U^Σ^V^T)(U^Σ^V^T)T=U^Σ^V^TV^Σ^U^T\hat{A}\hat{A}^T = (\hat{U}\hat{\Sigma}\hat{V}^T) (\hat{U}\hat{\Sigma}\hat{V}^T)^T = \hat{U}\hat{\Sigma}\hat{V}^T \hat{V}\hat{\Sigma}\hat{U}^T

Using V^TV^=Ir\hat{V}^T\hat{V} = I_r, we have:

A^A^T=U^Σ^IrΣ^U^T=U^Σ^2U^T\hat{A}\hat{A}^T = \hat{U}\hat{\Sigma} I_r \hat{\Sigma}\hat{U}^T = \hat{U}\hat{\Sigma}^2\hat{U}^T

As a full SVD using the orthogonal matrix UU, it is written as:

A^A^T=U(Σ^2000)UT\hat{A}\hat{A}^T = U \begin{pmatrix} \hat{\Sigma}^2 & 0 \\ 0 & 0 \end{pmatrix} U^T

(2)

A=UΣVTA = U\Sigma V^T であり、U^\hat{U}V^\hat{V} はそれぞれ UUVV の最初の rr 列からなる行列である。まず AV^A\hat{V}U^TA\hat{U}^T A を計算する。

VTV=InV^TV = I_n より VTV^=(IrO)Rn×rV^T\hat{V} = \begin{pmatrix} I_r \\ O \end{pmatrix} \in \mathbb{R}^{n \times r} であるから、

AV^=UΣVTV^=UΣ(IrO)=U(Σ^O)=U^Σ^A\hat{V} = U\Sigma V^T\hat{V} = U\Sigma \begin{pmatrix} I_r \\ O \end{pmatrix} = U \begin{pmatrix} \hat{\Sigma} \\ O \end{pmatrix} = \hat{U}\hat{\Sigma}

同様に UTU=InU^TU = I_n より U^TU=(IrO)Rr×n\hat{U}^TU = \begin{pmatrix} I_r & O \end{pmatrix} \in \mathbb{R}^{r \times n} であるから、

U^TA=U^TUΣVT=(IrO)ΣVT=(Σ^O)VT=Σ^V^T\hat{U}^TA = \hat{U}^TU\Sigma V^T = \begin{pmatrix} I_r & O \end{pmatrix}\Sigma V^T = \begin{pmatrix} \hat{\Sigma} & O \end{pmatrix} V^T = \hat{\Sigma}\hat{V}^T

これらを用いると、

AA^+A=A(V^Σ^1U^T)A=(AV^)Σ^1(U^TA)=U^Σ^Σ^1Σ^V^T=U^Σ^V^T=A^\begin{aligned} A\hat{A}^+A &= A(\hat{V}\hat{\Sigma}^{-1}\hat{U}^T)A \\ &= (A\hat{V})\hat{\Sigma}^{-1}(\hat{U}^TA) \\ &= \hat{U}\hat{\Sigma}\hat{\Sigma}^{-1}\hat{\Sigma}\hat{V}^T \\ &= \hat{U}\hat{\Sigma}\hat{V}^T = \hat{A} \end{aligned}

以上より、AA^+A=A^A\hat{A}^+A = \hat{A} が示された。

English: We have A=UΣVTA = U\Sigma V^T, where U^\hat{U} and V^\hat{V} consist of the first rr columns of UU and VV respectively. We first compute AV^A\hat{V} and U^TA\hat{U}^T A.

Since VTV=InV^TV = I_n, we have VTV^=(IrO)Rn×rV^T\hat{V} = \begin{pmatrix} I_r \\ O \end{pmatrix} \in \mathbb{R}^{n \times r}, hence

AV^=UΣVTV^=UΣ(IrO)=U(Σ^O)=U^Σ^A\hat{V} = U\Sigma V^T\hat{V} = U\Sigma \begin{pmatrix} I_r \\ O \end{pmatrix} = U \begin{pmatrix} \hat{\Sigma} \\ O \end{pmatrix} = \hat{U}\hat{\Sigma}

Similarly, UTU=InU^TU = I_n gives U^TU=(IrO)Rr×n\hat{U}^TU = \begin{pmatrix} I_r & O \end{pmatrix} \in \mathbb{R}^{r \times n}, hence

U^TA=U^TUΣVT=(IrO)ΣVT=(Σ^O)VT=Σ^V^T\hat{U}^TA = \hat{U}^TU\Sigma V^T = \begin{pmatrix} I_r & O \end{pmatrix}\Sigma V^T = \begin{pmatrix} \hat{\Sigma} & O \end{pmatrix} V^T = \hat{\Sigma}\hat{V}^T

Using these,

AA^+A=A(V^Σ^1U^T)A=(AV^)Σ^1(U^TA)=U^Σ^Σ^1Σ^V^T=U^Σ^V^T=A^\begin{aligned} A\hat{A}^+A &= A(\hat{V}\hat{\Sigma}^{-1}\hat{U}^T)A \\ &= (A\hat{V})\hat{\Sigma}^{-1}(\hat{U}^TA) \\ &= \hat{U}\hat{\Sigma}\hat{\Sigma}^{-1}\hat{\Sigma}\hat{V}^T \\ &= \hat{U}\hat{\Sigma}\hat{V}^T = \hat{A} \end{aligned}

Thus, AA^+A=A^A\hat{A}^+A = \hat{A} is proven.

(3)

P=XXTP = XX^T とおくと、XTX=IrX^TX = I_r であるため PP は階数 rr の直交射影行列である。 目標は APA2\|A - PA\|^2 を最小化することである。PAPA は行列 AA の列空間を XX が張る rr 次元部分空間に射影したものであり、rank(PA)r\text{rank}(PA) \le r である。

エッカート・ヤング・ミルスキーの定理(Eckart-Young-Mirsky Theorem)より、rank(Y)r\text{rank}(Y) \le r を満たす行列 YY の中で AY2\|A - Y\|^2 を最小化するものは Y=A^=U^Σ^V^TY = \hat{A} = \hat{U}\hat{\Sigma}\hat{V}^T である。 したがって、XXTA=A^XX^TA = \hat{A} を満たす XX を見つければよい。

行列 A=UΣVTA = U\Sigma V^T に対して U^U^TA\hat{U}\hat{U}^T A を計算すると、

U^U^TA=U^U^T(U^Σ^V^T+U~Σ~V~T)=U^Σ^V^T=A^\hat{U}\hat{U}^T A = \hat{U}\hat{U}^T (\hat{U}\hat{\Sigma}\hat{V}^T + \tilde{U}\tilde{\Sigma}\tilde{V}^T) = \hat{U}\hat{\Sigma}\hat{V}^T = \hat{A}

となる(U~\tilde{U}UUr+1r+1 から nn 列目)。 よって X=U^QX=\hat UQQTQ=IrQ^TQ=I_r)は解である。σr>σr+1\sigma_r>\sigma_{r+1} ならこれが全解である。σr=σr+1\sigma_r=\sigma_{r+1} の場合は、σr\sigma_r より大きい特異値の左特異ベクトルを全て含み、σr\sigma_r の左特異空間から残りの次元を任意に選んだ rr 次元部分空間の正規直交基も解となる。

English: Let P=XXTP = XX^T. Since XTX=IrX^TX = I_r, PP is an orthogonal projection matrix of rank rr. The objective is to minimize APA2\|A - PA\|^2. PAPA is the projection of the column space of AA onto the rr-dimensional subspace spanned by XX, ensuring rank(PA)r\text{rank}(PA) \le r.

By the Eckart-Young-Mirsky Theorem, the matrix YY that minimizes AY2\|A - Y\|^2 subject to rank(Y)r\text{rank}(Y) \le r is Y=A^=U^Σ^V^TY = \hat{A} = \hat{U}\hat{\Sigma}\hat{V}^T. Thus, we need to find XX such that XXTA=A^XX^TA = \hat{A}.

Calculating U^U^TA\hat{U}\hat{U}^T A for A=UΣVTA = U\Sigma V^T, we get:

U^U^TA=U^U^T(U^Σ^V^T+U~Σ~V~T)=U^Σ^V^T=A^\hat{U}\hat{U}^T A = \hat{U}\hat{U}^T (\hat{U}\hat{\Sigma}\hat{V}^T + \tilde{U}\tilde{\Sigma}\tilde{V}^T) = \hat{U}\hat{\Sigma}\hat{V}^T = \hat{A}

(where U~\tilde{U} represents columns r+1r+1 to nn of UU). Thus X=U^QX=\hat UQ, where QTQ=IrQ^TQ=I_r, is a solution. If σr>σr+1\sigma_r>\sigma_{r+1}, these are all solutions. If σr=σr+1\sigma_r=\sigma_{r+1}, any orthonormal basis of an rr-dimensional subspace containing all left singular spaces with singular value greater than σr\sigma_r and choosing the remaining dimensions inside the σr\sigma_r singular space is also optimal.

(4)

AAT=(UΣVT)(VΣUT)=UΣ2UTAA^T = (U\Sigma V^T)(V\Sigma U^T) = U\Sigma^2 U^T であり、これは固有値 σ12σ22σn2\sigma_1^2 \ge \sigma_2^2 \ge \dots \ge \sigma_n^2 を持つ対称行列である。 最適化問題は maxXtrace(XTAATX)\max_X \text{trace}(X^T AA^T X) subject to XTX=IrX^TX = I_r となる。

Ky Fanの定理(またはRayleigh-Ritzの定理の拡張)より、正規直交系を列に持つ行列 XX に対する trace(XTMX)\text{trace}(X^T M X) の最大値は、対称行列 MM の上位 rr 個の固有値の和(この場合は i=1rσi2\sum_{i=1}^r \sigma_i^2)に等しい。 この最大値は、XX の列ベクトルが MM の上位 rr 個の固有値に対応する固有空間(主部分空間)を張るときに達成される。

AATAA^T の上位 rr 個の固有値に対応する固有ベクトルは、行列 UU の最初の rr 列、すなわち U^\hat{U} である。 したがって X=U^QX=\hat UQQQ は任意の直交行列)は解であり、最大値は i=1rσi2\sum_{i=1}^r\sigma_i^2 である。σr>σr+1\sigma_r>\sigma_{r+1} ならこれが全解であり、境界で重複する場合の全解は (3) と同じ主部分空間の任意性を持つ。

English: AAT=(UΣVT)(VΣUT)=UΣ2UTAA^T = (U\Sigma V^T)(V\Sigma U^T) = U\Sigma^2 U^T, which is a symmetric matrix with eigenvalues σ12σ22σn2\sigma_1^2 \ge \sigma_2^2 \ge \dots \ge \sigma_n^2. The optimization problem is maxXtrace(XTAATX)\max_X \text{trace}(X^T AA^T X) subject to XTX=IrX^TX = I_r.

By Ky Fan's Theorem (or the extended Rayleigh-Ritz theorem), the maximum of trace(XTMX)\text{trace}(X^T M X) for an orthonormal matrix XX is the sum of the rr largest eigenvalues of the symmetric matrix MM (in this case, i=1rσi2\sum_{i=1}^r \sigma_i^2). This maximum is achieved when the column vectors of XX span the eigenspace (principal subspace) corresponding to the rr largest eigenvalues of MM.

The eigenvectors corresponding to the rr largest eigenvalues of AATAA^T are the first rr columns of UU, which is U^\hat{U}. Therefore X=U^QX=\hat UQ, with arbitrary orthogonal QQ, is optimal and the maximum is i=1rσi2\sum_{i=1}^r\sigma_i^2. If σr>σr+1\sigma_r>\sigma_{r+1} these are all solutions; with a tie at the boundary, the full solution set has the same freedom inside the tied principal subspace as in (3).

(5)

正則行列 AAA=BCA = BC と表されるため、BRn×nB \in \mathbb{R}^{n \times n} および CRn×nC \in \mathbb{R}^{n \times n} も正則行列(逆行列を持つ)である。 最適化する目的関数は ABXC2\|A - BXC\|^2 である。

Y=BXCY = BXC と定義する。B,CB, C が正則であるため、任意の行列 XX に対して rank(Y)=rank(X)\text{rank}(Y) = \text{rank}(X) が成り立つ。 したがって、条件 rank(X)=r\text{rank}(X) = rrank(Y)=r\text{rank}(Y) = r と同値になる。 問題は以下のように書き換えられる。

minYAY2subject torank(Y)=r\min_Y \|A - Y\|^2 \quad \text{subject to} \quad \text{rank}(Y) = r

エッカート・ヤング・ミルスキーの定理より、この最適化問題の一つの解は Y=A^Y = \hat{A} である。 元の変数 XX に戻すと、BXC=A^BXC = \hat{A} を満たす XX が求める解となる。 B,CB, C は正則であるため、両辺に左から B1B^{-1}、右から C1C^{-1} を掛ける。 解: X=B1A^C1X = B^{-1}\hat{A}C^{-1}

English: Since the regular (invertible) matrix AA is written as A=BCA = BC, the matrices BRn×nB \in \mathbb{R}^{n \times n} and CRn×nC \in \mathbb{R}^{n \times n} must also be regular (invertible). The objective function to be optimized is ABXC2\|A - BXC\|^2.

Let Y=BXCY = BXC. Because BB and CC are invertible, rank(Y)=rank(X)\text{rank}(Y) = \text{rank}(X) holds for any matrix XX. Therefore, the condition rank(X)=r\text{rank}(X) = r is completely equivalent to rank(Y)=r\text{rank}(Y) = r. The problem can be rewritten as:

minYAY2subject torank(Y)=r\min_Y \|A - Y\|^2 \quad \text{subject to} \quad \text{rank}(Y) = r

By the Eckart-Young-Mirsky Theorem, one solution to this optimization problem is Y=A^Y = \hat{A}. Reverting to the original variable XX, the desired solution satisfies BXC=A^BXC = \hat{A}. Since BB and CC are invertible, we multiply by B1B^{-1} on the left and C1C^{-1} on the right. Solution: X=B1A^C1X = B^{-1}\hat{A}C^{-1}