← Back to home ← Volver al inicio

CreatedCreado UpdatedActualizado

From “Cat or No Cat” to “Remove the Light Pole”

In 2017 I took Andrew Ng’s deep learning course on Coursera. The first programming assignment was a rite of passage an entire generation of engineers remembers: build a cat classifier.1 You wrote logistic regression by hand in numpy — forward propagation, backward propagation, a sigmoid at the end — and pointed it at a folder of small images. The model answered exactly one question, with one bit: is this a cat, yes or no? It got about 70% of them right, and it felt like magic.

That same year — the very same year — eight researchers at Google published Attention Is All You Need, the fifteen-page paper that introduced the Transformer.2 I’ve traced elsewhere how that one idea became the foundation of modern language models. This page is about the other thing it did, the one I didn’t see coming while I was busy classifying cats: it taught machines to manipulate images with words.

Nine years after that homework, I handed an AI a photograph I took in Paris and typed, in plain language: remove the light pole. And it did.


First, machines learned to look

The deep learning era arguably has a birthday: the 2012 ImageNet competition, where a convolutional network called AlexNet halved the error rate of every classical computer-vision method in the field.3 Fittingly for this story, 2012 also gave us the famous “cat neuron”: a Google Brain experiment — co-led by the same Andrew Ng — where a network shown ten million unlabeled YouTube frames spontaneously grew a neuron that fired for cat faces.4 Nobody told it what a cat was. Cats are, in a very real sense, the founding mascot of deep learning.

Everything in this first revolution, including my Coursera homework, pointed one direction: image goes in, label comes out. The machine could tell you what it saw. It could not draw.

Then, machines learned to draw

The second revolution ran on two ideas. Generative adversarial networks (2014) pitted a forger network against a detective network until the forgeries became photorealistic.5 Then diffusion models (2020) found a stranger and more powerful route: learn to remove noise, step by step, until you can start from pure noise and denoise your way to a photograph that never existed.6

But a generator alone is a lottery — you get an image, not the image you asked for. The missing piece was a way for language to steer pixels, and that piece came straight out of the 2017 Transformer paper. First vision transformers showed that attention could read images natively, as patches — the paper’s title is a wink at its ancestor: An Image is Worth 16×16 Words.7 CLIP learned to place pictures and captions in the same vector space, so “a photo of a cat” and an actual photo of a cat landed near each other.8 And latent diffusion — the architecture behind Stable Diffusion and, in spirit, everything since — wired cross-attention into the denoiser itself, so that at every step of the drawing, the model literally attends to the words of your prompt.9

Read that again in 2017 terms: attention, the mechanism invented to let a translator look back at the source sentence, is what lets an image model look back at your instruction while it paints. There was no separate “Attention Is All You Need for images.” The 2017 paper was it — vision just took a few years to collect its inheritance.

The experiment: one photo, three lives

Theory is cheap; here is the demo. On a trip to Paris I took this photograph. It’s a 24-megapixel frame, and — as every tourist at the Pont d’Iéna discovers — a double-headed street lamp grows straight out of the middle of the view.

Photograph of the Eiffel Tower under a clear blue sky, with a double-headed street lamp crossing the frame in the foreground.
The original. Eiffel Tower, Paris — photograph © Miguel Jackson. All rights reserved. The only human-made image on this page, and the only one without an AI watermark.

I gave the photo to Google’s Gemini image model — the one the internet affectionately nicknamed Nano Banana — and asked it to take out the light pole. No mask, no lasso tool, no clone stamp. A sentence.

The same Eiffel Tower photograph, re-generated by AI with the street lamp removed.
The edit. Same scene, light pole gone — generated by Gemini ("Nano Banana") from the photo above. Where the lamp used to cross the tower, the model reconstructed the iron lattice behind it. This file is served exactly as Gemini produced it, C2PA credentials intact — you can drop it into contentcredentials.org/verify yourself.

