TRANSCRIPCIÓN · CC BY 4.0

Aprendizaje profundo en la NYU, semana 1: Historia y evolución — Yann LeCun

Título original en inglés: Week 1 – Lecture: History, motivation, and evolution of Deep Learning

Alfredo Canziani (冷在) · Publicado el · 1 h 39 min · Audio original en inglés · subtítulos en español · Licencia: CC BY 4.0 · Fuente: ver en YouTube

Esta ficha ofrece el título y el contexto en español junto con la transcripción original íntegra en inglés con marcas de tiempo. Pulsa el botón superior para abrir la vista bilingüe español-inglés sincronizada en el lector.

Resumen generado por IA

Esta clase introductoria de aprendizaje profundo combina la logística del curso con un mapa de alto nivel del campo. El curso está dirigido por los asistentes docentes Alfredo Canziani y Mark Goldstein, con nueve clases los lunes impartidas por el instructor y sesiones prácticas los martes dirigidas además por Mark que cubren preguntas prácticas, repasos de matemáticas y tutoriales de PyTorch; hay tres clases invitadas, un examen parcial previsto posiblemente alrededor de marzo, y una competencia de proyecto final con una tabla de clasificación, posiblemente en grupos de dos, probablemente combinando aprendizaje autosupervisado y conducción autónoma. La clase examina el aprendizaje supervisado, las redes neuronales y el aprendizaje profundo, luego los próximos temas incluyendo retropropagación y componentes arquitectónicos, redes convolucionales y recurrentes, compuertas e interacciones multiplicativas (GRU, LSTM), redes de memoria, transformers y adaptadores, redes neuronales de grafos solo brevemente, y trucos de optimización. El aprendizaje profundo es casi siempre optimización basada en gradientes, pero la geometría de los objetivos no convexos no se comprende; los modelos basados en energía se presentan como una formulación general para el aprendizaje supervisado, no supervisado y autosupervisado, con los modelos probabilísticos como un caso especial, y el aprendizaje autosupervisado se describe como muy activo y probablemente dominante. La sección histórica rastrea las raíces desde las neuronas de unidad de umbral de McCulloch y Pitts y la idea de fuerza sináptica de Hebb, pasando por la cibernética de Wiener y el Perceptrón de Rosenblatt, el declive de finales de los años 1960, el resurgimiento de la retropropagación a mediados de los años 1980, y los resurgimientos del habla, la visión y el PLN posteriores a 2010, señalando que las máquinas siguen siendo estrechas y carecen de sentido común. Luego contrasta el reconocimiento de patrones en dos etapas con el aprendizaje profundo de extremo a extremo y explica por qué las matrices totalmente conectadas son poco prácticas para las imágenes, motivando la convolución y el pooling.

Resumen traducido automáticamente con IA a partir de la transcripción. Comprueba los fragmentos enlazados con el vídeo original.

Resúmenes por capítulo con marcas de tiempo

Logística y estructura del curso

Personal docente y contacto

  • [0:01] La clase en realidad está dirigida por los asistentes docentes Alfredo Canziani y Mark Goldstein, con quienes los estudiantes hablarán mucho más a menudo que con el instructor.
  • [0:16] Los estudiantes no deben hacer preguntas al final de la clase porque el instructor tiene que irse justo después para tomar un avión.

Sitio web y calendario de clases

  • [0:35] Existe un sitio web del curso, y el instructor hará lo posible por publicar el PDF de las diapositivas, probablemente solo unos minutos antes de la clase.
  • [0:55] El instructor impartirá nueve clases los lunes por la noche.

Sesiones prácticas de los martes

  • [1:01] Cada martes por la noche se realiza una sesión práctica, dirigida además por Mark.
  • [1:07] Las sesiones prácticas cubren preguntas prácticas, repasos de las matemáticas necesarias y conceptos básicos, y tutoriales sobre el uso de PyTorch y diversas otras herramientas de software.

Clases invitadas y temas

  • [1:24] Habrá tres clases invitadas, cuyos nombres no están finalizados.
  • [1:29] Los temas de las clases invitadas incluirán procesamiento de lenguaje natural, visión por computadora y aprendizaje autosupervisado.

Examen parcial y proyecto final

  • [1:41] Se espera un examen parcial, posiblemente en una de las sesiones alrededor de marzo.
  • [1:53] La evaluación se basará en el examen parcial y un proyecto final, y posiblemente se permita a los estudiantes trabajar en grupos de dos.
  • [2:02] Aún no se ha decidido si los grupos serán de dos o tres personas.
  • [2:10] El proyecto probablemente implicará una combinación de aprendizaje autosupervisado y conducción autónoma, y se están llevando a cabo conversaciones con diversas personas para obtener datos.

Introducción al curso de aprendizaje profundo y requisitos previos

Descripción general y alcance del curso

  • [2:23] La primera clase es una introducción amplia a qué es el aprendizaje profundo, qué puede hacer y qué no puede hacer.
  • [2:36] La clase recorre todo el arco del curso de manera superficial para dar una idea general de alto nivel de todos los temas, de modo que cada tema pueda situarse después en el panorama completo.

Requisito previo de aprendizaje automático

  • [2:55] La clase requiere familiaridad con el aprendizaje automático o al menos con los conceptos básicos de aprendizaje automático.
  • [3:04] El instructor pregunta quién ha experimentado con PyTorch o TensorFlow o ha entrenado una red neuronal.

Descripción general y fundamentos del curso de aprendizaje profundo

Plan del curso y secuenciación de temas

  • [3:25] El instructor no asumirá que los estudiantes conocen técnicas subyacentes profundas y puede ajustar el ritmo del curso según la experiencia previa.
  • [3:52] La clase de hoy cubre la introducción al aprendizaje supervisado, las redes neuronales y el aprendizaje profundo, incluido qué puede y qué no puede hacer el aprendizaje profundo y qué constituye buenas características.
  • [4:05] La próxima semana cubre la retropropagación y los componentes arquitectónicos básicos, como módulos, diferenciación automática, funciones de pérdida, funciones de activación, compartición de pesos, interacciones multiplicativas y compuertas de atención.
  • [4:35] Las macroarquitecturas que se cubrirán incluyen mezcla de expertos, redes siamesas y hiperredes.
  • [4:46] Una o dos clases magistrales, posiblemente incluyendo una conferencia invitada, cubrirán las redes convolucionales y sus aplicaciones.

Arquitecturas especializadas: modelos recurrentes, con compuertas y de atención

  • [5:06] Se cubrirán las redes neuronales recurrentes entrenadas con retropropagación a través del tiempo, incluyendo aplicaciones al control y a la generación de series temporales.
  • [5:26] El curso cubre la combinación de recurrencia con compuertas e interacciones multiplicativas, como las unidades recurrentes con compuertas y LSTM.
  • [5:35] Se discutirán arquitecturas construidas sobre interacciones multiplicativas, incluyendo redes de memoria, transformers y adaptadores, como recientes y populares en PLN y otras áreas.
  • [5:51] Las redes neuronales de grafos se cubrirán solo brevemente porque el curso separado de Joan Bruna les dedica mucho tiempo.

Desafíos de optimización y trucos prácticos de entrenamiento

  • [6:08] El curso cubrirá trucos para hacer funcionar los sistemas de aprendizaje profundo y comprender el tipo de optimización que tiene lugar en las redes neuronales.
  • [6:26] El aprendizaje profundo casi siempre trata sobre optimización basada en gradientes; las reglas del caso convexo se entienden bien, pero el entrenamiento estocástico y las funciones de costo no convexas con mínimos locales y puntos de silla no se entienden bien.
  • [7:02] El gran secreto es que nadie entiende realmente la geometría de la función objetivo, y es importante entender que nadie lo entiende.
  • [7:12] Los trucos prácticos surgieron de la intuición, algo de análisis teórico y búsqueda empírica: inicialización, normalización, regularización como drop out, recorte de gradientes para la optimización, momentum, promedio HDD y métodos para paralelizar HDD, muchos de los cuales no funcionan.
  • [7:40] Enfoques más exóticos incluyen target prop y la formulación lagrangiana de la retropropagación.

Modelos basados en energía e inferencia como razonamiento

  • [7:47] Los modelos basados en energía proporcionan una formulación general para el aprendizaje supervisado, no supervisado y autosupervisado, incluyendo enfoques que involucran inferencia.
  • [8:04] La inferencia significa buscar el valor de variables que nadie te dice pero que el sistema se supone que debe inferir, lo cual puede considerarse como implementar razonamiento con redes neuronales.
  • [8:20] El razonamiento en redes neuronales puede verse como la optimización de una función de energía con respecto a algunas variables, donde los valores resultantes son las variables buscadas.
  • [8:34] La visión común de una red neuronal como una función que calcula la salida a partir de la entrada es una forma bastante restrictiva de inferencia porque solo puede producir una salida para una entrada dada.

Modelos basados en energía y aprendizaje autosupervisado

Modelos basados en energía para múltiples respuestas

  • [8:50] Muchos problemas tienen múltiples respuestas posibles para una entrada dada, y una forma de representarlas es hacer que esas respuestas sean los mínimos de una función de energía.
  • [9:04] El algoritmo de inferencia encuentra los valores de las variables que minimizan la función objetivo, y los múltiples mínimos significan que el modelo puede producir múltiples salidas para una entrada.
  • [9:21] Los modelos basados en energía son una forma de hacer esto; los modelos probabilísticos como los métodos bayesianos, los modelos gráficos y las redes bayesianas son un caso especial, mientras que los métodos de energía son más generales y menos específicos.
  • [9:39] Los casos especiales incluyen lo que solía llamarse predicción de estructura, con muchas aplicaciones en el aprendizaje autosupervisado.

Auge del aprendizaje autosupervisado

  • [9:52] El aprendizaje autosupervisado es un tema de investigación muy activo hoy en día y probablemente se volverá realmente dominante en el futuro.
  • [10:02] En un año se volvió dominante en el procesamiento del lenguaje natural, y en los últimos meses algunos artículos mostraron que los métodos de aprendizaje autosupervisado funcionan realmente bien también en visión por computadora.
  • [10:17] El ponente supone que el aprendizaje autosupervisado dominará el mundo en los próximos años.

Ejemplos entendidos como enfoques basados en energía

  • [10:31] Los ejemplos incluyen auto-codificadores variacionales, auto-codificadores de eliminación de ruido y BERT, las arquitecturas transformer entrenadas para el procesamiento de lenguaje natural con aprendizaje autosupervisado como un caso especial de auto-codificador de eliminación de ruido.
  • [10:47] Estos métodos, incluidas las redes generativas antagónicas (GAN), pueden entenderse todos en el contexto del enfoque basado en energía.

Hacia una inteligencia de nivel felino y de nivel humano

  • [11:04] Las máquinas no son superinteligentes ni muy inteligentes ahora: pueden resolver muy bien problemas muy estrechos, a veces con un rendimiento sobrehumano, pero ninguna máquina tiene ningún tipo de sentido común.
  • [11:12] Las máquinas más inteligentes probablemente tienen menos sentido común que un gato doméstico, lo que plantea la cuestión de cómo alcanzar primero la inteligencia de nivel de gato y luego quizás la inteligencia de nivel humano.
  • [11:29] El ponente no pretende tener la respuesta, pero tiene algunas ideas que vale la pena discutir en el contexto del aprendizaje autosupervisado.

Tareas del curso y competición del proyecto final

Las tareas como preparación para el proyecto final

  • [11:57] El curso incluye tareas.
  • [12:29] Las tareas sirven como práctica para familiarizarse con las técnicas necesarias para el aprendizaje profundo en general y para el proyecto final en particular.

Formato del proyecto final y tabla de clasificación

  • [12:21] El proyecto final será una competición entre los equipos.
  • [12:26] Habrá una tabla de clasificación para la competición.

Las tareas también preparan para el examen parcial

  • [12:46] Las tareas también sirven como preparación para el examen parcial.

Orígenes de las redes neuronales y la cibernética

Inspirado en el cerebro pero conceptualmente diferente

  • [13:03] El aprendizaje profundo se inspira en observaciones sobre el cerebro, pero la inspiración es solo conceptual, no un intento de copiar el cerebro.
  • [13:11] Muchos detalles del cerebro son irrelevantes, y se desconoce si son realmente relevantes para la inteligencia humana.
  • [13:18] La analogía es como los aviones inspirados por las aves: los principios subyacentes del vuelo son esencialmente los mismos, pero los detalles son extremadamente diferentes.

El modelo de neurona de umbral de McCulloch y Pitts

  • [14:17] La historia comenzó en la década de 1940 con McCulloch y Pitts, quienes propusieron que las neuronas son básicamente unidades de umbral que están encendidas o apagadas.
  • [14:39] Al conectar tales neuronas, se pueden construir circuitos booleanos y realizar inferencia lógica con neuronas, lo que sugiere que el cerebro es básicamente una máquina de inferencia lógica.
  • [14:56] Una neurona calcula una suma ponderada de sus entradas y se activa si está por encima de un umbral y se desactiva si está por debajo, una visión muy simplificada de las neuronas reales.
  • [15:09] Ese modelo permaneció en el campo durante casi cuatro décadas, de hecho cuatro décadas completas.

El aprendizaje hebbiano y la cibernética de Wiener

  • [15:22] Donald Hebb propuso que el cerebro aprende modificando la fuerza de las sinapsis, con conexiones que aumentan cuando dos neuronas se activan juntas y posiblemente disminuyen cuando no lo hacen.
  • [15:50] El aprendizaje hebbiano no es un algoritmo de aprendizaje sino quizás una primera idea.
  • [15:55] Norbert Wiener propuso la cibernética: los sistemas con sensores y actuadores pueden tener bucles de retroalimentación y ser autorregulados.
  • [16:23] La dirección de un automóvil utiliza un controlador PID como mecanismo de retroalimentación que mide las posiciones del volante y de las ruedas del automóvil y corrige las ruedas para que coincidan.
  • [16:49] La estabilidad y las reglas de tales mecanismos de retroalimentación provienen básicamente todas inicialmente de este trabajo.

El hardware del perceptrón de Rosenblatt

  • [16:57] Frank Rosenblatt imaginó algoritmos de aprendizaje que modificaban los pesos de redes neuronales muy simples.
  • [17:11] El Perceptrón era una computadora analógica física, no un programa de Python de tres líneas, sino una máquina gigantesca con cables y sensores ópticos de baja resolución para mostrarle imágenes.
  • [17:35] Sus neuronas calculaban una suma ponderada, y los pesos adaptables eran potenciómetros con motores para que pudieran girar para el algoritmo de aprendizaje, haciéndolo electromecánico.
  • [17:45] Se muestra a Rosenblatt sosteniendo un módulo de ocho pesos con potenciómetros motorizados.

Línea de tiempo de la investigación en redes neuronales

  • [18:07] La idea de construir máquinas inteligentes simulando redes de neuronas nació en la década de 1940 y despegó un poco a finales de la década de 1950.

Declive y resurgimiento temprano de las redes neuronales

Colapso de la investigación en redes neuronales a finales de los años 1960

  • [18:19] La investigación en redes neuronales murió por completo a finales de la década de 1960 cuando la gente se dio cuenta de que los algoritmos de aprendizaje y las arquitecturas propuestas en ese momento solo podían manejar reconocimiento de patrones básico y muy simple.

Investigación aislada en Japón, 1968–1984

  • [18:38] Aproximadamente entre 1968 y 1984, básicamente nadie en el mundo trabajó en redes neuronales excepto unos pocos investigadores aislados, principalmente en Japón.
  • [18:50] Japón se describe como un ecosistema relativamente aislado para financiar la investigación, donde la gente no sigue las mismas modas.

Resurgimiento del campo alrededor de 1985

  • [19:04] El campo despegó de nuevo aproximadamente en 1985.

Por qué la retropropagación surgió a mediados de la década de 1980

Neuronas continuas y diferenciables como requisito previo

  • [19:12] La retropropagación es un algoritmo para entrenar redes neuronales multicapa, y en la década de 1960 se buscaba algo similar, pero no se encontró.
  • [19:24] El fracaso anterior se debió al uso de neuronas incorrectas: las neuronas binarias de McCulloch-Pitts.
  • [19:32] La retropropagación requiere una función de activación continua y diferenciable, o al menos continua, y faltaba la idea de usar neuronas continuas.
  • [19:46] Como las neuronas binarias no eran diferenciables, no se pensaba que tales sistemas pudieran entrenarse con descenso de gradiente.

Coste computacional de la multiplicación en coma flotante

  • [19:56] Con neuronas binarias no se necesita multiplicación: una neurona activa simplemente suma su peso a la suma ponderada, y una inactiva no suma nada.
  • [20:13] Las neuronas continuas requieren multiplicar la activación de una neurona por un peso para contribuir a la suma ponderada.
  • [20:19] Antes de la década de 1980, multiplicar dos números, especialmente números en coma flotante, era extremadamente lento en cualquier computadora que no fuera ridículamente cara, lo que incentivaba evitar las neuronas continuas.
  • [20:34] En retrospectiva, la retropropagación no surgió antes de mediados de la década de 1980 en gran medida porque fue entonces cuando las computadoras se volvieron lo suficientemente rápidas para las multiplicaciones en coma flotante.

