{"id":21252,"date":"2020-10-11T01:31:33","date_gmt":"2020-10-10T20:01:33","guid":{"rendered":"https:\/\/www.mygreatlearning.com\/blog\/backpropagation-through-time\/"},"modified":"2024-09-02T17:17:07","modified_gmt":"2024-09-02T11:47:07","slug":"backpropagation-through-time","status":"publish","type":"post","link":"https:\/\/www.mygreatlearning.com\/blog\/backpropagation-through-time\/","title":{"rendered":"Backpropagation through time | Backpropagation in RNN"},"content":{"rendered":"\n<p>In this article, we will find out why we cannot train <a aria-label=\"Recurrent Neural networks (opens in a new tab)\" href=\"https:\/\/www.mygreatlearning.com\/blog\/recurrent-neural-network\/\" target=\"_blank\" rel=\"noreferrer noopener\">Recurrent Neural networks<\/a> with the regular <a aria-label=\"backpropagation (opens in a new tab)\" href=\"https:\/\/www.mygreatlearning.com\/blog\/backpropagation-algorithm\/\" target=\"_blank\" rel=\"noreferrer noopener\">backpropagation<\/a> and use its modified version known as the backpropagation through time.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-backpropagation\"><strong>What is backpropagation?<\/strong><\/h2>\n\n\n\n<p>First, let us briefly go over backpropagation, Backpropagation is a training algorithm that is used for training neural networks. When training a neural network, we are actually tuning the weights of the network to minimize the error with respect to the already available true values(labels) by using the Backpropagation algorithm. It is a supervised learning algorithm as we find errors with respect to already given labels. The general algorithm is as follows:<br><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Present a training input pattern and propagate it through the network to get an output.<\/li><li>Compare the predicted outputs to the expected outputs and calculate the error.<\/li><li>Calculate the derivatives of the error with respect to the network weights.<\/li><li>Use these calculated derivatives to adjust the weights to minimize the error.<\/li><li>Repeat.<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"unrolling-the-rnnrecurrent-neural-network\"><strong>Unrolling the RNN(recurrent neural network)<\/strong><\/h2>\n\n\n\n<p>Here I am only going to briefly discuss RNN, enough to understand how the backpropagation algorithm is applied to recurrent neural network or RNN. You can click here to get a detailed article about&nbsp; RNN(recurrent neural network). So as you might know RNN is used to work with sequential data and in sequential data, there is a lot of information present in the data as well as in the sequence of the data. So in RNN, we have these loops that allow information to persist through time.<\/p>\n\n\n\n<p>Take a look at the architecture of RNN below:<\/p>\n\n\n<figure class=\"wp-block-image aligncenter size-large zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/2-3.png\"><img decoding=\"async\" width=\"141\" height=\"223\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/2-3.png\" alt=\"RNN\" class=\"wp-image-21253\"><\/figure>\n\n\n\n<p>Let us understand what happens by unfolding the above figure:<\/p>\n\n\n<figure class=\"wp-block-image aligncenter size-large zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/bb.jpg\"><img decoding=\"async\" width=\"526\" height=\"200\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/bb.jpg\" alt=\"RNN\" class=\"wp-image-21254\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/bb.jpg 526w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/bb-300x114.jpg 300w\" sizes=\"(max-width: 526px) 100vw, 526px\" \/><\/figure>\n\n\n\n<p>.<br><\/p>\n\n\n\n<p>So now that we unfolded the RNN with loop, we got the above figure. At time =t<sub>0 <\/sub>, we input x<sub>0 <\/sub>to our network and we get an output y<sub>0<\/sub> , at time =t<sub>1 <\/sub>, we input x<sub>1 <\/sub>to our network and we get an output y<sub>1, <\/sub>Now as you can see the figure, to calculate output the network uses input x and the cell state from the previous timestamp.To calculate certain Hidden state here is the formula<br><\/p>\n\n\n\n<p>We usually use tanh activation, but you can use anyone more suitable. And to calculate the output at each step, here is the formula<br><\/p>\n\n\n\n<p>Now to calculate the error, we just take the output and calculate its error with respect to the label(real output), but here we have multiple outputs, one at each time stamp and thus the regular backpropagation is not suitable here. Thus we modify this algorithm and call the new algorithm as backpropagation through time.<br><\/p>\n\n\n\n<p>Note: It is important to remember that the value of W<sub>hh<\/sub> ,W<sub>xh <\/sub>&nbsp;and W<sub>hy <\/sub>does not change across the timestamps, which means that for all inputs in a sequence, the values of these weights is same.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"backpropagation-through-time\"><strong>Backpropagation through time<\/strong><\/h2>\n\n\n\n<p>Now the questions that should come to your mind are<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>What is the total loss for this network?<\/li><li>How do we update the weights&nbsp; W<sub>hh<\/sub> ,W<sub>xh <\/sub>&nbsp;and W<sub>hy<\/sub>?<\/li><\/ol>\n\n\n\n<p>The total loss is simply the sum of the losses overall timestamps.For example,in the figure below,E<sub>n<\/sub> is the loss at each time stamp and instead of h to denote cell state, I am using s here.<br><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Then total loss = E<sub>0<\/sub> +&nbsp; E<sub>1<\/sub> + E<sub>2<\/sub> + E<sub>4<\/sub>&nbsp;<\/pre>\n\n\n\n<p>In general, we can say the total error is equal to summation over all the errors across timestamps t,<\/p>\n\n\n\n<p>Where E<sub>t<\/sub>(y<sub>t,<\/sub>y<sub>t<\/sub>) is the error made at timestamp t.<br><\/p>\n\n\n\n<p>Now we have to calculate the gradient of this loss with respect to&nbsp; W<sub>hh<\/sub> ,W<sub>xh <\/sub>&nbsp;and W<sub>hy<\/sub>.For simplicity I am going to denote&nbsp; W<sub>hh<\/sub> as W,W<sub>xh <\/sub>&nbsp;as U and W<sub>hy <\/sub>.as V.<br><\/p>\n\n\n\n<p>It is quite easy to calculate the derivative of loss with respect to V as it only depends on the values at the current time step. But when it comes to calculating the derivative of loss with respect to W and U, it becomes a bit tricky.<br><\/p>\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/99.png\"><img decoding=\"async\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/99.png\" alt=\"\" class=\"wp-image-21286\" width=\"213\" height=\"73\"><\/figure>\n\n\n\n<p>As you can see the first part of this equation,i.e derivative of E w.r.t s<sub>4<\/sub> can be easily calculated as it only depends on V.But to calculate the derivative of s<sub>4<\/sub> with respect to W is not so easy.<\/p>\n\n\n\n<p>The value of s<sub>4<\/sub>depends on s<sub>3<\/sub> which itself is a function W, therefore we cannot calculate the derivative of s4 keeping&nbsp; s3 as constant. In such networks, the derivative has two parts, implicit and explicit. In explicit part, we assume all other inputs as constant whereas in implicit part we sum over all the indirect paths. Therefore we calculate the derivative as :<\/p>\n\n\n\n<p>Now we can easily put this value in the previous formula to calculate the derivative of E with respect to W. In a similar manner, you can also calculate the derivative of E with respect to U.Now that we have all the three derivatives, we can easily update our weights. This algorithm is called backpropagation through time or BPTT for short as we used values across all the timestamps to calculate the gradients.<\/p>\n\n\n\n<p>It is very difficult to understand these derivations in text, here is a good explanation of this derivation<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Training RNNs - Loss and BPTT\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/RrB605Mbpic?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"limitations-of-backpropagation-through-time\"><strong>Limitations of <\/strong> <strong>backpropagation through time :<\/strong><\/h3>\n\n\n\n<p>When using BPTT(backpropagation through time) in RNN, we generally encounter problems such as exploding gradient and vanishing gradient.<\/p>\n\n\n\n<p>To avoid exploding gradient, we simply use a method called gradient clipping where at each timestamp, we can check if the gradient &gt; threshold and if it is, we normalize it. This helps to tackle exploding gradient. To tackle the vanishing gradient problem these are the possible solutions:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Use ReLU instead of tanh or sigmoid activation function.<\/li><li>Proper initialization of the W matrix can reduce the effect of vanishing gradients. It has been seen that initializing with an identity matrix helps in tackling this problem.<\/li><li>Using gated cells such as LSTM or GRUs<\/li><\/ul>\n\n\n\n<p>This brings us to the end of this article where we learned how we update weights in RNN by using Backpropagation through time. To know more about Machine learning and get a free course, click the banner below:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"further-reading\">Further reading<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/backpropagation-algorithm\/\">Introduction to Backpropagation Algorithm, Definition &amp; Case Study<\/a><\/li><li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/recurrent-neural-network\/\">What is Recurrent Neural Network | Introduction of Recurrent Neural Network<\/a><\/li><li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/face-recognition\/\">Face Recognition Using Python and OpenCV<\/a><\/li><li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/gradient-descent\/\">An Easy Guide to Gradient Descent in Machine Learning<\/a><\/li><li>Batch Normalisation \u2014 Speed up Neural Network Training<\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will find out why we cannot train Recurrent Neural networks with the regular backpropagation and use its modified version known as the backpropagation through time. What is backpropagation? First, let us briefly go over backpropagation, Backpropagation is a training algorithm that is used for training neural networks. When training a neural [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":21258,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[2],"tags":[],"content_type":[],"class_list":["post-21252","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-artificial-intelligence"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>What is Backpropagation in Artificial Intelligence &amp; how it works?<\/title>\n<meta name=\"description\" content=\"Backpropagation in Artificial Intelligence: In this article, we will see why we cannot train Recurrent Neural networks with the regular backpropagation and use its modified known as the backpropagation through time.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mygreatlearning.com\/blog\/backpropagation-through-time\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Backpropagation through time | Backpropagation in RNN\" \/>\n<meta property=\"og:description\" content=\"Backpropagation in Artificial Intelligence: In this article, we will see why we cannot train Recurrent Neural networks with the regular backpropagation and use its modified known as the backpropagation through time.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mygreatlearning.com\/blog\/backpropagation-through-time\/\" \/>\n<meta property=\"og:site_name\" content=\"Great Learning Blog: Free Resources what Matters to shape your Career!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-10T20:01:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-02T11:47:07+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/shutterstock_1403811650.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"700\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Great Learning Editorial Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/Great_Learning\" \/>\n<meta name=\"twitter:site\" content=\"@Great_Learning\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Great Learning Editorial Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/backpropagation-through-time\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/backpropagation-through-time\\\/\"},\"author\":{\"name\":\"Great Learning Editorial Team\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\"},\"headline\":\"Backpropagation through time | Backpropagation in RNN\",\"datePublished\":\"2020-10-10T20:01:33+00:00\",\"dateModified\":\"2024-09-02T11:47:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/backpropagation-through-time\\\/\"},\"wordCount\":1061,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/backpropagation-through-time\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/shutterstock_1403811650.jpg\",\"articleSection\":[\"AI and Machine Learning\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/backpropagation-through-time\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/backpropagation-through-time\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/backpropagation-through-time\\\/\",\"name\":\"What is Backpropagation in Artificial Intelligence & how it works?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/backpropagation-through-time\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/backpropagation-through-time\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/shutterstock_1403811650.jpg\",\"datePublished\":\"2020-10-10T20:01:33+00:00\",\"dateModified\":\"2024-09-02T11:47:07+00:00\",\"description\":\"Backpropagation in Artificial Intelligence: In this article, we will see why we cannot train Recurrent Neural networks with the regular backpropagation and use its modified known as the backpropagation through time.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/backpropagation-through-time\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/backpropagation-through-time\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/backpropagation-through-time\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/shutterstock_1403811650.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/shutterstock_1403811650.jpg\",\"width\":1000,\"height\":700},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/backpropagation-through-time\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI and Machine Learning\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/artificial-intelligence\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Backpropagation through time | Backpropagation in RNN\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"name\":\"Great Learning Blog\",\"description\":\"Learn, Upskill &amp; Career Development Guide and Resources\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"alternateName\":\"Great Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\",\"name\":\"Great Learning\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"width\":900,\"height\":900,\"caption\":\"Great Learning\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/GreatLearningOfficial\\\/\",\"https:\\\/\\\/x.com\\\/Great_Learning\",\"https:\\\/\\\/www.instagram.com\\\/greatlearningofficial\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/in.pinterest.com\\\/greatlearning12\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/beaconelearning\\\/\"],\"description\":\"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.\",\"email\":\"info@mygreatlearning.com\",\"legalName\":\"Great Learning Education Services Pvt. Ltd\",\"foundingDate\":\"2013-11-29\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1001\",\"maxValue\":\"5000\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\",\"name\":\"Great Learning Editorial Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"caption\":\"Great Learning Editorial Team\"},\"description\":\"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.\",\"sameAs\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/\",\"https:\\\/\\\/in.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/Great_Learning\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCObs0kLIrDjX2LLSybqNaEA\"],\"award\":[\"Best EdTech Company of the Year 2024\",\"Education Economictimes Outstanding Education\\\/Edtech Solution Provider of the Year 2024\",\"Leading E-learning Platform 2024\"],\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/author\\\/greatlearning\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"What is Backpropagation in Artificial Intelligence & how it works?","description":"Backpropagation in Artificial Intelligence: In this article, we will see why we cannot train Recurrent Neural networks with the regular backpropagation and use its modified known as the backpropagation through time.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mygreatlearning.com\/blog\/backpropagation-through-time\/","og_locale":"en_US","og_type":"article","og_title":"Backpropagation through time | Backpropagation in RNN","og_description":"Backpropagation in Artificial Intelligence: In this article, we will see why we cannot train Recurrent Neural networks with the regular backpropagation and use its modified known as the backpropagation through time.","og_url":"https:\/\/www.mygreatlearning.com\/blog\/backpropagation-through-time\/","og_site_name":"Great Learning Blog: Free Resources what Matters to shape your Career!","article_publisher":"https:\/\/www.facebook.com\/GreatLearningOfficial\/","article_published_time":"2020-10-10T20:01:33+00:00","article_modified_time":"2024-09-02T11:47:07+00:00","og_image":[{"width":1000,"height":700,"url":"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/shutterstock_1403811650.jpg","type":"image\/jpeg"}],"author":"Great Learning Editorial Team","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/Great_Learning","twitter_site":"@Great_Learning","twitter_misc":{"Written by":"Great Learning Editorial Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mygreatlearning.com\/blog\/backpropagation-through-time\/#article","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/backpropagation-through-time\/"},"author":{"name":"Great Learning Editorial Team","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad"},"headline":"Backpropagation through time | Backpropagation in RNN","datePublished":"2020-10-10T20:01:33+00:00","dateModified":"2024-09-02T11:47:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/backpropagation-through-time\/"},"wordCount":1061,"commentCount":0,"publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/backpropagation-through-time\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/shutterstock_1403811650.jpg","articleSection":["AI and Machine Learning"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.mygreatlearning.com\/blog\/backpropagation-through-time\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.mygreatlearning.com\/blog\/backpropagation-through-time\/","url":"https:\/\/www.mygreatlearning.com\/blog\/backpropagation-through-time\/","name":"What is Backpropagation in Artificial Intelligence & how it works?","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/backpropagation-through-time\/#primaryimage"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/backpropagation-through-time\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/shutterstock_1403811650.jpg","datePublished":"2020-10-10T20:01:33+00:00","dateModified":"2024-09-02T11:47:07+00:00","description":"Backpropagation in Artificial Intelligence: In this article, we will see why we cannot train Recurrent Neural networks with the regular backpropagation and use its modified known as the backpropagation through time.","breadcrumb":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/backpropagation-through-time\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mygreatlearning.com\/blog\/backpropagation-through-time\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/backpropagation-through-time\/#primaryimage","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/shutterstock_1403811650.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/shutterstock_1403811650.jpg","width":1000,"height":700},{"@type":"BreadcrumbList","@id":"https:\/\/www.mygreatlearning.com\/blog\/backpropagation-through-time\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mygreatlearning.com\/blog\/"},{"@type":"ListItem","position":2,"name":"AI and Machine Learning","item":"https:\/\/www.mygreatlearning.com\/blog\/artificial-intelligence\/"},{"@type":"ListItem","position":3,"name":"Backpropagation through time | Backpropagation in RNN"}]},{"@type":"WebSite","@id":"https:\/\/www.mygreatlearning.com\/blog\/#website","url":"https:\/\/www.mygreatlearning.com\/blog\/","name":"Great Learning Blog","description":"Learn, Upskill &amp; Career Development Guide and Resources","publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"alternateName":"Great Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization","name":"Great Learning","url":"https:\/\/www.mygreatlearning.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","width":900,"height":900,"caption":"Great Learning"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GreatLearningOfficial\/","https:\/\/x.com\/Great_Learning","https:\/\/www.instagram.com\/greatlearningofficial\/","https:\/\/www.linkedin.com\/school\/great-learning\/","https:\/\/in.pinterest.com\/greatlearning12\/","https:\/\/www.youtube.com\/user\/beaconelearning\/"],"description":"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.","email":"info@mygreatlearning.com","legalName":"Great Learning Education Services Pvt. Ltd","foundingDate":"2013-11-29","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1001","maxValue":"5000"}},{"@type":"Person","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad","name":"Great Learning Editorial Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","caption":"Great Learning Editorial Team"},"description":"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.","sameAs":["https:\/\/www.mygreatlearning.com\/","https:\/\/in.linkedin.com\/school\/great-learning\/","https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning","https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA"],"award":["Best EdTech Company of the Year 2024","Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024","Leading E-learning Platform 2024"],"url":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/shutterstock_1403811650.jpg",1000,700,false],"thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/shutterstock_1403811650-150x150.jpg",150,150,true],"medium":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/shutterstock_1403811650-300x210.jpg",300,210,true],"medium_large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/shutterstock_1403811650-768x538.jpg",768,538,true],"large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/shutterstock_1403811650.jpg",1000,700,false],"1536x1536":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/shutterstock_1403811650.jpg",1000,700,false],"2048x2048":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/shutterstock_1403811650.jpg",1000,700,false],"web-stories-poster-portrait":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/shutterstock_1403811650.jpg",640,448,false],"web-stories-publisher-logo":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/shutterstock_1403811650.jpg",96,67,false],"web-stories-thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/09\/shutterstock_1403811650.jpg",150,105,false]},"uagb_author_info":{"display_name":"Great Learning Editorial Team","author_link":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"},"uagb_comment_info":0,"uagb_excerpt":"In this article, we will find out why we cannot train Recurrent Neural networks with the regular backpropagation and use its modified version known as the backpropagation through time. What is backpropagation? First, let us briefly go over backpropagation, Backpropagation is a training algorithm that is used for training neural networks. When training a neural&hellip;","_links":{"self":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/21252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/comments?post=21252"}],"version-history":[{"count":6,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/21252\/revisions"}],"predecessor-version":[{"id":97490,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/21252\/revisions\/97490"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media\/21258"}],"wp:attachment":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media?parent=21252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/categories?post=21252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/tags?post=21252"},{"taxonomy":"content_type","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/content_type?post=21252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}