Then I asked for something no retoucher would call retouching: paint it in the style of Van Gogh.

A Van Gogh style oil painting of the same Eiffel Tower scene, with swirling starry sky.
The painting. Generated by Gemini ("Nano Banana") from the same photograph. Notice it worked from the original: the light pole is still there — except now its lamps glow in swirls, like the stars in The Starry Night. The model didn't apply a filter; it repainted the scene, and made an artistic decision about the pole I never asked for.

Why the edit is softer than the original — and why that’s the interesting part

Put the original and the edit side by side and you’ll notice the edit is less sharp. The file metadata says why, and it’s worth spelling out, because it explains how these models actually work.

My photograph is 6000×4000 pixels — about 24 megapixels. The pole-free version Gemini returned is 842×1264 — about one megapixel. That’s not a bug or laziness; it’s the tell. A classic retouching tool — Photoshop’s content-aware fill, say — works like a surgeon: it keeps every pixel you didn’t touch and patches the wound locally, at full resolution, by borrowing nearby texture. Nano Banana doesn’t do that. It re-synthesizes the entire image at its own working resolution: your photo is encoded into the model’s latent space, your sentence is encoded alongside it, and a new image is generated from scratch — with cross-attention binding every step of the drawing to both the photo and the instruction. Every pixel in the edit is new, including the ninety-something percent I never asked it to change.

That is why the softness is the fascinating part rather than the disappointing part. Look at where the lamp used to be: the model didn’t smear sky over the gap — it drew plausible iron lattice, continuing the tower’s cross-bracing behind an object that was blocking it. Nothing “revealed” those pixels; the model understood enough about the structure of the Eiffel Tower to invent them convincingly. My 2017 homework model output a single bit — cat or no cat. This one output a million pixels, each one an inference. The trade is honest: you give up resolution, you get understanding. (And resolution is a solvable, incremental problem — the gap between one megapixel and twenty-four is engineering. The gap between “yes, cat” and “here is your photo without the pole” was a revolution.)

A library in Sartenejas

One more image, closer to home. Before Paris, before Coursera, I studied chemical engineering at Universidad Simón Bolívar in Sartenejas, Venezuela — the campus where my thesis partner and I wrote a vapor–liquid equilibrium library in Visual Basic 6, the code that Claude helped me resurrect in Rust a quarter century later.

Pencil drawing of the Universidad Simón Bolívar library in Sartenejas, seen across its terraced gardens.
The library. Universidad Simón Bolívar's library in Sartenejas, drawn as a pencil sketch by Gemini ("Nano Banana") from a photograph found on the internet.

I asked Nano Banana to render the university library as a pencil sketch, from a photo found online. Same mechanism as the Van Gogh: the model attends to the geometry of the scene — the brutalist concrete, the terraced gardens, the palms — and re-draws all of it, stroke by invented stroke, in a medium the original never had. The building where I studied thermodynamics from paper books is now something an AI can sketch back to me from memory and math. The two threads of my education — the chemical engineering and the machine learning — keep braiding in ways 1999-me could not have drawn on any napkin.

Every AI image on this page says so

I believe something simple about this new power, and I’ll state it plainly: in the age of AI, images made by AI should be watermarked, so that everybody knows. When a model can reconstruct the lattice of the Eiffel Tower behind a lamp post convincingly enough that you’d never question it, provenance stops being a nicety and becomes infrastructure.

So we checked — not the marketing pages, the actual bytes of the files above. Every Gemini-generated image on this page carries three layers of provenance:

  • SynthID, Google DeepMind’s watermark, woven invisibly into the pixels themselves — designed to survive resizing, compression, and casual cropping, precisely the operations that strip ordinary metadata.10
  • C2PA Content Credentials, a cryptographically signed manifest recording that the image came from Google AI.11 The pole-removed image above is served byte-for-byte as Gemini produced it, so its credentials still verify.
  • IPTC metadata with the digital source type trainedAlgorithmicMedia — the industry’s standard label for “this was generated by a model.”