El resurgimiento del aprendizaje profundo y su expansión por las aplicaciones

Redes neuronales abandonadas después de 1995

  • [20:53] Una ola de interés en las redes neuronales duró aproximadamente de 1985 a 1995, tras lo cual el aprendizaje automático abandonó en gran medida la idea.
  • [21:08] Ese abandono duró hasta finales de la década de 2000 y principios de 2010.

Avance en el reconocimiento de voz alrededor de 2010

  • [21:10] Alrededor de 2009/2010, se descubrió que las redes neuronales multicapa entrenadas con retropropagación producían una mejora en el reconocimiento de voz.
  • [21:20] El resurgimiento comenzó con el reconocimiento de voz alrededor de 2010, no con ImageNet.
  • [21:28] En los 18 meses posteriores a los primeros artículos, todos los principales actores del reconocimiento de voz habían desplegado sistemas comerciales que utilizaban redes neuronales.
  • [21:38] Las funciones de reconocimiento de voz en los teléfonos Android alrededor de 2012 utilizaban redes neuronales, probablemente el primer despliegue muy amplio del aprendizaje profundo moderno.

Cambio en la visión por computadora en 2012–2013

  • [21:55] A finales de 2012 y principios de 2013, la comunidad de visión por computadora descubrió que el aprendizaje profundo, especialmente las redes convolucionales, funcionaba mucho mejor que los métodos anteriores.
  • [22:08] La comunidad se pasó a las redes convolucionales y abandonó en gran medida las técnicas anteriores, creando una segunda revolución en la visión por computadora.

Procesamiento del lenguaje natural alrededor de 2015–2016

  • [22:12] Unos tres años después, alrededor de 2015/16, se produjo el mismo cambio en el procesamiento del lenguaje natural, incluida la traducción de idiomas.

Expansión esperada a la robótica y el control

  • [22:28] Aún no ha ocurrido una revolución similar, pero se espera en robótica, control y una serie de otras áreas de aplicación.

Aprendizaje supervisado y ajuste de parámetros en el aprendizaje profundo

El papel dominante del aprendizaje supervisado y los datos de entrenamiento emparejados

  • [22:54] Alrededor del noventa y tantos por ciento de las aplicaciones de aprendizaje profundo utilizan el aprendizaje supervisado como enfoque principal.
  • [23:04] El aprendizaje supervisado recopila pares de entradas y salidas, como imágenes con categorías, clips de audio con transcripciones de texto o texto en un idioma con su transcripción en otro.

Corrección iterativa de salidas incorrectas

  • [23:22] Se alimenta un ejemplo a la máquina, que produce una salida; si la salida es correcta, se hace poco o nada, pero si es incorrecta, se ajustan los parámetros de la máquina.
  • [23:39] Los parámetros de la función parametrizada se ajustan para que la salida se acerque más a la deseada, como cuando una imagen de un coche no está etiquetada como coche.

Los pesos de las redes neuronales y el truco de la retropropagación

  • [23:54] En una red neuronal los parámetros son los pesos que calculan sumas ponderadas en las neuronas simuladas, y las perillas se ajustan para acercar la salida al objetivo.
  • [24:07] El truco clave en las redes neuronales es determinar en qué dirección y en cuánto ajustar las perillas, que es lo que abordan el cálculo de gradientes y la retropropagación.

Perceptrón, Adaline y el cuello de botella del extractor de características

Perceptrón y Adaline como modelos de umbral

  • [24:22] Una ráfaga de modelos básicos de clasificación comenzó con el Perceptrón y un modelo competidor, el Adaline.
  • [24:33] Ambos se basan en la misma arquitectura: calcular una suma ponderada de las entradas y compararla con un umbral, activándose por encima de él y desactivándose por debajo.
  • [24:45] El Adaline que Bernie Widrow está ajustando es una computadora analógica física, mucho más pequeña que el Perceptrón en muchos aspectos.

Capa asociativa fija del perceptrón

  • [24:59] El Perceptrón era una red neuronal de dos capas en la que solo la segunda capa tenía pesos adaptativos entrenables.
  • [25:08] La primera capa era fija y en la mayoría de los experimentos se determinaba aleatoriamente, conectando píxeles de entrada a neuronas de umbral con pesos aleatorios.
  • [25:27] Esta primera capa se denominó capa asociativa y se convirtió en la base del diseño de sistemas de reconocimiento de patrones durante aproximadamente cuatro décadas.

Extractor de características más clasificador entrenable

  • [25:49] El modelo pasa una entrada por un extractor de características destinado a extraer rasgos útiles para la tarea, como detectar un círculo oscuro para un ojo o un automóvil.
  • [26:17] El extractor de características produce un vector de características, que pueden ser números o valores de encendido/apagado, alimentado a un clasificador entrenable que calcula una suma ponderada y la compara con un umbral.
  • [26:41] El problema es que el extractor de características debe diseñarse manualmente.

Enfoque de la investigación en características diseñadas manualmente

  • [26:41] El reconocimiento estadístico de patrones y la parte orientada al reconocimiento de la visión por computadora se centraron en diseñar extractores de características para problemas particulares, como el reconocimiento de caracteres Hangul.
  • [27:12] El trabajo abarcaba trucos de preprocesamiento como normalizar el tamaño de la imagen, esqueletonizar y segmentar caracteres de su fondo.
  • [27:18] La literatura se dedicaba casi por completo al extractor de características y muy poco al clasificador entrenable.

Aprendizaje profundo: redes multicapa de extremo a extremo

El aprendizaje de extremo a extremo reemplaza las etapas construidas a mano

  • [27:31] El aprendizaje profundo reemplaza el proceso de reconocimiento de patrones de dos etapas, donde la representación de entrada se diseña a mano, con el aprendizaje de toda la tarea de extremo a extremo.
  • [27:52] El sistema se construye como una cascada de módulos, cada uno con parámetros ajustables y cierta no linealidad, apilados en múltiples capas.
  • [28:15] La palabra "profundo" en aprendizaje profundo se refiere únicamente a la presencia de múltiples capas, nada más.
  • [28:20] Entrenar toda la pila de extremo a extremo plantea la cuestión de cómo ajustar los parámetros de la primera capa, lo que aborda la retropropagación.

Por qué las capas deben ser no lineales

  • [28:39] Los módulos deben ser no lineales porque la composición de dos funciones lineales es a su vez lineal, por lo que dos capas lineales sucesivas colapsan en una.
  • [28:53] Multiplicar un vector por una matriz y luego por otra equivale a multiplicarlo por el producto precalculado de las dos matrices.
  • [29:06] No tiene sentido tener múltiples capas si esas capas son lineales, aunque el orador señala que hay un punto menor a favor.

La arquitectura no lineal ajustable más simple

  • [29:46] La entrada, como una imagen o audio, se trata como un vector y se multiplica por una matriz cuyos coeficientes son los parámetros ajustables.
  • [30:15] Cada componente del vector resultante pasa a través de una función no lineal, siendo la opción más simple ReLU(x) = max(x, 0).
  • [30:26] La misma función se llama ReLU en redes neuronales, rectificación de media onda en ingeniería y parte positiva en matemáticas.
  • [30:47] Después de la ReLU, el vector contiene muchos ceros dondequiera que la suma ponderada fuera menor que cero, y el proceso de multiplicar y luego aplicar la no linealidad se repite.

Por qué se llama red neuronal

  • [31:17] Cada componente de salida de una multiplicación de matrices es una suma ponderada de los componentes de entrada, usando la fila correspondiente de la matriz como pesos.
  • [31:39] Esta operación de suma ponderada se asemeja a unidades que reciben entradas, por lo que la arquitectura se denomina red neuronal.
  • [31:59] El número de unidades después de una multiplicación de matrices es igual al número de filas, y el número de columnas debe ser igual al tamaño de la entrada.

Aprendizaje supervisado y descenso de gradiente

Función objetivo y promedio del conjunto de entrenamiento

  • [32:21] El aprendizaje supervisado compara la salida del sistema para una entrada dada con una salida objetivo.
  • [32:33] Una función objetivo, módulo de pérdida o divergencia calcula una distancia o penalización entre la salida producida y el objetivo.
  • [32:53] La función de costo produce un escalar, como la distancia euclidiana entre el vector objetivo y el vector que produce el sistema de aprendizaje profundo.
  • [33:12] El costo escalar se promedia sobre un conjunto de entrenamiento de pares entrada-salida, y este promedio se minimiza con respecto a los parámetros ajustables del sistema.

Descenso de gradiente y convexidad

  • [33:55] La minimización se realiza calculando el gradiente, de forma análoga a encontrar la dirección de descenso más pronunciado mientras se está perdido en una montaña lisa y neblinosa de noche.
  • [34:22] Buscar la dirección descendente se denomina calcular un gradiente, técnicamente un gradiente negativo, y cada paso avanza en esa dirección.
  • [34:36] Si los pasos son lo suficientemente pequeños como para no saltar al otro lado de la montaña, el proceso finalmente converge al valle, siempre que el valle sea convexo.
  • [34:49] Sin convexidad, un mínimo local, como un lago de montaña, puede atrapar la búsqueda aunque exista un valle más bajo fuera de la vista, por lo que la convexidad es importante.

Gradiente estocástico: eficiencia y generalización

Cálculo de gradientes a partir de pequeños lotes de muestras

  • [35:20] La función objetivo es un promedio sobre muchas muestras, y su gradiente puede calcularse sobre todo el conjunto de entrenamiento promediando sobre la totalidad de este.
  • [35:37] Es más eficiente tomar una muestra o un grupo pequeño, calcular el error de esa muestra y su gradiente respecto a los parámetros, y dar un paso pequeño.
  • [35:51] Cada nueva muestra produce un error y un gradiente diferentes que pueden apuntar en una dirección distinta, por lo que la trayectoria desciende por la superficie de costo de forma ruidosa y fluctuante.

Trayectoria errática en un ejemplo de dos pesos

  • [36:16] El ejemplo mostrado aplica gradiente estocástico a un problema bidimensional simple con solo dos pesos.
  • [36:23] La trayectoria parece semipersiódica porque las muestras siempre se presentan en el mismo orden, lo cual no es lo que se debe hacer con gradiente estocástico, y la trayectoria es realmente errática.

Convergencia más rápida y mejor generalización

  • [36:36] Empíricamente, el gradiente estocástico converge mucho, mucho más rápido, particularmente con un conjunto de entrenamiento muy grande.
  • [36:42] También tiende a dar mejor generalización: el rendimiento medido en un conjunto separado es generalmente mejor con gradiente estocástico que con descenso de gradiente verdadero.

Costo del descenso de gradiente de lote completo

  • [37:16] Calcular el gradiente completo sobre todo el conjunto de datos es computacionalmente factible y no más costoso por cálculo, pero es menos ruidoso y más lento.
  • [37:37] Si un conjunto de entrenamiento de un millón de muestras es en realidad 100 repeticiones de un conjunto de 10.000 muestras, un gradiente completo calcula los mismos valores cien veces y dedica cien veces más trabajo del necesario.

Ruido, redundancia y retropropagación

Eficiencia del gradiente estocástico a partir de la redundancia

  • [38:11] El gradiente estocástico funciona no solo mediante la repetición, sino también en entornos de aprendizaje automático más normales donde las muestras contienen mucha redundancia y muchas muestras son muy similares entre sí.
  • [38:25] Si existe algún tipo de coherencia y el sistema es capaz de generalizar, el gradiente estocástico es más eficiente, porque sin gradiente estocástico no se puede aprovechar esa redundancia.
  • [38:40] Este es un caso en el que el ruido es beneficioso.

La retropropagación como regla de la cadena en módulos apilados

  • [38:53] La retropropagación es, informalmente, una aplicación práctica de la regla de la cadena: una red neuronal puede verse como una pila de módulos, es decir, composiciones de funciones.
  • [39:22] La derivada de F compuesta con G es la derivada de F en G de X multiplicada por la derivada de G en X, lo que da el producto de las dos derivadas.
  • [39:37] La misma regla se aplica cuando las funciones son funciones vectoriales que toman vectores como entradas y producen vectores como salidas, o, más generalmente, arreglos multidimensionales.
  • [40:06] Para módulos funcionales con múltiples entradas y múltiples salidas, la misma regla se aplica si se aplica ciegamente, excepto que deben usarse derivadas parciales.

Por qué se llama retropropagación

  • [40:20] Para calcular la derivada de la función objetivo —la diferencia entre la salida deseada y la salida real— respecto a cualquier variable dentro de la red, las derivadas deben propagarse hacia atrás y multiplicarse a lo largo del camino.
  • [40:42] Se llama retropropagación porque se aplica a múltiples capas; se promete un tratamiento más formal para la semana siguiente.

Escalado de redes neuronales a entradas de imagen

Dimensiones de la entrada de imagen

  • [41:04] Una imagen, incluso a una resolución relativamente baja, suele tener unos cientos de píxeles por lado.
  • [41:15] Una imagen de un coche de 256 x 256 tiene 65.536 píxeles, y con los componentes R, G y B eso da aproximadamente doscientos mil valores.
  • [41:33] Por lo tanto, el vector de entrada tiene unos doscientos mil componentes.

Tamaño de la matriz y falta de practicidad

  • [41:40] Una matriz que multiplique este vector debe tener doscientas mil columnas.
  • [41:54] Según el número de unidades de la primera capa, la matriz podría ser de 200.000 x 100.000, lo cual es muy grande.
  • [42:06] Incluso con compresión en la primera capa, una matriz así ya contiene miles de millones de entradas.
  • [42:16] Tratarla como una matriz completa no es realmente práctico.

Matrices estructuradas inspiradas en el cerebro

  • [42:23] Trabajar con imágenes requiere postular una estructura en la matriz para que no sea completamente densa y no conecte todo con todo.
  • [42:33] Una matriz totalmente conectada sería poco práctica, al menos para muchas aplicaciones prácticas.
  • [42:35] Aquí es donde vuelve la inspiración en el cerebro.

Jerarquía del sistema visual y reconocimiento rápido de objetos

Registros de la corteza visual de Hubel y Wiesel

  • [42:43] En el trabajo clásico de neurociencia de los años 60, Hubel y Wiesel insertaron electrodos en la corteza visual de gatos, monos, ratones y otros animales para determinar qué hacen las neuronas de la corteza visual, un trabajo que ganó el Premio Nobel en los años 70.

Compresión retiniana y punto ciego de los vertebrados

  • [43:27] Todos los sistemas visuales de los mamíferos están organizados de forma similar: la luz incide en la retina, donde unas pocas capas de neuronas situadas delante de los fotorreceptores preprocesan y comprimen la señal.
  • [43:44] El ojo humano es aproximadamente una cámara de cien millones de píxeles, pero cien millones de fibras en el nervio óptico lo harían demasiado grande para mover los ojos, así que las neuronas retinianas comprimen la señal a alrededor de un millón de fibras por ojo.
  • [44:26] El ponente califica este cableado como un error evolutivo en los vertebrados: los cables se sitúan delante de la retina y la perforan, creando un punto ciego, mientras que los invertebrados como el calamar y el pulpo tienen los cables saliendo por la parte posterior.

Núcleo geniculado lateral y jerarquía ventral

  • [45:33] La señal viaja desde los ojos hasta el núcleo geniculado lateral en la base del cerebro, que realiza cierta normalización de contraste.
  • [45:53] Desde allí la señal va a la corteza visual primaria V1 en la parte posterior del cerebro y a través de la jerarquía ventral V1, V2, V4 e IT, recorriendo desde la parte posterior hasta el lado del cerebro.
  • [46:11] En la corteza inferotemporal se representan las categorías de objetos: las neuronas se activan para tu abuela independientemente de lo que lleve puesto, su posición o oclusión, y los registros en pacientes con el cráneo abierto encontraron neuronas que responden solo a Jennifer Aniston.

Velocidad feed-forward del reconocimiento de objetos

  • [47:06] El sistema visual parece realizar reconocimiento de patrones con una estructura jerárquica de múltiples capas, y se cree que el procesamiento visual es esencialmente feed-forward.
  • [47:19] Reconocer un objeto cotidiano lleva unos 100 milisegundos, apenas tiempo suficiente para que la señal pase de la retina a la corteza inferotemporal con unos pocos milisegundos de retardo por neurona.
  • [47:41] No hay tiempo para conexiones recurrentes en el reconocimiento rápido, aunque el ponente señala que tales conexiones existen en gran número.

De Hubel y Wiesel a las redes convolucionales

