¿Es posible entrenar la red neuronal para resolver ecuaciones matemáticas?


24

Soy consciente de que las redes neuronales probablemente no están diseñadas para hacer eso, sin embargo, preguntando hipotéticamente, ¿es posible entrenar la red neuronal profunda (o similar) para resolver ecuaciones matemáticas?

So given the 3 inputs: 1st number, operator sign represented by the number (1 - +, 2 - -, 3 - /, 4 - *, and so on), and the 2nd number, then after training the network should give me the valid results.

Example 1 (2+2):

  • Input 1: 2; Input 2: 1 (+); Input 3: 2; Expected output: 4
  • Entrada 1: 10; Input 2: 2 (-); Input 3: 10; Expected output: 0
  • Entrada 1: 5; Input 2: 4 (*); Input 3: 5; Expected output: 25
  • and so

The above can be extended to more sophisticated examples.

¿Es eso posible? Si es así, ¿qué tipo de red puede aprender / lograr eso?



1
Esto podría ser relevante - github.com/deepmind/mathematics_dataset
GaneshTata

Respuestas:


21

Sí, se ha hecho!

Sin embargo, las aplicaciones no deben reemplazar las calculadoras ni nada de eso. El laboratorio con el que estoy asociado desarrolla modelos de redes neuronales de razonamiento equitativo para comprender mejor cómo los humanos podrían resolver estos problemas. Esta es una parte del campo conocido como Cognición matemática . Desafortunadamente, nuestro sitio web no es terriblemente informativo, pero aquí hay un enlace a un ejemplo de dicho trabajo.

Además de eso, el trabajo reciente sobre la ampliación de las redes neuronales para incluir almacenes de memoria externos (por ejemplo, máquinas neuronales de Turing) tienden a utilizar la resolución de problemas matemáticos como una buena prueba de concepto. Esto se debe a que muchos problemas aritméticos implican procedimientos largos con resultados intermedios almacenados. Vea las secciones de este documento sobre la suma y multiplicación binarias largas.


for me not just neural nets but neural architectures with external memory. Architectures like NTM and DNC can use to solve algorithms like shortest path because of they do have the ability to execute the iterative process by keeping track of what was being done (No catastrophic forgetting). But for me using just suervised learning is simply wrong as mentioned in the second answer.
Shamane Siriwardhana

The first link is dead, do you have the replacement?
kenorb

Both links just worked for me, what an excellent paper!
Zakk Diaz

8

Not really.

Neural networks are good for determining non-linear relationships between inputs when there are hidden variables. In the examples above the relationships are linear, and there are no hidden variables. But even if they were non-linear, a traditional ANN design would not be well suited to accomplish this.

By carefully constructing the layers and tightly supervising the training, you could get a network to consistently produce the output 4.01, say, for the inputs: 2, 1 (+), and 2, but this is not only wrong, it's an inherently unreliable application of the technology.


5

1) It is possible! In fact, it's an example of the popular deep learning framework Keras. Check out this link to see the source code.

2) This particular example uses a recurrent neural network (RNN) to process the problem as a sequence of characters, producing a sequence of characters which form the answer. Note that this approach is obviously different from how humans tend to think about solving simple addition problems, and probably isn't how you would ever want a computer to solve such a problem. Mostly this is an example of sequence to sequence learning using Keras. When handling sequential or time-series inputs, RNNs are a popular choice.


1

Yes - it would seem that it is now possible to achieve more is required from the example you've given this paper describes a DL solution to a considerably harder problem - generating the source code for a program described in natural language.

Both of these can be described as regression problems (i.e. the goal is to minimize some loss function on the validation set), but the search space in the natural language case is much bigger.


Al usar nuestro sitio, usted reconoce que ha leído y comprende nuestra Política de Cookies y Política de Privacidad.
Licensed under cc by-sa 3.0 with attribution required.