Название: Outsmarting AI
Автор: Brennan Pursell
Издательство: Ingram
Жанр: Банковское дело
isbn: 9781538136256
isbn:
Will your chatbot or texting app use or suggest words associated with hate speech, however popular in use? Will you grant or deny credit to an individual? Will you interview this or that person for a possible job? Will you grant an employee a promotion or not? Will you place this order or not? Will you call the customer about a suspected case of credit card fraud? Will you dispatch a squad car at that time and place? Your organization is completely responsible for the data source—did you obtain it legally?—for the data classification, the procedures, and the rules. The law bans discrimination against people based on race, religion, gender, sexual orientation, etc., even if you made no such data entries. Other laws protect personal privacy about certain topics. (Joshua will explore this topic further in chapter 6.)
Scorecards set up the different factors that contribute to a complex prediction, such as the likelihood of whether someone will contract lung cancer, and algorithms working through masses of historical examples assign points to each factor that accumulate into a final score. Age and the incidence of the disease in family history tend to count more than gender, smoking more than income level or education. Because the computer calculates without thinking rationally, it can point out statistical relationships among the factors without any prior expectations. It may detect possible connections that health experts had not thought of. A computer does not bother with the distinction between cause and coincidence, so some of the correlations might prove medically absurd. (Recall the statistical connection between a person’s IQ and their shoe size!)
Decision trees are used to model predictions based on answers to a series of simple classification questions. Using a breast cancer example, routine mammogram results divide patients into two groups. Those with no abnormalities are classified in the negative; the others go to the next question based on a mammogram. Were the mammogram results suspicious? The “no” answers are set aside, and the “yes” answers move on to the biopsy. That test may result in either a nonmalignant cyst, or, in case of a “yes,” a recommendation for surgery and chemotherapy. To a certain extent, medical professionals are trained to think in decision trees—as should AI systems in the same field, no?
In AI, decision trees can manage multiple sources of data and run constantly. They can “decide” whether a vehicle accelerates, cruises, or brakes; turns left, turns right, or heads straight; remains squarely in its lane or heads to the side of the road to take evasive action.
Neural networks are a key component of most AI systems, but the term is fundamentally misleading. Recall the table about the differences between human brains and computers (see introduction). Neural networks are computerized functions performed by software on hardware, nothing else. They take digitized data, make many calculations quick as lightning, and end in a number. A real neuron is a living human cell that accepts and sends electro-chemicals in the body. Human biologists actually don’t really know how a neuron works, when it comes down to it. To compare a neuron to an electric transistor that is either on or off (reads either 1 or 0) is wildly misleading. But there is no point in trying to change the name at this point.
The best way to explain what a neural network in AI does is by way of example. Think of everything that can go into determining the actual price of a house at sale.[14] Square footage, lot size, year built, address, zip code, number of bedrooms, number of bathrooms, basement, floors, attached/detached garage, pool, facade type, siding type, window quality, inside flooring, family size, school quality, local tax burden, recent sale price of a house nearby, and so forth. Those are the inputs. For simplicity’s sake, let’s say there are thirty of them in a single column of thirty rows.
The neural network sets up an inner “hidden layer” of calculations—imagine another column of say, ten rows—in which each of the original inputs is “weighted,” or multiplied by a parameter (a number you can change) and results in a single, new output number. Think of the hidden layer as a stack of ten functions that push the house price up or down. One could be for, say, “curb appeal,” another for “in-demand trend,” another for “family fit,” another for “convenience,” etc. All thirty input data points are included, each weighted differently by a set parameter, in each of the ten processed inputs in this first hidden layer.
The next layer does the same as the first, adjusting the numbers from the first hidden layer further, bringing them closer to a final recommended price. The final output is the price number. The input data, the inner “hidden” layers, and the final output comprise the neural network.
Neural Network
Source: Image by Brennan Pursell
Although the statistical calculations linking the layers can become very complex, to say the least, the computer performs them accurately, except where bugs intervene—and they can be fiendishly difficult to detect. Given enough data entries and enough hidden layers, neural networks can produce some very accurate calculations. Neural networks can have one, few, or many hidden layers. The more there are, the “deeper” the neural network. “Deep” networks usually work better than “shallow” networks with fewer layers.
Here’s the catch: The neural network has no way of knowing whether its output house price is accurate or not. It needs to be “trained” based on example data sets. You need to train it based on good data—actual examples, in this case, of houses successfully sold at a given price.
The beauty is that when you enter into the network the output and its matching set of inputs, the network’s algorithms can adjust the parameters in the hidden layers automatically.
There are three key algorithms that make neural networks work. In them you will see that “deep learning” and “machine learning” really have a lot to do with training, but almost nothing to do with human learning.
Backpropagation makes the neural network adjust the weights in the hidden layers. Backpropagation is usually at the heart of “deep learning,” “machine learning,” and AI today. The algorithm was a breakthrough by Geoffrey Hinton and, independently, Yann Lecun, in the mid-1980s, although their work relied on research from the 1960s and ’70s. Backpropagation only lately became an effective tool when available data and processing speeds both grew exponentially in the last decade.
Backpropagation starts at the output—the house price, in our example—and then works backward through the hidden layers toward the inputs. Say that the neural network predicted a price of $500,000 for a certain house, but you know that the actual price was $525,000. Backpropagation takes the correct price and adjusts the weights in each calculation in the hidden layers so that the neural network would come to the same price based on the initial inputs.
But that is just one example. If you train the network on many examples, then backpropagation averages all the adjustments that it needs to make, in order to optimize accurate performance across the entire data set.
The more you train it, the more you test its results, the better it gets.
Gradient descent refers to the mathematical process of measuring the adjustment of the weights—the parameters—in the hidden layers to improve the accuracy of the neural network’s calculations and minimize the effect of errors in the data. Think of it as steps toward the sweet spot, the best set of weights in the network for generating the best, most realistic output, given the inputs. Gradient descent relies on derivatives in good old calculus, which determine the slopes of function lines.
Finally, the sigmoid and rectified linear unit (ReLU) functions help neural networks to generate clear “yes” and “no” answers and/or classifications СКАЧАТЬ