El modelo no supervisado capa por capa de Fukushima

  • [47:58] Kunihiko Fukushima se inspiró en Hubel y Wiesel en la década de 1970 y construyó un modelo de red neuronal con capas.
  • [49:25] Fukushima no insistió en extraer características orientadas, sino que utilizó un algoritmo de aprendizaje no supervisado.
  • [49:39] Entrenó el sistema capa por capa de forma no supervisada en lugar de extremo a extremo.
  • [49:51] Adoptó la replicación de neuronas por todo el campo visual y el concepto de células complejas de Hubel y Wiesel.

Organización retinotópica y selectividad de orientación en V1

  • [48:14] Hubel y Wiesel descubrieron que las neuronas individuales de V1 responden solo a una pequeña parte del campo visual.
  • [48:40] Las neuronas están organizadas retinotópicamente, de modo que las neuronas vecinas responden a regiones vecinas del campo visual.
  • [48:48] Los grupos de neuronas que cubren la misma área parecen responder a bordes en orientaciones particulares, con neuronas vecinas sintonizadas a bordes ligeramente rotados.
  • [49:18] Así pues, se representaba V1 como dotada de selectividad de orientación, con grupos sintonizados a múltiples orientaciones replicados por todo el campo visual.

Células complejas e invariancia al desplazamiento

  • [50:00] Las células complejas agrupan las actividades de las células simples, que son las unidades selectivas a la orientación.
  • [50:15] Cuando un borde orientado se desplaza ligeramente, se activan distintas células simples, pero la célula compleja permanece activada hasta que el borde sale de su campo receptivo.
  • [50:32] Por tanto, las células complejas incorporan una pequeña invariancia al desplazamiento en la representación.
  • [50:44] Estos mecanismos se denominan ahora convolución y pooling en las redes convolucionales.

Redes convolucionales: conexiones locales y compartición de pesos

  • [50:54] Esta línea de trabajo condujo a las redes convolucionales a mediados y finales de la década de 1980.
  • [51:00] Las redes convolucionales tienen conexiones locales replicadas a través del campo visual, intercalando capas de detección de características con operaciones de agrupamiento.
  • [51:34] Cada neurona de una capa calcula una suma ponderada sobre una pequeña área de la entrada, y todas las neuronas de la capa utilizan el mismo conjunto de pesos.
  • [51:50] Esta es la idea de atadura de pesos o compartición de pesos, y la retropropagación permitió entrenar dichas redes para reconocer patrones.

Primeras redes neuronales de extremo a extremo para el reconocimiento de caracteres a

Demostración de dígitos manuscritos de Bell Labs en un PC 386

  • [52:02] El ponente muestra una demostración de dígitos manuscritos de finales de los años ochenta o principios de los noventa, junto a una foto suya de unos treinta años y su antiguo número de teléfono de Bell Labs en Nueva Jersey, que ya no funciona.
  • [52:21] Al pulsar una tecla se ejecuta una red neuronal en un PC 386 con una tarjeta aceleradora especial, similar a la red animada mostrada anteriormente, que reconoce caracteres de cualquier estilo, incluidos los muy extraños.
  • [52:51] Esto era novedoso en aquel momento porque el reconocimiento de patrones seguía el modelo de extraer características y luego entrenar un clasificador encima, mientras que este sistema aprendía toda la tarea de extremo a extremo a partir de los datos.
  • [53:08] Las primeras capas actuaban como extractor de características pero se entrenaban a partir de datos; se eligió el reconocimiento de caracteres porque este y el reconocimiento de voz eran las únicas tareas con suficientes datos, y los experimentos de voz solo tuvieron un éxito parcial.

Redes convolucionales para segmentación y reconocimiento simultáneos

  • [53:29] La naturaleza convolucional de las redes les permitía reconocer grupos de caracteres a la vez, no solo caracteres individuales, al aplicarse a una imagen grande y activarse siempre que aparece una forma reconocible en su campo de visión.
  • [54:02] Una red convolucional con una pequeña ventana de entrada se desliza sobre toda la imagen, y cada vez que se activa ha detectado el objeto que fue entrenada para detectar.
  • [54:15] El sistema realiza segmentación y reconocimiento simultáneos, a diferencia de los programas anteriores de reconocimiento de patrones que separaban explícitamente los objetos del fondo y entre sí antes de enviar cada carácter a un reconocedor.

Detección por ventana deslizante para rostros y peatones

  • [54:42] El mismo enfoque se aplica a imágenes naturales como la detección de rostros y peatones: entrenar una red convolucional con varios miles de ejemplos para distinguir imágenes con y sin rostro, y luego deslizar la ventana sobre la imagen.
  • [55:02] Como un rostro puede ser más grande que la ventana, la imagen se submuestrea para hacerla más pequeña y la red se desliza de nuevo repetidamente, lo que permite detectar rostros independientemente de su tamaño.

Detección convolucional de obstáculos para la navegación de robots

  • [55:19] Antes de que el aprendizaje profundo se popularizara, las redes convolucionales se aplicaban a imágenes de cámara de un robot en movimiento para clasificar cada pequeña ventana, de unos 40x40 píxeles o menos, según si su píxel central está en el suelo o en un obstáculo.
  • [55:48] El suelo se marca en verde y los obstáculos en rojo o púrpura, y esto se mapea en un mapa cenital utilizado para planificar una ruta hacia un objetivo y navegar.
  • [56:09] Se muestra a los antiguos estudiantes de doctorado Raia Hadsell y Pierre Sermanet probando el robot; Sermanet es científico investigador en Google Brain en California trabajando en robótica, y Hadsell es directora de investigación en robótica.

Segmentación semántica y la adopción por Mobileye

Segmentación semántica de ventana deslizante

  • [56:45] La segmentación semántica puede usar un enfoque de ventana deslizante en el que una red convolucional clasifica el píxel central usando la ventana como contexto.
  • [56:58] A diferencia de la detección de obstáculos, esta red está entrenada para clasificar unas 30 categorías, como carreteras, personas, plantas y árboles.
  • [57:18] El sistema encuentra incorrectamente desierto en medio de Washington Square Park, por lo que no es perfecto, aunque en su momento era el estado del arte para esta tarea.

Evangelizando el aprendizaje profundo alrededor de 2010

  • [57:36] Alrededor de 2010, antes de la revolución del aprendizaje profundo, el ponente dio charlas para evangelizar a la gente sobre el aprendizaje profundo.
  • [57:48] Un profesor teórico de Israel asistió a una de estas charlas y quedó fascinado por las posibles aplicaciones.

El cambio de Mobileye a las redes convolucionales

  • [58:03] El profesor estaba a punto de tomar un año sabático en Mobileye, entonces una startup israelí de conducción autónoma.
  • [58:15] Instó a Mobileye a probar las redes convolucionales, pero los ingenieros rechazaron la idea en favor de su propio método.
  • [58:26] Lo implementó él mismo y superó todos sus benchmarks, tras lo cual toda la empresa se pasó a las redes convolucionales.

Primer sistema de visión para automóviles

  • [58:36] Mobileye fue la primera empresa en producir un sistema de visión para automóviles capaz de mantener un coche en un carril de autopista y frenar ante un peatón o ciclista que cruza.
  • [58:54] Ese sistema usaba una segmentación semántica muy similar a la mostrada para el robot.
  • [58:59] El profesor era Shai Shalev-Schwartz.

Hardware de redes neuronales y el renacimiento del aprendizaje profundo

Trabajo en chips de redes neuronales en Bell Labs en los años 80

  • [59:08] En los años 80 había un gran interés en hardware especializado capaz de ejecutar redes neuronales muy rápido.
  • [59:16] Varias personas del grupo del ponente en Bell Labs, Nueva Jersey, implementaron varios chips de redes neuronales, y el ponente participó en algunos de ellos.
  • [59:28] El interés por las redes neuronales murió a mediados de la década de 1990, por lo que el trabajo en ese tipo de hardware se detuvo hasta hace unos años.

Esfuerzo coordinado con Bengio y Hinton

  • [59:08] A principios de los 2000, el ponente, Yoshua Bengio y Geoff Hinton sabían que el aprendizaje profundo funcionaba bien y que la comunidad se equivocaba al descartar las redes neuronales y el aprendizaje profundo.
  • [59:08] El término aprendizaje profundo aún no se había usado y se inventó unos años después; alrededor de 2003 o 2004 el grupo comenzó lo que el ponente llama una conspiración.
  • [59:08] Se propusieron batir récords en conjuntos de datos, inventar algoritmos para entrenar redes neuronales muy grandes y recopilar conjuntos de datos muy grandes para mostrar al mundo que estos métodos realmente funcionan, ya que nadie lo creía realmente.

Aceleradores de redes neuronales como el tema candente de chips hoy en día

  • [59:39] Los aceleradores de redes neuronales son ahora el tema más candente en el diseño de chips en la industria de semiconductores.
  • [59:52] En conferencias de arquitectura de computadoras y circuitos de estado sólido como ISSCC, aproximadamente la mitad de las ponencias tratan sobre aceleradores de redes neuronales.
  • [1:00:03] El ponente ha trabajado en algunos aceleradores de redes neuronales.

Avances a partir de 2010

  • [1:00:09] Alrededor de 2010, 2013 y 2015 se produjeron avances en reconocimiento de voz, reconocimiento de imágenes y procesamiento de lenguaje natural, y continúan en otros temas.
  • [1:00:23] El ponente señala con pesar que este avance no ocurrió en su propio laboratorio sino con amigos.

AlexNet y el avance del aprendizaje profundo en visión por computadora

Redes convolucionales basadas en GPU y la configuración de ImageNet

  • [1:01:18] Alex Krizhevsky, estudiante de Geoff Hinton, dedicó mucho tiempo a implementar redes convolucionales en GPU, que en esa época estaban alcanzando alto rendimiento.
  • [1:01:36] Esto les permitió entrenar redes convolucionales mucho más grandes que cualquier otra persona antes.
  • [1:01:48] Entrenaron con el conjunto de datos ImageNet de fotos naturales, donde el sistema debe reconocer el objeto principal entre 1000 categorías, con 1,3 millones de muestras de entrenamiento.
  • [1:02:09] Construyeron una red convolucional muy grande y muy profunda basada en gran medida en el mismo modelo que antes, la ejecutaron en GPU durante un par de semanas y superaron a los mejores sistemas competidores por un amplio margen.

Progresión de la tasa de error de ImageNet y el momento decisivo

  • [1:02:27] En la medida de error top-5, el error de ImageNet en 2010 fue de aproximadamente 28 % y en 2011 de 25,8 %, con el sistema de 2011 muy grande y solo su última capa entrenada.
  • [1:03:04] El equipo de Hinton redujo el error al 16,4 %, un momento decisivo para la comunidad de visión por computadora.
  • [1:03:18] La comunidad pasó de rechazar casi todos los artículos con redes neuronales en 2011-2012 a rechazar artículos sin una red convolucional en 2016.

Inflación de capas en arquitecturas sucesivas

  • [1:03:50] A medida que las tasas de error cayeron rápidamente gracias a trucos arquitectónicos, el número de capas se infló: las redes convolucionales de la década de 1990 tenían alrededor de 7 capas.
  • [1:04:03] AlexNet tenía alrededor de 12 capas, VGG al año siguiente tenía 19, y el número de GoogLeNet es difícil de determinar.
  • [1:04:18] El actual backbone estándar para el reconocimiento de objetos, ResNet-50, tiene 50 capas, mientras que algunas redes tienen alrededor de 100 capas.

Precisión de ImageNet frente a compensaciones de cómputo y memoria

Ejes del gráfico de comparación de redes

  • [1:04:35] Cada burbuja del gráfico representa una arquitectura de red concreta.
  • [1:04:41] El eje x muestra el número de miles de millones de operaciones necesarias para calcular la salida.
  • [1:04:50] El eje y es la precisión top-one en ImageNet, una medida de rendimiento distinta de la mostrada anteriormente.
  • [1:05:01] El tamaño de cada burbuja representa la ocupación de memoria, medida en millones de números en coma flotante necesarios para almacenar los valores de los pesos.

Incentivos de compresión y optimización

  • [1:04:57] Los mejores sistemas se sitúan hoy alrededor de 84 en esta medida de precisión.
  • [1:05:12] La gente comprime estas redes, por ejemplo cuantizándolas, y equipos enteros en Google, Facebook y otros lugares trabajan únicamente en optimizarlas y comprimirlas para que puedan ejecutarse rápido.
  • [1:05:37] Facebook, por ejemplo, ejecuta una red convolucional en sus servidores decenas de miles de millones de veces al día, lo que crea un enorme incentivo para optimizar el cálculo requerido.

La composicionalidad como base del aprendizaje profundo

Jerarquía composicional en los datos naturales

  • [1:06:01] Las redes convolucionales tienen éxito porque explotan la composicionalidad, una propiedad de los datos naturales.
  • [1:06:16] Una escena se compone de objetos, los objetos de partes, las partes de subpartes, las subpartes de motivos, y los motivos de contornos, bordes o texturas, que son combinaciones de píxeles.
  • [1:06:40] En esta jerarquía composicional, combinaciones concretas de objetos en una capa forman objetos en la capa siguiente.

Imitar la jerarquía en la arquitectura de red

  • [1:06:48] El aprendizaje profundo imita la jerarquía composicional en la arquitectura de red y le permite aprender las combinaciones adecuadas de características en una capa que forman las características de la capa siguiente.
  • [1:07:06] El aprendizaje profundo consiste en aprender a representar el mundo y explotar su estructura, es decir, la organización que existe porque el mundo es composicional.

La versión de Stuart Geman de la cita de Einstein

  • [1:07:19] Stuart Geman, de la Universidad de Brown, jugó con la cita de Einstein de que lo más incomprensible del mundo es que sea comprensible.
  • [1:07:35] El punto de Einstein es que el mundo podría ser tan complicado que no tuviéramos forma de entenderlo, así que parece una conspiración que podamos comprender al menos una parte.
  • [1:07:47] La versión de Geman es que el mundo es composicional, o que hay un Dios, ya que se necesitarían cosas sobrenaturales para entenderlo si el mundo no fuera composicional.

Progreso del aprendizaje profundo en visión por computador

Capacidades de visión por computadora habilitadas por el aprendizaje profundo

  • [1:08:06] El aprendizaje profundo ha impulsado un progreso notable en la visión por computadora, desde una detección de personas poco fiable hasta máscaras precisas por objeto, estimación de pose y funcionamiento en tiempo real en plataformas móviles.
  • [1:08:25] La mayor parte de este progreso se basa en dos familias básicas de arquitecturas.

Dos familias de arquitecturas dominantes

  • [1:08:34] Una familia son las arquitecturas de detección/reconocimiento de objetos de una sola pasada, como RetinaNet y la red de pirámides de características, o U-Net.
  • [1:08:43] La otra familia es Mark-RCNN; ambas familias se originaron con personas que ahora están en Facebook, a veces antes de unirse.
  • [1:08:59] Estas arquitecturas funcionan bien, detectando objetos parcialmente ocluidos y dibujando una máscara para cada objeto.

Predicción de máscaras de imagen a imagen

  • [1:09:05] El modelo es una red neuronal convolucional cuya entrada es una imagen y cuya salida también es un conjunto de imágenes, una por categoría.
  • [1:09:13] Para cada categoría, genera la máscara del objeto perteneciente a esa categoría.

Segmentación de instancias de objetos individuales

  • [1:09:23] Estos modelos pueden realizar segmentación de instancias: dado un grupo de ovejas, distinguen y seleccionan ovejas individuales en lugar de solo etiquetar una región como oveja.
  • [1:09:31] El modelo puede contar las ovejas, lo que, según bromea el ponente, es lo que uno hace para dormirse.

Cultura de investigación abierta en el aprendizaje profundo

  • [1:09:50] Gran parte de la comunidad de aprendizaje profundo ha adoptado la investigación abierta.
  • [1:10:01] El trabajo discutido en clase no solo se publica, sino que se publica con código y, a menudo, con modelos preentrenados que se pueden descargar y ejecutar.
  • [1:10:13] Todo es de código abierto y de uso gratuito, lo cual es realmente novedoso, ya que las personas, particularmente en la industria e incluso en el ámbito académico, no solían distribuir su código de esta manera.

Redes convolucionales en la conducción autónoma

El despliegue temprano de redes convolucionales de Mobileye

  • [1:10:38] Mobileye fue uno de los primeros usuarios de redes convolucionales para la conducción autónoma, como se muestra en un vídeo de Mobileye.
  • [1:10:47] En 2015, Mobileye había logrado integrar una red convolucional en un chip que había diseñado para otro propósito.
  • [1:10:52] Mobileye licenció la tecnología a Tesla, cuyos primeros Tesla con asistencia a la conducción podían mantenerse en el carril en autopista y cambiar de carril usando este sistema de Mobileye.
  • [1:11:05] La red convolucional se ejecuta en un pequeño chip situado detrás del espejo retrovisor que mira por la ventana.

Amplio despliegue y posición en el mercado

  • [1:11:18] En los cuatro o cinco años transcurridos desde entonces, esta tecnología se ha desplegado de forma muy amplia por muchas empresas diferentes.
  • [1:11:26] Mobileye fue comprada por Intel y posee alrededor del 70 u 80 por ciento del mercado de esos sistemas de visión.
  • [1:11:35] Muchas empresas y fabricantes de automóviles usan estos sistemas.