And the photograph carries the opposite mark, the old-fashioned one: EXIF copyright, © Miguel Jackson. One page, two kinds of provenance — human and machine — each declaring itself. That’s what the ecosystem should look like everywhere: not AI images pretending to be photographs, and not photographs drowned in doubt, but every image answering the question where did you come from? before anyone has to ask.


Nine years. In 2017 I trained a model that could answer one question about an image with one bit, and the paper that would change everything was fifteen pages nobody outside the field had read yet. Today the same attention mechanism reads my sentence, looks at my photograph, and hands me back Paris without the lamp post — every pixel newly imagined, and honestly labeled as such. From cat or no cat to remove the light pole. I checked both boxes: it’s been a long way, and it’s been fast.

  1. Course 1 of the Deep Learning Specialization (deeplearning.ai / Coursera, launched August 2017). The assignment, “Logistic Regression with a Neural Network Mindset,” classifies cat vs. non-cat images at roughly 70% accuracy — later assignments push past 80% with deeper networks.

  2. Vaswani et al., “Attention Is All You Need”, NeurIPS 2017.

  3. Krizhevsky, Sutskever & Hinton, “ImageNet Classification with Deep Convolutional Neural Networks”, NeurIPS 2012 — top-5 error of 15.3% against the runner-up’s 26.2%.

  4. Le et al., “Building High-level Features Using Large Scale Unsupervised Learning”, ICML 2012 — the Google Brain network that learned a cat-face detector from unlabeled YouTube frames, with no cat labels anywhere in training.

  5. Goodfellow et al., “Generative Adversarial Networks”, NeurIPS 2014.

  6. Ho, Jain & Abbeel, “Denoising Diffusion Probabilistic Models”, NeurIPS 2020.

  7. Dosovitskiy et al., “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”, ICLR 2021.

  8. Radford et al., “Learning Transferable Visual Models From Natural Language Supervision” (CLIP), ICML 2021.

  9. Rombach et al., “High-Resolution Image Synthesis with Latent Diffusion Models”, CVPR 2022 — the paper that introduced cross-attention conditioning into latent diffusion, the architecture behind Stable Diffusion.

  10. SynthID, Google DeepMind — an imperceptible watermark embedded in the pixel data of AI-generated images, detectable by machine even after common transformations.

  11. The Coalition for Content Provenance and Authenticity (C2PA) standard; inspect any file’s credentials at contentcredentials.org/verify.

De «¿gato o no gato?» a «quítame el poste de luz»

En 2017 tomé el curso de deep learning de Andrew Ng en Coursera. La primera tarea de programación fue un rito de iniciación que toda una generación de ingenieros recuerda: construir un clasificador de gatos.1 Escribías la regresión logística a mano en numpy — propagación hacia adelante, propagación hacia atrás, una sigmoide al final — y la apuntabas a una carpeta de imágenes pequeñas. El modelo respondía exactamente una pregunta, con un solo bit: ¿esto es un gato, sí o no? Acertaba como el 70%, y se sentía como magia.

Ese mismo año — el mismito año — ocho investigadores de Google publicaron Attention Is All You Need, el paper de quince páginas que introdujo el Transformer.2 Ya conté en otra parte cómo esa sola idea se volvió el cimiento de los modelos de lenguaje modernos. Esta página es sobre lo otro que logró, lo que yo no vi venir mientras andaba clasificando gatos: le enseñó a las máquinas a manipular imágenes con palabras.

Nueve años después de aquella tarea, le entregué a una IA una fotografía que tomé en París y le escribí, en lenguaje corriente: quita el poste de luz. Y lo quitó.


Primero, las máquinas aprendieron a mirar

