• 文章转自微信大众号:机器学习炼丹术
  • 笔记:陈亦新
  • 论文称号:Spatio-temporal Dynamics of Intrinsic Networks in Functional Magnetic Imaging Data Using Recurrent Neural Networks

ICA | 用RNN-ICA探索功能核磁内在网络模型的时空动力学

Introduction

有许多的办法能够剖析MRI,其中有一种办法是主成分剖析法independent component analysis ICA 1995。它假定数据data is a mixture of maximally independent sources. ICA is trainable through one of many relatively simple optimization routines that maximize non-Gaussianity or minimize mutual information.然而ICA和其他的办法相同,在时刻上的顺序是不可知的。每一个时刻step的多元信号都被以为是独立同散布的。

While model degeneracy in time is conventient for learning; as an assumption about the data the explicit lack of temporal dependence necessarily marginalizes out dynamics, which then must be extrapolated in post-boc analysis.

Background

Here we will formalize the problem of source separation with temporal dependencies and formulated the solution in terms of maximum likelihood estimation (MLE) and a recurrent model taht parameterizes a conditionally independent distribution

The data is composed of N ordered sequences of lengt T.

ICA | 用RNN-ICA探索功能核磁内在网络模型的时空动力学

where each element in the sequence xt,nx_{t,n} is a D dimensional vector, and the index n enumerates the whole sequence.

The gold is to find a set of source signals:

ICA | 用RNN-ICA探索功能核磁内在网络模型的时空动力学

这儿还能够构建子序列:

ICA | 用RNN-ICA探索功能核磁内在网络模型的时空动力学

我看到这儿,我对这个问题是什么还是一无所知。。。

This problem can generally be understood as inderence of unobserved or latent configurations from time-series observations.

这个问题一般能够理解为从时刻序列调查中推断出未调查到或潜在的配置。

It is convencient to assume that the sources, SnS_n, are stochastic random variables with well-understood and interpretable noise, suhc as Gaussian or logistic variables with independence constrains.

Representable as a directed graphical model in time, the choice of a-priori model structure, such as the relationship between latent variables and observations, can have consequences on model capacity and inference complexity.

能够及时表示为有向图模型,先验模型结构的挑选,例如潜在变量和调查值之间的联系,会对模型容量和推理复杂性产生影响。潜在变量和调查值这个好像能理解X和S之间的联系?

Directed graphical models often require complex approximate inference which introduces variance into learning. Rather than solving the general problem in Equation 3. We will assume that the generating function, G() is noiseless, and the source sequences, SnS_n have the same dimensionality as the data XnX_n, with each source signal being composed of a set of conditionally independent components with density parameterized by a recurrent neural network(RNN)

有向图模型一般需求复杂的近似推理,这会在学习中引进方差。而不是解决等式 3 中的一般问题。咱们将假定生成函数 G() 是无噪声的,并且源序列 SnS_n 与数据 XnX_n 具有相同的维度,每个源信号由一组条件独立的组件,其密度由递归神经网络 (RNN) 参数化

We will show that the learning objective closely resembles that of noiseless independent component analysis (ICA). Assuming generation is noiseless and preserves dimensionality will reudce variance which would otherswise hinder learning with high-dimensional, low-sample size data, such as fMRI.

咱们将证明学习方针与无噪声独立成分剖析 (ICA) 十分相似。假定生成是无噪声的并且保存维度将削减方差,否则方差会阻止使用高维、低样本量数据(例如 fMRI)进行学习。

Independent component analysis

参考资料:

  • [2013.11.29 Lesson9-session2]多變數剖析-獨立成分剖析ICA – YouTube

  • (1298条音讯) 独立成分剖析ICA原理_蔡希玉的博客-CSDN博客_ica原理

  • (1298条音讯) ICA与PCA的差异_psybrain的博客-CSDN博客_ica和pca

  • ICA又称为盲源别离Blind source separation BBS。

  • ICA是independent component analysis独立成分剖析的缩写。

  • 用鸡尾酒会模型来做比方,假定咱们在一个音乐厅或者是一个舞会,麦克风放在舞台的各个方位,每个麦克风都会捕获到混合的原始信号,有多少个麦克风就会有多少个混合信号。ICA的方针便是将混合信号别离提取或重建成非混合信号。

数学上说,ICA是一种线性改换,和PCA是相同的。这个改换把数据或信号别离成核算独立的非高斯散布的信号源的线性组合。能够证明只需源信号非高斯,这种分化便是仅有的

ICA | 用RNN-ICA探索功能核磁内在网络模型的时空动力学

能够看到,A便是将源信号s进行线性组合,得到了观测信号x。ICA的意图便是通过x来估计混合矩阵A和源信号s。


【ICP vs PCA】 ICA是一种将数据乘以一个分化矩阵来康复源数据的办法,而PCA是对输出进行去相关,让每一个连续重量尽可能多的解说数据中的方差。ICA则试图输出具有核算含义上的独立,使得每一个重量尽可能多的反响数据中与时刻无关的信息。