Frenado de emergencia obligatorio en Europa

  • [1:11:41] En algunos países europeos, todos los coches que salen al mercado, incluso los de gama baja, tienen sistemas de visión basados en redes convolucionales para el frenado de emergencia avanzado o automatizado (AEBS).
  • [1:11:58] AEBS está desplegado en todos los coches de Francia, por ejemplo, y reduce las colisiones en un 40%.
  • [1:12:04] Todavía no lo tienen todos los coches en las carreteras porque la gente conserva sus coches durante mucho tiempo, pero esto significa que salva vidas.

Aplicaciones del aprendizaje profundo en imágenes médicas

Redes convolucionales 3D para el análisis de MRI

  • [1:12:21] Las imágenes médicas son otra categoría principal de aplicaciones del aprendizaje profundo y se describen como probablemente el tema más candente en radiología hoy en día.
  • [1:12:34] Una diapositiva de un artículo de colegas de NYU muestra el análisis de imágenes de MRI usando IA, es decir, redes convolucionales.
  • [1:12:41] Una ventaja clave de las redes convolucionales es que no necesitan mirar una pantalla para examinar una MRI.
  • [1:12:53] No tienen que dividir una MRI en imágenes 2D y, en su lugar, pueden examinar todo el volumen 3D.
  • [1:13:01] Una red convolucional 3D examina todo el volumen de la MRI y usa una técnica similar a la segmentación semántica para activar la imagen de salida allí donde está presente una estructura como un fémur.
  • [1:13:25] Este enfoque funciona mejor en 3D que en cortes 2D.

Detección de tumores en mamografías y otros proyectos

  • [1:13:31] La red puede activarse cuando detecta un tumor maligno en mamografías, que son 2D en lugar de 3D.
  • [1:13:37] También están en marcha varios otros proyectos de imágenes médicas.

Aplicaciones en ciencia y física

  • [1:13:47] Hay muchas aplicaciones en ciencia y física, bioinformática y otras áreas, que el ponente dice que se retomarán más adelante.

Misterios del aprendizaje profundo

Falta de una teoría completa

  • [1:14:00] El aprendizaje profundo aún contiene misterios: la gente tiene cierta comprensión, pero no existe una teoría elegante que lo abarque todo, incluido por qué estos métodos funcionan tan bien.

Por qué se necesitan más de dos capas

  • [1:14:16] Los teóricos argumentaron hace mucho que cualquier función puede aproximarse con solo dos capas, por lo que cuestionaban por qué se necesitarían más capas.

Qué hace especiales a las redes convolucionales

  • [1:14:29] Las redes convolucionales aprovechan la composicionalidad de las imágenes naturales y otras señales naturales como el habla, aunque el ponente admite que esta explicación parece un poco forzada.

Entrenamiento a pesar de objetivos no convexos

  • [1:14:45] Sigue sin estar claro cómo el entrenamiento tiene éxito aunque el objetivo minimizado es muy no convexo y puede tener muchos mínimos locales.
  • [1:14:52] Los críticos que nunca habían experimentado con redes neuronales objetaban que no hay garantía de que el algoritmo converja, lo que hace que el enfoque dé demasiado miedo para usarlo.

Sobreparametrización frente al consejo estadístico

  • [1:15:10] El entrenamiento de redes neuronales parece romper la regla de los libros de estadística de que con n puntos de datos no se debe tener más de n parámetros, o se producirá un sobreajuste grave.
  • [1:15:41] Las redes neuronales se entrenan y despliegan habitualmente en producción con cientos de millones de parámetros, muchos más que el número de muestras de entrenamiento, y aun así funciona.

Capacidades y límites actuales del aprendizaje profundo

Aplicaciones prácticas del aprendizaje profundo hoy

  • [1:15:59] El aprendizaje profundo hoy permite coches más seguros, mejores sistemas de análisis de imágenes médicas y traducción de idiomas que está lejos de ser perfecta pero es útil.
  • [1:16:13] Las aplicaciones actuales también incluyen lo que el ponente llama chatbots tontos y una muy buena búsqueda, recuperación y filtrado de información.
  • [1:16:19] Google y Facebook están completamente construidos en torno al aprendizaje profundo y se desmoronarían sin él.
  • [1:16:28] El aprendizaje profundo también tiene muchas aplicaciones en la gestión y producción de energía, la manufactura y la protección del medio ambiente.

Lo que aún les falta a las máquinas inteligentes

  • [1:16:34] Todavía no tenemos máquinas realmente inteligentes ni máquinas con sentido común.
  • [1:16:39] También nos faltan asistentes personales inteligentes, chatbots inteligentes y robots domésticos.
  • [1:16:45] Hay muchas cosas que no sabemos hacer, por eso la investigación continúa.

Aprendizaje profundo y representaciones aprendidas

Qué es una representación

  • [1:16:51] El aprendizaje profundo consiste fundamentalmente en aprender representaciones.
  • [1:17:09] Una representación convierte los datos brutos en una forma útil, idealmente útil de manera general independientemente de la tarea, aunque esa noción no es del todo clara.
  • [1:17:28] Como mínimo, la representación debe ser útil para la tarea que se prevé.

Proyecciones aleatorias y el Perceptrón

  • [1:17:44] A lo largo de las décadas ha habido muchas ideas para el preprocesamiento general de datos naturales con el fin de producir buenas representaciones, como el recuento del espacio y la proyección aleatoria.
  • [1:18:06] La proyección aleatoria reaparece aproximadamente cada cinco años y hay que descartarla cada vez.
  • [1:18:15] La primera capa de un Perceptrón es una capa de proyecciones aleatorias.
  • [1:18:21] Una proyección aleatoria es una matriz aleatoria con una dimensión de salida menor que la dimensión de entrada, seguida de alguna no linealidad, como una red neuronal de una sola capa con pesos aleatorios.

Máquinas de aprendizaje extremo

  • [1:18:43] Periódicamente la gente redescubre las proyecciones aleatorias y afirma que son geniales porque no se necesita entrenamiento multicapa.
  • [1:18:50] La idea comenzó con el Perceptrón y regresó en los años 60, en los años 80 y de nuevo ahora.
  • [1:18:59] Una comunidad, principalmente en Asia, llama a las redes neuronales de dos capas con una primera capa aleatoria "máquinas de aprendizaje extremo", lo que al ponente le parece ridículo, pero señala que existen.

Jerarquía del aprendizaje profundo y críticas

Jerarquía composicional entre modalidades

  • [1:19:27] El mundo es composicional: en visión, la información va de píxeles a bordes, a textones, motivos, partes y objetos.
  • [1:19:30] El texto sigue una jerarquía similar, de caracteres a palabras, grupos de palabras, cláusulas, oraciones e historias.
  • [1:19:38] El habla también tiene una jerarquía, desde muestras individuales pasando por bandas espectrales, sonidos, fonos, fonemas y palabras.

Desestimaciones recurrentes del aprendizaje profundo

  • [1:19:52] Se han hecho muchos intentos de descartar toda la idea del aprendizaje profundo, y estos argumentos se han escuchado durante décadas, principalmente de teóricos.
  • [1:20:01] Es probable que estos descartes regresen en cinco años cuando la gente diga que el aprendizaje profundo es una porquería.
  • [1:20:10] Un descarte recurrente pregunta por qué no usar máquinas de vectores de soporte en su lugar.

Máquinas de kernel y redes de dos capas

Las máquinas de vectores de soporte como redes de primera capa fija

  • [1:20:55] Una máquina de vectores de soporte puede verse como una red neuronal de dos capas, aunque a la gente no le gusta formularla así.
  • [1:21:06] En la primera capa, cada unidad compara el vector de entrada X con una de las muestras de entrenamiento X^i usando una función K.
  • [1:21:26] Una K típica toma el producto punto de X y X^i y lo pasa por una exponencial de menos el cuadrado, dando una respuesta gaussiana como función de la distancia.
  • [1:21:54] Las puntuaciones de K se combinan en una suma ponderada, y los parámetros aprendidos son los pesos, los alphas.
  • [1:21:59] La segunda capa es entrenable y la primera capa es fija, aunque la primera capa puede verse como entrenada sin supervisión porque usa solo las X, no las Y.

Comparación de plantillas glorificada y su costo

  • [1:22:14] La primera capa usa los datos de la manera más simple imaginable: almacena cada X y usa cada una como peso de una neurona.
  • [1:22:44] El método es básicamente una comparación de plantillas glorificada porque compara el vector de entrada con todas las muestras de entrenamiento.
  • [1:22:54] No funciona bien para visión por computadora con imágenes sin procesar: con un millón de imágenes de ImageNet, cada imagen debe compararse con un millón de imágenes, lo cual es muy costoso.
  • [1:23:19] La comparación en sí esencialmente resuelve el problema, mientras que la suma ponderada final es realmente la cereza del pastel.

Aproximación universal y la objeción del teórico

  • [1:23:29] Los teoremas muestran que cualquier función puede aproximarse tanto como se desee ajustando la función K y los alphas.
  • [1:23:39] Un teórico podría por lo tanto preguntar por qué se necesita el aprendizaje profundo cuando una máquina de kernel puede aproximar cualquier función.
  • [1:23:50] Sin embargo, el número de términos en la suma puede ser muy grande y nadie especifica qué función kernel usar, así que esto no resuelve el problema.

Redes neuronales de dos capas y el costo de la profundidad

  • [1:24:01] En una red neuronal de dos capas, la primera capa aplica una no linealidad F al producto de una matriz W^0 y el vector de entrada, y la segunda capa multiplica por una segunda matriz y pasa el resultado por otra no linealidad.
  • [1:24:16] Bajo algunas condiciones, tal composición de dos operaciones lineales y no lineales puede aproximar cualquier función dado un vector intermedio suficientemente grande.
  • [1:24:31] Si la dimensión que sale de la primera capa es suficientemente alta —potencialmente infinita— cualquier función puede aproximarse tanto como se desee haciendo que esta capa tienda a infinito.
  • [1:24:43] Los teóricos pueden preguntar por qué se necesitan capas, ya que dos capas pueden aproximar cualquier cosa, pero el contraargumento es que hacerlo en dos capas podría ser muy, muy costoso.

Circuitos lógicos y funciones booleanas de dos capas

  • [1:25:09] En el diseño de circuitos lógicos, todo se puede hacer solo con compuertas NAND.
  • [1:25:25] Cualquier función booleana se puede escribir como un conjunto de AND seguidos de un OR encima, lo que se denomina forma normal disyuntiva (DNF).
  • [1:25:36] Por lo tanto, cualquier función booleana se puede escribir en dos capas.

Compensaciones entre profundidad y tamaño del circuito

Ancho exponencial de los circuitos poco profundos

  • [1:25:40] Para la mayoría de las funciones, el número de términos necesarios en la capa intermedia es exponencial en el tamaño de la entrada.
  • [1:25:48] Para la paridad sobre N bits de entrada, un circuito de dos capas necesita esencialmente un número exponencial de compuertas.
  • [1:26:12] Permitir log(N) capas, donde N es el número de bits de entrada, reduce la complejidad a lineal.

Analogía con un programa de dos pasos

  • [1:26:28] Un circuito de dos capas es como un programa restringido a dos pasos secuenciales, con la mayoría de las instrucciones ejecutándose en paralelo.
  • [1:26:54] Las instrucciones disponibles son operaciones simples como combinaciones lineales y no linealidades, no subprogramas completos.
  • [1:27:10] Para la mayoría de los problemas, el número de valores intermedios calculados en el primer paso es exponencial en el tamaño de la entrada, y solo un número muy pequeño de problemas evita un número exponencial de minitérminos.

Los pasos secuenciales intercambian velocidad por recursos

  • [1:27:25] Permitir múltiples pasos secuenciales puede hacer que un programa sea mucho más simple, pero se ejecuta más lentamente mientras usa mucha menos memoria y menos recursos.
  • [1:27:49] Un sumador binario secuencial simple suma cada par de bits y propaga el acarreo, tomando un tiempo proporcional al tamaño de los números.

Anticipación de acarreo y la compensación entre profundidad y área

  • [1:28:13] Los diseñadores de circuitos usan la anticipación de acarreo para precalcular el acarreo, de modo que la suma toma muchas menos de N etapas.
  • [1:28:21] La anticipación de acarreo tiene como costo un enorme aumento en la complejidad del circuito y el área que ocupa en el chip.
  • [1:28:35] Esto ilustra el conocido intercambio entre tiempo y espacio, o entre profundidad y tiempo.

Definición de profundidad en modelos de aprendizaje profundo

Criterios para llamar profundo a un modelo

  • [1:28:46] Una red neuronal de dos capas con una capa oculta no se considera "profunda", aunque técnicamente use retropropagación.
  • [1:28:52] Una red tan superficial no aprende realmente representaciones complejas.
  • [1:29:01] El aprendizaje profundo implica una idea de jerarquía, y las SVM definitivamente no son profundas.

Hipótesis de la variedad y representaciones de características

Las imágenes naturales como un pequeño subconjunto del espacio de píxeles

  • [1:29:20] La hipótesis de la variedad sostiene que los datos naturales viven sobre una superficie de baja dimensión dentro de un espacio ambiente de alta dimensión.
  • [1:29:32] Una imagen en color de 1000 x 1000 píxeles es un vector con 3 millones de componentes, pero solo un pequeño subconjunto de tales vectores corresponde a imágenes naturales.
  • [1:30:14] Hay muchas más formas de combinar píxeles aleatorios en imágenes sin sentido que en imágenes que parezcan naturales.

Dimensión de la variedad de imágenes de rostros

  • [1:30:43] Para un video largo de una persona haciendo muecas contra un fondo blanco sin que el cabello se mueva, el conjunto de todas las imágenes yace sobre una superficie de baja dimensión.
  • [1:33:31] El número de píxeles ocupados por la persona es una cota superior amplia de la dimensión de la superficie, ya que esos píxeles no toman todos los valores posibles.
  • [1:33:58] La dimensión está acotada por el número de músculos faciales que se mueven de forma independiente, unos 50 y menos de 100, excluyendo la lengua.
  • [1:34:14] La inclinación y la traslación de la cabeza añaden aproximadamente 6 grados de libertad, por lo que localmente la superficie tiene menos de 100 parámetros a pesar de ser altamente no lineal.

Extracción de características ideal y desenredo

  • [1:35:35] Un extractor de características ideal desenredaría los factores explicativos de variación en los datos observados.
  • [1:35:45] Cada factor independiente, como mover los músculos faciales, mover la cabeza o quitarse las gafas, es un factor de variación separado.

Aprendizaje de representaciones y desenredo de factores de variación

Objetivo de separar factores independientes de variación

  • [1:35:53] La iluminación es otro ejemplo de un factor variable que puede cambiar.
  • [1:36:00] Una representación ideal representaría individualmente cada uno de estos factores de variación.
  • [1:36:06] Un criterio para aprender buenas representaciones es encontrar factores explicativos independientes de variación en los datos.

Desafío no resuelto y objetivo final

  • [1:36:18] La conclusión es que nadie tiene idea de cómo hacer esto.
  • [1:36:23] Este sigue siendo el objetivo final del aprendizaje de representaciones.
  • [1:36:32] El ponente afirma que la charla está esencialmente llegando a su fin.

Límites de PCA para variedades faciales no lineales

PCA solo funciona para variedades lineales

  • [1:36:52] PCA puede encontrar los vectores relevantes solo si la variedad es lineal, es decir, si la superficie ocupada por todos los ejemplos o rostros es un plano.
  • [1:37:11] Bajo esa suposición lineal, PCA encontraría la dimensión de ese plano.
  • [1:37:18] En la práctica, la variedad no es lineal.

Variedades faciales cercanas pero distintas

  • [1:37:29] Las imágenes del ponente y de su hijo mayor, que se parece a él, poniendo la misma cara en la misma posición están relativamente cerca aunque no sean la misma persona.
  • [1:37:41] El rostro del ponente desplazado 20 píxeles está más lejos de su propio rostro que el rostro de su hijo.
  • [1:37:58] El rostro del ponente yace sobre una variedad complicada, y el de su hijo yace sobre una variedad ligeramente distinta que no se interseca con ella.
  • [1:38:06] Las dos variedades están más cerca entre sí que dos muestras cualesquiera dentro de cualquiera de las variedades, así que PCA básicamente no te dirá nada.

La rotación de la cabeza como una variedad circular

  • [1:38:20] Una segunda razón por la que la superficie no es un plano es la variedad unidimensional del ponente girando la cabeza 360 grados completos.
  • [1:38:38] Esa variedad es topológicamente idéntica a un círculo, por lo que no es plana y no se puede alinear, y PCA no la encontrará.

Lee los subtítulos disponibles con marcas de tiempo o transcribe podcasts, clases y audio o vídeo local. Extractor gratuito de subtítulos de YouTube.

[0:00] OK, so first of all, I have a terrible confession to make. This class is actually being run not by me, but by these two guys: Alfredo Canziani and Mark Goldstein, whose names are here [points to slide]. They are the TA'S and you'll talk to them much more often than you'll talk to me. That's the first thing. The other confession I have to make is that if you have questions about this class, don't ask them at the end of this course because I have to run right after the class to catch an airplane. But that can wait until next week. OK, so let's start right in.

[0:35] Some very basic course information. There is a website as you can see. I will do what I can to post the PDF of the slides on the website. Probably just before the lecture, probably just a few minutes before the lecture, usually. But, but it should be there by the time you get to class, or at least by the time I get to class. There's going to be nine lectures that I'm going to teach, on Monday evenings. There is also a practical session every Tuesday night that further on Mark will be running. So, they'll go through some of the, you know, practical questions. Some, you know, refreshers on sort of math, you know mathematics that are necessary for this, and basic concepts. Some tutorials on how to use PyTorch and various other software tools.

[1:24] And there's going to be three guest lectures. The names of the guest lectures are not finalized. But it's gonna be on topics like natural language processing, computer vision, self-supervised learning, things like that. There's going to be a midterm exam, or at least we think there is. And it's going to take one of those sessions, you know, around March. And the evaluation will be done on the midterm and on a final project.

[1:58] And, you can sort of, you know, band in groups of two. Did we say two or three, or just two? We didn't decide yet, we'll see. The project will probably have to do with a combination of self-supervised learning and autonomous driving. We are discussing with various people for data and things like that. Okay, let me talk a little bit about, so this first lecture is really going to be sort of a broad introduction about what deep running is really, and what it can do and what it cannot do.

[2:33] So it will serve as an introduction to the entire thing. So, we'll go through the entire arc, if you want, of the class but in, sort of, very superficial terms so that you get, sort of, broad high-level idea of all the topics we're talking about. And whenever I'll talk about a particular topic you'll see where it fits in this kind of whole picture. But before that... So, there is a prerequisite for the class which is, you know: You need to be kind of familiar with machine learning or at least basic concepts in machine learning.

[3:04] Who here has played with PyTorch, TensorFlow, has trained a neural net? OK. Who has not done that? Don't be shy, OK. OK? So the majority has. Which is good. But I'm not going to assume that you know everything about this. Particularly, I am not going to assume that you know a lot of the, you know, sort of deep underlying techniques. OK, so here is the course plan and depending on what you tell me I can adjust this and sort of, you know, go faster on certain sections that you think are too obvious because you've played with this before, or other things.

[3:52] So intro to Supervised Learning, Neural Nets, Deep Learning. That's what I'm going to talk about today. What deep learning can do, what it cannot do, what are good features. Deep learning is about learning representations. That's what I'm going to talk about. Next week will be about back propagation and basic architectural components. So things like the fact that you build neural nets out of modules that you connect with each other. Then you compute gradients you get automatic differentiations. And then these various types of architectures, loss functions, activation functions — you know different modules. Tricks like weight sharing and weight tying, multiplicative interactions, attention gating — things like this, right.

[4:33] And then particular macro architectures, like mixture of experts, Siamese net, hyper networks, etc. So we'll dive pretty quickly in and that's appropriate if you've already played with some of those things. Then there will be either one or two lectures – I haven't completely decided yet — about convolutional nets and their applications. One of them might end up being a guest lecture. Then, more specifically, about deep learning architectures that are useful in special cases.

[5:06] So things like recurrent neural nets with back propagation through time, which is the way you train recurrent neural nets. And ... ... and sort of ... ... applications of ... recurrent neural nets to things like control and, you know, producing time series and stuff like that. Then things like combine recurrence and gating and multiplicative interactions like gated recurrent units and LSTM. And then things that really use multiplicative interactions as kind of really a basis of their architecture like memory networks, transformers, adapters, etc., which are sort of very recent architectures that have become extremely popular and in things like NLP and other other areas. And then a little bit about graph neural nets, which I'm not going to talk about this a lot because there is another course that you can take by Joan Bruna where he spends a lot of time on graph neural nets.

[6:06] Then... then we'll talk about how we get those deep learning systems to work. And, so, various tricks to get them to work. Sort of understanding the type of optimization that takes place in neural nets. So... ...the type of... you know, we... we use, of course — learning is always about, almost always about, optimization. And deep learning is almost always about gradient-based optimization. And there are certain rules about optimization in the convex case that are well understood.

[6:40] But they're not well understood when the training is stochastic, which is the case for most deep learning systems. And they're not very well understood. also in deep learning, because the the cost function is not. ... is not convex. It has local minima, and saddle points, and things like this. So it's important to understand the geometry of the objective function. I say it's important to understand but, the the big secret here is that nobody actually understands. So ... it's important to understand that nobody understands. Okay? But there are a few tricks that have. come up through a combination of intuition and a little bit of theoretical analysis and, empirical search. Things like initialization tricks, normalization tricks, and regularization tricks like drop out.

[7:29] (Grading clipping is more for optimization.) Things like momentum, average HDD, the various methods for parallelizing HDD. Many of which do not work. And then something a little exotic called target prop and the Lagrangian formulation of back prop. Then I'll switch to my favorite topic, which is energy-based models. So this is sort of a general formulation of a lot of different, sort of, approaches to learning — whether they are supervised, unsupervised, self-supervised. And whether they involve things like inference.

[8:04] Like, you know, searching for the value of variables that nobody tells you the value of, but that your process your system is supposed to infer. So that could be thought of as sort of a way of implementing reasoning with neural nets. So you could think of reasoning in neural nets as a process by which you have some energy function that's being optimized with respect to some variables. And the value you get as a result of this optimization is the value of those variables you were trying to find. And so, there is sort of the the common view that a neural net is just a function that computes its output as a function of its input. So you just run through the neural net, you get an output.

[8:43] But that's a fairly restrictive form of inference in the sense that you can only produce one output for a given input. But very often there are multiple possible answers to a given input. And so, how do you, kind of, represent problems of this type where there are multiple answers, multiple possible answers, to a given input? And one answer to this is: You make those answers the minima of some energy function, and your inference algorithm is going to find values of those variables that minimize this objective function. And there might be multiple minima. So that means your model might produce multiple outputs for a given input. Okay?

[9:21] So, energy-based models, it's kind of a way of doing this. A special case of those energy-based models are probabilistic models: like, you know Bayesian methods, graphical model, Bayesian nets and things like this. Energy methods are a little more general. So a little less specific. So special cases of this include things like what people used to call structure prediction. And then there is a lot of applications of this in what's called self-supervised learning. And that will be the topic of the next couple lectures. So self-supervised learning is a very very active topic of research today.

[9:57] And probably something that's going to become really dominant in the future. It's already ... ... in the space of a year, it's become dominant in natural language processing. And, in the last few months, just three months there's been a few papers that show that self-supervised learning methods actually. work really well in things like computer vision as well. And so my guess, my guess is that ... self-supervised learning is going to take over the world. in the next few years. So, I think it's useful to hear about it in this class. The things like —. I'm not going to go through a laundry list of this — but there are. things that you may have heard of: like variational auto-encoders, de-noising auto-encoders, BERT, which is, you know, those transformer architectures that are trained for natural language processing. They are trained with self-supervised learning and they are a special case of a de-noising auto-encoder.

[10:45] So a lot of those things you may have heard of without realizing they were all, kind of —. it can be all understood in the context of this sort of energy-based approach. And that includes also generatative adversarial networks (GANs), which I'm sure many of you have heard of. And then there is self-supervised learning and beyond. So, you know, how do we get machines to really kind of become really intelligent? They're not superintelligent. They're not very intelligent right now. They can solve very narrow problems very well, sometimes with superhuman performance. But no machine has any kind of common sense. And, the most intelligent machines that we have probably have less common sense than a house cat. So, how do we get to cat-level intelligence first, and then maybe human-level intelligence?

[11:29] And, I don't pretend to have the answer, but I have, you know —. a few ideas that are interesting to discuss in the context of self-supervised learning, there. I've had some applications. Any questions? So that's the plan of the course. Okay. it might change, dynamically. But, at least, that's the intent. Any questions? ...Okay... [Student Question: Will we also be having assignments in the course?] Yeah, yeah, there are assignments.

[12:00] [...Inaudible...] Okay, so for those of you who didn't hear Alfredo, because he didn't speak very loudly: The final project is actually going to be a competition between the teams. So there is going to be a leaderboard and everything. And, in preparation for this, the assignments will be basically, practice to get familiar with all the techniques that you would need for deep learning in general, but for the final project in particular.

[12:46] [Also for the midterm.] Right, also for midterm, obviously. Okay, so most of you probably know that — and this is gonna probably be boring for some of you who've already played with those things — but let's start from the basics. Deep learning is inspired by what people have observed about the brain, but the inspiration is just an inspiration. It's not, the attempt is not to copy the brain because there's a lot of details about the brain that are irrelevant, and that we don't know if they are relevant actually to human intelligence. So the inspiration is at kind of the conceptual level.

[13:18] And, it's a little bit the same as, you know, airplanes being inspired by birds. But the underlying principles of flight for birds and airplanes are essentially the same, but the details are extremely different. They both have wings. They both generate lift by propelling themselves through air, but, you know, airplanes don't have feathers and don't flap their wings. So it's a bit of the same idea. And the history of this goes back to a field that has kind of almost disappeared, or, at least changed names now, called Cybernetics. If you want a specialist about the history of cybernetics, he is sitting right there: Joe Lemelin. Can you raise your hand?

[13:57] So, Joe is actually philosopher. And he is interested in the — he actually has a seminar on, kind of, the history of AI. In the what department is this? [Joe: Media, Culture, and Communication.] Media, Culture, and Communication. So, not CS. He knows everything about, you know, the history of cybernetics. So it started in the 40's with two gentlemen: McCulloch and Pitts. Their picture is on the top right here. And they came up with the idea that, you know, people at the time were interested in logic, but neuroscience was a very sort of nascent field.

[14:32] And, they got the idea that if neurons are basically threshold units that are on or off, then by connecting neurons with each other, you can build Boolean circuits and you can basically do logical inference with neurons. So they say, you know: The brain is basically a logical inference machine because the neurons are binary. And this idea — So the idea was that a neuron computes a weighted sum of its inputs and then compares the weighted sum to a threshold. It turns on if it's above the threshold, turns off if it's below.

[15:05] Which is sort of simplified view of how real neurons work — a very, very simplified view. That model kind of stuck with the field for decades. Almost four decades. Actually, a full four decades. Then there was, you know, quasi-simultaneously Donald Hebb, who had the idea that neurons in the brain — it's an old idea that the brain learns by modifying the strength of the connections between the neurons that are called the synapses. And you had the idea of what's now called Hebbian learning, which is that if two neurons fire together, then the connection that links them increases. And if they don't fire together, maybe it decreases.

[15:50] That's not an idea for learning algorithm, but it's sort of a first idea, perhaps. And then cybernetics was proposed by this guy Norbert Wiener, who is here. [Bottom Right] This is the whole idea that by having systems that, kind of, have sensors and have actuators, you can have feedback loops and you can have, you know, self-regulating systems. And, what's the theory behind this? You know, we sort of take that for granted now. But the idea that you know, you have things, like kind of, for example: You know, you drive your car, right? You turn the wheel and there's a so-called PID controller that actually turns the wheel in proportion to how you turn the steering wheel.

[16:36] And it's a feedback mechanism that basically measures the position of the steering wheel, measures the position of the wheel of the car. And, then, if there is a difference between the two, kind of corrects the wheels of the car so that they match the orientation steering wheel. That's a feedback mechanism. That, the stability of this, and the rules about this basically all come initially from this work. That led to a gentleman by the name of Frank Rosenblatt to basically imagine learning algorithms that modified the weights of very simple neural nets. And what you see here at the bottom the two pictures here [Bottom Left]: This is Frank Rosenblatt, and this is the Perceptron. This was a physical analog computer. It was not a three-line Python program, which is what it is now.

[17:24] It was a gigantic machine with, you know, wires and optical sensors so you could show it pictures. It was very low resolution. And then it had — it had neurons that could compute a weighted sum, and the weights could be adapted. And the weights were potentiometers. The potentiometers had motors on them so they could rotate for the learning algorithm. So it was electro-mechanical. And what he's holding here in his hand is a module of eight weights with (you can count them), with those potentiometers, motorized potentiometers on them.

[18:02] Okay, so that was a little bit of history of where neural nets come from. Another interesting piece of history is that this whole idea of, sort of, trying to build intelligent machines by basically simulating networks of neurons was born in the 40's, kind of took off a little bit in the late-50's, and completely died in the 1960's, in the late-1960s when people realized that with the kind of learning algorithms and architectures that people were proposing at the time you couldn't do much. You know, you could do some basic, very simple pattern recognition, but you couldn't do much.

[18:36] So between 1969, roughly, and — or 1968 — and 1984, I would say, basically, nobody in the world was working on neural nets. except a few kind of isolated researchers mostly in Japan. Japan is its own, kind of, relatively isolated ecosystem for funding research. People don't listen to the same kind of ... ... fashions, if you want. And then the field took off again in 1985, roughly, with the emergence of backpropagation [backprop]. So backpropagation is an algorithm for training multi-layer neural nets, as many of you know.

[19:20] People were looking for something like this in the 60's and basically didn't find it. And the reason they didn't find it was because they had the wrong neurons. They were using McCulloch-Pitts neurons that are binary. The way to get backpropagation to work is to use an activation function that is continuous, differentiable, or at least, continuous. And people just didn't have ... you know, the idea of using continuous neurons. And so, they didn't think that you could train those systems with gradient descent, because things were not differentiable.

[19:56] Now there's another reason for this, which is that if you have a neural net with binary neurons, you never need to compute multiplications. You never need to multiply two numbers. You only need to add numbers, right. If your neuron is active, you just add the weight to the weighted sum. If it is inactive, you don't do anything. If you have continuous neurons, you need to multiply the activation of a neuron by a weight to get a contribution to the weighted sum. It turns out, before the 1980's, multiplying two numbers, particularly floating point numbers, on any sort of non-ridiculously expensive computer was extremely slow. And so there was an incentive to not use continuous neurons for that reason.

[20:34] So the reason why backprop didn't emerge earlier than the mid 80's is because that's when, you know, computers became fast enough to do floating point multiplications, pretty much. People didn't think of it this way, but that's, you know, kind of retrospectively, that's pretty much what happened. So, there was a wave of interest in neural nets between 1985 and 1995 — lasted about 10 years. In 1995, it died again. People in machine learning. basically abandoned the idea of using neural nets.