La era del deep learning tiene, se puede decir, fecha de nacimiento: la competencia ImageNet de 2012, donde una red convolucional llamada AlexNet redujo a la mitad la tasa de error de todos los métodos clásicos de visión por computadora.3 Y muy a tono con esta historia, 2012 también nos dio la famosa «neurona del gato»: un experimento de Google Brain — codirigido por el mismo Andrew Ng — donde una red que vio diez millones de cuadros de YouTube sin etiquetar desarrolló espontáneamente una neurona que se activaba con caras de gato.4 Nadie le dijo qué era un gato. Los gatos son, en un sentido muy real, la mascota fundacional del deep learning.

Todo en esta primera revolución, incluida mi tarea de Coursera, apuntaba en una sola dirección: entra una imagen, sale una etiqueta. La máquina te podía decir qué veía. Dibujar, no sabía.

Después, las máquinas aprendieron a dibujar

La segunda revolución corrió sobre dos ideas. Las redes generativas antagónicas (2014) pusieron a pelear una red falsificadora contra una red detective hasta que las falsificaciones se volvieron fotorrealistas.5 Luego los modelos de difusión (2020) encontraron una ruta más extraña y más poderosa: aprender a quitar ruido, paso a paso, hasta poder arrancar de ruido puro e ir des-ruidando hasta llegar a una fotografía que nunca existió.6

Pero un generador solo es una lotería — te da una imagen, no la imagen que pediste. La pieza que faltaba era una forma de que el lenguaje dirigiera los píxeles, y esa pieza salió directico del paper del Transformer de 2017. Primero los vision transformers demostraron que la atención podía leer imágenes de forma nativa, como parches — el título del paper es un guiño a su ancestro: An Image is Worth 16×16 Words.7 CLIP aprendió a colocar imágenes y descripciones en el mismo espacio vectorial, de modo que «una foto de un gato» y una foto real de un gato quedaran cerquita.8 Y la difusión latente — la arquitectura detrás de Stable Diffusion y, en espíritu, de todo lo que vino después — cableó la atención cruzada dentro del propio proceso de dibujo, de manera que en cada paso el modelo literalmente atiende a las palabras de tu instrucción.9

Léelo otra vez en términos de 2017: la atención, el mecanismo inventado para que un traductor pudiera mirar de nuevo la oración original, es lo que le permite a un modelo de imágenes mirar de nuevo tu instrucción mientras pinta. Nunca hubo un «Attention Is All You Need de las imágenes» aparte. El paper de 2017 fue ese paper — la visión simplemente tardó unos años en cobrar su herencia.

El experimento: una foto, tres vidas

La teoría es barata; aquí va la demostración. En un viaje a París tomé esta fotografía. Es un cuadro de 24 megapíxeles, y — como descubre todo turista en el Pont d’Iéna — un poste de luz de dos lámparas crece justo en el medio de la vista.

Fotografía de la Torre Eiffel bajo un cielo azul despejado, con un poste de luz de dos lámparas cruzando el primer plano.
La original. Torre Eiffel, París — fotografía © Miguel Jackson. Todos los derechos reservados. La única imagen hecha por un humano en esta página, y la única sin marca de agua de IA.

Le pasé la foto al modelo de imágenes Gemini de Google — al que internet le puso de cariño Nano Banana — y le pedí que quitara el poste de luz. Sin máscara, sin lazo, sin tampón de clonar. Una oración.

La misma fotografía de la Torre Eiffel, regenerada por IA con el poste de luz eliminado.
La edición. La misma escena, sin el poste — generada por Gemini («Nano Banana») a partir de la foto de arriba. Donde la lámpara cruzaba la torre, el modelo reconstruyó el enrejado de hierro que estaba detrás. Este archivo se sirve exactamente como Gemini lo produjo, con sus credenciales C2PA intactas — puedes soltarlo tú mismo en contentcredentials.org/verify.

Después pedí algo que ningún retocador llamaría retoque: píntala al estilo de Van Gogh.

