“神经网络的有效信息计算”的版本间的差异

来自集智百科 - 复杂系统|人工智能|复杂科学|复杂网络|自组织
跳到导航 跳到搜索
第205行: 第205行:
 
实验代码地址:https://github.com/constantinexu/NIS-EI-Experiments
 
实验代码地址:https://github.com/constantinexu/NIS-EI-Experiments
  
−
[[文件:NIS-EI实验.png|替代=|无框|900x700像素]]
+
[[文件:NIS-EI-RESULTS.png|替代=|无框|900x700像素]]
  
 
=总结=
 
=总结=

2025年2月23日 (日) 16:25的版本

人工神经网络(artificial neural networks)主要通过分析节点与数据集间的互信息(Mutual Information,MI),来研究其对输入的响应。然而,神经网络还可以在因果关系层面进行探讨,揭示网络内部各层间“谁影响谁”及其作用机制。有效信息(Effective Information, EI)作为一种基于信息论的工具,可以通过最大熵扰动下的输入与输出之间的互信息,量化网络层间的因果作用。此外,基于神经信息压缩机(Neural Information Squeezer,NIS)框架的有效信息计算方法可以识别系统从微观状态到宏观状态的因果涌现。

简介

人工神经网络在语音合成[1]、图像识别[2][3]和翻译[4]等各个领域都表现出了先进的性能。然而,人工神经网络底层机制还存在很多未知。例如,基本的机器学习理论表明,拥有大量参数的模型往往容易记住数据集中的所有信息,导致泛化能力差,特别是在未正则化的模型中[5]。深度神经网络(DNN)的主要原理是将深度学习技术[6]引入人工神经网络,以及将GPU用于高速计算[7]。在实践中,研究者发现即使没有显式正则化的DNN也具有良好的泛化性能[8]。虽然众所周知,尽管人工神经网络可以逼近任何函数[9],但它们得出的函数是如何超越训练数据进行泛化的,仍缺乏清晰的理论解释。

信息瓶颈(information bottleneck)是一种被提出来解释人工神经网络泛化能力的理论框架[10]。它认为神经网络在压缩输入数据与预测输出之间寻找最佳平衡。通过分析网络在信息平面(information plane)上的行为——即输入数据与每层网络之间的互信息,研究者尝试揭示网络的学习机制[11]。虽然寻找信息瓶颈是一个可行的方法,但更大的网络仍然受到信息估计问题的困扰[12],并且某些网络拓扑和激活函数的预测或偏差存在错误[13]。更根本的是,信息瓶颈方法的数学公式是数据依赖的,也就是说,它的互信息得分随着输入分布的变化而变化。然而,从定义上讲,泛化能力是不同数据集(输入频率不同,甚至是未知且尚未定义的未来数据集)性能的函数。因此,为了理解泛化能力,有必要关注神经网络在具有不同属性的不同数据集上的不变性[14]。

为更深入理解神经网络的泛化能力,我们需要关注网络中独立于数据分布的因果结构。因果结构描述了网络中节点间的依赖关系,反映了节点之间的连接机制和作用方式。这里我们介绍一种微扰方法,该方法使用信息理论以逐层的方式跟踪神经网络内的因果作用。具体来说,我们引入了有效信息(Effective Information, EI),它可以捕获因果关系的信息量和强度。EI最初是作为复杂系统两个子集之间因果关系的信息论度量而引入的[15]。已经有学者证明,EI可以量化布尔网络的因果结构[16],也可以量化图形[17]。值得注意的是,EI与信息瓶颈方法在数学上有相似之处,但EI侧重于因果关系。在神经网络中,EI通过对网络层节点施加独立且随机的最大熵噪声,计算扰动后输出与输入之间的互信息,捕捉层间因果结构的信息总量。研究发现,网络训练过程中损失函数的快速下降往往伴随着EI的剧烈变化,揭示了网络因果结构的动态演化。

更重要的是,EI可以帮助我们追踪网络训练过程中各层因果结构的变化路径。通过观察网络连接的“敏感度”(Sensitivity,即扰动的传递效果,类似Erik Hoel的Determinism概念[18])和“简并度”(Degeneracy,即连接重叠导致的信息丢失),我们可以看到不同任务如何塑造神经网络的因果结构。复杂任务往往导致网络因果结构分化更明显,而简单任务中这种分化较弱。此外,冗余层通常无法在因果平面中显著变化,显示其对网络功能贡献较小。此外,我们会展示如何使用EI来计算一层中节点的总联合效应和总个体效应之间的差异,从而可以测量神经网络中的前馈集成信息[19]。

此外,神经信息压缩机(Neural Information Squeezer, NIS)是用于量化神经网络有效信息另一个重要方法[20]。NIS旨在通过可逆神经网络(Invertible Neural Network,INN)和投影操作,自动从时间序列数据中提取有效的粗粒化策略和宏观动力学,并识别因果涌现。NIS的核心思想是将粗粒化策略分解为信息转换和信息丢弃两个过程,通过可逆神经网络实现信息无损的转换,再通过投影操作丢弃冗余信息,从而在宏观尺度上获得更强的因果连接。NIS框架通过优化有效信息来寻找最优的粗粒化策略和宏观动力学,实验表明,NIS能够在多个经典系统中自动发现有效的宏观状态和动力学,并在不同尺度下展现出显著的因果涌现效应。

量化神经网络中的有效信息为解决人工神经网络的可解释性问题提供了新的思路。由于人工神经网络拥有大量参数,常被视为“黑匣子”,其内部机制难以理解,影响了模型的透明度[21]。缺乏可解释性可能会掩盖其他问题,如数据集[22]或模型选择[23]中的偏见,对于那些想使用人工神经网络做出关于人生命的事情来说是一个重大问题,例如在自动驾驶汽车[24]、自动驾驶无人机[25]或医疗诊断[26]的情况下。因此使用这套技术,研究人员将能够在训练过程中直接观察神经网络的整体因果结构发生变化的过程,这是打开“黑匣子”和了解神经网络中的作用的关键一步。

基于互信息的有效信息计算

干预揭示因果关系

