{"id":3446,"date":"2024-09-01T16:35:32","date_gmt":"2024-09-01T16:35:32","guid":{"rendered":"https:\/\/workhouse.sweetdishy.com\/?p=3446"},"modified":"2024-09-01T16:35:34","modified_gmt":"2024-09-01T16:35:34","slug":"the-various-neural-networks","status":"publish","type":"post","link":"https:\/\/workhouse.sweetdishy.com\/index.php\/2024\/09\/01\/the-various-neural-networks\/","title":{"rendered":"The Various\u00a0Neural Networks"},"content":{"rendered":"\n<p id=\"Par58\">The most basic type of a neural network is a fully connected neural network. As the name implies, it is where all the neurons have connections from layer to layer. This network is actually quite popular since it means having to use little judgment when creating the model.<\/p>\n\n\n\n<p id=\"Par59\">Then what are some of the other neural networks? The common ones include the recurrent neural&nbsp;network&nbsp;(RNN), the convolutional neural&nbsp;network&nbsp;(CNN), and the generative adversarial network (GAN&nbsp;), which we\u2019ll cover next.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Recurrent Neural&nbsp;Network<\/h3>\n\n\n\n<p id=\"Par60\">With a recurrent neural network (RNN), the function not only processes the input but also prior inputs across time. An example of this is what happens when you enter characters in a messaging app. As you begin to type, the&nbsp;system&nbsp;will predict the words. So if you tap out \u201cHe,\u201d the computer will suggest \u201cHe,\u201d \u201cHello,\u201d and \u201cHere\u2019s.\u201d The RNN is essentially a string of neural networks that feed on each other based on complex algorithms.<\/p>\n\n\n\n<p id=\"Par61\">There are variations on the model. One is called LSTM, which stands for long short-term memory. This came about from a paper written by professors Sepp Hochreiter and J\u00fcrgen Schmidhuber in 1997.<sup><a href=\"https:\/\/learning.oreilly.com\/library\/view\/artificial-intelligence-basics\/9781484250280\/html\/480660_1_En_4_Chapter.xhtml#Fn6\">6<\/a><\/sup>&nbsp;In it, they set forth a way to effectively use inputs that are separated from each other for long time periods, allowing the use of more datasets.<\/p>\n\n\n\n<p id=\"Par63\">Of course,&nbsp;RNNs&nbsp;do have drawbacks. There is the&nbsp;vanishing gradient problem, which means that the accuracy&nbsp;decays&nbsp;as the models get larger. The models can also take longer to train.<\/p>\n\n\n\n<p id=\"Par64\">To deal with this,&nbsp;Google&nbsp;developed a new model called the Transformer, which is much more efficient since it processes the inputs in parallel. It also results in more accurate results.<\/p>\n\n\n\n<p id=\"Par65\">Google has gained much insight about RNNs through its Translate app, which handles over 100 languages and processes over 100 billion words a day.<sup><a href=\"https:\/\/learning.oreilly.com\/library\/view\/artificial-intelligence-basics\/9781484250280\/html\/480660_1_En_4_Chapter.xhtml#Fn7\">7<\/a><\/sup>&nbsp;Launched in 2006, it initially used machine learning systems. But in 2016,&nbsp;Google&nbsp;switched to&nbsp;deep learning&nbsp;by creating Google Neural Machine Translation.<sup><a href=\"https:\/\/learning.oreilly.com\/library\/view\/artificial-intelligence-basics\/9781484250280\/html\/480660_1_En_4_Chapter.xhtml#Fn8\">8<\/a><\/sup>&nbsp;All in all, it has resulted in much higher accuracy rates.<sup><a href=\"https:\/\/learning.oreilly.com\/library\/view\/artificial-intelligence-basics\/9781484250280\/html\/480660_1_En_4_Chapter.xhtml#Fn9\">9<\/a><\/sup><\/p>\n\n\n\n<p id=\"Par69\">Consider how Google Translate has helped out doctors who&nbsp;work&nbsp;with patients who speak other languages. According to a study from the University of California, San Francisco (UCSF), that was published in&nbsp;<em>JAMA Internal Medicine<\/em>, the app had a 92% accuracy rate with English-to-Spanish&nbsp;translations. This was up from 60% over the past couple years.<sup><a href=\"https:\/\/learning.oreilly.com\/library\/view\/artificial-intelligence-basics\/9781484250280\/html\/480660_1_En_4_Chapter.xhtml#Fn10\">10<\/a><\/sup><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Convolutional Neural&nbsp;Network&nbsp;(CNN)<\/h3>\n\n\n\n<p id=\"Par71\">Intuitively, it makes&nbsp;sense&nbsp;to have all the units in a neural network to be connected. This works well with many applications.<\/p>\n\n\n\n<p id=\"Par72\">But there are scenarios where it is far from optimal, such as with image recognition. Just&nbsp;imagine&nbsp;how complex a model would be where every pixel is a unit! It could quickly become unmanageable. There would also be other complications like&nbsp;overfitting. This is where the data is not reflective of what is being tested or there is a focus on the wrong&nbsp;features.<\/p>\n\n\n\n<p id=\"Par73\">To deal with all this, you can use a convolutional neural network (CNN). The origins of this go back to professor\u00a0Yann LeCun\u00a0in 1998, when he published a paper called \u201cGradient-Based Learning Applied to Document Recognition.\u201d<sup>11<\/sup>\u00a0Despite its strong insights and breakthroughs, it got little traction. But as\u00a0deep learning\u00a0started to show significant progress in 2012, researchers revisited the model.<\/p>\n\n\n\n<p id=\"Par75\">LeCun&nbsp;got his inspiration for the CNN from Nobel Prize winners David Hubel and Torsten Wiesel who studied neurons of the visual cortex. This system takes an image from the retina and processes it in different&nbsp;stages\u2014from easy to more complex. Each of the stages is called a convolution. For&nbsp;example, the first level would be to identify lines and angles; next, the visual cortex will find the shapes; and then it will detect the objects.<\/p>\n\n\n\n<p id=\"Par76\">This is analogous to how a computer-based CNN works. Let\u2019s take an example: Suppose you want to build a model that can identify a letter. The CNN will have input in the form of an image that has 3,072 pixels. Each of the pixels will have a value that is from 0 to 255, which indicates the overall intensity. By using a CNN, the computer will go through multiple variations to identify the&nbsp;features.<\/p>\n\n\n\n<p id=\"Par77\">The first is the convolutional layer, which is a filter that scans the image. In our example, this could be 5 \u00d7 5 pixels. The process will create a feature map, which is a long array of numbers. Next, the model will apply more filters to the image. By doing this, the CNN will identify the lines, edges and shapes\u2014all expressed in numbers. With the various output layers, the model will use pooling, which combines them to generate a single output, and then create a fully connected neural&nbsp;network.<\/p>\n\n\n\n<p id=\"Par78\">A CNN can definitely get&nbsp;complex. But it should be able to accurately identify the numbers that are input into the&nbsp;system.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Generative Adversarial&nbsp;Networks&nbsp;(GANs)<\/h3>\n\n\n\n<p id=\"Par79\">Ian Goodfellow, who got his\u00a0masters\u00a0in computer science at Stanford and his PhD in machine learning at the Universit\u00e9 de Montr\u00e9al, would go on to work at\u00a0Google. In his 20s, he co-authored one of the top books in AI, called\u00a0<em>Deep Learning<\/em>\u00a0,<sup>12<\/sup>\u00a0and also made innovations with Google Maps.<\/p>\n\n\n\n<p id=\"Par81\">But it was in 2014 that he had his most impactful breakthrough. It actually happened in a pub in Montreal when he talked with some of his friends about how deep\u00a0learning\u00a0could\u00a0<em>create<\/em>\u00a0photos.<sup>13<\/sup>\u00a0At the time, the approach was to use generative models, but they were often blurry and nonsensical.<\/p>\n\n\n\n<p id=\"Par83\">Goodfellow realized that there had to be a better why. So why not use game theory? That is, have two models compete against each other in a tight feedback loop. This could also be done with unlabeled&nbsp;data.<\/p>\n\n\n\n<p>Here\u2019s a basic workflow:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><em>Generator<\/em>: This neural network creates a myriad of new creations, such as photos or sentences.<\/li>\n\n\n\n<li><em>Discriminator<\/em>: This neural network looks at the creations to see which ones are real.<\/li>\n\n\n\n<li><em>Adjustments<\/em>: With the two results, a new model would change the creations to make them as realistic as possible. Through many&nbsp;iterations, the&nbsp;discriminator&nbsp;will no longer need to be used.<\/li>\n<\/ul>\n\n\n\n<p id=\"Par88\">He was so excited about the idea that after he left the pub he started to code his ideas. The result was a new&nbsp;deep learning&nbsp;model: the generative adversarial network or GAN. And the results were standout. He would soon become an AI rock star.<\/p>\n\n\n\n<p id=\"Par89\">GAN research has already spurred over 500 academic papers.<sup>14<\/sup>\u00a0Companies like Facebook have also used this\u00a0technology, such as for its photo analysis and processing. The company\u2019s chief AI scientist,\u00a0Yann LeCun, noted that GANs are the \u201cthe coolest idea in deep learning in the last 20 years.\u201d<sup>15<\/sup><\/p>\n\n\n\n<p id=\"Par92\">GANs\u00a0have also been shown to help with sophisticated scientific research. For example, they have helped improve the accuracy of detecting behavior of subatomic particles in the Large Hadron Collider at CERN in Switzerland.<sup>16<\/sup><\/p>\n\n\n\n<p id=\"Par94\">While still in the early innings, this technology could lead to such things as a computer that can develop new types of fashion items or maybe a new-fangled wearable. Perhaps a GAN could even come up with a hit rap song.<\/p>\n\n\n\n<p id=\"Par95\">And it could be sooner than you think. As a teenager, Robbie Barrat taught himself how to use&nbsp;deep learning&nbsp;systems&nbsp;and built a model to rap in the style of Kanye West.<\/p>\n\n\n\n<p id=\"Par96\">But this was just the beginning of his AI wizardry. As a researcher at Stanford, he developed his own GAN platform, which processed roughly 10,000 nude portraits. The system then would create truly mesmerizing new works of art (you can find them at his Twitter account at @DrBeef_).<\/p>\n\n\n\n<p id=\"Par97\">Oh, and he also made his&nbsp;system&nbsp;open source at his GitHub account. This caught the attention of a collective of French artists, called Obvious, that used the&nbsp;technology&nbsp;to create portraits of an eighteenth-century fictional family. It was based on processing 15,000 portraits from the fourteenth to the twentieth centuries.<\/p>\n\n\n\n<p id=\"Par98\">In 2018, Obvious put its artwork at a Christie\u2019s auction, fetching a cool $432,000.\u00a0<sup>17<\/sup><\/p>\n\n\n\n<p id=\"Par100\">But unfortunately, when it comes to&nbsp;GANs, there have been uses that have been less than admirable. One example is to use them for&nbsp;deepfakes, which involve leveraging neural networks to create images or videos that are misleading. Some of this is just kind of playful. For example, one&nbsp;GAN&nbsp;makes it possible to have Barack Obama say anything you tell him!<\/p>\n\n\n\n<p id=\"Par101\">Yet there are lots of risks. Researchers at New York University and the Michigan State University wrote a paper that focused on \u201cDeepMasterPrints.\u201d<sup>18<\/sup>\u00a0It showed how a GAN can develop fake fingerprints to unlock three types of smartphones!<\/p>\n\n\n\n<p id=\"Par103\">Then there was the incident of a so-called\u00a0deepfake\u00a0video of actress Jennifer Lawrence at a Golden Globes press conference. Her face was merged with Steve Buscemi\u2019s.<sup>19<\/sup><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The most basic type of a neural network is a fully connected neural network. As the name implies, it is where all the neurons have connections from layer to layer. This network is actually quite popular since it means having to use little judgment when creating the model. Then what are some of the other [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3327,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[442],"tags":[],"class_list":["post-3446","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-deep-learning"],"jetpack_featured_media_url":"https:\/\/workhouse.sweetdishy.com\/wp-content\/uploads\/2024\/08\/deep-learning-1.png","_links":{"self":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/3446","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/comments?post=3446"}],"version-history":[{"count":1,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/3446\/revisions"}],"predecessor-version":[{"id":3447,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/3446\/revisions\/3447"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media\/3327"}],"wp:attachment":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media?parent=3446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/categories?post=3446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/tags?post=3446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}