Papers › Adaptively Truncating Backpropagation Through Time to Control Gradient Bias

Adaptively Truncating Backpropagation Through Time to Control Gradient Bias

17 May 2019arXiv:1905.07473archive 2025-07-28

Christopher Aicher, Nicholas J. Foti, Emily B. Fox

Truncated backpropagation through time (TBPTT) is a popular method for learning in recurrent neural networks (RNNs) that saves computation and memory at the cost of bias by truncating backpropagation after a fixed number of lags. In practice, choosing the optimal truncation length is difficult: TBPTT will not converge if the truncation length is too small, or will converge slowly if it is too large. We propose an adaptive TBPTT scheme that converts the problem from choosing a temporal lag to one of choosing a tolerable amount of gradient bias. For many realistic RNNs, the TBPTT gradients decay geometrically in expectation for large lags; under this condition, we can control the bias by varying the truncation length adaptively. For RNNs with smooth activation functions, we prove that this bias controls the convergence rate of SGD with biased gradients for our non-convex loss. Using this theory, we develop a practical method for adaptively estimating the truncation length during training. We evaluate our adaptive TBPTT method on synthetic data and language modeling tasks and find that our adaptive TBPTT ameliorates the computational pitfalls of fixed TBPTT.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1905.07473")

Code

Syntology Ran 0 of 21 code samples harvested from 1 repository linked to this paper; 21 have no recorded run.

By repository: official repository: 21 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

aicherc/adaptive_tbptt officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

21 samples harvested; 0 ran; 0 honoured the contract we drafted; 21 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

21unverified

Licence: 0 of the 21 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from aicherc/adaptive_tbptt. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

TPP_y_loss aicherc/adaptive_tbptt/experiments/temporal_pp_model.py official repository unverified MIT (permissive) · 1a697a4f5733df42 · report
beta_est_method_to_params aicherc/adaptive_tbptt/experiments/synth_script.py official repository unverified MIT (permissive) · f01e1ff3d3042d96 · report
calculate_component_gradient_norms aicherc/adaptive_tbptt/tbptt/adaptive_truncation.py official repository unverified MIT (permissive) · 79a84db2ebe166bc · report
calculate_elementwise_gradients aicherc/adaptive_tbptt/tbptt/adaptive_truncation.py official repository unverified MIT (permissive) · ed8aa9f6bc5882f9 · report
calculate_gradient_norms aicherc/adaptive_tbptt/tbptt/adaptive_truncation.py official repository unverified MIT (permissive) · 180ab5fb456bcc2c · report
convert_dict_to_arg_string aicherc/adaptive_tbptt/experiments/script_maker.py official repository unverified MIT (permissive) · 3e24b02cec0c8000 · report
generate_copy_sequence aicherc/adaptive_tbptt/tbptt/generate_data.py official repository unverified MIT (permissive) · df25a42af64b0733 · report
generate_linear_seq aicherc/adaptive_tbptt/tbptt/generate_data.py official repository unverified MIT (permissive) · 7e93cbc251f3eaed · report
generate_repeating_sequence aicherc/adaptive_tbptt/tbptt/generate_data.py official repository unverified MIT (permissive) · b09f8ae9eca73a81 · report
get_batch aicherc/adaptive_tbptt/experiments/language_script.py official repository unverified MIT (permissive) · 488b1c7ff2dceb72 · report
get_batch aicherc/adaptive_tbptt/experiments/synth_script.py official repository unverified MIT (permissive) · b4a2dfd91c6a713c · report
log_boxplot aicherc/adaptive_tbptt/tbptt/plotting_utils.py official repository unverified MIT (permissive) · 8aa6056df6fad7cf · report
log_heatmap aicherc/adaptive_tbptt/tbptt/plotting_utils.py official repository unverified MIT (permissive) · 0e40a0fc6ff21389 · report
log_lineplot aicherc/adaptive_tbptt/tbptt/plotting_utils.py official repository unverified MIT (permissive) · 385348b104576a5e · report
process_data aicherc/adaptive_tbptt/experiments/temporal_pp_model.py official repository unverified MIT (permissive) · 5ef6d0018f789dd0 · report
process_data_onehot aicherc/adaptive_tbptt/experiments/temporal_pp_model.py official repository unverified MIT (permissive) · 3ffead363144b94d · report
setup_copy_fixed_memory_script aicherc/adaptive_tbptt/experiments/script_maker.py official repository unverified MIT (permissive) · 73e9cbd44b3d4d2d · report
setup_copy_variable_memory_script aicherc/adaptive_tbptt/experiments/script_maker.py official repository unverified MIT (permissive) · 7b3bab5b88fb01d2 · report
stochastic_subset aicherc/adaptive_tbptt/experiments/language_script.py official repository unverified MIT (permissive) · 5eacf6bc5dfa2fc4 · report
stochastic_subset aicherc/adaptive_tbptt/experiments/synth_script.py official repository unverified MIT (permissive) · 9db61e1f7611e72d · report
stochastic_subset aicherc/adaptive_tbptt/experiments/temporal_pp_script.py official repository unverified MIT (permissive) · b047609c78c58868 · report

Tasks

Language ModelingLanguage Modelling

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

SGD

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections