John F. Wu's Personal Blog

I'm John! Welcome to my personal blog. Here I post on astronomy, machine learning, personal thoughts, etc.

These writings are mine alone and do not reflect the views of my employer.

2026

Stabilizing Deep Neural Networks by Staying Close to the Identity

9 minute read

Published:

Deep neural networks can be thought of as compositions of many simple transformations, each represented by a layer with trainable parameters. When the number of layers is large, the effect of multiplying many random matrices becomes exponentially unstable, i.e. they can grow or shrink exponentially. This is the primary reason that naive initialization leads to exploding or vanishing signals for both forward (activations) and backward (gradients). Nonetheless, stability is possible when each layer is close to the identity operation. With the right scaling of weights at initialization, a deep network acts like a time-discretized flow, and the total transformation resembles a matrix exponential of small perturbations. [...]

Tags: machine-learning · tutorial

2025

Learning with LLMs

14 minute read

Published:

AI is here, and its impacts on education cannot be overstated. Let’s put aside the issues of cheating; I assume that you want to learn, perhaps with the assistance of LLMs if they are actually helpful. But how do you know you’re not using AI as a crutch, versus using it to augment learning? The former setting outsources your thinking to AI, whereas the latter can help you reveal gaps in your understanding, bypass blockers that prevent learning, and/or tailor education to your style. In this post, I provide an analogy between learning and phase transitions in statistical mechanics, and describe recommendations and warnings on using LLMs in different learning scenarios. [...]

Tags: education · llms · personal

Re-envisioning Euclid Galaxy Morphology

8 minute read

Published:

With the Euclid and Roman Space Telescope missions ready to image billions of galaxies, we’ll need data-driven methods to find new, rare phenomena that exist outside human-defined taxonomies! Sparse Autoencoders (SAEs) can be that discovery engine, surfacing interpretable features in modern galaxy surveys. This blog post highlights some preliminary results from our tiny NeurIPS ML4PS workshop paper, jointly led by Mike Walmsley and me. Read the paper here. [...]

Tags: computer-vision · galaxies · interpretability · machine-learning · research

Galaxy environments and graph neural networks

9 minute read

Published:

This post discusses how graph neural networks (GNNs) can model the galaxy–halo connection within its large-scale surroundings. Dark matter structures, which seem to account for most of the mass in the Universe, can be represented as nodes in a cosmic graph. But dark matter—which solely interacts via gravitation—is also much easier to simulate than the messy baryons, whose magnetohydrodynamics are computationally expensive. By exploiting the representational power of GNNs, can we predict galaxies’ baryonic properties purely using simple dark matter-only simulations? Yes we can! [...]

Tags: galaxies · graphs

Worlds we impose

3 minute read

Published:

In the book Impro: Improvisation and the Theatre, Keith Johnstone recounts a moment between a teacher and a special needs student. The teacher holds up a flower and says, “Look at the pretty flower.” The girl responds, “All of the flowers are beautiful.” Then the teacher gently says, “but this flower is especially beautiful.” The girl proceeds to scream and thrash about violently. [...]

Tags: advice · llms · personal · philosophical

Graph neural networks in astrophysics

15 minute read

Published:

Many physical phenomena exhibit relational inductive biases and can be represented as mathematical graphs. In recent years, graph neural networks (GNNs) have been successfully used to model and learn from astronomical data. This post provides an introductory review to GNNs for astrophysics. [...]

Tags: galaxies · graphs · review · tutorial

The benefits of slow growth, misguided rabbit holes, and painful mistakes

16 minute read

Published:

I am a self-confessed productivity junkie. I hate wasting time. And if you scroll through social media, or even my blog posts, you might think that the typical research or learning process is just a happy, monotonic hill climb, capped off with regular announcements of new discoveries or gained expertise. But what if the most important lessons emerge not from unencumbered progress, but rather from seemingly aimless pursuits and the frustration of doing things badly? This post is a tribute to all those times we got stuck and emerged with nothing to show for it, because those “unproductive” moments lead to some of the most important lessons we can ever learn. [...]

Tags: academia · personal · productivity

Foundation Models in Astronomy

6 minute read

Published:

Here’s a casual introduction to foundation models and how they might impact astronomy research in the coming years. I’m writing this on the train back from New York to Baltimore, having just wrapped up the Foundation Models in Astronomy workshop at the Flatiron Institute Center for Computational Astrophysics. My co-organizers and I are planning to write up a more comprehensive blog post based on our workshop discussions; in the meantime, you’ll just have to settle for this. [...]

Tags: astronomy · computer-vision · foundation-models · llms

Accelerate the Boring Stuff with AI

4 minute read

Published:

Need to perform a boring, repetitive task? Even if it can’t be fully automated, you may be able to dramatically speed up your task by partially automating it! Simply use a LLM to code up a throwaway app to help accelerate your mindless task. [...]

Tags: llms · productivity

On Pope Francis and galaxies

3 minute read

Published:

Back in 2014, I was privileged to participate in the Vatican Observatory Summer School (VOSS). Over those four weeks, I formed new friends, made new discoveries, and ate awesome food. But the most unforgettable moment of that trip was meeting Pope Francis. [...]

Tags: astronomy · galaxies · personal · politics

Four ways I use LLMs

10 minute read

Published:

Large language models (LLMs) haven’t upped my productivity by 10x, but they have dramatically changed the way that I work. In this post I introduce four ways that I use LLMs every day. [...]

Tags: llms · productivity

Hello World (again)!

7 minute read

Published:

Oh hey, it’s me again. Yes, I’m going to try to write more blog posts. Yes, I’ve promised that before. Sorry. This time it’ll be different. [...]

Tags: blogging · personal

2024

2021

2020

Visualizing deep learning with galaxies, part 2

19 minute read

Published:

In the previous post, we examined the feature space of galaxy morphological features. Now, we will use the Grad-CAM algorithm to visualize the parts of a galaxy image that are most strongly associated with certain classifications. This will allows us to identify exactly which morphological features are correlated with low- and high-metallicity predictions. [...]

Tags: galaxies · visualization · tutorial · original-blog

Identifying racial bias in health data

12 minute read

Published:

We are becoming more and more reliant on machine learning algorithms in our everyday lives. But what if these algorithms aren’t fair? In this exploratory data analysis of Obermeyer et al. 2019, we look at how racial biases can creep in to an algorithm’s decision-making process. [...]

Tags: tutorial · data-science · original-blog

Deep learning with galaxy images

7 minute read

Published:

Welcome! In this first post to my blog, we will take a deeper look at galaxy images. Why should we bother measuring the metallicities, or elemental abundances, of other galaxies? And why would we use convolutional neural networks? Read more to find out! [...]

Tags: galaxies · computer-vision · original-blog