From 66e0d8b9fd4d0f7a2231d689c055e26fdf1cf04a Mon Sep 17 00:00:00 2001 From: YurenHao0426 Date: Sat, 13 Jun 2026 12:35:36 -0500 Subject: rrm workspace: TRM/HRM/SRM code, Maze dataset, dynamical-analysis pipeline Curated export for clone-and-run Maze training (2x A6000) + diagnostics. trm/hrm pretrain.py carry trajectory-augmentation code (backward-compatible). Heavy artifacts (checkpoints/wandb/npz) gitignored; see PROVENANCE.md. Co-Authored-By: Claude Fable 5 --- .../flossing/external/GradientFlossing/README.md | 79 ++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 research/flossing/external/GradientFlossing/README.md (limited to 'research/flossing/external/GradientFlossing/README.md') diff --git a/research/flossing/external/GradientFlossing/README.md b/research/flossing/external/GradientFlossing/README.md new file mode 100644 index 0000000..962c955 --- /dev/null +++ b/research/flossing/external/GradientFlossing/README.md @@ -0,0 +1,79 @@ +# Gradient Flossing: Improving Gradient Descent through Dynamic Control of Jacobians + +This repository contains the implementation code for manuscript:
+__Gradient Flossing: Improving Gradient Descent through Dynamic Control of Jacobians__
+## Overview +In this work we show that RNN training can be improved by pushing Lyapunov exponents of the forward pass to zero during or before training. + +## Installation + +#### Prerequisites +- Download [Julia](https://julialang.org/downloads/) + +#### Dependencies +- Julia (1.6) +- Flux, BackwardsLinalg + +## Getting started +To install the required packages, run the following in the julia REPL after installing Julia: + +``` +using Pkg + +for pkg in ["Flux", "BackwardsLinalg"] + Pkg.add(pkg) +end +``` + +For example, to train an RNN on tracking delayed XOR task, run: +``` +include("GradientFlossing_ExampleCode.jl") +# setting parameters: +N, E, Ef, Ei, Ep, Ni, B, S, T, Tp, Ti, sIC, sIn, sNet, sONS, lr, b1, b2, IC, g, gbar, I1, delay, wsS, wsM, wrS, wrM, bS, bM, nLE, task, intype, Lwnt= +80, 3001, 100, 500, 500, 2, 16, 1, 300, 55, 300, 1,1,1,1, 0.001f0, 0.9, 0.999, 1, 1.0, 0.0, 1.0,10, 1.0f0, 0.0f0, 1.0f0, 0.0f0, 0.1f0, 0.0f0,75, -1, 3, 0.0 + +trainRNNflossing(N, E, Ef, Ei, Ep, Ni, B, S, T, Tp, Ti, sIC, sIn, sNet, sONS, lr, b1, b2, IC, g, gbar, I1, delay, wsS, wsM, wrS, wrM, bS, bM, nLE, task, intype, Lwnt) +``` + +## Repository Overview +_GradientFlossing_ExampleCode.jl_:\ +Example scripts for training networks with gradient flossing before training, with gradient flossing before and during training and without gradient flossing. + + +_GradientFlossing_XOR.jl_:\ +Generates input and target output for copy task and delayed XOR task. + + + + + + + +### Implementation details +A full specification of packages used and their versions can be found in _packages.txt_ .\ +For learning rates the default ADAM parameters were used to avoid any impression of fine-tuning.\ +All simulations were run on a single CPU and took on the order of minutes to a few of hours. + + + + + + + -- cgit v1.2.3