ICA需求预先界说分化的独立源的数目,及需求用户对数据有一个先验常识,把握必定的数据特征,不能随意挑选。而PCA的核算过程是完全无参的。

  • 一般以为,PCA假定源信号彼此非相关,PCA的源信号其实便是主成分的方向,不相关其实便是只主成分方向正交
  • ICA假定源信号彼此独立。因为ICA分化的源信号需求坚持核算上的独立。
  • 主成分剖析以为主元之间彼此正交,样本呈高斯散布,独立成分剖析则要求数据非高斯散布。
  • PCA的意图是找到信号当中的不相关部分(正交性),对应二阶核算量(最大方差)。PCA的完成就像咱们之前讲的,两种:特征值分化和SVD分化。PCA的问题便是对向量描绘的基的改换,让改换后的数据有着最大的方差。方差的巨细是描绘一个变量的信息量。
  • ICA是找出构成信号的彼此独立的部分,并不要求正交,对应高阶核算量剖析。ICA的理论以为用来观测的混合矩阵X是由独立源A经过线性加权取得的。ICA的方针便是通过X求取一个别离矩阵W,使得W作用在X上取得的成果是独立源S的最优逼近。

x=AS,A=W−1,WX=Y,Y=Ax=AS,A=W^{-1},WX=Y,Y=\hat{A}

  • 与PCA不同,ICA的方针不在于下降方针的维度,而是尽可能的从混合讯号中找出更具生理或者物理含义的信号来源。

【ICA的假定】

  1. 假定源信号是各自独立的;也便是一起散布是各自散布的乘积
  2. 假定源信号散布对错高斯散布。

python完成ICA

关于ICA的理论数学推导比较复杂。之后需求的话专门开一个坑研究。先看一下iCA的python完成:

import numpy as np
import matplotlib.pyplot as plt
from sklearn.decomposition import FastICA
# 构建四个不同的信号
C=200
x=np.arange(C)
s1 = 2 * np.sin(0.02 * np.pi * x)
a = np.linspace(-2,2,25)
s2 = np.concatenate([a,a,a,a,a,a,a,a])
s3 = np.array(20*(5*[2]+5*[-2]))
s4 = np.random.random(C)
# 展示信号
ax1 = plt.subplot(411)
ax2 = plt.subplot(412)
ax3 = plt.subplot(413)
ax4 = plt.subplot(414)
ax1.plot(s1)
ax2.plot(s2)
ax3.plot(s3)
ax4.plot(s4)

ICA | 用RNN-ICA探索功能核磁内在网络模型的时空动力学

这四个波分别是正弦波、锯齿波、方波和随机信号,四个代表互相独立的源信号。


s = np.array([s1,s2,s3,s4])
ran = np.random.random([4,4])
mix = np.dot(ran,s)
ax1 = plt.subplot(411)
ax2 = plt.subplot(412)
ax3 = plt.subplot(413)
ax4 = plt.subplot(414)
ax1.plot(mix[0])
ax2.plot(mix[1])
ax3.plot(mix[2])
ax4.plot(mix[3])

将四个源信号经过随机混合出来四个观测信号。

ICA | 用RNN-ICA探索功能核磁内在网络模型的时空动力学

ica = FastICA(n_components=4)
u = ica.fit_transform(mix.T)
print(ica.n_iter_)
ax1 = plt.subplot(411)
ax2 = plt.subplot(412)
ax3 = plt.subplot(413)
ax4 = plt.subplot(414)
ax1.plot(u[:,0])
ax2.plot(u[:,1])
ax3.plot(u[:,2])
ax4.plot(u[:,3])

通过sklearn的fastICA进行独立成分分化。发现成果也是和源信号十分相似的

ICA | 用RNN-ICA探索功能核磁内在网络模型的时空动力学

ica = FastICA(n_components=4)
ica.fit(mix.T)
w = ica.components_
u = np.dot(w,mix)
ax1 = plt.subplot(411)
ax2 = plt.subplot(412)
ax3 = plt.subplot(413)
ax4 = plt.subplot(414)
ax1.plot(u[0])
ax2.plot(u[1])
ax3.plot(u[2])
ax4.plot(u[3])

这个是用ica.components_,这个便是用来从混合信号中解耦出独立源信号的矩阵。

ICA | 用RNN-ICA探索功能核磁内在网络模型的时空动力学

这儿我扩展了一种思路,这儿面的混合信号是有4个,那么假定混合信号数量变少或者变多,那会有什么反响呢?

其实ICA宏观来看,跟医学图画重建的思路十分相似。混合信号能够堪称是投影,通过多个混合信号来重建原始信号。所以假如混合信号的数量不够多,那么重建的原始信号的作用就会差。此外,混合信号的数目必需要大于等于原始信号的数量。

ICA | 用RNN-ICA探索功能核磁内在网络模型的时空动力学

能够看到,当混合信号的数目为2的时候,咱们最多能够剖析出两个原始信号。一个看起来是正弦+矩形,另一个是锯齿+随机信号。

回到RNN-ICA

其实便是用图画做PCA之后,然后自己设置了一个参数W,作为ICA的那个解耦矩阵加入到练习。这样RNN-ICA便是能够视为ICA办法在高纬度的序列上的解耦。