[21:05] (For reasons that I'm not gonna go into right now.) And that lasted until the late 2000's, early 2010. So, when around 2009/2010 people realized that you could use multi-layer neural nets, training with backprop, and get an improvement for speech recognition. It didn't start with ImageNet. It started with speech recognition, around 2010. And within 18 months of the first papers being published on this, every major player in speech recognition had deployed commercial speech recognition systems that use neural nets. So, if you had an Android phone and you were using any other speech recognition features in an Android phone around 2012 that used neural nets. That was probably the first really, really wide. deployment of, kind of, modern forms of deep learning, if you want.

[21:55] Then at the end of 2012 / early-2013, the same thing happened in computer vision, where the computer vision community realized. deep learning, convolutional nets in particular, work much better than whatever it is that they were using before, and started to switch to using commercial nets, and basically abandoned all previous techniques. So that created a second revolution, now in computer vision. And then three years later, around 2016 or so, the same thing happened in natural language processing — in language translation, and things like this: 2015/16.

[22:28] And, now we're going to see — it's not happened yet — but we're going to see the same revolution occur. in things like robotics, and control, and, you know, a whole bunch of application areas. But let me get to this: Okay. So, you all know what supervised learning is, I'm sure. And this is really what the vast majority — and not the vast majority — 90-some percent applications of deep learning use supervised learning as kind of the main thing. So supervised learning is the process by which you collect a bunch of pairs of inputs and outputs of examples of, let's say, images together with a category (if you want to do image recognition). Or a bunch of audio clips with their text transcription: a bunch of text in one language with the transcription in another language, etc.

[23:22] and you feed one example to the machine. It produces an output. If the output is correct. you don't do anything, or you don't do much. If the output is incorrect, then you tweak the parameters of the machine. (Think of it as a parametrized function of some kind.) And you tweak the parameters of that function in such a way that the output gets closer to the when you want. Okay. This is in non-technical terms what supervised learning is all about. Show a picture of a car, if the system doesn't say car, tweak the parameters. The parameters in the neural net are going to be the weights, you know, that compute weighted sums in those simulated neurons.

[24:03] tweak the knobs so that the output gets closer to the one you want. The trick in neural nets is: How do you figure out in which direction and by how much to tweak the knobs so that the output gets closer to the one you want? That's what gradient computation and backpropagation is about. But before we get to this, a little bit of history again. So there was a flurry of models, basic models for classification. You know, starting with the Perceptron, there was another competing model called the Adaline, which is on the top right here. They are based on the same kind of basic architectures: compute the weighted sum of inputs compared to a threshold. If it's above the threshold, turn on. if it's below the threshold, turn off.

[24:45] What you see, the Adaline here, the thing that Bernie Widrow is tweaking is actually a physical. analog computer again. So it's like the Perceptron, it was much less, you know, much smaller, in many ways. The reason I tell you about this is that the the Perception actually was a two layer neural net, a two layer neural net in which the second layer was trainable. with adaptive weights. But the first layer was fixed. In fact, most of the time with most experiments it was, It was determined randomly. You would, like, randomly connect. input pixels of an image to neurons that would, you know, be threshold neurons with random weights, essentially.

[25:27] This is what they called the associative layer. And that basically became the basis for the sort of conceptual design of a pattern recognition system for the next four decades. I want to say four decades. Yeah, pretty much. So, that model is one by which you take an input, you run it through a feature extractor that is supposed to extract the relevant characteristics of the input that will be useful for the task.

[26:01] So, you want to recognize a face? Can you detect an eye? How do you detect an eye? Well, there is probably a dark circle somewhere. Things like that, right? You want to recognize a car, you know. Well, they are kind of dark, round things, etc. So, the problem here — and so, what this feature extractor produces is a vector of features, which are things that may be numbers, or they may be on or off. Okay, so it's just a list of numbers, a vector. And you're going to feed that vector to trainable classifier. In the case of Perceptron or a simple neural net, it's gonna be just the system that computes a weighted sum, compares it to a threshold.

[26:41] The problem is that you have to engineer the feature extractor. So the entire literature of pattern recognition (statistical pattern recognition at least) and a lot of computer vision (at least the part of computer vision that's interested in recognition) was focused on this part: the feature extractor. How do you design a feature extractor for a particular problem? You want to do, I don't know, Hangul character recognition. What are the relevant features for recognizing Hangul? And how can you extract them using all kinds of algorithmic tricks? How do you pre-process the images? You know, how do you normalize their size? You know, things like that.

[27:16] How do you skeletonize them? How do you segment them from their background? So the entire literature was devoted to this [Feature Extractor], very very little was devoted to that [Trainable Classifier.]. And what deep learning brought to the table is this idea that instead of having this kind of two-stage process for pattern recognition, where one stage is built by hand, where the representation of the input is the result of, you know, some hand-engineered program, essentially.

[27:48] The idea of deep learning is that you learn the entire task end-to-end. Okay, so basically you build your pattern recognition system, or whatever it is that you want to do with it as a cascade or a sequence of modules. All of those modules have tunable parameters. All of them have some sort of nonlinearity in them. And then you stack them, you stack multiple layers of them, which is why it's called deep learning. So the only reason for the "deep" word in deep learning is the fact that there are multiple layers. There is nothing more to that.

[28:20] And then you train the entire thing end-to-end. So the complication here, of course, is the fact that the parameters that are in the first box: How do you know how to tune them so that the output does— you know, goes closer to the output you want? That's what backpropagation does for you. Okay, why do all those modules have to be nonlinear? It's because, if you have two successive modules, and they're both linear, you can collapse them into a single linear. Right, the product of two linear functions, or the composition of two linear functions is a linear function. Take a vector multiply by a matrix and then multiply it by a second matrix.

[28:59] It's as if you had pre-computed the product of those two matrices, and then multiplied the input vector by that composite matrix. So there's no point having multiple layers if those layers are linear. Okay, there's actually a point, but it's a minor point. So, since they have to be nonlinear, what is the simplest multi-layer architecture you can imagine that has arameters that you can tune — things like weights in the neural nets — and is non-linear?

[29:38] And you realize quickly that it has to look something like this: So ... Take an input. An input can be represented as a vector, right. An image is just a list of numbers. Think of it as a vector, ignore the fact that it's an image for now. Piece of audio, whatever it is that your sensors or your data set gives you, is a vector. Multiply this vector by a matrix. The coefficients in this matrix are the tunable parameters. And then take the resulting vector, right — when you multiply a matrix by a vector, you get a vector.

[30:15] Pass each component of this vector through a nonlinear function. And, if you want to have the simplest possible nonlinear function, use something like what's shown at the top here [ReLU(x) = max(x, 0)], which people in neural nets call the ReLU; people in engineering call this half wave rectification; people in math call this positive part. Whatever you want to call it, okay. So, apply this nonlinear function to every component of the vector that results from multiplying the input vector by the matrix.

[30:47] Okay. Now you get a new vector, which has lots of zeros in it, because whenever the weighted sum was less than zero, the output is zero, if you pass through the ReLU. And then repeat the process: Take that vector, multiply it by a weight matrix; pass the result through point wise non-linearity; take the result, pass it — multiplied by a matrix — pass the result through nonlinearities. That's a basic neural net, essentially. Okay now Why is that called a neural net at all? It's because when you take a vector and you multiply a vector by a matrix, to compute each component of the output, you actually compute a weighted sum of the components of the input, by a corresponding row in the matrix, right. So this little symbol here — there's a bunch of components of the vector, coming into this layer. And, you take a row of the matrix, compute a weighted sum of those values where the weights are the

[31:51] values in the row of that matrix, and that gives you a weighted sum. And you do this for every row that gives you the result, right. So, the number of units after the multiplication by a matrix is going to be equal to the number of rows of your matrix. And the number of columns of the matrix, of course, has to be equal to the size of the input. Okay. So supervised learning — in slightly more formal terms than the one I showed earlier — is the idea by which you're going to compare the output that the system produces...

[32:26] So, right, you show an input, you run through the neural net, you get an output. You're going to compare this output with a target output. And you are going to have an objective function, a loss module, that computes a distance, a discrepancy, penalty — whatever you want to call it. Divergence — okay, there's various names for it. And then you're going to compute the average of that. So the output of this cost function is a scalar, right.

[32:56] It computes the distance, for example, Euclidean distance between a target vector and the vector that the neural net produces, the deep learning system system produces. And then you can compute the average of this cost function, which is just a scalar。 You're going to average it over a training set, right. So, a training set is composed of a bunch of pairs of inputs and outputs; compute the average of this over the training set. The function you want to minimize with respect to the parameters of the system (the tunable knobs,) is that average. Okay. So, you want to find the value of the parameters that minimizes the average error between the output you want and the output you get, averaged over a training set of samples.

[33:47] So... I'm sure the vast majority of people here, sort of, have at least an intuitive understanding of what gradient descent is. So, basically, the way to minimize this is to compute the gradient, right. It's like you are in a mountain, you're lost in the mountain (and it's a very smooth mountain), but there is fog and it's night, and you want to go to the village in the valley. And so, the best thing you can do is you turn around and you see which way is down, and you take a step down in the direction of steepest descent.

[34:22] Okay. So, this search for the direction that goes down: that's called "computing a gradient" or, technically, a negative gradient. Okay, then you take a step down. That's taking a step down in the direction of negative gradient. And if you keep doing this and your steps are small enough — small enough so that when you take a step, you don't jump to the other side of the mountain — then. eventually you're going to converge to the valley, if. the valley is convex. Which? means that if there is no, kind of, lake, no mountain lakes in the middle where, you know, there's kind of a. minimum and you're going to get stuck in that minimum the valley might be lower, but you don't see it.

[35:03] Okay. So that's why convexity. is important as a concept. But here is another concept, which is the concept of stochastic gradient, which I'm sure again a lot of you have heard [of]. I'll come back to that. in more detail. The objective function you're computing is an average over many many samples. You can compute the objective function in its gradient. over the entire training set by averaging the. the value of the entire training set.

[35:37] But, it turns out it is more efficient to, just take one sample or, a small group of samples, computing the error that. this sample makes, then computing the gradient of that error with respect to the parameters and taking a step. A small step. Then a new. sample comes in — you're going to get another. value for the error and another value for the gradient, which may be in a different direction because it's a different sample. And take a step in that direction. And if you keep doing this, you're gonna go down the. the cost surface but in kind of a noisy way — there's going to be a lot of fluctuations.

[36:16] So what is shown here is an example of this. This is stochastic gradient applied to a very simple problem with two dimensions. where you only have two weights. And, it looks kind of semi-periodic because, the examples are always shown in the same order, which is not what you're supposed to do with stochastic gradient. But as you can see the path is really erratic. Why do people use this? There's various reasons. One reason is that, empirically it converges much, much faster, particularly if you have a very large training set. And the other reason is that you actually get better generalization in the end. So if you measure the performance of the system on a separate set that you —. I assume you all know the concepts of "training set" and "test set" and "validation set" but —. So if you test the performance of the system on a different set, you get generally better. generalization if you use stochastic gradient than if you actually use the real, true gradient descent.

[37:05] The problem is... yes. [inaudible student question]. No. It's worse. So computing the entire gradient of the entire dataset —. It is computationally feasible. I mean you can do it. It's. not any more expensive than... ...you know... [inaudible student comment] It'll be less noisy but it will be slower. So let me tell you why: I mean, this is something we're gonna talk about again when we talk about optimization.

[37:37] But let me tell you: I give you a training set with a million training samples. It's actually 100 repetitions of the same training sample with 10,000 samples. Okay. So my actual sample is 10,000 training samples. I replicate it 100 times and I claim that, you know, I scrambled it. I tell you here is my training set with a million training samples. So if you do a full gradient, you're going to compute the same values a hundred times. You're gonna spend a hundred times more work than necessary.

[38:09] Without knowing it. Okay. So this only works because of repetition. But it also works in, kind of, more normal situations in machine learning where you have samples that are, have a lot of redundancy in them, like very many samples are very similar to each other, etc. So if there is any kind of coherence — if your system is capable of generalization, then that means stochastic gradient is going to be more efficient because if you don't stochastic gradient, you're not going to be able to take advantage of that redundancy. So that's one case where noise is good for you.

[38:46] Okay. Don't pay attention to the formula. Don't get scared because we're going to come back to this in more detail. But, why is backpropagation called backpropagation? Again, this is very informal. It's basically a practical application of Chain Rule. So you can think of a neural net of the type that I showed you earlier as a bunch of modules that are stacked on top of each other. And you can think of this as compositions of functions. And you all know the basic rule of calculus. You know, how do you compute the derivative of a function composed with another function?

[39:22] Well the derivative of, you know, F composed with G is the derivative of F at the point of G of X, multiplied by the derivative of G at the point X. Right. So you get the product of the two derivatives. So this is the same thing except that the functions, instead of being scalar functions, are vector functions. They get vectors as inputs and the previous vectors as outputs. More generally, actually, they take multi-dimensional arrays as input and multi-dimensional arrays as output, but that doesn't matter. Basically, what is the generalization of this chain rule in the case of functional modules that have multiple inputs, multiple outputs that you can view as functions? Right.

[40:06] And, basically, it's the same rule if you, kind of, blindly apply them — it's the same rule as you applied for, as you apply for regular derivatives. (Except here you have to use partial derivatives.) You know, what you see in the end is, that. if you want to compute the derivative of the difference between the output you want, and the output you get, which is the value of your objective function, with respect to any variable inside of the network, then you have to kind of back, you know, propagate derivatives backwards and kind of multiply things on the way.

[40:37] All right. We'll be much more formal about this next week. For now, you just know why it's called backpropagation: because it applies to multiple layers. OK, so, the the picture I showed earlier of this neural net is nice, but what if the input is actually an image? Right. So, an image, even sort of a relatively low resolution image, is typically like, you know, a few hundred pixels on the side.

[41:12] OK. So. let's say 256 x 256, to take a random example. OK, a car image: 256 x 256. So it's got 65,536 pixels, times three, because you have R, G, and B components to it for, you know, you have three value for each pixels. And so that's, you know, roughly two hundred thousand values. OK, so your vector here is a vector with two hundred thousand components. If you have a matrix that is going to multiply this vector, this matrix is going to have to have two hundred thousand rows —. Columns, I'm sorry.

[41:50] And depending on how many units you have here in the first layer, there's going to be a 200,000 x, you know, maybe a large number. That's a huge matrix. Right. Even if it's 200,000 x 100,000. So you have a compression in the first layer you know, that's already a lot of—very, very large matrix: billions. So it's not really practical to think of this as a full matrix. What you're going to have to do if you want to deal with things like images is make some hypothesis about the structure of this matrix so that it's not a completely full matrix that, you know, connects everything to everything.

[42:33] That would be impractical. At least for a lot of practical applications. So this is where inspiration from the brain comes back. There was some work, classic work, in neuroscience in the 1960s by the gentlemen at the top here: Hubel and Wiesel. They actually won a Nobel Prize for this in the in the 70s. but their workforce from the late 50s—early 60s. And what they did was that they poked electrode in the. visual cortex of various animals: you know, cats, monkeys, mice, you know, whatever.

[43:05] (I think they like cats a lot.). And they tried to figure out what the neurons in the visual cortex were doing. And what they discovered was that— so, first of all, well, this is a human brain. But, I mean, this chart is from much later. But all mammalian. visual systems is organized in similar way. You have signals coming in to your eyes, striking your retina. You have a few layers of neurons in your retina in front of your photoreceptors that, kind of, pre-process the signal, if you want. They kind of compress it, because you can't have— you know the human eye is something like a hundred million pixels.

[43:49] So it's like a hundred million pixel camera, megapixel camera. But the problem is you cannot have a hundred million fibers coming out of your eyes, because otherwise your optical nerve would be this big. And you wouldn't be able to move your eyes. So those neurons in front of your retina do compression. They don't do JPEG compression, but they do compression. So that the signal can be compressed to one million fibers. Right. You have one million fibers coming out of each of your eyes. And that makes your, you know, optical nerve about this big, which means, you know, you can carry the signal and turn your eyes.

[44:26] This is actually a mistake that evolution made for vertebrates. Invertebrates are not like that. Invertebrates have actually—so, it's a big mistake because the wires collecting the information from your retina, because the neurons that process the signal in front of your retina, the wires have to kind of— it'll be in front of your retina, and so blocking part of the view, if you want. And then they have to punch a hole through your retina to get through your brain.

[44:59] So there's a blind spot in your visual field because that's where your optical nerve punches through your retina. So it's kind of ridiculous if you have a camera like this to have the wires coming out the front and then, you know, dig a hole in your sensor to get the wires back. It's much better if the wires come out the back, right? And vertebrates got that wrong. Invertebrates got it right. So, you know, like squid and octopus actually have wires coming out the back. They're much luckier. But anyway.

[45:33] So, the signal goes from your eyes to a little piece of brain called the lateral geniculate nucleus, which is under your brain actually—and like at the basis of it. It does a little bit of contrast normalization. We'll talk about this again in a few lectures. And, and, then that goes to the back of your brain where the the primary visual cortex area called v1 is. It's called V1 in humans. And there's something called the ventral hierarchy: V1, V2, V4 (IT), which is a bunch of brain areas going from the back to the side. And in the infero-temporal cortex right here, this is where object categories are represented.

[46:17] So, when you go around and you see your grandmother, you have a bunch of neurons firing that represent your grandmother in this area. And it doesn't matter what your grandmother is wearing, you know, what what position she is in, if there is occlusion or whatever—those neurons will fire if you see your grandmother. So the sort of category-level things. And those things have been discovered by experiments with patients that had to have their skull open for a few weeks, and where, you know, people poked electrode and had them watch movies and realize this is known that turns on if Jennifer Aniston is on the movie. And it only turns on for Jennifer Aniston.

[47:03] So with the idea that somehow the visual context, you know, can do pattern recognition and seems to have this sort of hierarchical structure, multi-layer structure, there's also the idea that the visual process is essentially a feed-forward process. So the process by which you recognize an everyday object is very fast. It takes about 100 milliseconds. There's barely enough time for the signal to go from your retina to the infero-temporal cortex. It takes about, it's a few millisecond delay per neuron that you have to go through.

[47:36] 100 milliseconds you barely have time to, for just you know, a few spikes to go through the entire system. So there's no time for like, you know, recurrent connections and like, you know, etc. Doesn't mean that there are no recurrent connections. There's tons of them but somehow fast recognition is done without them. So this is called the the feed-forward ventral pathway. And this gentleman here, Kunihiko Fukushima, had the idea of taking inspiration from Hubel and Wiesel in the 70s, and sort of built a neural net model on the computer that had this idea that, first there were layers, But also the idea that Hubel and Wiesel discovered, that individual neurons only react to a small part of the visual field.

[48:22] So they poked electrodes in neurons in V1 and they realized that this neuron in V1 only reacts to motifs that appear in a very small area in the visual field. And then the neuron next to it will react to another area that's next to the first one, right. So the neurons seem to be organized in what's called a retinotopic way, which means that neighboring neurons react to neighboring regions in the visual field. What they also realized is that the group of neurons that all react to the same area in the visual field, and they seem to turn on for edges at a particular orientation. So one neuron will turn on for, if it's receptive field has an edge, a vertical edge, and then the one next to it if the edge is a little slanted, and then the one next to it if the edge is a little rotated, etc.

[49:09] And so they had this picture of V1 basically as oriented, orientation selectivity, so neurons that look at a local field and then react to orientations. And those groups of neurons that react to multiple orientations are replicated over the entire visual field. So this guy Fukushima said, well, why don't I build a neural net that that does this? I'm not going to, you know, necessarily insist that my system extracts oriented features, but I'm going to use some sort of unsupervised learning algorithm to to train it. So he was not training his system end-to-end. He was training it layer by layer in some sort of unsupervised fashion, which I'm not going to go into the details of.

[49:48] And then he used another concept from, so he used the concept that those neurons were replicated across the visual field, and then he used another concept from Hubel and Wiesel. called complex cells. So complex cells are units that pool the activities of a bunch of simple cells, which are those oriented orientation-selective units. And they pull them in such a way that if an orientation, if an oriented edge is moved a little bit, it will activate different simple cells, but the complex cell, since it integrates the outputs from all those simple cells, will stay activated until the edge moves beyond its receptive field.

[50:32] So those complex cells build a little bit of shift invariance in the representation. You can shift an edge a little bit, and it will not change the activation the activity of one of those complex cells. So that's what we now call "convolution" and "pooling" in the context of convolutional nets. And that basically is what led me in the mid-80s or late-80s to come up with convolutional nets. So they are basically networks where the connections are local; they are replicated across the visual field; and you intersperse, sort of, feature detection layers that detect those local features with pooling operation. We'll talk about this at length in three weeks.

[51:21] So I'm not going to go to into every detail. But it has, it recycles this idea from Hubel and Wiesel and Fukushima that (...if I can can get my pointer...). that, basically, every neuron in one layer computes a weighted sum of a small area of the input, and the weighted sum uses those weights. But those weights are replicated across, so every neuron in a layer uses the same set of weights. OK, so this is the idea of weight tying or weight sharing.

[51:57] So using backprop we were able to train neural nets like this to recognize handwritten digits. This is back from the late-80s early-90s. And this is me when I was about your age, maybe a little older. I'm about thirty in this video. And this is my phone number when I was working at Bell Labs. Doesn't work anymore. It's a New Jersey number. And I hit a key, and there is this neural net running on the 386 PC with a special accelerator card recognizing those characters, running a neural net very similar to the one I just showed you the animation of.

[52:34] And the thing could, you know, recognize characters of any style, including very strange styles, including even stranger styles. And so this was kind of new at the time because this was back when character recognition, or pattern recognition in general, were still on the model of: we extract features and then we train a classifier on top. And this could basically train the entire, like, learn the entire task from end-to-end.

[53:08] You know, basically, the first few layers of that neural net would would play the role of a feature extractor, but it was trained from data. The reason why we used character recognition is because this was this was the only thing for which we had data. The only task for which there was enough data was either character recognition of speech recognition. Speech recognition experiments were somewhat successful, but not as much. Pretty quickly, we realized we could use those convolutional nets not just to recognize individual characters, but to recognize groups of characters, so multiple characters at a single time. And it's because of this convolutional nature of the network, which I'll come back to in three lectures, that basically allowed those systems to just, you know, be applied to a large image and then they will just turn on whenever they see in their field of view, whenever they see a shape that they can recognize.

[54:02] So, basically, if you have a large image, you train a convolutional net that it has a small input window, and you swipe it over the entire image, and whenever it turns on it means it's detected the object that you trained it to detect. So here the system, you know, is capable of doing simultaneous segmentation and recognition. You know, back in the—before that, people in pattern recognition would have an explicit program that would separate individual objects from their background and from each other, and then send each individual object, character for example, to a recognizer. But with this you could, you can do both at the same time.

[54:35] You don't have to worry about it. You don't have to build any special program for it. So in particular this could be applied to natural images for things like facial detection, pedestrian detection, things like this. Right. Same thing, train a convolutional net to distinguish between an image where you have a face and an image where you don't have a face, train this with several thousand examples, and then take that window, swipe it over an image: whenever it turns on there is a face. Of course, the face could be bigger than the window so you sub-sample the image: you make it smaller, and you swipe your network again, and then make it smaller again, swipe your network again. So now you can detect faces regardless of size.

[55:15] OK. In particular you can use this to drive robots. So this is things that were done before deep running became popular, OK. So this is an example where the the network here is a convolutional net. It's applied to the image coming from a camera, from a you know, running robot. And it's trying to classify every window of a small window—like, 40 x 40 pixels or so, even less— as to whether the central pixel in that window is on the ground or is an obstacle, right.

[55:48] So whatever it classifies as being on the ground is green. Whatever it classifies as being an obstacle is red or purple, if it's on a foot of the obstacle. And then you can sort of map this to a map, which you see at the top. And then do planning in this map to reach a particular goal, and then use this to navigate. And so these are two former PhD students. Raia Hadsell on the right, Pierre Sermanet on the Left, who are annoying this poor robot.

[56:20] Pretty confident the robot is not going to break their legs, since they actually wrote the code and trained it. Pierre Sermanet is a research scientist at Google Brain in California working on robotics. Raia Hadsell is head of robotics research— Director of Robotics research at DeepMind. They did pretty well. So a similar idea can be used for what's called semantic segmentation. So semantic segmentation is the idea that you can, again, with this kind of sliding window approach, you can train a convolutional net to classify the central pixel using a window as a context.

[56:58] But here it's not just trained to classify obstacles from non-obstacles. It's trained to classify something like 30 categories. This is— this is down Washington Place, I think. This is Washington Square Park. And, it you know, it knows about roads, and people, and plants, and trees, and whatever—but it finds, you know, desert in the middle of Washington Square Park, which is not... There's no beach that I'm aware of... So it's not perfect. At the time it was state of the art, though. That was the best system there was to do this kind of semantic segmentation.

[57:36] I was running around giving talks like trying to evangelize people about deep learning back then. This was around 2010. So this is before the, kind of, deep learning revolution, if you want. And one person, a professor from Israel was sitting in one of my talks. And he's a theoretician, but he was really kind of transfixed by the potential applications of this, and he was just about to take a sabbatical and work for a company called Mobileye, which was a start-up in Israel at the time— working on autonomous driving. And so, a couple of months after he heard my talk, he started working at Mobileye.

[58:15] He told the Mobileye people, you know—"You should try this convolutional net stuff. This works really well." And the engineers there said—Nah. No, we don't believe in that stuff. We have our own method. So he implemented it, and tried it himself, beat the hell out of all the benchmarks they had. And all of a sudden the whole company switched to using convolutional nets. And they were the first company to actually come up with a vision system for cars that, you know, can keep a car in a highway, and can break if there is a pedestrian or cyclist crossing. I'll come back to this in a minute. They were basically using this technique.

[58:54] Semantic segmentation, very similar to the one I showed for the robot before. This was a guy by the name of Shai Shalev-Schwartz. You have to be aware of the fact also that back in the 80s, people were really interested in using, in sort of implementing special types of hardware that could run neural nets really fast. And these are kind of a few examples of neural net chips that were actually implemented—I. had to do with some of them— but they were implemented by people working in the same group as I was, as I was at Bell Labs in New Jersey.

[59:28] So this was kind of a hot topic in the 1980s, and then of course with the interest in neural nets dying in the mid-90s people weren't working on this anymore, until a few years ago. Now the hottest topic in in chip design in the chip industry is neural net accelerators. You go to any conference on computer architecture, you know, chip, like ISSCC, which is the big kind of solid-state circuit conference—half the talks are about neural net accelerators.

[1:00:03] And I worked on a few of those things. OK, so then something happened, as I told you, around 2010, -13, -15, in speech recognition, image recognition, natural language processing, and it's continuing. We're in the middle of it now for other topics. And what happened, and I'm really sad to say it didn't happen in my lab, but but with our friends, we started, with Yoshua Bengio and Geoff Hinton back in the early 2000s—we knew, you know that deep learning was working really well and we knew that the whole community was making a mistake by dismissing neural nets and deep learning. And so—. we didn't use the term deep learning yet. We invented it a few years later—so, around 2003 or so, 2004, we started kind of a conspiracy, if you want. We got together and we said we're just going to try to, kind of, beat some records, and some data sets, invent some new algorithms that will allow us to train very large neural nets.

[1:01:03] So that will, and will collect very large data sets, so that we will show the world that those things really work, because nobody really believed it. That really kind of succeeded beyond our wildest dreams. In particular, in 2012, Geoff Hinton had one student Alex Krizhevsky, who spent a lot of time implementing convolutional nets on GPUs, which were kind of new at the time—they were not entirely new but they were starting to become really high-performance. So he was very good at sort of hacking that and and then they were able to train much larger neural nets, convolutional nets, than anybody was able to do before.

[1:01:44] And so they used it to to train on the ImageNet dataset. The ImageNet dataset is a bunch of natural photos. And the system is supposed to recognize the main objects in the photo among 1,000 different categories. And the training set had 1.3 million samples. Which is kinda large. So what they did was build this really large, and very deep convolutional net, pretty much on the same model as what we had before, implemented on GPUs, and let it run for a couple weeks. And with that they beat the performance of best competing systems by a large margin. So this is the error rate on ImageNet going back to 2010. So 2010 it was about 28% error, top 5.

[1:02:35] So, basically you get an error if the correct category is not in the top 5 among 1,000. OK, so it's kind of a mild measure of error. 2011 it was 25.8%, the system that was able to do this was actually very, very large. It was sort of somewhat convolutional-net-like, but it wasn't trained. I mean only the last layer was trained. And then Geoff and his team got it down to 16.4%, and then that was a watershed moment for the computer vision community. A lot of people said, Okay, you know now we know that this thing works.

[1:03:18] And the whole community went from basically refusing every paper that had neural nets in them in 2011 and 2012 to refusing every paper that does not have a convolutional net in it in 2016. So now it's the new religion, right. You can't get a paper in a computer vision conference unless you use ConvNets somehow. And the error rate went down really quickly, you know people found all kinds of really cute architectural tricks. that, sort of, made those things work better. And what you'd see in there is that there was an inflation of the number of layers.

[1:03:56] So my convolutional nets from the 90s had 7 layers or so, and from the early 2000s. And then AlexNet had, I don't know, 12. Then VGG the year afterward, after that had 19. GoogLeNet had I don't know how many, because it's hard to figure out how you count. And then the workhorse now of object recognition, the standard backbone, as people called them, has 50 layers. It's called ResNet-50. But some, you know, some networks have 100 layers or so.

[1:04:29] So Alfredo a few years ago put together this chart that shows where each of those blob is a particular network architecture. And the x-axis is the number of billions of operations you need to do to compute the output. Okay, those things are really big. billions of connections. The y-axis is the top one accuracy on ImageNet. So it's not the same measure of performance as the one I showed you before. So the best systems are around 84, today.

[1:05:01] And the size of the of the blob is the memory occupancy, so the number of millions of floats that you need to store to store the weight, the weight values. Now people are very smart about compressing those things like. you know quantizing them, and. there's entire teams at Google, Facebook, and various other places that only work on optimizing those networks and compressing the. things so they can run fast. Because, to give you just a. rough idea, the number of times. Facebook, for example, runs a convolutional net on its servers per day is in the tens of billions.

[1:05:44] Okay. So there's a huge incentive to optimizing the amount of computation necessary for this. So one... one reason why. convolutional nets are being so successful. is that they exploit a property of natural data, which is compositionality. So, compositionality is. the. property by which. a scene is composed of objects; objects are composed of parts; parts are composed of sub-parts; sub-parts are really combinations of motifs; and motifs are combinations of contours or edges, right, or textures.

[1:06:33] And those are just combinations of pixels. Okay, so there's this so-called compositional hierarchy that, you know, particular combinations of. objects at one layer in the hierarchy. form. objects at the next layer. And so if you, kind of, mimic this compositional hierarchy in the architecture of the network, and you let it learn the appropriate. combinations of features at one layer that, you know, form the the features of the next layer, that's really what deep learning is.

[1:07:06] Okay. Learning to represent the world and exploit the structure of the world—and the world, being the fact that. there is organization in the world because the world is compositional. A statistician by the name of Stuart Geman, who is at Brown University, said— so he was kind of playing on the famous Einstein quote, Einstein said: The most incomprehensible thing about the world is that the world is comprehensible. Like, among all the complicated things that the world, you know, the world could be extremely complicated, so complicated that we have no way of understanding it.

[1:07:42] And it looks like a conspiracy that we are able to understand at least part of the world. And so Stuart Geman's version of this is that the world is compositional... or there is a God. (Because you need supernatural things to be able to understand it if the world is not compositional.) So this has led to incredible progress in things like computer vision, as you know, from you know, being able to unreliably identify, you know, detect people, to being able to generate masks for every object, accurate masks, and then even to figure out the pose, and then do this in real time on a mobile platform, you know.

[1:08:25] I mean the progress has been sort of nothing short of incredible, and most of those things are based on two basic families of architectures. This sort of so-called one-pass object detection/recognition architectures called RetinaNet, feature pyramid network. There's various names for it. Or U-Net. Then another type called Mark-RCNN, both of them actually originated from Facebook. Or, the people who originated them are now at Facebook—they sometimes came up with it before they came to Facebook.

[1:08:59] But, you know, those things work really well, you know, they can do things like that: detect objects that are partially occluded, and, you know, draw a mask of every object. So basically, this is a neural net, a convolutional net where the input is an image. But the output is also an image. In fact, the output is a whole bunch of images, one per category. And for each category outputs the mask of the object from that category. Those things can also do what's called "instant segmentation." So if you have a whole bunch of sheeps, it can tell you, you know, not just that this region is sheep, but actually pick out the individual sheeps and will tell them apart, and it will count the sheeps right, and fall asleep.

[1:09:40] That's what you're supposed to do right, to fall asleep you count sheeps, right? And the cool thing about deep learning is that a lot of the community has embraced the whole concept that research has to be done in the open. So a lot of the stuff that we're gonna be talking about, as you probably know, in the class is it's not just published, but it's you know, published with code. It's not just code, it's actually pre-trained models that you can just download and run.

[1:10:13] All open source. All free to use. So that's really new. I mean people didn't use to do research this way, particularly in industry. But even in academia people weren't used to kind of distributing their code. But deep learning has sort of, somehow the race has kind of driven people to kind of be more open about research. So there's a lot of applications of all this, as I said, you know self-driving cars. This is actually a video from Mobileye, and Mobileye was pretty early in this in using convolutional nets for autonomous driving.

[1:10:45] To the point that in 2015 they had managed to shoehorn a convolutional net on the chip that they had designed for some other purpose. And they sold the licensed the technology to Tesla. So the first self-driving Tesla's, I mean self-driving, not really self-driving, they have driving assistance, right. They can keep in lane on the highway and change lane—had this Mobileye system. And, and that's, that's pretty cool. So that's a convolutional net. It's a little chip that is, you know, just behind the, it looks out the window and it's behind the the rear-view mirror.

[1:11:18] Since then this—you know, four/five years ago—since then this kind of technology has been very widely deployed by a lot of different companies. Mobileye still now was bought by Intel, and they have like 70 or 80 percent of the market for those vision systems. But, but there is a lot of companies that—and car manufacturers— that use those things. So in fact in some European countries, every single car that comes out, even low-end cars, has convolutional-net-based vision systems. And they call this: emergency, emergency, sort of, advanced emergency braking system or automated emergency braking system.

[1:11:56] AEBS— is deployed in every car in France, for example. It reduces collisions by 40%. So not every car on the roads have them yet, because you know people keep their cars for a long time. But what that means is that it saves lives. So a very positive application of deep learning. Another big category of applications, of course, is medical imaging. So this is a, it's probably the hottest topic in radiology these days—is how to use AI (which means convolutional nets) for radiology. This [slide image] is lifted from a paper by some of our colleagues here at NYU, where they analyzed MRI images. So there's one big advantage to convolutional nets: it's that they don't need to look at the screen to look at an MRI. In particular to be able to look at an MRI, they don't have to slice it into 2D images.

[1:12:56] They can look at the entire 3D volume. This is one property that this thing uses. It's a 3D convolutional net that looks at the entire volume of an MRI image and then produces, you know, it uses the very similar technique for, as I was showing before, for semantic segmentation. And it produces, it basically turns on on the output image wherever there is some, you know, here a femur bone, but you know, it could be— so this is the kind of result it produces. It works better in 3D than in 2D slices. Or, it can turn on when it detects malignant tumor in mammograms. (This is to 2D, it's not 3D.)

