Backpropagation through time

Thứ hai - 02/02/2026 21:43

Backpropagation through time (BPTT) is a gradient-based technique for training certain types of recurrent neural networks, such as Elman networks. The algorithm was independently derived by numerous researchers.[1][2][3]

BPTT unfolds a recurrent neural network through time.

The training data for a recurrent neural network is an ordered sequence of k {displaystyle k} input-output pairs, ⟨ a 0 , y 0 ⟩ , ⟨ a 1 , y 1 ⟩ , ⟨ a 2 , y 2 ⟩ , . . . , ⟨ a k − 1 , y k − 1 ⟩ {displaystyle langle mathbf {a} _{0},mathbf {y} _{0}rangle ,langle mathbf {a} _{1},mathbf {y} _{1}rangle ,langle mathbf {a} _{2},mathbf {y} _{2}rangle ,...,langle mathbf {a} _{k-1},mathbf {y} _{k-1}rangle } . An initial value must be specified for the hidden state x 0 {displaystyle mathbf {x} _{0}} , typically chosen to be a zero vector.

BPTT begins by unfolding a recurrent neural network in time. The unfolded network contains k {displaystyle k} inputs and outputs, but every copy of the network shares the same parameters. Then, the backpropagation algorithm is used to find the gradient of the loss function with respect to all the network parameters.

Consider an example of a neural network that contains a recurrent layer f {displaystyle f} and a feedforward layer g {displaystyle g} . There are different ways to define the training cost, but the aggregated cost is always the average of the costs of each of the time steps. The cost of each time step can be computed separately. The figure above shows how the cost at time t + 3 {displaystyle t+3} can be computed, by unfolding the recurrent layer f {displaystyle f} for three time steps and adding the feedforward layer g {displaystyle g} . Each instance of f {displaystyle f} in the unfolded network shares the same parameters. Thus, the weight updates in each instance ( f 1 , f 2 , f 3 {displaystyle f_{1},f_{2},f_{3}} ) are summed together.

Below is pseudocode for a truncated version of BPTT, where the training data contains n {displaystyle n} input-output pairs, and the network is unfolded for k {displaystyle k} time steps:

Back_Propagation_Through_Time(a, y) // a[t] is the input at time t. y[t] is the output Unfold the network to contain k instances of f do until stopping criterion is met: x := the zero-magnitude vector // x is the current context for t from 0 to n − k do // t is time. n is the length of the training sequence Set the network inputs to x, a[t], a[t+1], ..., a[t+k−1] p := forward-propagate the inputs over the whole unfolded network e := y[t+k] − p; // error = target − prediction Back-propagate the error, e, back across the whole unfolded network Sum the weight changes in the k instances of f together. Update all the weights in f and g. x := f(x, a[t]); // compute the context for the next time-step

BPTT tends to be significantly faster for training recurrent neural networks than general-purpose optimization techniques such as evolutionary optimization.[4]

BPTT has difficulty with local optima. With recurrent neural networks, local optima are a much more significant problem than with feed-forward neural networks.[5] The recurrent feedback in such networks tends to create chaotic responses in the error surface which cause local optima to occur frequently, and in poor locations on the error surface.

  • Backpropagation through structure

Mình là Khánh, người sáng lập nghengu.vn – nơi chia sẻ niềm yêu thích với tiếng Nghệ, tiếng Việt và những phương ngữ đa dạng. Mình mong muốn lan toả vẻ đẹp của tiếng mẹ đẻ đến nhiều người hơn. Nếu thấy nội dung hữu ích, bạn có thể ủng hộ bằng cách donate hoặc mua sản phẩm giáo dục qua các liên kết tiếp thị trong bài viết.

Cảm ơn bạn đã đồng hành!

Tổng số điểm của bài viết là: 0 trong 0 đánh giá

  Ý kiến bạn đọc

.
Bạn đã không sử dụng Site, Bấm vào đây để duy trì trạng thái đăng nhập. Thời gian chờ: 60 giây
https://thoitietviet.edu.vn đọc sách online https://xemthoitiet.com.vn https://thoitiet24.edu.vn fun88 เข้าระบบ TOPCLUB 88xx 79king ssc88 Cm88 CM88 https://open88s.com/ C168 ufabet https://webmarket.jpn.com/ Luck8 Sv388 Xoilac Socolive TV Link nbet XX88 Socolive 78WIN KJC https://okvip26.com/ xoso66 Vin777 88VV Xoilac TV Live trực tiếp Cakhia TV Nohu90 Xoilac TV Socolive https://tt8811.net https://789pai.com https://mmoo.com.de c168 com five88 ggwin oxbet one88 xo88 33WIN https://playta88.com/ Bongdalu FUN88 fo88 86bet ok9 red88 KJC kèo nhà cái 5 ok9 zowin debet 8kbet Cakhia TV Trực tiếp bóng đá Fun88 Bet KJC lu88 W88 Alo789 99OK MB66 FLY88 FLY88 OK9 COM oxbet five88 net88 https://c168.tel/ https://c168b.com/ 789bet f8bet f8bet new88 new88 ta88 debet fabet cakhiatv Ok365 OPEN88.COM https://sunwin97.in.net https://383sports.baby 84win B52CLUB ZBET NET88 C168 xem bóng đá luongsontv http://cracks.ru.com/