icml2026-repro-l35QweVxgn-code
收藏资源简介:
该数据集由XOR-cluster数据生成器生成,用于支持论文《On the Theory of Continual Learning with Gradient Descent for Neural Networks》中关于神经网络持续学习理论的实验研究。数据生成器是论文作者原始Jupyter notebook的复现版本,创建XOR聚类数据,以研究在持续学习场景下,梯度下降方法中遗忘、泛化等理论性质。数据在实验中被用来验证论文中的多个理论声明,包括遗忘界限、参数机制、均匀误分类误差、延迟泛化差距等。数据生成过程是确定性的,由种子控制,数据规模(如样本数量n、特征维度d、任务数量K等)可通过实验驱动文件中的参数进行配置。
This dataset is generated by the 'XOR-cluster Data Generator' hosted in the accompanying code repository, and is designed to support experimental studies on the theoretical framework of continual learning for neural networks in the paper *On the Theory of Continual Learning with Gradient Descent for Neural Networks*. The data generator is a reproduced implementation based on the original Jupyter notebook created by the paper's authors, which is used to create XOR-clustered data for investigating theoretical properties of gradient descent-based methods in continual learning scenarios, such as forgetting and generalization. In experiments, this dataset is utilized to validate multiple theoretical claims proposed in the paper, including forgetting bounds, parameter mechanisms, uniform misclassification error, delayed generalization gap, and other related contents. The data generation process is deterministic and controlled by random seeds, and the scale parameters of the dataset, such as the number of samples n, feature dimension d, number of tasks K, and others, can be configured via the parameters in the experiment driver files.
数据集概述
该数据集是ICML 2026论文《On the Theory of Continual Learning with Gradient Descent for Neural Networks》(Taheri, Ghosh & Mazumdar,arXiv:2510.05573v2)的清洁室NumPy复现代码和完整扫描工具集。数据集对应OpenReview上的论文ID为l35QweVxgn。
内容结构
数据集包含四个主要目录:
code/:复现代码及全部八个扫描驱动程序results/:每个驱动程序一个JSON文件,包含所有运行记录及summary.json(所有拟合斜率)figs/:每一张图的独立HTML、PNG及绘制所用的CSV数据poster/:60"×36"会议海报(HTML源码、打印PDF、预览PNG)
代码组件
| 文件 | 对应论文声明 | 功能 |
|---|---|---|
code/clcore.py |
— | 模型、XOR簇数据生成器、全批量梯度下降及闭式线性损失求解器 |
code/exp1_scalings.py |
1 | 全批量梯度下降;遗忘率随n、m、K-k、η、T变化 |
code/exp2_mechanism.py |
1、2 | 闭式求解器;将遗忘率分解为first_order/remainder/fo_fluct/fo_mean,含平均重叠控制 |
code/exp3_regime.py |
2、3、6 | 预定路径扫描、三个条件破坏分支、ηT地平线网格、4×4的(n,m)联合网格 |
code/exp4_gengap.py |
4、5 | 度量泛化延迟差距与两个界定右侧的对比 |
code/exp5_etaT_needed.py |
2 | 二分法求解在(d,m)上适配单任务所需的最小ηT |
code/exp6_noise.py |
3 | 簇噪声控制,σc∈[0.1,4.0] |
code/exp7_decomp_mc.py |
6 | 对分解中丢弃项的蒙特卡洛控制 |
code/exp8_nonvacuous.py |
4、5 | 指数前因子降至O(1)的低η角点 |
code/analyze.py |
全部 | 读取所有results/exp*.json,拟合所有log-log斜率,写入results/summary.json |
code/figures.py |
全部 | 读取summary.json,生成figs/.html和figs/.csv |
code/runall.sh |
— | 按顺序运行驱动程序,跳过已有JSON的项 |
复现方法
bash pip install numpy plotly cd code OMP_NUM_THREADS=1 CL_NPROC=3 ./runall.sh # 单CPU约2.8小时 python analyze.py && python figures.py
每个驱动程序从整数种子出发,结果确定可复现。无需GPU,无需下载训练权重:网络状态为float64的m×d矩阵,从种子在一秒内生成。
内存优化:clcore.out()和clcore.gd_step()以行块(默认CL_ZBLOCK=4096)进行乘法运算,峰值RSS保持在每工作器约160 MB以下(即使m=10^5)。可调低CL_ZBLOCK以适应更紧内存,调高以提高速度。
验证结论
共检验论文六项声明,每项均有审计及至少一个可推翻假设的控制实验:
- 定理1闭式遗忘界(项结构及八个指数)—— 支持
- 参数范围 n=Θ̃(d²K),m=Ω̃(d⁸K⁴),ηT=Θ(d²) —— 三个条件中两个承重,宽度条件宽松约10^14倍
- 定理2均匀误分类误差 —— 误差部分成立(32/32次运行零错误);损失部分需完整时间范围
- 定理3延迟泛化差距 —— 成立但处处空洞(10^826 vs 1.7×10⁻⁴)
- 定理4自界损失改进 —— 支持;基点处收紧10^756倍
- 测试时遗忘分解 —— n控制遗忘,m不控制;被丢弃项仍未解决
完整推理、图表及注意事项见配套logbook。
数据来源
原始论文作者在GitHub仓库hosseinta2/continual-learning-with-neural-nets(审计于commit 5e73290)发布三个Jupyter笔记本。其中无可复用模块、配置或种子文件、无扫描驱动,因此本数据集仅从其XOR数据生成器和模型定义中借鉴(已与continual_learning_codes-XOR.ipynb逐行核对),其余为独立实现。