[1:13:37] And there's, you know, various other projects in medical imaging that are going around. Okay. Lots of applications in science and physics, bioinformatics, you know, whatever, which we'll come back to so... Okay. So there's a bunch mysteries in deep learning. They're not complete mysteries, because people have some understanding of all this, but they are mysteries in the sense that we don't have, like, a nice theory for everything.

[1:14:11] Why do they work so well? So one big question that theoreticians were asking many years ago, when I was trying to convince the world that deep longing was a good idea, was that they would tell me: Well, you can approximate any function with just two layers, why do you need more? And I'll come back to this in a minute. What's so special about convolutional nets? I talked about the compositionality of natural images, or natural data, in general. This is true for speech also and values of the signals, natural signals. But it seems a little contrived.

[1:14:45] How is it that we can train the system, despite the fact that the objective function we're minimizing is very non-convex. We may have lots of local minima. This was a big criticism that people were throwing at neural nets, people who'd never played with neural nets were throwing out neural nets back in the old days. Say, like, you know, you have no guarantee that your algorithm will converge,—you know, it's too scary. I'm not gonna use it. And, the last one is: why is it that the way we train neural nets breaks everything that every textbook in statistics tell you?

[1:15:19] Every textbook in statistics tells you, if you have n data points, you shouldn't have more than n parameters, because you're going to overfit like crazy. You know, you might regularize. If you're a Bayesian, you might through a prior. But... (which is equivalent) But what guarantee do you have? And with neural nets, neural nets are wildly over parametrized. We train neural nets with hundreds of millions of parameters, routinely. They're used in production. And the number of training samples is nowhere near that. How does that work?

