lunes, 5 de junio de 2023

The book of why, de Pearl

Un libro interesante para entender la diferencia entre correlación y causalidad, el papel de las variables que confunden las relaciones, los contrafactuales...sin ecuaciones, sólo con gráficos y buenas explicaciones. El libro es útil, y yo he aprendido bastantes cosas, aunque cosas de las que hay que reflexionar y trabajar, no cuestiones puntuales (por eso no he tomado demasiadas notas).

En una primera lectura, los elementos fundamentales con los que me he quedado son, primero, la "escalera de la causalidad", que yo no conocía: un primer escalón es el de la Asociación (en el que se sitúan muchos animales y también la inteligencia artificial actual); un segundo, el de la Intervención (cuando hay planificación de actividades); y un tercero, el de los contrafactuales. El primero es capaz de detectar correlaciones. El segundo responde a "Qué pasaría si hago esto", y requiere un modelo de la realidad (los datos recogidos de forma pasiva por sí mismos no pueden responderlo, incluso el deep learning no nos dirá nada de esto si no incluye un modelo causal). El tercer nivel es el que permite responder a "Qué habría pasado si...", o "Por qué". Para responder a estas preguntas hay que comparar lo observado con lo hipotético, y sólo con experimentos no se puede hacer. De nuevo, hace falta un modelo causal, una teoría o una ley natural. Hace falta entender cómo funcionan las cosas.

A partir de esto, Pearl dedica el libro a explicar los modelos causales, su funcionamiento para responder a las preguntas que le planteamos, y cómo resolverlos cuando hay variables confundiendo las relaciones, para lo que propone su operador "do" (como alternativa a los experimentos aleatorios).

p150. All things being equal, RCTs are still preferred to observational studies, just as safety nets are recommended for tightrope walkers. But all things are not necessarily equal: in some cases, interventions may be physically impossible. Or interventions may be unethical.

Fortunately, the do-operator gives us scientifically sound ways of determining causal effects from nonexperimental studies, which challenge the traditional supremacy of RCTs.

Y también a contarnos la historia de los descubrimientos científicos (o falta de ellos) en este campo.


p63. It is an irony of history that Galton started out in search of causation and ended up discovering correlation, a relationship that is oblivious to causation.


Además de todo esto, y en este marco, hay muchos comentarios sobre la inteligencia artificial, en la que Pearl es una autoridad reconocida (inventor de las redes bayesianas en las que se basan muchos de los algoritmos de aprendizaje automático). Cree que hay mucho por hacer todavía, y además, de forma lo más transparente posible (algo que no está demasiado garantizado en los modelos de negocio actuales)

p30. Deep learning has succeeded primarily by showing that certain questions or tasks we thought were difficult are in fact not. It has not addressed the truly difficult questions that continue to prevent us from achieving humanlike AI.

Deep learning has given us machines with truly impressive abilities but no intelligence. The difference is profound and lies in the absence of a model of reality.

p362. Deep learning systems limitations stem from their inability to go beyond rung one of the Ladder of Causation. This limitation does not hinder the performance of AlphaGo in the narrow world of go games, since the board description together with the rules of the game constitutes an adequate causal model of the go-world. Yet it hinders learning systems that operate in environments governed by rich webs of causal forces, while having access merely to surface manifestations of those forces. Medicine, economics, education, climatology and social affairs are typical examples of such environments. Like the prisoners in Plato's famous cave, deep-learning systems explore the shadows on the cave wall and learn to accurately predict their movements. They lack the understanding that the observed shadows are mere projections of three-dimensional objects moving in a three-dimensional space. Strong AI requires this understanding.

In technical terms, machine-learning methods today provide us with an efficient way of going from finite sample estimates to probability distributions, and we still need to get from distributions to cause-effect relations.

Y hasta se mete con la libre voluntad...

p364. Not all philosophers are convinced that there really is a clash between free will and determinism. A group called "compatibilists", among whom I count myself, consider it only an apparent clash between two levels of description: the neural level at which processes appear deterministic (barring quantum indeterminism) and the cognitive level at which we have a vidid sensation of options.

Granted that free will is (or may be) an illusion, why is it so important to us as humans to have this illusion? Why did evolution labor to endow us with this conception? Gimmick or no gimmick, should we program our computers to have this illusion? What for? What computational benefits does it entail?

Un buen libro. Vale la pena.


1 comentario:

Mario Castro dijo...

Pearl es una figura impresionante en el ámbito de la IA. En el IIT ya estamos usando su teoría del do-calculus. Dicho esto, el libro es estupendo porque está escrito por un periodista, porque este hombre, todo lo que tiene de listo lo tiene de oscuro en sus trabajos :-D

Esto ha hecho que hay unas "causality-wars" entre los seguidores de Rubin (otro gigante) y los de Pearl. Me quedo con Pearl en el largo plazo, aunque solo sea por sus contribuciones al análisis gráfico de redes causales.

Pero sí, una lectura muy recomendada.