干预(也称为“扰动”)是揭示因果关系的关键工具。前馈深度神经网络(DNN)的因果关系集合(也称为“因果结构”)由多个层、层之间的连接以及节点的激活函数组成。我们引入了一套工具,用于探索一个假设:DNN的泛化能力取决于其因果结构如何适应所训练的任务(详见 https://github.com/ei-research-group/deep-ei )。

为了研究这一问题,我们采用了一种广泛用于因果分析的正式方法,其中干预被表示为对系统中的某个变量应用[math]\displaystyle{ do(x) }[/math]操作符[27]。通常,[math]\displaystyle{ do(x) }[/math]用于将一个变量设置为特定值,例如在有向无环图中,它可以用来对单个节点进行干预(例如,之前在DNN中已用于应用单个干预[28]。[math]\displaystyle{ do(x) }[/math]通常用于将给定系统中的单个变量(如有向无环图)设置为特定值(例如,它以前曾被用于在DNN中应用单个干预[29][30])。然而,我们在这里引入了一种新的方法,即使用“干预分布”(Intervention Distribution, [math]\displaystyle{ I_D }[/math]),它是对[math]\displaystyle{ do(x) }[/math]操作符的概率分布描述。简单来说,[math]\displaystyle{ I_D }[/math]是对一系列干预的数学描述。当我们在一个网络层的输入上应用[math]\displaystyle{ I_D }[/math]时,会导致输出节点产生某种效应分布([math]\displaystyle{ E_D }[/math])[31]。

通过信息理论,我们可以量化这些因果关系的信息量。更强的因果关系意味着它们传递了更多的信息。我们使用有效信息(Effective Information, EI)来衡量因果关系的强度。具体来说,EI是干预分布([math]\displaystyle{ I_D }[/math])和效应分布([math]\displaystyle{ E_D }[/math])之间的互信息(Mutual Information, MI),当[math]\displaystyle{ I_D }[/math]为最大熵分布(即[math]\displaystyle{ H^{max} }[/math])时。换句话说,EI是通过向网络注入噪声(随机化)后计算的互信息。这种随机化有多个作用:首先,它确保了所有传递的互信息都是由噪声引起的,而不是简单的相关性;其次,作为最大熵的干预,EI反映了随机化变量所产生的信息量,这在科学中是因果关系的“黄金标准”;最后,EI可以被视为对输入状态空间的无偏采样,反映了网络如何处理分布外的数据。

此外,EI还可以被理解为衡量函数映射的“图像”如何帮助恢复“原像”,并且与Kolmogorov复杂度和VC熵有重要关系[32]。最重要的是,先前的研究表明,EI能够反映因果关系的重要特性,例如其确定性(缺乏噪声)或退化性(缺乏唯一性)[16],而这些特性是标准互信息无法捕捉的。

测量层与层之间的有效信息

首先我们介绍一种方法,用于测量深度神经网络中层与层之间的有效信息,从而捕捉一个层对另一个层的总联合效应。因此,我们从L1开始,L1是一组与L2有加权前馈连接的节点,我们假设所有节点都有一些激活函数,如sigmoid函数。为了测量EI,L1在最大熵[math]\displaystyle{ do(L_{1}=H^{\max}) }[/math]处受到扰动,这意味着节点的所有激活都被迫进入随机选择的状态。[math]\displaystyle{ L_{1}=H^{\max} }[/math]最大限度地放大了L1中所有节点的同时和独立的最大熵扰动:

[math]\displaystyle{ \begin{equation} EI = I(L_1, L_2) \mid do(L_1 = H^{\text{max}}) \end{equation} }[/math]

这个公式表示在L1被最大熵扰动的情况下,L1和L2之间的互信息。

互信息的计算

互信息 [math]\displaystyle{ I(L_1, L_2) }[/math] 的计算基于输入层 [math]\displaystyle{ L_1 }[/math] 和输出层 [math]\displaystyle{ L_2 }[/math] 的联合分布。具体步骤如下:

1.离散化 将输入层 [math]\displaystyle{ L_1 }[/math] 和输出层 [math]\displaystyle{ L_2 }[/math] 的激活值离散化为若干个区间(bins)。 假设每个节点的激活值被划分为 [math]\displaystyle{ B }[/math] 个区间,则输入层 [math]\displaystyle{ L_1 }[/math] 的离散化状态空间大小为 [math]\displaystyle{ B^n }[/math],输出层 [math]\displaystyle{ L_2 }[/math] 的离散化状态空间大小为 [math]\displaystyle{ B^m }[/math],其中 [math]\displaystyle{ n }[/math] 和 [math]\displaystyle{ m }[/math] 分别是输入层和输出层的节点数。

2.构建联合分布 通过多次最大熵扰动,记录输入层和输出层的离散化状态,构建输入-输出的联合分布 [math]\displaystyle{ P(L_1, L_2) }[/math]。 具体来说,对于每次扰动,输入层 [math]\displaystyle{ L_1 }[/math] 的激活值被随机化,输出层 [math]\displaystyle{ L_2 }[/math] 的激活值通过网络计算得到。然后将这些值离散化并记录到联合分布中。

3.计算互信息 根据联合分布 [math]\displaystyle{ P(L_1, L_2) }[/math],计算互信息 [math]\displaystyle{ I(L_1, L_2) }[/math]:

[math]\displaystyle{ I(L_1, L_2) = \sum_{x \in L_1} \sum_{y \in L_2} P(x, y) \log \frac{P(x, y)}{P(x) P(y)} }[/math]

其中: [math]\displaystyle{ P(x, y) }[/math] 是输入层 [math]\displaystyle{ L_1 }[/math] 和输出层 [math]\displaystyle{ L_2 }[/math] 的联合概率分布。 [math]\displaystyle{ P(x) }[/math] 和 [math]\displaystyle{ P(y) }[/math] 分别是输入层和输出层的边缘概率分布。


有效信息的分解

EI 可以进一步分解为两个部分:敏感性(Sensitivity)和简并性(Degeneracy)。

1.敏感性(Sensitivity) 敏感性衡量的是网络中每个边对输出的独立贡献。具体来说,敏感性是每个输入节点 [math]\displaystyle{ i \in L_1 }[/math] 和输出节点 [math]\displaystyle{ j \in L_2 }[/math] 之间的互信息之和:

[math]\displaystyle{ \text{Sensitivity} = \sum_{(i \in L_1, j \in L_2)} I(t_i, t_j) \mid do(i = H^{\text{max}}) }[/math]

其中: [math]\displaystyle{ t_i }[/math] 和 [math]\displaystyle{ t_j }[/math] 分别是输入节点 [math]\displaystyle{ i }[/math] 和输出节点 [math]\displaystyle{ j }[/math] 的激活值。 [math]\displaystyle{ do(i = H^{\text{max}}) }[/math] 表示仅对节点 [math]\displaystyle{ i }[/math] 进行最大熵扰动,其他节点的激活值设为 0。

2.简并性(Degeneracy) 简并性衡量的是由于输入节点之间的重叠(即多个输入节点连接到同一个输出节点)导致的信息损失。简并性通过以下公式计算:

[math]\displaystyle{ \text{Degeneracy} = \text{Sensitivity} - EI }[/math]

简并性反映了网络中因果关系的冗余程度。

基于NIS框架的有效信息计算

NIS框架概述

神经信息压缩机(Neural Information Squeezer, NIS)框架是一种基于机器学习的新方法,旨在通过自动化地发现有效的粗粒化策略(Coarse-Graining Strategies)和宏观动态(Macro-Dynamics),从数据中识别因果涌现(Causal Emergence)[33]。该框架由以下三个关键组成部分构成:

1. 编码器(Encoder):编码器由可逆神经网络(Invertible Neural Network, INN) [math]\displaystyle{ \psi_\alpha }[/math] 和投影算子 [math]\displaystyle{ \chi_q }[/math] 组成,其映射定义为 [math]\displaystyle{ \phi_q = \chi_q \circ \psi_\alpha. }[/math] 其中,[math]\displaystyle{ \psi_\alpha : \mathbb{R}^p \to \mathbb{R}^p }[/math] 为双射变换,保证信息无损,而 [math]\displaystyle{ \chi_q : \mathbb{R}^p \to \mathbb{R}^q }[/math] 通过舍弃部分冗余信息实现降维。

2. 动态学习器(Dynamics Learner):利用带参数 [math]\displaystyle{ \beta }[/math] 的前馈神经网络 [math]\displaystyle{ f_\beta }[/math] 学习宏观状态的时间演化,即近似描述 [math]\displaystyle{ y_{t+1} = y_t + f_\beta(y_t) + \xi', }[/math] 其中 [math]\displaystyle{ \xi' }[/math] 表示附加的高斯(或拉普拉斯)噪声。它近似描述了宏观状态的时间演化,通过约束粗粒化策略以保持对微观动态的可预测性来最大化有效信息(Effective Information, EI)。

3. 解码器(Decoder):利用 INN 的逆变换 [math]\displaystyle{ \psi_\alpha^{-1} }[/math] 和补全操作 [math]\displaystyle{ \chi_q^\dagger }[/math] 将预测的宏观状态还原为微观状态,其定义为 [math]\displaystyle{ \phi_q^\dagger = \psi_\alpha^{-1} \circ \chi_q^\dagger, }[/math] 其中对 [math]\displaystyle{ \chi_q^\dagger }[/math] 的定义为:对任意 [math]\displaystyle{ x_q \in \mathbb{R}^q }[/math], [math]\displaystyle{ \chi_q^\dagger(x_q) = x_q \oplus z_{p-q},\quad z_{p-q}\sim N(0,I_{p-q}). }[/math]

NIS中的粗粒化策略明确分为两个过程:信息转换(Information Conversion)和信息丢弃(Information Discarding)。在信息转换阶段,可逆神经网络确保所有相关信息被保留;在信息丢弃阶段,投影算子 [math]\displaystyle{ \chi }[/math] 丢弃不必要的维度,从而将微观状态压缩为有意义的宏观状态。这种分离提供了对信息通道宽度(Width of the Information Channel)的控制,并支持将过程分解为可逆和不可逆的组件进行解析。通过结合这两个过程,NIS框架在保持宏观状态因果性最大化的同时,保证计算的可行性。

有效信息的近似计算

在传统方法中,计算有效信息通常需要对输入和输出空间进行离散化,并基于频率估计概率分布。然而,这种方法在高维空间下计算效率低,并且对低概率区域的估计不准确。NIS框架通过引入基于雅可比矩阵的近似方法,提出了适用于神经网络的有效信息计算公式。详细计算步骤如下:

定义输入输出空间与噪声模型

1. 输入空间: 输入 [math]\displaystyle{ X }[/math] 为 [math]\displaystyle{ n }[/math] 维向量,取值范围为 [math]\displaystyle{ [-L, L]^n }[/math]([math]\displaystyle{ L }[/math] 为大整数)。 假设输入服从均匀分布:[math]\displaystyle{ X \sim U([-L, L]^n) }[/math]。

2. 输出空间与噪声模型: 输出 [math]\displaystyle{ Y = \mu(X) }[/math],其中 [math]\displaystyle{ \mu }[/math] 是神经网络的确定性映射。 噪声模型假设: 高斯分布(使用均方误差损失时): [math]\displaystyle{ p(Y|X) = \frac{1}{\sqrt{(2\pi)^m|\Sigma|}} \exp\left(-\frac{1}{2}(Y - \mu(X))^T \Sigma^{-1} (Y - \mu(X))\right), }[/math] 其中 [math]\displaystyle{ \Sigma = \operatorname{diag}(\sigma_1^2, \dots, \sigma_m^2) }[/math],[math]\displaystyle{ \sigma_i }[/math] 为第 [math]\displaystyle{ i }[/math] 维输出的标准差。 拉普拉斯分布(使用平均绝对误差损失时): [math]\displaystyle{ p(Y|X) = \prod_{i=1}^m \frac{1}{2b_i} \exp\left(-\frac{|y_i - \mu_i(X)|}{b_i}\right), }[/math] 其中 [math]\displaystyle{ b_i }[/math] 为第 [math]\displaystyle{ i }[/math] 维输出的尺度参数。

计算雅可比矩阵

雅可比矩阵 [math]\displaystyle{ \partial_X \mu(X) }[/math] 描述输入对输出的局部敏感性,其元素为: [math]\displaystyle{ \partial_X \mu(X) = \left[ \frac{\partial \mu_i(X)}{\partial x_j} \right]_{n \times m}, }[/math] 即第 [math]\displaystyle{ i }[/math] 个输出对第 [math]\displaystyle{ j }[/math] 个输入的偏导数矩阵。

关键作用: 行列式 [math]\displaystyle{ \det(\partial_X \mu(X)) }[/math] 反映输入变化对输出的整体影响强度。 若行列式在所有输入点均为零,则EI为零(网络无法区分不同输入)。

NIS框架下的有效信息计算公式

若存在至少一个输入点使 [math]\displaystyle{ \det(\partial_X \mu(X)) \neq 0 }[/math],则EI近似为: [math]\displaystyle{ EI \approx n \ln(2L) - \frac{m}{2} \left(1 + \ln(2\pi)\right) - \frac{1}{2} \sum_{i=1}^m \ln(\sigma_i^2) + \mathbb{E}_{X \sim U} \left[ \ln |\det(\partial_X \mu(X))| \right]. }[/math]

其中: [math]\displaystyle{ n \ln(2L) }[/math] 为输入熵。表示输入空间的多样性,取值范围越大([math]\displaystyle{ L }[/math] 越大),EI越高。 [math]\displaystyle{ -\frac{m}{2} \left(1 + \ln(2\pi)\right) }[/math] 为输出维度惩罚。输出维度 [math]\displaystyle{ m }[/math] 越高,信息分散到更多维度,EI降低。 [math]\displaystyle{ -\frac{1}{2} \sum_{i=1}^m \ln(\sigma_i^2) }[/math] 为噪声惩罚。噪声标准差 [math]\displaystyle{ \sigma_i }[/math] 越大,输出不确定性越高,EI降低。 [math]\displaystyle{ \mathbb{E}[\ln |\det(\partial_X \mu)|] }[/math] 为敏感度增益。雅可比行列式对数的期望值,衡量网络对输入变化的全局敏感性。行列式绝对值越大,EI越高。

蒙特卡洛采样实现期望计算

数学期望 [math]\displaystyle{ \mathbb{E}_{X \sim U}[\cdot] }[/math] 通过以下步骤近似: 1. 均匀采样:从输入空间 [math]\displaystyle{ [-L, L]^n }[/math] 随机采样 [math]\displaystyle{ N }[/math] 个点(如 [math]\displaystyle{ N=1000 }[/math])。 2. 计算行列式:对每个采样点 [math]\displaystyle{ X_k }[/math],计算雅可比矩阵 [math]\displaystyle{ \partial_X \mu(X_k) }[/math] 及其行列式。 3. 对数平均:计算所有行列式对数的平均值: [math]\displaystyle{ \mathbb{E}[\ln |\det(\partial_X \mu)|] \approx \frac{1}{N} \sum_{k=1}^N \ln |\det(\partial_X \mu(X_k))|. }[/math]

最终输出 将上述四项代入公式,即可得到神经网络的有效信息值。此方法通过解析公式与采样结合,显著降低了高维空间的计算复杂度,适用于实际场景中的EI评估。

基于互信息方法量化联合效应

整合信息论(Integrated Information Theory, IIT) 是一种用来评估系统中联合效应和独立效应的工具[34]。简单来说,联合效应指的是多个节点(或变量)共同作用产生的效果,而独立效应则是单个节点单独作用的效果。IIT帮助我们分析网络中这些效应是如何整合在一起的[35][36]。

以前,研究人员通过计算有效信息的损失来衡量综合信息[37]。EI是一种衡量因果关系的工具,它通过向网络输入随机噪声(最大熵扰动),然后测量输入层和输出层之间的互信息来量化因果强度。然而,目前还没有一个通用的标准来衡量综合信息[38]。不同的系统可能需要不同的方法来衡量[39][40]。

在传统的前馈神经网络中,综合信息通常被认为是零,因为前馈神经网络没有反馈连接(即信息只能从输入层流向输出层)。然而,即使在前馈网络中,一层的节点仍然可能对另一层产生联合效应,即多个节点共同作用的效果。为了衡量这种联合效应,我们引入了一种新的度量方法,称为前馈集成信息(Feedforward Integrated Information, [math]\displaystyle{ \Phi_{feedforward} }[/math])。

量化联合效应

为了量化联合效应,我们首先需要计算每条边的独立贡献。我们引入了一个叫做[math]\displaystyle{ EI_{parts} }[/math]的度量方法。具体来说,对于每一层的每个节点,我们记录它在随机扰动下的激活值,然后计算这些激活值与下一层节点之间的互信息。最后,我们将所有这些互信息值相加,得到[math]\displaystyle{ EI_{parts} }[/math]:

[math]\displaystyle{ \begin{equation} EI_{\text{parts}}(L_1 \rightarrow L_2) = \sum_{(i \in L_1, j \in L_2)} I(t_i, t_j) \mid \text{do}(L_1 = H^{\max}). \end{equation} }[/math]

这里的[math]\displaystyle{ I(t_i, t_j) }[/math]表示节点[math]\displaystyle{ i }[/math]和节点[math]\displaystyle{ j }[/math]之间的互信息,[math]\displaystyle{ \text{do}(L_1 = H^{\max}) }[/math]表示对输入层[math]\displaystyle{ L_1 }[/math]进行最大熵扰动。

联合效应与独立效应的差异

[math]\displaystyle{ EI_{parts} }[/math]衡量的是网络中每条边的独立贡献,但它可能会忽略一些联合效应。为了捕捉这些联合效应,我们计算[math]\displaystyle{ EI }[/math]和[math]\displaystyle{ EI_{parts} }[/math]之间的差异,即:

[math]\displaystyle{ \begin{equation} \Phi_{feedforward} = EI - EI_{parts}. \end{equation} }[/math]

这个差值[math]\displaystyle{ \Phi_{feedforward} }[/math]表示网络中联合效应的总量。如果[math]\displaystyle{ \Phi_{feedforward} }[/math]是正的,说明网络中的联合效应是有益的;如果是负的,说明这些联合效应可能是噪声。

训练过程中联合效应的变化

为了了解联合效应在训练过程中的变化,我们分析了两个经典的数据集:Iris和MNIST。我们发现,MNIST数据集上的网络比Iris数据集上的网络具有更高的[math]\displaystyle{ \Phi_{feedforward} }[/math]。这表明,MNIST任务更复杂,网络需要更多的联合效应来学习(见下图)。

基于NIS方法观察神经网络层间EI变化

本实验通过NIS框架所提供的EI计算方法,研究了神经网络在MNIST和IRIS任务中的逐层有效信息动态变化。实验分别使用五层网络(25→6→6→6→5)和四层网络(4→5→5→3)进行训练,并记录了每一层的EI值随训练轮次(epoch)的变化情况。实验结果通过下图展示,揭示了神经网络在训练过程中的信息流动和转换效率。

在MNIST任务中,左侧图表展示了五层网络的EI动态变化。从图中可以看出,随着训练的进行,每一层的EI值逐渐趋于稳定,且不同层之间的EI变化具有一致性。例如,`X-T1`(输入层到第一隐藏层)的EI值在训练初期波动较大,但随着训练轮次的增加逐渐收敛。`T1-T2`、`T2-T3`的EI值也表现出类似的趋势,`T3-Y`(隐藏层之间及最后一层到输出层)始终相对平稳,验证了网络结构的鲁棒性和稳定性。值得注意的是,`X-T1`的EI值最终稳定在较高水平,表明第一层对信息的处理能力较强。

在IRIS任务中,右侧图表展示了四层网络的EI动态变化。与MNIST任务相比,IRIS任务的EI值变化范围较小,且整体趋势更为平缓。`X-T1`的EI值在训练前期呈现一定波动,随后趋于稳定,而`T1-T2`和`T2-Y`的EI值在整个训练过程中保持相对稳定。这表明IRIS任务中隐藏层对信息的处理效率较高,且网络能够快速收敛。此外,`T2-Y`的EI值最终稳定在较低水平(接近于0),可能与IRIS数据集的简单性和网络结构的轻量化有关。

通过对比两个任务的实验结果,我们可以得出以下结论: (1)任务复杂性影响EI动态:MNIST任务的EI值变化范围较大,反映了其较高的数据复杂性;而IRIS任务的EI值变化较小,表明其数据相对简单。 (2)网络结构对EI的影响:不同层之间的EI变化趋势反映了网络结构的信息处理能力。隐藏层之间的EI值变化显著,表明隐藏层在信息转换中起到了关键作用。 (3)训练稳定性:两个任务的EI值均随训练轮次的增加逐渐趋于稳定,验证了NIS方法在逐层有效信息分析中的有效性和普适性。

实验代码地址:https://github.com/constantinexu/NIS-EI-Experiments

总结

人工神经网络的有效信息计算是理解其内部机制和泛化能力的关键。通过引入基于信息论的工具——有效信息,研究者能够量化神经网络中层与层之间的因果关系。在互信息方法中,EI通过最大熵扰动下的输入与输出之间的互信息,捕捉网络层间的因果作用强度,揭示网络在训练过程中因果结构的动态演化。具体而言,EI通过对网络层节点施加独立且随机的最大熵噪声,计算扰动后输出与输入之间的互信息,从而量化因果关系的强度。这种方法不仅能够反映网络因果结构的敏感性和简并性,还能帮助研究者追踪网络训练过程中各层因果结构的变化路径。此外,神经信息压缩机框架则是通过引入基于雅可比矩阵的近似方法,提出了适用于神经网络的有效信息计算公式。NIS通过优化有效信息来寻找最优的粗粒化策略和宏观动力学,实验表明其能够在多个经典系统中自动发现有效的宏观状态和动力学,并在不同尺度下展现出显著的因果涌现效应。这些基于有效信息的计算方法为解决神经网络的可解释性问题提供了新思路,帮助研究者观察网络训练过程中因果结构的变化,推动对神经网络内部机制的理解。

参考文献

  1. ↑ Zhizheng Wu, Oliver Watts, and Simon King. Merlin: An open source neural network speech synthesis system. In SSW, pages 202–207, 2016.
  2. ↑ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012.
  3. ↑ Edgar Xi, Selina Bing, and Yang Jin. Capsule network performance on complex data. arXiv preprint arXiv:1712.03480, 2017.
  4. ↑ I Sutskever, O Vinyals, and QV Le. Sequence to sequence learning with neural networks. Advances in NIPS, 2014.
  5. ↑ Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. arXiv preprint arXiv:1611.03530, 2016.
  6. ↑ Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. nature, 521(7553):436–444, 2015.
  7. ↑ Rajat Raina, Anand Madhavan, and Andrew Y Ng. Large-scale deep unsupervised learning using graphics processors. In Proceedings of the 26th annual international conference on machine learning, pages 873–880. ACM, 2009.
  8. ↑ Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester, and Nati Srebro. Exploring generalization in deep learning. In Advances in Neural Information Processing Systems, pages 5947–5956, 2017.
  9. ↑ Kurt Hornik, Maxwell Stinchcombe, and Halbert White. Multilayer feedforward networks are universal approximators. Neural networks, 2(5):359–366, 1989.
  10. ↑ Naftali Tishby, Fernando C Pereira, and William Bialek. The information bottleneck method. arXiv preprint physics/0004057, 2000.
  11. ↑ Ravid Shwartz-Ziv and Naftali Tishby. Opening the black box of deep neural networks via information. arXiv preprint arXiv:1703.00810, 2017.
  12. ↑ Kristoffer Wickstrøm, Sigurd Løkse, Michael Kampffmeyer, Shujian Yu, Jose Principe, and Robert Jenssen. Information plane analysis of deep neural networks via matrix-based renyi’s entropy and tensor kernels.arXiv preprint arXiv:1909.11396, 2019.
  13. ↑ Andrew M Saxe, Yamini Bansal, Joel Dapello, Madhu Advani, Artemy Kolchinsky, Brendan D Tracey, and David DCox. On the information bottleneck theory of deep learning. Journal of Statistical Mechanics: Theory and Experiment, 2019(12):124020, 2019.
  14. ↑ Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. arXiv preprint arXiv:1611.03530, 2016.
  15. ↑ Giulio Tononi and Olaf Sporns. Measuring information integration. BMC neuroscience, 4(1):31, 2003.
  16. ↑ 16.0 16.1 Erik P Hoel, Larissa Albantakis, and Giulio Tononi. Quantifying causal emergence shows that macro can beat micro. Proceedings of the National Academy of Sciences, 110(49):19790–19795, 2013.
  17. ↑ Erik P Hoel, Larissa Albantakis, and Giulio Tononi. Quantifying causal emergence shows that macro can beat micro. Proceedings of the National Academy of Sciences, 110(49):19790–19795, 2013.
  18. ↑ Hoel, Erik P.; Albantakis, L.; Tononi, G. (2013). "Quantifying causal emergence shows that macro can beat micro". Proceedings of the National Academy of Sciences. 110 (49): 19790–19795.
  19. ↑ Masafumi Oizumi, Larissa Albantakis, and Giulio Tononi. From the phenomenology to the mechanisms of consciousness: integrated information theory 3.0. PLoS Comput Biol, 10(5):e1003588, 2014.
  20. ↑ Jianyu Zhang, Kai Liu. Neural Information Squeezer for Causal Emergence. In Entropy, volume 25, pages 1–26, 2023.
  21. ↑ David Gunning. Explainable artificial intelligence (xai). Defense Advanced Research Projects Agency (DARPA), nd Web, 2, 2017.
  22. ↑ Mohsan Alvi, Andrew Zisserman, and Christoffer Nellåker. Turning a blind eye: Explicit removal of biases and variation from deep neural network embeddings. In Proceedings of the European Conference on Computer Vision(ECCV) , pages 0–0, 2018.
  23. ↑ Arnaud Mignan and Marco Broccardo. One neuron versus deep learning in aftershock prediction. Nature, 574(7776): E1–E3, 2019.
  24. ↑ Mariusz Bojarski, Davide Del Testa, Daniel Dworakowski, Bernhard Firner, Beat Flepp, Prasoon Goyal, Lawrence D Jackel, Mathew Monfort, Urs Muller, Jiakai Zhang, et al. End to end learning for self-driving cars. arXiv preprint arXiv:1604.07316, 2016.
  25. ↑ Dario Floreano and Robert J Wood. Science, technology and the future of small autonomous drones. Nature, 521(7553):460–466, 2015.
  26. ↑ Hoo-Chang Shin, Holger R Roth, Mingchen Gao, Le Lu, Ziyue Xu, Isabella Nogues, Jianhua Yao, Daniel Mollura, and Ronald M Summers. Deep convolutional neural networks for computer-aided detection: Cnn architectures, dataset characteristics and transfer learning. IEEE transactions on medical imaging, 35(5):1285–1298, 2016.
  27. ↑ Judea Pearl. Causality. New York: Cambridge, 2000. doi: 10.1017/CBO9780511803161.
  28. ↑ Judea Pearl. Causality. New York: Cambridge, 2000. doi: 10.1017/CBO9780511803161.
  29. ↑ Michael Harradon, Jeff Druce, and Brian Ruttenberg. Causal learning and explanation of deep neural networks via autoencoded activations. arXiv preprint arXiv:1802.00541, 2018.
  30. ↑ Tanmayee Narendra, Anush Sankaran, Deepak Vijaykeerthy, and Senthil Mani. Explaining deep learning models using causal inference. arXiv preprint arXiv:1811.04376, 2018.
  31. ↑ Erik P. Hoel. When the map is better than the territory. Entropy, 19(5):188, 2017. ISSN 1099-4300. doi: 10.3390/e19050188.
  32. ↑ R. A. Fisher. The Design of Experiments. The American Mathematical Monthly, 43(3):180, 1936. ISSN 00029890. doi: 10.2307/2300364.
  33. ↑ Jiang Zhang, Kai Liu. Neural Information Squeezer for Causal Emergence. In Entropy, volume 25, pages 1–26, 2023.
  34. ↑ Giulio Tononi. Consciousness as integrated information: a provisional manifesto. The Biological Bulletin, 215(3): 216–242, 2008.
  35. ↑ William Marshall, Hyunju Kim, Sara I Walker, Giulio Tononi, and Larissa Albantakis. How causal analysis can reveal autonomy in models of biological systems. Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences, 375(2109):20160358, 2017.
  36. ↑ Larissa Albantakis, William Marshall, Erik Hoel, and Giulio Tononi. What caused what? a quantitative account of actual causation using dynamical causal networks. Entropy, , 21(5):459, 2019.
  37. ↑ David Balduzzi and Giulio Tononi. Integrated information in discrete dynamical systems: motivation and theoretical framework. PLoS Comput Biol, 4(6):e1000091, 2008.
  38. ↑ Masafumi Oizumi, Larissa Albantakis, and Giulio Tononi. From the phenomenology to the mechanisms of consciousness: integrated information theory 3.0. PLoS Comput Biol, 10(5):e1003588, 2014.
  39. ↑ Max Tegmark. Improved measures of integrated information. PLoS computational biology, 12(11):e1005123, 2016.
  40. ↑ Pedro AM Mediano, Anil K Seth, and Adam B Barrett. Measuring integrated information: Comparison of candidate measures in theory and simulation. Entropy, 21(1):17, 2019.