8
$\begingroup$

Say a Deep Neural Net is created using Keras or Tensorflow. Usually when you want to make a prediction the user would invoke model.predict.... However, how would the actual AI system proactively invoke their own actions? Happy to clarify the question.

$\endgroup$
  • 2
    $\begingroup$ Hi and welcome to this community. Yes, your question is unclear. What confuses you? Wouldn't e.g. a call to model.predict be the answer to your question? $\endgroup$ – nbro Dec 10 '19 at 16:54
  • $\begingroup$ Thanks for the warm welcome @nbro! So when I want to predict something I can call model.predict, but the question I am asking is if it is possible for an AI to invoke commands on its own? I constantly hear "Let an AI lose on a network", but failing to understand how it can proactively invoke actions if today the person behind the keyboard is invoking all the commands. $\endgroup$ – joethemow Dec 10 '19 at 17:09
  • $\begingroup$ Do you have a specific example where you want us to clarify? Can you e.g. quote an article that mentions the unclear statement? The answer to your question may depend on the context. $\endgroup$ – nbro Dec 10 '19 at 20:51
  • $\begingroup$ "Let an AI lose on a network" usually means you write some sort of input system (web crawler, port scanner, automated scripts running tools on Kali Linux etc) then feeds the resulting data to the AI (call model.predict). Something does indeed call model.predict - it is the sensory system $\endgroup$ – slebetman Dec 11 '19 at 9:06
11
$\begingroup$

Neural networks, deep learning and other supervised learning algorithms do not "take actions" by themselves, they lack agency.

However, it is relatively easy to give a machine agency, as far as taking actions is concerned. That is achieved by connecting inputs to some meaningful data source in the environment (such as a camera, or the internet), and connecting outputs to something that can act in that environment (such as a motor, or the API to manage an internet browser). In essence this is no different from any other automation that you might write to script useful behaviour. If you could write a series of tests, if/then statements or mathematical statements that made useful decisions for any machine set up this way, then in theory a neural network or similar machine learning algorithm could learn to approximate, or even improve upon the same kind of function.

If your neural network has already been trained on example inputs and the correct actions to take to achieve some goal given those inputs, then that is all that is required.

However, training a network to the point where it could achieve this in an unconstrained environment ("letting it loose on the internet") is a tough challenge.

There are ways to train neural networks (and learning functions in general) so that they learn useful mappings between observations and actions that progress towards achieving goals. You can use genetic algorithms or other search techniques for instance, and the NEAT approach can be successful training controllers for agents in simple environments.

Reinforcement learning is another popular method that can also scale up to quite challenging control environments. It can cope with complex game environments such as Defense of the Ancients, Starcraft, Go. The purpose of demonstrating AI prowess on these complex games is in part showing progress towards a longer-term goal of optimal behaviour in the even more complex and open-ended real world.

State of the art agents are still quite a long way from general intelligent behaviour, but the problem of using neural networks in a system that learns how to act as an agent has much research and many examples available online.

$\endgroup$
  • 1
    $\begingroup$ "However, training a network to the point where it could achieve this in an unconstrained environment ("letting it loose on the internet") is a tough challenge." And if you let it learn based on what they see in unconstrained environments, you can easily get things like Microsoft's Tay turning into a Nazi after spending less than 24 hours on Twitter. $\endgroup$ – nick012000 Dec 11 '19 at 7:45
  • $\begingroup$ I'm also thinking what if AI was proactive instead of reactive? That would seem like a logical first step towards AGI. What if AI could figure out what questions to ask based on their environment? For example: It experiences an apple falling from a tree and asks "What made the Apple fall?". But it's similar to us not knowing what questions to ask about say the universe. $\endgroup$ – joethemow Dec 11 '19 at 23:01
  • $\begingroup$ @joethemow: That might be worth asking a different question about. At the highest level, pro-active behaviour of gathering information is already part of choosing the right actions. As a simple example a robot could move a camera around to get a full view of an area, gathering information about the world, before taking some other action e.g. to move forward. Moving the camera around can already be an action choice, so the robot must decide whether it has enough data to go forward or needs to perform further data gathering actions. It makes that decision based on data it already has. $\endgroup$ – Neil Slater Dec 12 '19 at 10:12
  • $\begingroup$ I did end up expanding this to its own question. ai.stackexchange.com/questions/17084/… $\endgroup$ – joethemow Dec 13 '19 at 21:48
3
$\begingroup$

The short answer, i think, is that it cannot.

The AI system will only do, and it will only be good at the task that the programmer made it for. Of course you could have an AI that, for example, can trigger a prediction on the input with different models depending on some other variables, but that will still be based on what the programmer wrote, it will never be able to do or learn new unintended things. Like having the model.predict() for an image classification NN in a loop and only stop when it detects a dog and then use another model to predict the breed for example.

What you mentioned about "letting the AI lose on the network" usually is part of some concerns about AI that it could evolve, learn new actions and start acting on its own. But those people unknowingly are actually talking about a general AI or strong AI, an AI system that could be as smart as a human so it could act in its own too. But as far is a know at least, we are not even close to creating such a system.

Hope I actually answered your question and didn't deviated too much from what you actually asked. Please tell me if so.

$\endgroup$
  • $\begingroup$ There have been plenty of examples of AIs doing unexpected things, but they are still constrained to the domain they are designed for. A Twitter bot may learn to be racist, but it will still only be able to post tweets; it won't be able to stab people. $\endgroup$ – user253751 Dec 11 '19 at 12:18
1
$\begingroup$

You invoke it in a loop. Imagine a digital assistant responding to voice queries. It might look something like this:

for(;;) {
   var audio = RecordSomeAudio();
   var response = model.predict(audio);
   if(response.action == "SAYSOMETHING") {
      PlaySomeAudio(response.output);
   }
}

Note that the model gets invoked repeatedly and can decide in a given situation whether to respond or not. In a digital assistant context, part of the model would be to check for if the user raised a query (e.g. "Hey Google" etc.).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.