[1:15:53] But it works! OK, so things we can do with deep learning today: You know, we can have safer cars; we can have better medical analysis, medical image analysis systems; we can have pretty good language translation, far from perfect, but useful; stupid chatbots; you know, very good information search retrieval and filtering. Google and Facebook nowadays are completely built around deep learning. You take deep learning out of them and they crumble.

[1:16:27] And, you know, lots of applications in energy management and production, and all kinds of stuff; manufacturing, environmental protection. But we don't have really intelligent machines. We don't have machines with common sense. We don't have intelligent personal assistants. We don't have, you know, smart chatbots. We don't have household robots. You know, I mean, there's a lot of things we don't know how to do, right. Which is why we still do research. OK, so, deep learning is really about learning representations. But really we should know in advance what representations are. So I talked about the traditional model of pattern recognition.

[1:17:04] But... Representation is really about you know, you have your raw data, and you want to turn it into a form that is useful, somehow. Ideally, you'd like to turn it into a form that's useful regardless of what you want to do with it. Sort of "useful" in a general way. OK, and it's not entirely clear what that means. But, at least, you want to turn it into a representation that's useful for the task that you are envisioning. And there's been a lot of ideas over the decades on, sort of, general ways to pre-process natural data in such a way that you produce good representations of it.

[1:17:54] I'm not going to go through the details of this laundry list. But the things like tallying the space, doing random projection. So random projection is actually, kind of, you know, like a monster that rears its head periodically, like every five years. And you have to whack it on the head every time he pops up. That was the idea behind the Perceptron. So the first layer of a perceptron is a layer of random projections. What does that mean? A random projection is a random matrix, which you know, has a smaller output dimension than input dimension, with some sort of non-linearity at the end, right. So think about a single layer neural net with nonlinearities, but the weights are random.

[1:18:38] So you can think of this as random projections. And a lot of people are rediscovering that wheel periodically, claiming that it's great because you don't have to do multi-layer training. And so it started with the Perceptron, and then you know it came back in the 60s, and then it came back again in the 1980s, and then it came back again. And now it came back. There's a whole community, mostly in Asia. They call two layer neural nets, where the first layer is random, they call this "extreme learning machines," OK.

[1:19:12] It's like, it's ridiculous, but it exists. They're not "extreme," I mean they're extremely stupid, but—you know. Right, so I was mentioning the compositionality of the world. It's, you know, from pixels to edges to texton, motifs, parts, objects. In text you have characters, word, word groups, clauses, sentences, stories. In speech it's the same, you have individual samples. You have, you know, spectral band, sound, phone, phonemes, words, etc.

[1:19:49] You always have this kind of hierarchy. OK, so here are many attempts at dismissing the whole idea of deep learning. OK, first, first thing. And this is things that I've heard for decades, OK— from mostly theoreticians, but a lot of people, and you have to know about them because they're going to come back in five years when people say, "Oh, deep learning sucks." Why not use support-vector machines? OK, so, here is support-vector machines here on the top left. Support-vector machine is a, and I'm sure many of you have heard about kernel machines and support-vector machines.

[1:20:22] Who knows what this is? I mean, even if it's a rough idea what this is. OK, a few hands. Who has no idea what a support-vector machine is? Don't be shy. Yeah. Yeah, I mean it's okay if you don't. OK, like most people haven't raised their hands for either. [Alfredo: Hands up, please, who knows support-vector machines.] OK, come on all the way up. Cool, all right. Who has no idea what it is? Don't be shy, it's okay. [Alfredo: inaudible] All right, good.

[1:20:55] Right, so here's the support-vector machine. Support-vector machine is a two layer neural net. It's not really a neural net, people don't like when it's formulated this way, but really you can think of it this way. It's a two layer neural net, where the first layer, which is symbolized by this function K here, each unit in the first layer compares the input vector X to one of the training samples X^i's. OK, so you take your training samples, let's say you have a thousand of them— so you have a thousand X^i's, from i = 1 to 1,000, and you have some function K that is going to compare X and X^i.

[1:21:26] Good example of a function to compare the two is you take the dot product between X and X^i, and you pass the result through, like, exponential minus square or something. So you get a Gaussian response, as a function of the distance between X and X^i, OK. So it's a way of comparing to two vectors, doesn't matter what it is. And, then you take those scores coming out of this K function that compares the input to every sample and you compute a weighted sum of them. And what you're going to learn are the weights, the alphas.

[1:21:59] Okay, so it's a two-layer neural net in which the second layer is trainable and the first layer is fixed. But in a way you can think of the first layer as being trained in an unsupervised manner, because it uses the data from the training set, but it only uses the X's, doesn't use the Y's. It uses the data in the stupidest way you can imagine, which is you store every X and use every single X as the weight of a neuron, if you want. Okay. That's what support vector machine is. You can write a thousand page book about the cute mathematics behind that. But the bottom line is it's a two-layer neural net where the first layer is trainied a very stupid way unsupervised, and the second layer is just a linear classifier.

[1:22:44] So, it's basically glorified template matching, because it basically compares the input vector to all the all the training samples. And so, it doesn't work if you want to do like, you know, computer vision with raw images. If X is an image and the X^i's are a million images from ImageNet— first of all, for every image you're gonna have to compare it with a million images, or maybe a little less if you're smart, and how you train it. That's going to be very expensive, and the kind of comparison you're making is basically what solves the problem. The weighted sum you're gonna get at the end is really the cherry on the cake.

[1:23:24] I use that analogy too often, actually. So... You can approximate, you can have theorems that show that you can approximate any function you want, as close as you want, by tuning the K function and the alphas. And so, if you were to talk to a theoretician, they'll tell you: Why do you need deep learning? I can approximate any function I want with a kernel machine. The number of terms in that sum can be very large, and nobody tells you what kernel function you can use. And so, that doesn't solve the problem.

[1:24:01] You can use a two-layer neural net, OK. So this is the top right here. The first layer is a nonlinear function F applied to the product of a matrix W^0 by input vector; and then the second layer multiplied by the second matrix; and then passes it through another non-linearity. OK, so this is a composition of two linear and non-linear operations. Again, you can show that under some conditions you can approximate any function you want with something like this. Given that you have a large enough vector in the middle.

[1:24:31] OK, so the dimension of what comes out of the first layer, if it's high enough, —potentially infinite—you can approximate any function you want as close as you want, by making this layer go to infinity. So again, you talk to theoreticians and they tell you: Why do you need layers? I can approximate anything I want with two layers. But there is an argument, which is it could be very, very expensive to do it in two layers. And...

[1:25:03] For some of you this may sound familiar. For most of you probably not. Let's say I want to design a logic circuit. OK, so, when you design logic circuits, right, you have AND-gates and OR-gates and... or NAND-gates, right. You can do everything with just NAND's, right, negative ANDs. And if you.. You can show that any Boolean function can be written as a bunch of ORs on a bunch of, a bunch... you know, a bunch of ANDs and then an OR on top of this. That's called disjointed normal form (DNF).

[1:25:36] So any function can be written in two layers. The problem is that for most functions, the number of terms you need in the middle is exponential in the size of the input. So, for example, if I give you N bits, and ask you to construct a circuit that tells me if the number of bits that are on in the input string is even or odd. OK, it's a simple Boolean function: 1 or 0 on the output. The number of gates that you need is essentially exponential, in the middle. If you do it in two layers.

[1:26:09] If you allow yourself to do it in log(N) layers, where N is number of input bits, then it's linear. OK. So you go from exponential complexity to linear complexity. if you allow yourself to use multiple layers. It's as if, you know, when you write a program—. I'll tell you. write the program in such a way that. there is only two sequential steps that are necessary to run your program. So basically your program has two sequential instructions. You can have, you can run as many instructions as you want in your program. but they have to run in parallel, most of them. And you're only allowed two sequential steps.

[1:26:52] OK. And, the kind of instructions you have access to are things like, you know, linear combinations, nonlinearities—. like simple things, right. Not like entire sub-programs. So for most, most problems, the number of intermediate values you're going to have to compute in the first step. is going to be exponential in the size of the input. There's only a tiny number of problems for which you're going to be able to get away with a non-exponential number of minterms.

[1:27:25] But if you allow your program to run multiple steps sequentially then all of a sudden, you know, it can be much simpler. It will run slower, but it will take a lot less memory. It will take a lot less stuff—. resources. So people who design computers circuits know this, right. You can design, for example, a circuit that adds two binary numbers. And there is a very simple way to do this, which is that you first you take the first two bits, you add them, and then you propagate the carry at the. second bit, the second pair of bits, you know, taking the carry into account that gives you the second bit of result, and then carry, you know, propagate the carry, and then you do this sequentially, right.

[1:28:02] So problem with this is that it takes the time that's proportional to the size of the. numbers that you're trying to add. So circuit designers have a way of, basically, pre-computing the carry, it's called carry lookahead, so that the number of steps necessary to do an addition is actually not N, it's much less than that. OK. But that, that's at the expense of a huge increase in the. complexity of the circuit. The the number, like the area that it takes on the chip. So this exchange between time and space, or, between depth and and...

[1:28:42] and, kind of, time is is known. So what do we call deep. models? So, you know, a two-layer neural net, one that has one hidden layer, I don't call that "deep," even though technically it uses backprop. But, eh, you know, it doesn't really learn. complex representations. So there's this idea of hierarchy in deep learning. SVMs definitely aren't deep. Unless you learn complicated kernels, but then they're not SVM's anymore. So what are good features? What are good representations?

[1:29:20] So, here's an example I like. There is something called the manifold hypothesis, and it's the fact that natural data— So, if I take a picture of this room with, you know, a camera with a 1,000 x 1,000 pixel resolution. That's 1 million pixels at 3 million values. It leaves, you can think of it as a vector with 3 million components. Among all the possible vectors with 3 million components, how many of them correspond to what we would call natural images?

[1:29:54] We can tell when we see a picture whether it's a natural image or not. We have a model in our visual system that tells us this looks like a real, like a real image. And we can tell when it's not. So the number of combinations of pixels that actually are things that we think of as natural images is a tiny, tiny, tiny, tiny, tiny subset of the set of all possible images. There's way more ways of combining random pixels in nonsensical images than there are ways of combining pixels into things that look like natural images.

[1:30:27] So the manifold hypothesis is that the set of things that, you know, look natural to us live in a low-dimensional surface inside the high-dimensional ambient space. And a good example to convince yourself of this: Imagine I take lots of pictures of a person making faces, right. So the person is in front of a white background. Her hair not moving. And she, kind of, moves her head around and, you know, makes faces, etc. The set of all images of that person—so I take a long video of that person—the set of all images of that person lives in a low dimensional surface.

[1:31:07] So a question I have for you is, What's the dimension of that surface? Whatever magnitude, okay. Any, yes? [Inaudible student comment.] Yeah, you've probably heard my spiel before, but... [Speaker: What did the person say?] Huh? [Speaker: What did they say?] OK, so for whoever hasn't heard this, you have a shot, another shot at an answer. OK, any guess?

[1:31:41] No? Don't be shy. I want like multiple proposals. Anyone. You can look down your laptop, but, you know, I can point at you or something. OK, any idea? Yes.

[1:32:11] No idea? It's OK. You, any idea? Maybe you heard what he said. [Inaudible student comment.] Linear, what does that mean? [Inaudible student comment.] It's a 1D space. OK, a one-dimensional subspace. OK, any other proposal? Any idea? OK, the images I'm taking are a million pixels. OK, so the ambient space is 3 million dimensions.

[1:32:52] [Inaudible student comment] They don't change, no. And the person can move the head, you know, turn around, things like this. But not really move the whole body. I mean you only see the face, it's mostly centered. [Student: A thousand.] A thousand, OK. Why? [Inaudible student comment.]

[1:33:23] OK yeah, that's a good guess. At least the motivation. [Inaudible student comment.] Say again. [Student: The surface area of the person.] The surface area of the person. Right. So it's bounded by the number of pixels. occupied by the person. That's for sure. That's a, that's an upper bound. Yes. Those pixels, of course, are not gonna take all possible values. So that's a wide upper ground. Any other idea? OK. So, basically the dimension of that, as you said, Is bounded by the number of muscles in the face of the person.

[1:34:03] Right. The number of degrees of freedom that you observe in that person is the number of muscles in their face. The number of independently movable muscles, right. So there's 3 degrees of freedom due to the fact that you can tilt your head this way, that way, or that way. That's 3, right there. Then there is translation, this way, that way. Maybe this way and that way, maybe up or down. That's 6. And then the number of muscles in your face, right. So you can smile. You can, you know, pout. You can do all kinds of stuff, right. And you can do this, you know, independently. You close one eye.

[1:34:46] You can smile in one direction, you know, I mean... So, whatever independent muscles, you have—not counting the tongue, because there's tons of muscles in the tongue. And that's about 50. Maybe a little more. So, regardless, it's less than 100. OK, so the surface, locally, if you want to parameterize the surface occupied by all those pictures—move from one picture to another— it's a surface with less than 100 parameters that determine the position of a point on that surface. Of course it's a highly nonlinear surface.

[1:35:21] It's not like this beautiful Calabi-Yau manifold here, but but it's a it is a surface nonetheless. Of course the answer was in the slide so, you know. So what you'd like is an ideal feature extractor to be able to disentangle the explanatory factors of variation of what you're observing. Right. So the different aspects of my face, you know, it's not just I move my muscles and I move my head around—each of those is an independent factor of variation. Again I can also remove my glasses.

[1:35:53] You know, the lighting could change. That's another set of, you know, variable— variables. And what you'd like is a representation that basically individually represents each of those factors of variations. So if there is a criterion to satisfy in learning good representations. it's that: it's finding independent explanatory factors of variation of the data that you're looking at. And the bottom line is that nobody has any idea how to do this. OK. But that would be the ultimate goal of representation learning.

[1:36:32] And we basically are at the end. OK. I'll take two more questions, if there is any. Yes. [Inaudible student question.] OK, so the question is: Is there some sort of pre-processing like PCA that will find those vectors? Yeah, so PCA will find those if the manifold is linear. So if you assume that the surface occupied by all those examples or faces is a plane, then PCA will find the dimension of that plane—principal component analysis, right.

[1:37:18] But, no, it's not linear unfortunately, right. Let me... Yeah, let me give you an example. If you take me and my oldest son that looks like me, and you place us making the same face in the same position, the distance between our images will be relatively small even though we're not the same person. Now if you take my face and my face shifted by 20 pixels, there's more distance between me and myself shifted than there is between me and my son, OK.

[1:37:53] So... What that means is that, you know, the manifold of my face, you know, is some complicated manifold in that space. My son is a slight different manifold which does not intersect mine. Yet these two, those two manifolds are very close to each other, and they're closer to each other than any two samples from my manifold, and two samples from his manifold. So PCA is not going to tell you anything, basically. OK, here is another reason why that surface is not, is not a plane.

[1:38:26] You're looking at me right now. Now imagine the manifold, which is a linear manifold, one dimensional manifold, of me turning my head all the way 360. OK. That manifold is topologically identical to a circle. It's not flat. Can't be, it can't be aligned. So PCA is not going to find it. OK, I gotta blast off. Thanks! See you next week.

Abrir en el lector de Vidleaf

Busca citas exactas entre comillas, compara subtítulos bilingües y exporta TXT, SRT o Markdown con marcas de tiempo.

Atribución y licencia

«Week 1 – Lecture: History, motivation, and evolution of Deep Learning» por Alfredo Canziani (冷在) (https://www.youtube.com/@alfcnz), con licencia CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Vídeo original: https://www.youtube.com/watch?v=0bMe_vCZo30. Esta página presenta una transcripción con marcas de tiempo; la persona o entidad creadora no está afiliada a Vidleaf ni lo avala.

¿Eres el autor o titular de derechos? Solicita correcciones o retirada en copyright@vidleaf.app.

Última actualización