Una pintura al óleo estilo Van Gogh de la misma escena de la Torre Eiffel, con un cielo de remolinos estrellados.
La pintura. Generada por Gemini («Nano Banana») a partir de la misma fotografía. Fíjate que trabajó desde la original: el poste de luz sigue ahí — solo que ahora sus lámparas brillan en remolinos, como las estrellas de La noche estrellada. El modelo no aplicó un filtro; repintó la escena, y tomó una decisión artística sobre el poste que yo nunca le pedí.

Por qué la edición se ve menos nítida que la original — y por qué eso es lo interesante

Pon la original y la edición lado a lado y notarás que la edición es menos nítida. Los metadatos de los archivos dicen por qué, y vale la pena explicarlo, porque revela cómo funcionan estos modelos de verdad.

Mi fotografía mide 6000×4000 píxeles — unos 24 megapíxeles. La versión sin poste que devolvió Gemini mide 842×1264 — como un megapíxel. Eso no es un bug ni flojera; es la pista. Una herramienta clásica de retoque — el relleno según contenido de Photoshop, digamos — trabaja como un cirujano: conserva cada píxel que no tocaste y parcha la herida localmente, a resolución completa, copiando textura vecina. Nano Banana no hace eso. Re-sintetiza la imagen completa a su propia resolución de trabajo: tu foto se codifica en el espacio latente del modelo, tu oración se codifica al lado, y una imagen nueva se genera desde cero — con la atención cruzada amarrando cada paso del dibujo tanto a la foto como a la instrucción. Cada píxel de la edición es nuevo, incluido el noventa y pico por ciento que yo nunca pedí cambiar.

Por eso la suavidad es la parte fascinante y no la decepcionante. Mira donde estaba la lámpara: el modelo no embadurnó cielo sobre el hueco — dibujó enrejado de hierro verosímil, continuando las diagonales de la torre detrás de un objeto que las tapaba. Nada «reveló» esos píxeles; el modelo entendió lo suficiente de la estructura de la Torre Eiffel como para inventarlos de forma convincente. Mi modelo de tarea de 2017 producía un solo bit — gato o no gato. Este produjo un millón de píxeles, cada uno una inferencia. El intercambio es honesto: cedes resolución, ganas comprensión. (Y la resolución es un problema resoluble, incremental — la brecha entre un megapíxel y veinticuatro es ingeniería. La brecha entre «sí, gato» y «aquí está tu foto sin el poste» fue una revolución.)

Una biblioteca en Sartenejas

Una imagen más, más cerca de casa. Antes de París, antes de Coursera, estudié ingeniería química en la Universidad Simón Bolívar en Sartenejas, Venezuela — el campus donde mi compañero de tesis y yo escribimos una librería de equilibrio líquido–vapor en Visual Basic 6, el código que Claude me ayudó a resucitar en Rust un cuarto de siglo después.

Dibujo a lápiz de la Biblioteca de la Universidad Simón Bolívar en Sartenejas, vista desde sus jardines aterrazados.
La biblioteca. La biblioteca de la Universidad Simón Bolívar en Sartenejas, dibujada a lápiz por Gemini («Nano Banana») a partir de una fotografía encontrada en internet.

Le pedí a Nano Banana que dibujara la biblioteca de la universidad como un boceto a lápiz, desde una foto encontrada en línea. El mismo mecanismo que el Van Gogh: el modelo atiende a la geometría de la escena — el concreto brutalista, los jardines aterrazados, las palmeras — y la vuelve a dibujar completa, trazo a trazo inventado, en un medio que la original nunca tuvo. El edificio donde estudié termodinámica en libros de papel es ahora algo que una IA puede devolverme dibujado desde la memoria y la matemática. Los dos hilos de mi formación — la ingeniería química y el machine learning — se siguen trenzando de maneras que el Miguel de 1999 no habría podido dibujar en ninguna servilleta.

Cada imagen de IA en esta página lo declara

Creo algo muy sencillo sobre este nuevo poder, y lo digo sin rodeos: en la era de la IA, las imágenes hechas por IA deben llevar marca de agua, para que todo el mundo lo sepa. Cuando un modelo puede reconstruir el enrejado de la Torre Eiffel detrás de un poste con tanta naturalidad que jamás lo cuestionarías, la procedencia deja de ser un detalle y se vuelve infraestructura.

Así que lo verificamos — no las páginas de marketing, sino los bytes reales de los archivos de arriba. Cada imagen generada por Gemini en esta página lleva tres capas de procedencia:

  • SynthID, la marca de agua de Google DeepMind, tejida de forma invisible en los propios píxeles — diseñada para sobrevivir cambios de tamaño, compresión y recortes casuales, exactamente las operaciones que borran los metadatos comunes.10
  • Credenciales de contenido C2PA, un manifiesto firmado criptográficamente que registra que la imagen salió de la IA de Google.11 La imagen sin poste de arriba se sirve byte por byte tal como Gemini la produjo, así que sus credenciales todavía verifican.
  • Metadatos IPTC con el tipo de fuente digital trainedAlgorithmicMedia — la etiqueta estándar de la industria para «esto lo generó un modelo».

Y la fotografía lleva la marca contraria, la de toda la vida: copyright EXIF, © Miguel Jackson. Una página, dos tipos de procedencia — humana y de máquina — cada una declarándose. Así debería verse el ecosistema en todas partes: ni imágenes de IA haciéndose pasar por fotografías, ni fotografías ahogadas en la duda, sino cada imagen respondiendo la pregunta ¿de dónde vienes tú? antes de que alguien tenga que hacerla.


Nueve años. En 2017 entrené un modelo que podía responder una pregunta sobre una imagen con un bit, y el paper que lo cambiaría todo eran quince páginas que casi nadie fuera del área había leído. Hoy el mismo mecanismo de atención lee mi oración, mira mi fotografía y me devuelve París sin el poste de luz — cada píxel imaginado de nuevo, y etiquetado honestamente como tal. De ¿gato o no gato? a quítame el poste de luz. Marqué las dos casillas: ha sido un largo camino, y ha sido rapidísimo.

  1. Curso 1 de la Deep Learning Specialization (deeplearning.ai / Coursera, lanzada en agosto de 2017). La tarea, «Logistic Regression with a Neural Network Mindset», clasifica imágenes de gato vs. no-gato con cerca del 70% de acierto — las tareas siguientes pasan del 80% con redes más profundas.

  2. Vaswani et al., «Attention Is All You Need», NeurIPS 2017.

  3. Krizhevsky, Sutskever y Hinton, «ImageNet Classification with Deep Convolutional Neural Networks», NeurIPS 2012 — error top-5 de 15,3% contra 26,2% del segundo lugar.

  4. Le et al., «Building High-level Features Using Large Scale Unsupervised Learning», ICML 2012 — la red de Google Brain que aprendió un detector de caras de gato con cuadros de YouTube sin etiquetar, sin una sola etiqueta de gato en el entrenamiento.

  5. Goodfellow et al., «Generative Adversarial Networks», NeurIPS 2014.

  6. Ho, Jain y Abbeel, «Denoising Diffusion Probabilistic Models», NeurIPS 2020.

  7. Dosovitskiy et al., «An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale», ICLR 2021.

  8. Radford et al., «Learning Transferable Visual Models From Natural Language Supervision» (CLIP), ICML 2021.

  9. Rombach et al., «High-Resolution Image Synthesis with Latent Diffusion Models», CVPR 2022 — el paper que introdujo el condicionamiento por atención cruzada en la difusión latente, la arquitectura detrás de Stable Diffusion.

  10. SynthID, Google DeepMind — una marca de agua imperceptible incrustada en los píxeles de las imágenes generadas por IA, detectable por máquina incluso tras transformaciones comunes.

  11. El estándar de la Coalition for Content Provenance and Authenticity (C2PA); inspecciona las credenciales de cualquier archivo en contentcredentials.org/verify.