Categoría: Uncategorized

  • Dimensionality Reduction: PCA, t-SNE and UMAP, and What Each One Throws Away

    Too Many Columns

    A grayscale image of 28 by 28 pixels is a point in a space with 784 dimensions. A single cell measured with RNA sequencing is a point in a space with around 20,000, one for each gene. Nobody can look at a scatter plot in 20,000 dimensions, and many algorithms struggle there too.

    Richard Bellman called this the curse of dimensionality. As dimensions grow, the volume of the space grows so fast that data becomes sparse. The distance between a point and its nearest neighbor ends up not much smaller than the distance to its farthest one, which undermines anything that depends on «close» meaning something, such as nearest-neighbor methods and clustering.

    The saving grace is that real data rarely fills all those dimensions. Pixels in a handwritten digit are strongly correlated with their neighbors, and genes are regulated in coordinated programs. The data usually lies near a much lower-dimensional structure, often called a manifold. Dimensionality reduction tries to find that structure and describe each point with far fewer numbers, while keeping the information that matters. Every method has to decide what matters, and that decision is the main difference between them.

    Principal Component Analysis

    PCA is the oldest of the three methods here. Karl Pearson described it in 1901, and Harold Hotelling developed it further in 1933. It finds new axes for the data, called principal components, ordered by how much variance they capture. The first component is the direction along which the data spreads out the most. The second is the direction of greatest remaining spread, perpendicular to the first, and so on.

    Computationally, these directions are the eigenvectors of the data’s covariance matrix, or equivalently come from the singular value decomposition of the centered data. Keeping only the first few components gives a projection that preserves as much variance as any linear projection to that many dimensions can.

    PCA has properties that make it a solid first step. It is deterministic, so the same data always gives the same result. It is fast. The components are linear combinations of the original features, which means they can be inspected: a component might load heavily on a group of genes known to be involved in the cell cycle. And the explained variance of each component tells you how much information you are keeping. A plot of cumulative explained variance is the standard way to decide how many components to keep.

    A well-known application is eigenfaces, from Turk and Pentland in 1991: PCA on a set of face images produces components that look like ghostly faces, and any face can be approximately rebuilt as a weighted sum of a few dozen of them. PCA is also used as preprocessing, to compress data before running a slower method on it, and to remove noise by discarding low-variance components.

    Its limitation is that it is linear. If the data lies on a curved surface, like a sheet of paper rolled into a spiral, PCA projects it flat and points from different layers of the roll land on top of each other.

    Nonlinear Methods Before t-SNE

    In 2000, the journal Science published two papers in the same issue proposing ways to «unroll» curved manifolds. Isomap, from Tenenbaum, de Silva and Langford, estimates distances along the manifold by building a neighborhood graph and computing shortest paths through it, then embeds those geodesic distances in low dimensions. Locally Linear Embedding, from Roweis and Saul, describes each point as a weighted combination of its neighbors and finds a low-dimensional layout that preserves those weights. Both worked well on clean synthetic examples like the «Swiss roll,» but they were sensitive to noise and to the choice of neighborhood size on real data.

    t-SNE

    t-SNE, from Laurens van der Maaten and Geoffrey Hinton in 2008, focused on a narrower goal: making two-dimensional pictures in which points that are neighbors in the original space stay neighbors in the picture.

    It converts distances in high dimensions into probabilities that one point would pick another as a neighbor, using a Gaussian centered on each point. It then places points in two dimensions and defines similar probabilities there, but with a Student t-distribution, which has heavier tails. Finally, it moves the points around with gradient descent to make the two sets of probabilities match, measured by KL divergence. The heavy-tailed distribution in the low-dimensional space is the key trick. It lets moderately distant points be placed far apart, which solves the «crowding problem» of the earlier SNE method and produces the well-separated clusters t-SNE plots are known for.

    The main parameter is perplexity, which roughly sets how many neighbors each point considers. Wattenberg, Viégas and Johnson’s 2016 article «How to Use t-SNE Effectively» in the journal Distill showed how much the output can change with it, and listed several traps: cluster sizes in a t-SNE plot mean nothing, distances between clusters may mean nothing, and random noise can produce apparent clusters at low perplexity.

    UMAP

    UMAP, from McInnes, Healy and Melville in 2018, has a theoretical basis in topology (fuzzy simplicial sets), but in practice it works much like t-SNE. It builds a weighted nearest-neighbor graph in high dimensions and optimizes a low-dimensional layout whose graph matches it, using a cross-entropy objective.

    It became popular quickly for practical reasons. It is much faster than the original t-SNE and scales to millions of points. It can embed into more than two dimensions, so it can serve as general preprocessing and not only visualization. It can place new points into an existing embedding. And its plots were thought to preserve more global structure, meaning the relative positions of clusters. In 2019, Becht and colleagues published an evaluation in Nature Biotechnology arguing for UMAP in single-cell analysis, and it became the default visualization in tools like Scanpy and Seurat.

    Later work complicated the global structure claim. Kobak and Linderman showed in 2021 that a large part of the difference came from initialization: UMAP started from a spectral embedding by default, while t-SNE was usually started at random. When both are given the same informative initialization, the gap in global structure mostly disappears.

    The Distortion Problem

    In 2023, Tara Chari and Lior Pachter published «The specious art of single-cell genomics» in PLOS Computational Biology. They measured how well two-dimensional t-SNE and UMAP embeddings of real single-cell data preserved local neighborhoods, global relationships between cell types, and pairwise distances. Their conclusion was that the distortion is severe on all three counts. To show how little the local-preservation criterion constrains the picture, they also produced an embedding of the same data forced into the shape of an elephant, which preserved neighborhoods comparably to the standard methods.

    This does not make t-SNE or UMAP useless. It means a 2D plot of 20,000-dimensional data is a lossy summary, and conclusions like «these two cell types are close» or «this cluster is twice as spread out» should be checked in the original space or in a PCA space, not read off the picture.

    Choosing Between Them

    For preprocessing before another model, PCA is usually the right choice: it is fast, reproducible and interpretable, and it keeps a meaningful notion of distance. For compressing data where the structure is strongly nonlinear, autoencoders (neural networks trained to reconstruct their input through a narrow bottleneck layer) are the learned alternative. For visualizing local cluster structure in large datasets, t-SNE and UMAP are both reasonable, ideally run with a few different parameter settings and a PCA initialization. A common workflow in single-cell analysis combines them: reduce to around 50 principal components first, then run UMAP or t-SNE on those.

    Reflection

    Each method keeps something different: PCA keeps variance, Isomap keeps distances along the manifold, t-SNE and UMAP keep neighborhoods. None of them can keep everything, because squeezing thousands of dimensions into two always loses information. A clean, well-separated scatter plot is easy to read as a faithful picture of the data, and it rarely is. It is safer to know what the method was designed to keep and to trust the picture only on that.

    By: Max Johnson B.

  • Clustering: Finding Groups in Data Nobody Labeled

    Learning Without Answers

    Most of the machine learning people hear about is supervised: the model sees an input, sees the correct answer, and adjusts. Clustering has no correct answers to look at. It receives a pile of unlabeled data points and has to decide which ones belong together.

    That makes it one of the most useful and least well-defined tasks in the field. A retailer with two million customer records does not know in advance how many kinds of customers it has. A biologist sequencing thousands of individual cells does not know which cell types are present. Clustering is how both of them get a first map of the data. The catch is that «which points belong together» depends entirely on how similarity is measured and what shape a group is assumed to have, and different algorithms make very different assumptions.

    k-means

    k-means is the most widely used clustering algorithm, and it is simple. Pick a number k. Place k centers somewhere in the data. Then repeat two steps: assign every point to its nearest center, and move each center to the mean of the points assigned to it. Stop when the assignments stop changing.

    The algorithm goes back to Stuart Lloyd at Bell Labs in 1957 (though it was not published until 1982), and the name «k-means» comes from James MacQueen in 1967. Each iteration can only decrease the total squared distance between points and their centers, so it always converges. What it converges to, though, is a local optimum that depends on where the centers started. A bad initialization can put two centers inside one real group and leave another group with none.

    Arthur and Vassilvitskii addressed this in 2007 with k-means++, which picks the initial centers one at a time, each chosen with probability proportional to its squared distance from the centers already placed. That spreads the starting points out and comes with a guarantee that the result is within a logarithmic factor of the optimum in expectation. It is the default initialization in most libraries today.

    k-means has two built-in assumptions worth keeping in mind. It uses Euclidean distance to a mean, so it prefers compact, roughly spherical clusters of similar size. And it assigns every single point to some cluster, outliers included. On data shaped like two interlocking crescents, it will cut straight across both.

    Choosing k

    k-means needs the number of clusters as input, which is often the exact thing the analyst wants to find out. Two common heuristics help. The elbow method plots the total within-cluster distance against k and looks for the point where adding more clusters stops giving much improvement. The silhouette score, introduced by Peter Rousseeuw in 1987, measures for each point how close it is to its own cluster compared to the nearest other cluster, on a scale from -1 to 1. Averaging it across the dataset and picking the k with the highest value is a reasonable rule.

    Neither method gives a definitive answer, and on real data the elbow is often not visible at all. In practice, the choice of k is frequently made by looking at whether the resulting groups make sense to someone who knows the domain.

    Hierarchical Clustering

    Hierarchical clustering avoids choosing k up front by building a whole tree of groupings. The agglomerative version starts with every point as its own cluster and repeatedly merges the two closest clusters until only one is left. The history of merges is drawn as a dendrogram, and cutting the tree at different heights gives different numbers of clusters.

    The key decision is how to measure the distance between two clusters. Single linkage uses the closest pair of points, which can follow long, chain-like shapes but tends to string unrelated groups together through a few intermediate points. Complete linkage uses the farthest pair, which produces compact clusters. Ward’s method, from Joe Ward in 1963, merges the pair that causes the smallest increase in total within-cluster variance, and in practice it behaves a lot like k-means.

    The main drawback is cost. A straightforward implementation needs all pairwise distances, which is quadratic in memory, so it works well on thousands of points and poorly on millions. It is common in biology, where dendrograms of gene expression profiles or species are standard figures.

    DBSCAN and Density-Based Methods

    DBSCAN takes a different view: a cluster is a region where points are packed densely, separated from other clusters by regions where they are sparse. Ester, Kriegel, Sander and Xu proposed it in 1996, and the paper received the KDD Test of Time Award in 2014.

    The algorithm has two parameters: a radius eps and a minimum number of points. A point with at least that many neighbors within eps is a core point. Clusters grow by connecting core points that are within reach of each other, and points that are not reachable from any core point are labeled as noise.

    This gives DBSCAN three things k-means lacks. It does not need the number of clusters. It finds clusters of arbitrary shape, including the two crescents. And it has an explicit notion of outliers, instead of forcing every point into a group. The weak spot is that a single eps assumes all clusters have roughly the same density. HDBSCAN, by Campello, Moulavi and Sander in 2013, fixes this by building a hierarchy across all density levels and extracting the most stable clusters from it, which is why it is now often recommended over plain DBSCAN.

    Probabilistic Clustering with Gaussian Mixtures

    A Gaussian mixture model assumes the data was generated by several Gaussian distributions, each with its own mean, covariance and weight, and fits them with the expectation-maximization algorithm (Dempster, Laird and Rubin, 1977). Instead of assigning each point to exactly one cluster, it gives a probability of belonging to each.

    That soft assignment is useful when groups overlap. Because each component has its own covariance matrix, mixtures can also fit elongated, tilted clusters that k-means would split. k-means is in fact a limiting case of a Gaussian mixture where all covariances are equal and spherical and the assignments are forced to be hard.

    Where Clustering Gets Used

    Customer segmentation is the textbook example, and it is real: marketing teams use clusters of purchasing behavior to decide who gets which campaign. In single-cell RNA sequencing, clustering is a central step. Tools like Seurat and Scanpy build a nearest-neighbor graph of cells and run community detection algorithms such as Louvain or Leiden on it, and the resulting clusters are then annotated as cell types. In computer vision, k-means on pixel colors is a simple way to reduce an image to a small palette, and clustering of local image descriptors produced the «bag of visual words» used in image retrieval before deep learning. Astronomers cluster stars by position and velocity to find stellar streams, and fraud teams cluster transactions to find groups that behave unlike the rest.

    The Question of What a Good Cluster Is

    Jon Kleinberg proved in 2002 that no clustering function can satisfy three natural-looking properties at once: scale invariance (multiplying all distances by a constant should not change the result), richness (every possible partition should be reachable with some distance function), and consistency (making points within a cluster closer, and points in different clusters farther, should not change the result). Every algorithm gives up at least one of them.

    This matches what practitioners see. The same dataset clustered with k-means, DBSCAN and a Gaussian mixture can give three different, equally defensible answers. Internal metrics like the silhouette score favor certain shapes, so they cannot settle the matter either.

    Reflection

    Clustering can look like the model is discovering structure on its own, but every method brings its own definition of a group: close to a center, dense in a region, or generated by the same distribution. The algorithm finds what fits that definition. The results are most useful when someone checks the clusters against knowledge from outside the data, because the math alone cannot say which grouping is the real one.

    By: Max Johnson B.

  • Support Vector Machines: Drawing the Widest Possible Line Between Two Classes

    The Problem a Support Vector Machine Solves

    Picture two groups of points on a sheet of paper, red and blue, and suppose a straight line can separate them. Usually there are infinitely many lines that do the job. Some pass very close to a red point, others brush against a blue one. All of them classify the training data perfectly, but they will not all behave the same way on new points.

    A support vector machine (SVM) answers the question of which line to pick with a specific rule: choose the one that leaves the widest possible gap between the two classes. That gap is called the margin, and the idea is that a boundary with lots of room on both sides is less likely to be fooled by a new point that lands slightly off from where the training points were. In more than two dimensions the line becomes a plane, and in general a hyperplane, but the principle does not change.

    Support Vectors and the Maximum Margin

    The points that sit exactly on the edge of the margin are the support vectors. They are the only training points that determine where the boundary goes. Move any other point around (without crossing the margin) and the solution stays exactly the same. Remove a support vector and the boundary shifts.

    This is an unusual property. Most models are influenced a little by every training example. An SVM is defined by a small subset of them, often a small fraction of the dataset, which makes the final model compact and gives a concrete answer to the question «which examples were hard?»

    Mathematically, maximizing the margin is equivalent to minimizing the norm of the weight vector subject to every point being on the correct side with some minimum distance. That is a convex quadratic optimization problem. Convex means there is a single global optimum and no local minima to get stuck in, which was a big selling point in the 1990s, when training neural networks was notoriously finicky.

    Soft Margins for Messy Data

    Real data is rarely perfectly separable. A few mislabeled points, or classes that genuinely overlap, make the strict version of the problem impossible to solve. Corinna Cortes and Vladimir Vapnik addressed this in their 1995 paper «Support-Vector Networks» by introducing the soft margin. Each point gets a slack variable that allows it to fall inside the margin or even on the wrong side, and the objective pays a penalty for every unit of slack.

    The penalty is controlled by a parameter usually called C. A large C punishes violations heavily, so the model bends to classify almost every training point correctly and risks overfitting. A small C tolerates more violations in exchange for a wider, simpler margin. Tuning C is one of the two main decisions when training an SVM. The other is the kernel.

    The Kernel Trick

    A straight line cannot separate two concentric circles of points, one inside the other. But if each point (x, y) is mapped to three dimensions by adding a new coordinate x² + y², the inner circle ends up low and the outer circle ends up high, and a flat plane separates them easily. Many problems that are not linearly separable in their original space become separable after mapping to a higher-dimensional one.

    The catch is cost. Explicitly mapping data into a space with thousands or millions of dimensions is expensive, and some useful mappings go to infinite dimensions. The kernel trick avoids the mapping entirely. The SVM’s optimization and its prediction rule only ever need dot products between pairs of points. A kernel function computes the dot product in the high-dimensional space directly from the original coordinates, without ever building the high-dimensional vectors.

    Boser, Guyon and Vapnik combined this trick with the maximum margin classifier in 1992. The common kernels are the polynomial kernel, which corresponds to all feature products up to a certain degree, and the radial basis function (RBF) or Gaussian kernel, whose feature space is infinite-dimensional. The RBF kernel has its own parameter, gamma, which controls how far the influence of a single training point reaches. A large gamma makes each point’s influence very local and the boundary very wiggly. A small gamma makes it smooth.

    Which functions count as valid kernels is governed by Mercer’s theorem: the kernel must produce a positive semi-definite matrix for any set of points. This opened the door to kernels built for specific data types, such as string kernels for text and DNA sequences, or graph kernels for molecules, where there is no natural vector representation to start from.

    Training at Scale

    The quadratic program behind an SVM involves a matrix with one entry per pair of training points. For 100,000 examples, that is ten billion entries. General-purpose solvers could not handle this, so specialized algorithms were developed. John Platt’s Sequential Minimal Optimization (SMO), published in 1998, broke the problem into the smallest possible subproblems (two variables at a time) that can be solved analytically. It became the basis for LIBSVM, the library by Chih-Chung Chang and Chih-Jen Lin that is still inside scikit-learn’s SVM classes today.

    Even with SMO, kernel SVMs scale roughly between quadratically and cubically with the number of samples. For linear SVMs there are much faster solvers, like LIBLINEAR, that handle millions of examples. For kernel SVMs on large datasets, approximations such as random Fourier features (Rahimi and Recht, 2007) map the data into a finite space where a linear SVM can approximate the kernel version.

    Where SVMs Were the Best Tool Available

    For about fifteen years, SVMs were often the most accurate general-purpose classifier around. Thorsten Joachims showed in 1998 that linear SVMs worked very well for text categorization, where documents are represented as sparse vectors with tens of thousands of word dimensions and the classes tend to be linearly separable. Spam filters and news classifiers used them widely.

    On the MNIST handwritten digit benchmark, DeCoste and Schölkopf reported a 0.56% test error in 2002 using a polynomial kernel SVM trained with «virtual» support vectors (shifted copies of the support vectors that teach the model small translations do not matter). That was competitive with the convolutional networks of the time. In bioinformatics, SVMs were used for protein classification, gene expression analysis for cancer subtypes, and splice site detection. In computer vision, the Dalal and Triggs pedestrian detector from 2005 combined histogram of oriented gradients (HOG) features with a linear SVM and became a standard method for years.

    What Changed After Deep Learning

    The same property that made SVMs attractive, a fixed kernel chosen before training, also limits them. The kernel decides what «similar» means, and if it is the wrong notion of similarity for the problem, no amount of training will fix it. Deep networks learn the representation and the classifier together. Once there was enough data and GPU compute, learned features beat hand-designed features plus an SVM on images, audio and eventually text.

    SVMs have not disappeared. They remain a good option on small to medium datasets with a clear feature representation, particularly when the number of features is large compared to the number of samples, as in some genomics and spectroscopy problems. They are also still used as the final classifier on top of features extracted from a pre-trained neural network. Their one-class variant is used for novelty detection, and support vector regression uses the same margin idea to fit a tube around the data instead of separating it.

    Reflection

    The SVM made an idea very explicit: of all the boundaries that fit the data, prefer the one that sits farthest from the examples. That preference comes from statistical learning theory, and it held up in practice. It is also why a model trained on thousands of points ends up defined by a handful of them. Even where deep networks now do better, the central questions are the same ones the SVM asked directly: how much room there is between the classes, and what it means for two data points to be similar.

    By: Max Johnson B.

  • Decision Trees, Random Forests and Gradient Boosting: The Models That Still Rule Tabular Data

    What a Decision Tree Does

    A decision tree is a sequence of yes or no questions about the data. Is the applicant’s income above 30,000? If yes, is their debt ratio under 0.4? If no, have they missed a payment in the last year? Each question splits the dataset into two smaller groups, and the process repeats inside each group until the groups are pure enough, or small enough, that splitting further stops helping. The final groups are the leaves, and each leaf holds a prediction: a class for classification, an average value for regression.

    The model learns which questions to ask. At every node, the algorithm tries many candidate splits across every feature and keeps the one that separates the data best. For classification, «best» usually means the split that most reduces Gini impurity or entropy. For regression, it is the split that most reduces the variance of the target inside each child. This is a greedy procedure. It picks the best split right now without checking whether a worse split today would lead to a better tree later, and that turns out to be a reasonable compromise, because finding the globally optimal tree is NP-hard.

    The two classic algorithms come from the 1980s. Breiman, Friedman, Olshen and Stone published CART (Classification and Regression Trees) in 1984, and Ross Quinlan published ID3 in 1986, later refined into C4.5. Almost every tree implementation in use today descends from one of those two lines.

    Why a Single Tree Is Not Enough

    Trees have real strengths. They handle numerical and categorical features without scaling, they do not care whether a relationship is linear, and a small tree can be printed on a page and read by someone with no statistics background. A doctor can follow the path a tree took to classify a patient.

    The problem is variance. A tree grown until every leaf is pure will memorize the training set, noise included. Change a few training examples and the top split can change, which changes everything below it. The result is a model that looks excellent on the data it has seen and unstable on everything else. Pruning helps (cutting back branches that do not improve validation performance), and so does limiting depth, but a pruned tree is also a weaker tree. For most of the 1990s this tension was the main complaint about the method: interpretable, but not very accurate.

    The fix came from a different direction. Instead of trying to build one good tree, build many mediocre ones and combine them.

    Random Forests

    Leo Breiman proposed random forests in 2001, building on his earlier work on bagging (bootstrap aggregating). The recipe has two sources of randomness. First, each tree is trained on a bootstrap sample, a random sample of the training set drawn with replacement, so every tree sees a slightly different dataset. Second, at each split, the tree is only allowed to consider a random subset of the features. For classification, a common default is the square root of the total number of features.

    That second step is the important one. Without it, if one feature is very predictive, every tree would split on it first and the trees would end up highly correlated. Averaging correlated models does not reduce variance much. Forcing each split to choose from a random subset decorrelates the trees, and averaging hundreds of decorrelated, high-variance trees gives a model with much lower variance and almost the same bias.

    Random forests also come with a free validation estimate. Each bootstrap sample leaves out roughly a third of the training data, and those out-of-bag examples can be used to measure error without a separate hold-out set. The method is hard to break, needs little tuning, and trains in parallel since each tree is independent. For many years it was the default first model people tried on a new tabular problem, and it is still a strong baseline.

    Boosting: Trees That Correct Each Other

    Boosting takes the opposite approach. Instead of training independent trees and averaging them, it trains trees one after another, and each new tree focuses on what the previous ones got wrong.

    AdaBoost, introduced by Freund and Schapire in the mid 1990s, did this by reweighting the data. After each round, misclassified examples get a higher weight, so the next weak learner (often a tree with a single split, called a stump) pays more attention to them. The final prediction is a weighted vote.

    Jerome Friedman generalized the idea in 2001 with gradient boosting. The model is built as a sum of trees, and each new tree is fitted to the negative gradient of the loss function with respect to the current predictions. For squared error, that gradient is just the residual: the difference between the true value and what the ensemble currently predicts. So the second tree learns to predict the errors of the first, the third learns the errors of the first two, and so on. A learning rate shrinks each tree’s contribution, which slows learning down on purpose and generally improves generalization.

    Because it works with any differentiable loss, gradient boosting handles regression, classification, ranking and custom objectives with the same machinery. It also tends to be more accurate than random forests, at the cost of being easier to overfit and more sensitive to hyperparameters like depth, learning rate and number of trees.

    XGBoost, LightGBM and CatBoost

    Gradient boosting became dominant in practice once fast, scalable implementations appeared. XGBoost, by Tianqi Chen and Carlos Guestrin, was presented at KDD in 2016. It added a regularization term to the objective that penalizes complex trees, used second-order gradient information to choose splits, handled missing values by learning a default direction at each split, and was engineered for speed with cache-aware and parallel computation. The paper reported that among 29 winning solutions published on Kaggle in 2015, 17 used XGBoost.

    Microsoft’s LightGBM (2017) made training faster on large datasets by growing trees leaf-wise instead of level-wise and by using histogram-based split finding, plus sampling tricks that skip examples with small gradients. Yandex’s CatBoost focused on categorical features, using an ordered form of target encoding that avoids leaking the label into the features, and symmetric trees that make prediction fast.

    The three libraries are now close in accuracy on most problems, and the choice between them often comes down to dataset size, how many categorical columns there are, and what the team already knows.

    Why Deep Learning Has Not Taken Over Tabular Data

    Neural networks replaced almost everything in vision, speech and language. Tabular data is the exception. Grinsztajn, Oyallon and Varoquaux studied this directly in a NeurIPS 2022 paper, benchmarking tree-based models and several deep learning architectures on 45 datasets with a careful hyperparameter search for each. Tree-based models stayed ahead on medium-sized data (around 10,000 samples), even before considering that they train much faster.

    Their analysis pointed to inductive biases. Neural networks are biased toward smooth functions, while real tabular targets are often irregular, with sharp thresholds (a tax bracket, a credit cutoff). Tabular datasets also tend to contain many uninformative columns, and trees are good at simply ignoring them. And neural networks are rotation invariant in a way that mixes features together, which does not match data where each column has its own meaning.

    There is a newer twist. In January 2025, Hollmann and colleagues published TabPFN in Nature, a transformer pre-trained on millions of synthetic tabular datasets. It predicts on a new dataset in a single forward pass without training on it. On datasets with up to 10,000 samples, the authors report that it beat tuned ensembles of strong baselines, and in classification it did so in 2.8 seconds against baselines tuned for four hours. It does not replace boosting on large datasets, but it is the first serious sign that the gap is closing for small ones.

    Reading What the Model Learned

    An ensemble of 500 trees is not interpretable the way a single tree is, but the structure still helps. Feature importance can be measured by how much each feature reduces impurity across all splits, or by permutation importance: shuffle one column and see how much accuracy drops. Impurity-based importance has a known bias toward features with many unique values, so permutation importance is often the safer choice.

    SHAP values go further. The TreeSHAP algorithm by Lundberg and colleagues computes exact Shapley values for tree ensembles in polynomial time, which gives a per-prediction breakdown of how much each feature pushed the output up or down. This is a large part of why boosted trees are common in regulated settings like credit scoring and insurance, where a lender may need to explain an individual decision.

    Where These Models Are Used

    Fraud detection, credit risk, churn prediction, demand forecasting, click-through prediction for ads, insurance pricing, and a large share of clinical risk scores run on gradient boosted trees or random forests. In the physical sciences they appear in particle physics event classification and in materials property prediction. The common thread is data that lives in a table, with a few dozen to a few thousand columns, where each column means something specific.

    Reflection

    Decision trees are one of the oldest ideas in machine learning, and the best-performing models on the most common kind of business data are still made of them. The individual tree never got much better. What changed was how trees are combined: averaging many decorrelated ones in random forests, or stacking small corrections one after another in boosting. When someone reaches for a neural network by default, it is worth training a gradient boosted model first. On a spreadsheet, it is usually the model to beat.

    By: Max Johnson B.

  • Adversarial Examples: The Blind Spot That Keeps Reappearing

    What an Adversarial Example Is

    In 2014, Szegedy and colleagues made an odd discovery: state-of-the-art image classifiers reliably misclassify inputs that are only slightly different from ones they classify correctly, differences small enough that a human looking at both images can’t tell them apart. Stranger still, the same crafted input often fools multiple different models, even ones with different architectures trained on different subsets of data. That transferability was the first clue that this wasn’t a quirk of one specific network, it was something more structural.

    The initial guess was that extreme non-linearity in deep networks caused the blind spot. Goodfellow and colleagues argued the opposite the following year: modern networks are actually too linear in high-dimensional space, and that linearity is precisely what makes them predictably sensitive to small perturbations pushed in a consistent direction.

    The Fast Gradient Sign Method

    That insight led directly to FGSM, the Fast Gradient Sign Method, introduced by Goodfellow, Shlens, and Szegedy in 2014. It’s a single-step attack: take the gradient of the model’s loss with respect to the input, take the sign of each element, scale it by a small factor, and add that to the original input. One gradient computation is enough to reliably push an image across a decision boundary while keeping the change nearly invisible to a human. Kurakin and colleagues later measured this at scale on ImageNet, finding top-1 error rates around 63 to 69 percent for reasonably chosen perturbation sizes.

    FGSM’s cheapness is also its limitation. It’s easy to defend against directly once a model has seen that kind of perturbation during training, which is part of why it became less an attack people worry about and more a building block, and a standard benchmark, for what came next.

    Case: Stickers on a Stop Sign

    The clearest demonstration that this isn’t confined to digital pixel manipulation came from Eykholt and colleagues in 2018. Their RP2 algorithm found a small set of black and white stickers that, placed in specific positions on a real, physical stop sign, caused a road-sign classifier to read it as a Speed Limit 45 sign, consistently, from a range of distances and viewing angles. This wasn’t a manipulated image file, it was a printed sticker on an actual sign photographed by an actual camera under actual lighting.

    The result mattered directly for autonomous driving, where a sign classifier misreading a stop sign has obvious consequences. Follow-up work extended the same idea to object detectors like YOLO, trying to make the sign disappear from detection entirely rather than just get mislabeled, and other researchers found that some detectors resisted the original attack, which kicked off a genuine back and forth of attack and counter-attack papers that’s continued for years.

    Projected Gradient Descent and Adversarial Training

    Madry and colleagues formalized a much stronger, iterative version of the same idea in 2018: Projected Gradient Descent (PGD), which takes multiple small gradient steps instead of one, projecting back into the allowed perturbation region after each step. PGD quickly became the standard benchmark attack, strong enough that a defense which survives it is taken seriously, and one that doesn’t, generally isn’t.

    The matching defense, adversarial training, bakes PGD directly into the training loop: at every step, generate a PGD-perturbed version of each training example and train the model on that instead of the clean input, framed formally as a min-max optimization problem. Athalye and colleagues later broke most of the defenses submitted to a major 2018 robustness competition using stronger attack variants within weeks of the review cycle ending. PGD adversarial training was one of the few that held up, and it largely still does.

    The Attack-Defense Cycle

    That pattern, a defense proposed, then broken within months by a slightly stronger attack, repeated often enough that it became something researchers explicitly study as a cycle rather than a series of one-off events. PGD adversarial training surviving this long is the exception, not the norm.

    It comes at a real cost, though. Training against PGD-generated examples at every step multiplies training time, since each step now runs an inner optimization loop of its own. More importantly, models trained this way tend to lose accuracy on ordinary, unperturbed inputs, a robustness-accuracy tradeoff that’s been measured repeatedly and that researchers are still actively trying to narrow rather than eliminate.

    Case: Jailbreaking Language Models with GCG

    The same underlying idea shows up again, a decade later, in a very different kind of model. Zou and colleagues introduced the Greedy Coordinate Gradient (GCG) attack in 2023: an automated search for a short suffix of otherwise meaningless tokens that, appended to a harmful request, reliably pushes an aligned language model into starting its response with something like «Sure, here’s how to» instead of refusing.

    The property that made FGSM interesting shows up here too. A suffix optimized against one open-weight model frequently transfers to other models the attacker never had direct gradient access to, including closed commercial systems. Follow-up work built generative models that can produce large numbers of these successful suffixes in seconds rather than requiring a fresh optimization run each time, pushing attack success rates on some tested open models close to 100 percent. Separate mechanistic research found these suffixes work by hijacking the model’s internal attention, dominating how it contextualizes the rest of the prompt in the moment right before it starts generating a response.

    Conclusion

    From a stop sign with stickers on it to a string of gibberish tokens appended to a chatbot prompt, the same fact keeps resurfacing: a model trained to minimize error over a data distribution doesn’t automatically learn a decision boundary that lines up with human intuition about which inputs count as «similar.» Anyone with gradient access, or in some cases just enough queries and compute, can find the specific direction where that mismatch is largest and push an input across it. Every generation of models so far, image classifiers, object detectors, aligned language models, has shipped with some version of this blind spot, and every defense proposed against it has bought time rather than closed the gap for good.

    By: Max Johnson B.

  • Differential Privacy: Making the Privacy-Accuracy Tradeoff Explicit

    What Differential Privacy Guarantees

    Differential privacy is a formal mathematical definition of privacy, not just a set of best practices. Introduced by Cynthia Dwork and colleagues in 2006, it says a mechanism (an algorithm that processes a dataset and returns some output) is ε-differentially private if the probability of any given output barely changes whether or not any single person’s record is included in the dataset. Formally, for two «neighboring» datasets that differ by exactly one record, the probability of any output S under mechanism M satisfies Pr[M(D) ∈ S] ≤ e^ε · Pr[M(D’) ∈ S].

    What that buys you is specific: someone looking at the output cannot confidently infer whether any particular individual’s data was even in the dataset, let alone what it said. This is a stronger guarantee than older anonymization techniques, which typically just strip names and IDs from a dataset and hope the remaining fields aren’t enough to re-identify anyone. That hope has failed repeatedly once attackers cross-reference «anonymized» data with outside information. Differential privacy doesn’t rely on hoping.

    The Epsilon Parameter

    The strength of the guarantee is controlled by ε, often called the privacy budget. Smaller ε means less the output can shift based on one person’s data, which means stronger privacy and, unavoidably, more noise and less accuracy. Many deployments also add a second parameter, δ, a tiny probability (often around 10⁻⁵) that the strict guarantee fails in some worst case, giving what’s called (ε, δ)-differential privacy.

    Choosing ε in practice is genuinely hard, and not just technically. A 2023 study out of Northwestern, UC San Diego, Columbia, and Boston University found that when people are shown a specific ε value, they reason about it poorly, and their willingness to share data barely tracks what the number actually implies about their risk. Some privacy researchers argue ε shouldn’t exceed roughly 1.1 (ln 3) for a genuinely strong guarantee. Real deployments frequently use much higher values, which is a tension that shows up directly in the case studies below.

    The Laplace Mechanism

    The most common way to actually add the noise is the Laplace mechanism. Given a function f computed on a dataset, you add random noise drawn from a Laplace distribution, scaled to the function’s global sensitivity, meaning how much f’s output can change if you swap out one single record. A function with low sensitivity needs less noise to hide any one person’s contribution; a function where one record can swing the output wildly needs a lot more. For choosing among a set of discrete options rather than releasing a number, a related tool called the exponential mechanism does the analogous job.

    The underlying idea in both cases is the same: figure out how much one person could possibly move the answer, then inject enough randomness to blur exactly that much.

    Case: The 2020 US Census

    The clearest large-scale test of this framework in the wild is the US Census Bureau, which for the first time used differential privacy, through what it calls its Disclosure Avoidance System, to protect the 2020 decennial census, replacing an older method called data swapping. It set off a real fight among demographers and social scientists.

    Studies since then have found that the noise is genuinely well-behaved at large scale: aggregate population totals for big geographic units like counties come out accurate. The trouble shows up at smaller scales. Research from Mueller and Santos-Lozada found the algorithm introduces disproportionate discrepancies for rural populations and for non-white subgroups specifically, exactly the kind of small-area estimate that local governments and researchers rely on. Steven Ruggles, director of the Minnesota Population Center, became the method’s most vocal critic, arguing the older swapping approach did less damage to accuracy while offering comparable protection. Harvard researchers led by Kosuke Imai ran simulations using the Bureau’s disclosure parameters and found the added noise could meaningfully shift generated redistricting maps, connecting a math parameter to actual electoral map-drawing.

    None of this means the Bureau made an obviously wrong call. It means the tradeoff differential privacy makes explicit, more privacy protection costs some accuracy, became something people had to actually negotiate over instead of ignore, and the negotiation got contentious.

    Case: Apple’s Local Differential Privacy

    Apple runs a different flavor of the same idea, called local differential privacy, where the noise gets added directly on a person’s device before anything is transmitted, so Apple’s own servers never receive real data to begin with. That’s distinct from the Census Bureau’s approach, where a trusted central curator holds the real data and adds noise before releasing results.

    Apple uses this for QuickType keyboard suggestions, emoji suggestions, Lookup Hints, and several Safari behaviors like detecting energy-draining or crash-prone domains, using a technique called Count Mean Sketch. The published epsilon values are concrete: emoji suggestions use ε=4 with one contribution per day, QuickType uses ε=8 with two donations per day, Health Type Usage uses ε=2. Those numbers sit well above the roughly 1.1 ceiling some privacy researchers consider genuinely strong, and that gap didn’t go unnoticed. A 2023 paper on what its authors called pool inference attacks showed that once you account for a user’s contributions accumulating over time rather than looking at a single donation in isolation, Apple’s real-world privacy loss is measurably higher than the individual epsilon values alone would suggest.

    Training Neural Networks with DP-SGD

    Differential privacy also gets applied directly to training machine learning models, using an algorithm called DP-SGD, introduced by Abadi and colleagues in 2016. It modifies ordinary stochastic gradient descent in two steps: compute the gradient for each individual training example separately and clip it to a fixed maximum size, bounding how much any single example can influence the update, then add calibrated Gaussian noise to the clipped gradients before applying them.

    The motivation isn’t hypothetical. Separate research by Carlini and colleagues has repeatedly shown that neural networks, language models in particular, can memorize specific training examples closely enough to regurgitate them later, which is a real privacy failure if the training data included anything sensitive. DP-SGD gives the resulting model a formal guarantee against that. The cost is real too: the literature consistently describes a substantial accuracy gap between DP-SGD-trained models and their non-private equivalents at any reasonably strong privacy budget, and the per-example gradient computation is considerably slower and more memory-hungry than standard training, which is a big part of why DP-SGD, despite being the academic standard answer, still isn’t the default in most production training pipelines.

    The Privacy Budget Problem

    Epsilon isn’t a setting you configure once. Every additional query, or every additional training step run against the same underlying data, spends more of the privacy budget, and these costs compose. Run the same mechanism multiple times against one dataset and the effective privacy loss adds up across all of them, not just the individual runs. Abadi and colleagues introduced a more careful accounting method called the moments accountant to track this more tightly than naive addition would, later generalized by Mironov into a broader framework called Rényi differential privacy.

    The practical consequence is that an organization can’t just pick one good ε and call it solved. If a dataset gets queried repeatedly, or a model gets retrained or fine-tuned again and again on the same data, the total privacy loss has to be tracked and budgeted across the entire pipeline, the same way you’d budget a limited resource, because it genuinely is one.

    Closing Observations

    Differential privacy doesn’t tell anyone what epsilon to pick. What it does is force that choice into the open and make it mathematically provable instead of a guess dressed up as a policy. The Census Bureau’s fight with demographers, Apple’s epsilon values sitting well above what researchers consider genuinely strong, and DP-SGD’s accuracy hit during training are really the same argument playing out in three different rooms: somebody has to decide how much noise is tolerable, and there’s no universal correct number that works for every dataset and every use case.

    That’s arguably the honest contribution here. Older anonymization approaches let organizations avoid that conversation entirely by pretending stripping a name off a record was enough. Differential privacy doesn’t let anyone avoid it, it just gives them a rigorous way to have it.

    By: Max Johnson B.

  • Federated Learning: Training a Model Without Ever Seeing the Data

    Moving the Model, Not the Data

    The default way to build a machine learning model is to collect data in one place and train on it there. Federated learning inverts that. Instead of moving data to the model, the model moves to the data. A copy of the model is sent out to wherever the data already lives (a phone, a hospital server, a factory sensor), it trains for a bit locally, and only the resulting weight updates travel back to a central server. The raw data never leaves the device it started on.

    Google’s research team coined the term around 2016 while working on a very unglamorous problem: how do you improve the keyboard’s word predictions using what people actually type, without collecting what people actually type? That constraint, useful data that legally or practically cannot be centralized, is the reason federated learning exists at all. It shows up again and again: hospitals that cannot pool patient scans, banks that cannot share transaction histories, phones that generate more text and location data per day than any server farm could ethically ingest.

    FedAvg in Five Steps

    The algorithm behind most federated systems is Federated Averaging, or FedAvg, introduced by McMahan and colleagues in 2017. It runs in rounds, and each round follows roughly the same sequence:

    1. The central server sends the current global model to a selected group of clients (a subset of devices or institutions, not necessarily all of them).
    2. Each client trains that model for a few local epochs using only its own data.
    3. Each client sends back the change in its model weights, not the data that produced them.
    4. The server combines all the updates into a new global model, weighting each client’s contribution by how much data it trained on.
    5. The updated global model gets sent out again for the next round.

    In large consumer deployments like Gboard, this can run across millions of phones and thousands of rounds. In medical or financial settings, the numbers flip: a handful of institutions, each holding a large and valuable dataset. Researchers call the first setup cross-device and the second cross-silo, and the two have different bottlenecks. Cross-device systems worry about devices dropping offline mid-round. Cross-silo systems worry more about a single hospital’s data skewing the whole model.

    Gboard’s Prediction Engine

    The clearest production example is still Google’s own keyboard. Gboard’s next-word prediction, smart compose, and emoji suggestions are trained with federated learning directly on users’ phones, and the words someone actually types never get uploaded anywhere. What gets uploaded is a small model update reflecting how that local model changed after a bit of training on that person’s typing.

    Google has kept refining the privacy side of this pipeline. A 2023 paper from the Gboard team describes pairing FedAvg with a technique called DP-FTRL, which gives formal differential privacy guarantees without needing to randomly sample clients in a specific way, combined with secure aggregation so the server can sum client updates without seeing any individual one in the clear. The team reported that, as of that work, every next-word prediction language model shipped in Gboard carries a formal DP guarantee, and that this is now a requirement for future launches, not an optional add-on.

    Brain Scans That Never Leave the Hospital

    Medical imaging is where the cross-silo version of federated learning has been tested hardest. The Federated Tumor Segmentation challenge, known as FeTS and run under MICCAI, trains models to outline glioma tumors in brain MRI scans using data that stays physically inside each participating hospital. The underlying dataset, based on BraTS, includes well over a thousand multi-modal MRI scans contributed by institutions across the globe, thirty-two of them in one recent benchmark, and the training itself runs on Intel’s OpenFL framework with a 3D U-Net segmentation model.

    What makes FeTS interesting isn’t just the privacy angle, it’s that it exposed real engineering lessons. Work from the challenge found that letting the server adaptively weight contributions from different sites, rather than treating every hospital’s update identically, improved the final model. It also found that having only a fraction of institutions (roughly a fifth in some rounds) actively participate at any given step saved time and computing resources without hurting accuracy. That is not something you would predict from the theory alone. It came out of running the system on real institutional data.

    The Non-IID Problem

    FedAvg was built assuming, at least loosely, that each client’s local data looks like a small fair sample of the whole population. Real deployments almost never work that way. One hospital sees mostly one tumor subtype because of its patient population. One phone user types mostly in a language the global model underrepresents. Researchers call this statistical heterogeneity, or more casually, the non-IID problem, and it turns out to matter a lot. Studies have shown that plain FedAvg can converge slowly or fail to converge at all once client data gets sufficiently heterogeneous, a failure mode often described as client drift, where each local model wanders toward its own client’s quirks between rounds instead of staying aligned with the group.

    FedProx, proposed as a direct response, adds a regularization term that penalizes local updates for straying too far from the shared global model, which helps stabilize training under heterogeneity. It is not a complete fix. Newer work keeps proposing alternatives: clustering clients with similar data before aggregating, weighting updates by how well they align with the overall gradient direction, sampling clients more deliberately. None of this is fully solved, which is worth knowing if anyone frames federated learning as a plug-and-play technique. It has real optimization problems that centralized training simply does not run into.

    Is Federated Actually Private?

    The pitch for federated learning leans hard on privacy, and it’s easy to hear «the data never leaves the device» and assume the problem is solved. It isn’t. The model updates themselves can leak information about the data that produced them, sometimes in surprising detail.

    The foundational demonstration of this is a 2019 paper by Zhu and colleagues, Deep Leakage from Gradients, which showed that in small networks, an attacker with access to a single gradient update could reconstruct the original training image with near pixel-level accuracy, no auxiliary data needed. A more recent and more concerning example targeted Gboard directly. A 2023 study from Trinity College Dublin ran new attacks against the actual next-word prediction model used in the production app and found that the words a person typed could be recovered with high accuracy, including full sentence order, and that standard countermeasures like training on mini-batches or adding local noise did not stop it.

    This is why serious federated systems layer in more than just «don’t centralize the data.» Differential privacy bounds how much any single user’s data can influence the shared model and adds calibrated noise to make individual contributions statistically hard to isolate. Secure aggregation is a cryptographic protocol that lets the server compute the sum of client updates without ever seeing any individual client’s update unencrypted. Neither of these is automatic. They have to be deliberately engineered in, and Gboard’s own team treats formal DP guarantees as something they had to build toward over several years, not something federated learning gave them for free.

    Regulation, Money, and the Push Toward FL

    Part of why federated learning is getting more attention now, rather than staying a research curiosity, is that data protection law increasingly makes centralizing sensitive data a liability rather than a convenience. Rules like GDPR and HIPAA push organizations toward architectures that minimize how much personal data moves or gets pooled in the first place, and federated learning fits that requirement structurally rather than as an afterthought.

    The commercial numbers reflect this shift. Market research estimates put the federated learning market at roughly $0.33 billion in 2025, growing to about $0.46 billion in 2026, and projects it reaching close to $1.77 billion by 2030, a compound annual growth rate near 40 percent. The drivers cited are the ones you’d expect: tighter privacy expectations, wider AI adoption generally, and the growing number of edge and IoT devices that generate data faster than anyone could reasonably centralize it.

    Federated Fine-Tuning for LLMs

    The newest frontier is applying federated learning to large language models, and it runs into an immediate practical wall: a phone cannot fine-tune a multi-billion parameter model in full. The fix researchers have converged on is pairing federated training with parameter-efficient fine-tuning methods, most commonly LoRA (low-rank adaptation), where each device trains only a small set of additional parameters layered on top of a frozen base model, and only that small adapter gets shared and aggregated instead of the whole network.

    Work like the heterogeneous LoRA approach for on-device foundation models, and separate methods like FedBiOT that let a large model be fine-tuned collaboratively without ever moving the full model to any single client, are early attempts at making this practical on real hardware. The appeal is obvious: a personalized assistant that adapts to how someone actually writes, without that writing ever leaving their device, while still benefiting from a model trained across many users. The catch is that everything covered above, statistical heterogeneity across devices, the risk that gradients leak information, comes along for the ride, just at the scale of a much bigger and more expressive model.

    The Real Trade-off

    Federated learning is often described as free privacy, and that framing undersells what’s actually happening. It’s a shift in where the risk sits, not a removal of risk. In exchange for not centralizing raw data, you take on a distributed system with unreliable clients, uneven data, and communication costs that a single dataset in one place never had, and you take on an attack surface, the model updates themselves, that has to be actively defended rather than assumed safe.

    That trade is genuinely worth making in plenty of cases. Hospitals really cannot pool patient scans across borders, and a billion phones really cannot upload everything users type. But it is a trade, and the next stretch of federated learning research, particularly around fine-tuning language models on-device, is largely going to be spent paying down the same debts that Gboard and FeTS already ran into: how to handle clients whose data doesn’t look like anyone else’s, and how to stop the model updates from quietly giving away what they were trained on.

    By: Max Johnson B.

  • AI Agents and Multi-Agent Systems

    Not long ago, using an AI language model meant a single exchange: you typed something, it typed something back, done. That loop is breaking down. Language models now plan multi-step tasks, call external tools, browse the web, write and run code, and keep going without a person checking in after every move. The industry has a name for this: agentic AI, as opposed to the older, purely reactive kind.

    The Loop Behind Every Agent

    An agent, stripped down to its mechanics, runs on a loop. It reasons about a task, takes an action like calling a tool or writing something to memory, looks at what happened, and loops back around, repeating until the task is actually done rather than stopping after one reply. That loop, think, act, observe, is the whole unit everything else gets built on top of. You give it a goal. It works out the steps.

    Getting that loop to hold up in production is genuinely hard. An agent needs to track its own progress across a task that might run dozens of steps deep, connect to outside tools without those connections turning into a security mess, hold onto memory across sessions instead of forgetting everything the moment a conversation ends, and stay inside guardrails that actually stop it mid-action if something goes wrong. None of that infrastructure looked the same two years ago. Most of it didn’t exist.

    Tools and Connection Protocols

    Tool use is the part that actually makes an agent do something rather than just describe what it would do. Early versions of this were clunky: a model would notice a task needed a web search or a calculation, and someone had built a custom, fragile hookup for that one specific tool. A newer protocol called MCP cleaned a lot of that up, giving agents a standard way to find and connect to tools instead of every integration being its own one-off project. A separate protocol, A2A, does something similar but for agent-to-agent communication, letting one agent hand work directly to another rather than routing everything back through a person first.

    Several Agents on the Same Problem

    That agent-to-agent piece is where the conversation is actually heading right now. If 2025 was about individual agents becoming something companies could actually deploy, 2026 is turning into the year of getting several of them to work together without stepping on each other. A single agent working alone tends to be genuinely good at its one job and genuinely disconnected from everything around it, which recreates a problem familiar from human org charts: departments that don’t talk to each other produce duplicated, conflicting work. Multi-agent systems are an attempt to fix that at the software level, agents that share context and coordinate instead of each just doing its own thing in a corner.

    Companies have noticed. Inquiries about multi-agent systems reportedly jumped over 1,400 percent between early 2024 and mid 2025, and a pattern has emerged where instead of one giant model trying to do everything, teams run an orchestrator, sometimes called a «puppeteer» setup, that hands pieces of a task to smaller, specialized agents underneath it. It’s basically the same reason companies hire specialists instead of expecting one person to do every job. Except now the specialists are agents, and the manager is also software.

    Where Coordination Actually Breaks

    This doesn’t mean it works cleanly. Put multiple autonomous, reasoning systems in the same workflow and you get failure modes that a single agent never runs into: two agents making conflicting assumptions about shared state, one agent’s mistake quietly poisoning what the next agent does with it, nobody noticing until the output is already wrong. Researchers digging into why these multi-agent setups fail have found the breakdowns usually aren’t about any one agent reasoning badly on its own. It’s the handoffs. The coordination layer is where things actually go sideways, which is exactly the part that’s hardest to test for.

    What’s Already Running on This

    The applications already out there are wide. On the business side: qualifying sales leads, handling customer interactions, running competitive research, sorting through sentiment at a scale no team could do by hand. On the research side: materials science, biomedical research, chemical reasoning, software engineering, even simulating social and policy dynamics that would take forever to model manually. Coding assistants that plan out a change across several files, check that it compiles, and fix their own mistakes without someone watching every step are probably the most mature, most widely used version of this pattern right now.

    A Different Kind of Handing Off Work

    What actually changed, underneath all of it, is what it means to hand work to software. A regular program does exactly what it’s told, nothing more. An agent gets a goal and has to figure out a reasonable path there on its own, adjusting as it goes, pulling in other tools or other agents when the situation calls for it, and only coming back to a person once the job’s actually finished or it hits something it’s not allowed to touch alone. Whether that ends up being reliable enough to trust with anything that really matters is still being figured out, mostly through a lot of protocols, orchestration layers, and benchmarks trying to catch the coordination failures before they cause real damage.

  • AlphaFold and the AI Revolution in Structural Biology

    For roughly fifty years, one of biology’s most stubborn open problems sat quietly at the intersection of chemistry and computation: given the sequence of amino acids that make up a protein, could anyone predict the intricate three-dimensional shape that sequence would actually fold into? This was not an academic curiosity. A protein’s shape determines almost everything about what it does inside a living cell, and getting that shape wrong, or not knowing it at all, has stalled drug discovery, disease research, and basic biology for generations. Then, in a genuinely striking turn, an AI system built by DeepMind essentially closed that fifty-year gap. AlphaFold turned a five-decade-old open problem in structural biology into a routine computational task, placing a predicted three-dimensional model for nearly every cataloged protein within reach of any researcher who wants one.

    A Problem That Used to Take Years and Cost Fortunes

    Before AlphaFold arrived, determining a protein’s structure was slow, expensive, and often required specialized laboratory equipment that only well funded institutions could afford. Structural biologists typically had to identify functional and stable regions of a protein, gather sequence and experimental structural information, build physical models, and painstakingly analyze the resulting structural data, a process that often took months or even years, relying on costly experimental techniques like X-ray crystallography and cryo-electron microscopy.

    This meant that for a huge share of the roughly two hundred million proteins known across all forms of life, nobody actually knew what shape they took, since experimentally solving even a single structure could consume a graduate student’s entire dissertation. Drug discovery, disease research, and basic biological understanding all moved at the pace this bottleneck allowed, which is to say considerably slower than the pace at which biologists were identifying new proteins worth studying in the first place.

    Learning to Read Shape From Sequence Alone

    AlphaFold’s breakthrough moment came at a biennial competition called CASP, the Critical Assessment of Structure Prediction, where research teams from around the world test their prediction methods against proteins whose real structures have already been solved experimentally but not yet published. DeepMind’s AlphaFold2 system delivered a genuinely watershed result at CASP14 in 2020, and researchers dissecting its underlying architecture in mechanistic detail afterward found a system built around a specialized component called the Evoformer, paired with a structure module that together learned to translate raw sequence information directly into confident three-dimensional coordinates.

    The core insight behind this success drew on evolution itself. Proteins that perform similar functions across different species tend to have evolved from common ancestors, leaving behind subtle statistical fingerprints in how their sequences vary together across related species, fingerprints that encode real information about which parts of a protein sit physically close to each other in its folded, three-dimensional form. AlphaFold learned to extract and interpret exactly this kind of evolutionary signal at a scale and precision no earlier computational method had managed, converting sequence-level statistical patterns into structural predictions that, in a genuinely large number of cases, matched the accuracy of results obtained through actual laboratory experiments.

    A Database That Grew Almost Impossibly Fast

    What happened after that initial breakthrough turned out to be just as consequential as the breakthrough itself. Rather than keeping the technology locked away, DeepMind released it openly and built the AlphaFold Protein Structure Database, which initially covered a modest twenty-one model organism proteomes comprising a little over 360,000 predicted structures back in 2021. The growth from there has been genuinely staggering. The database has since expanded to amass over 214 million predicted protein structures, and more recent figures push that coverage toward the entire catalog of known protein sequences, representing the largest single expansion of publicly available protein structural data in the history of the field.

    That scale of open access changed who could actually participate in structural biology research. The practical utility of these predictions is reflected in real usage numbers, with well over four and a half million total users accessing the database directly, alongside more than eighteen thousand full proteome archives downloaded by researchers around the world. A graduate student or a small academic lab without access to expensive crystallography equipment can now pull up a confident structural prediction for almost any protein they are studying, a level of access that simply did not exist before this technology arrived.

    Knowing Exactly How Much to Trust Each Prediction

    A genuinely important and often underappreciated part of using AlphaFold responsibly involves understanding what its confidence scores actually mean, and what they do not. Every predicted structure comes with a per-residue confidence measure called pLDDT, and interpreting this score correctly matters more than casual users often realize. A high pLDDT score answers a narrower question than many researchers assume, indicating that the model is confident in the local geometry of a given region relative to its immediate surroundings, not that the protein performs a particular function, binds a specific partner molecule, or exists in any particular biological state within an actual living cell.

    This distinction has real practical consequences for how these predictions get used in serious research. The predicted results still need to be verified and refined through experimental means by structural biologists, and the biological interpretation and functional attribution of a predicted structure continues to depend on expert human judgment rather than the raw prediction alone. AlphaFold also has genuine, well documented blind spots. Although it performs exceptionally well predicting rigid, globular protein structures, its accuracy decreases significantly when dealing with flexible proteins, membrane proteins, and complex multi-domain assemblies, precisely the kinds of structures that tend to resist a clean, single, confident three-dimensional answer even under laboratory conditions.

    Extending the Method Beyond a Single Folded Chain

    The most recent major iteration, AlphaFold3, expanded the system’s ambitions considerably beyond predicting the shape of a single isolated protein chain. One of the most significant advancements of AlphaFold3 is its expanded predictive capability, now accurately predicting protein-molecule complexes that include biological molecules such as DNA and RNA, an expansion with real significance for genomics and for understanding how proteins actually interact with the broader molecular machinery inside a cell rather than existing in laboratory isolation.

    This matters because proteins in real biological systems rarely act alone. They bind to other proteins, wrap around strands of genetic material, and interact with small drug-like molecules, and being able to predict the shape of these entire molecular complexes, rather than just one component in isolation, brings AlphaFold considerably closer to modeling biology as it actually functions inside a living organism.

    A Method Now Woven Into How Structural Biology Actually Gets Done

    The influence of this technology on the day-to-day practice of structural biology has become remarkably concrete. Roughly forty percent of new structures deposited into the Protein Data Bank between 2024 and 2025 involved AI-driven modeling techniques building on AlphaFold’s approach, a genuinely enormous share of the field’s total output flowing through methods that essentially did not exist a handful of years earlier. Rather than replacing experimental techniques like cryo-electron microscopy, X-ray crystallography, and nuclear magnetic resonance spectroscopy, AI-driven prediction has become deeply intertwined with them, with predictions helping guide where experimental effort gets focused, and experimental results in turn feeding back into training and validating the next generation of prediction models.

    The downstream applications built on top of this foundation continue to multiply. Researchers have applied AlphaFold-predicted structures to analyze aggregation propensity, essentially how likely a given protein is to clump together in ways implicated in diseases like Alzheimer’s and Parkinson’s, across tens of thousands of entries in the human proteome, an application layer where structure prediction feeds directly into disease mechanism research rather than remaining a purely academic exercise in molecular geometry.

    A Genuinely Rare Case of a Field Being Reset Overnight

    It is worth being honest about just how unusual this story actually is within the broader landscape of AI applications. Most fields where machine learning has made an impact saw a gradual accumulation of incremental improvements over many years. Structural biology experienced something closer to an overnight reset, a fifty-year-old bottleneck effectively dissolving within the span of a single research competition cycle, followed by an open database expansion that handed working structural predictions to researchers who previously had no realistic path to obtaining them at all.

    That said, the technology has not eliminated the underlying discipline it transformed. Expert judgment, experimental verification, and a genuine understanding of where a confident-looking prediction might quietly be wrong remain just as essential now as they were before AlphaFold existed, arguably more so, since the sheer volume of predictions now available makes careful, informed skepticism about any individual result more important, not less. What changed is the starting point. A biologist studying an obscure, poorly characterized protein no longer begins from nothing, waiting months or years for a crystal to form under laboratory conditions. They begin from a confident three-dimensional hypothesis, generated in minutes, that experimental work can then test, refine, and build genuine biological understanding on top of.

    By: Max Johnson B.

  • Generative Adversarial Networks: Two Neural Networks Locked in a Contest

    Invented by Ian Goodfellow and his colleagues in 2014, Generative Adversarial Networks introduced an idea that felt almost mischievous compared to how machine learning models had traditionally been trained: instead of teaching a single network to solve a problem directly, build two networks, set them against each other as adversaries, and let their ongoing conflict force both of them to improve. That structure, a genuine contest baked directly into the training process, produced some of the most visually striking AI results of the past decade, and understanding exactly how that contest works mechanically reveals one of the more elegant ideas in modern deep learning.

    A Forger and a Detective, Trained Together

    A GAN comprises two competing neural networks: a generator and a discriminator, trained simultaneously in a competitive, adversarial setting. The generator’s job is to create synthetic data by transforming random noise into outputs that resemble real data, essentially starting from pure statistical randomness and learning to sculpt it into something that could plausibly pass as genuine. The discriminator’s job is the opposite: it functions as a classifier, examining both authentic samples pulled from the real training dataset and synthetic samples produced by the generator, and trying to correctly tell which is which.

    A useful, if slightly informal, way to picture this relationship is a forger and an art detective locked in an ongoing rivalry. The forger, playing the role of the generator, studies genuine paintings and tries to produce convincing fakes. The detective, playing the role of the discriminator, examines paintings and tries to spot the forgeries. Neither one ever sees the other’s internal reasoning directly. They only see the outcome of each attempt, and both get better specifically because the other keeps getting better too.

    The Minimax Game at the Center of Everything

    The mathematical structure underlying this rivalry is called a minimax game, borrowed directly from game theory. Both networks play a two-player minimax game, where the generator tries to fool the discriminator with increasingly realistic outputs, while the discriminator simultaneously improves its ability to correctly classify inputs as either real or generated. The generator is trying to maximize the chance that its fakes get classified as real, while the discriminator is trying to minimize that same chance, hence the minimax framing: one side maximizing, the other minimizing, over the exact same underlying objective.

    This adversarial structure is what gives the whole architecture its name. Both networks are typically deep neural networks with multiple layers, and they improve simultaneously through this adversarial process. When the generator manages to produce a noticeably better fake, the discriminator is forced to become more sophisticated in order to keep catching it, and that improved discriminator, in turn, pushes the generator to get even better on its next attempt. In an ideal, well behaved training run, this back and forth pressure eventually converges toward what game theorists call a Nash equilibrium, a stable point where neither network can improve its own outcome any further by changing its strategy alone.

    A Training Process That Refuses to Behave Normally

    Anyone coming from a background in more standard supervised learning will find GAN training genuinely disorienting the first time they actually try it. Custom training loops are essential for GANs since they do not follow standard supervised learning patterns, and getting the two networks to improve together, rather than one collapsing or overwhelming the other, requires real care in how the training process is structured.

    In practice, this typically means alternating updates between the two networks rather than training them jointly in one smooth pass. The discriminator trains first on a batch containing both real and generated images, learning to classify them correctly, and only afterward does the generator update its own parameters, specifically trying to produce outputs that would fool the discriminator’s newly updated judgment. Many successful implementations deliberately update the discriminator more frequently than the generator, a choice made specifically to prevent the discriminator from being overwhelmed by a generator that is improving faster than it can keep pace with, since a discriminator that falls too far behind stops providing the generator with any genuinely useful signal about how to improve further.

    When the Contest Breaks Down

    The adversarial dynamic that makes GANs so conceptually elegant is also exactly what makes them notoriously difficult to train reliably in practice. This success is achieved at the cost of a notoriously difficult training procedure, one that has introduced several persistent challenges the field has spent years working to address.

    The most well known of these failure modes is called mode collapse, a situation where the generator discovers a narrow handful of outputs that reliably fool the current discriminator, and then simply keeps producing variations on those same few outputs rather than genuinely capturing the full diversity of the real data distribution it was supposed to learn. A generator trained on a dataset of thousands of different human faces might, under mode collapse, converge on producing only a small handful of face types repeatedly, technically fooling the discriminator each time while completely failing to represent the genuine variety present in the original training data. This happens because the generator’s only real incentive is to fool whatever discriminator currently exists, and if a narrow set of outputs already accomplishes that reliably, there is no built-in pressure pushing it to explore anything beyond that narrow, exploitable region.

    Beyond mode collapse, GAN training can also suffer from genuine instability, where the delicate back and forth between generator and discriminator simply fails to converge at all, oscillating indefinitely rather than settling toward the kind of stable equilibrium the underlying game theory promises in principle. Researchers have proposed a wide range of fixes for these problems over the years, including modifying the original minimax objective itself to provide steadier gradients during the earliest, most unstable phase of training, and extending the basic two-player framework into genuinely multi-player variants involving several discriminators working together, an approach shown to produce higher quality samples in a fraction of the training iterations a standard single-discriminator setup would require.

    A Family That Grew Considerably Since 2014

    The original GAN architecture Goodfellow’s team proposed has since spawned a genuinely large family of specialized variants, each adapting the core adversarial idea to solve a different specific limitation or unlock a different specific capability.

    Deep Convolutional GANs incorporated convolutional layers directly into both the generator and discriminator, a natural and highly effective pairing given how well suited convolutional architectures already are to image data, and this combination became something close to a standard baseline for image generation tasks for years afterward. Conditional GANs extended the basic framework by allowing the generator to take an additional input, a class label or some other conditioning signal, letting a user specify what kind of output they wanted rather than leaving generation purely up to chance, turning an unconstrained random generator into something closer to a controllable tool. CycleGAN tackled a genuinely different and harder problem, translating images from one visual domain into another, turning a photo into the style of a particular painter, or a daytime scene into a nighttime one, without requiring paired training examples showing the exact same scene in both domains, a genuinely clever workaround for a data requirement that would otherwise have been prohibitively expensive to satisfy. StyleGAN pushed image quality and controllability further still, introducing an architecture that separated high level attributes like pose and identity from finer, lower level details like skin texture and hair, giving genuinely fine-grained control over specific aspects of a generated image that earlier architectures could not offer.

    Where This Adversarial Idea Actually Proved Useful

    Despite the genuine training difficulties, GANs found real, practical traction across a surprisingly wide range of applications well beyond simply generating convincing fake photographs. GANs served as an initial enabler for the field of text-to-image models, and for a long time, GAN-based approaches achieved state-of-the-art results in image generation before diffusion models eventually took over much of that particular spotlight.

    Data augmentation became one of the more practically valuable uses of this technology, since a trained GAN can generate additional synthetic training examples for domains where genuine data is scarce or expensive to collect, such as certain categories of medical imaging, helping other machine learning models train more effectively even when real labeled examples remain limited. Image-to-image translation tasks, converting sketches into photorealistic images, colorizing black and white photographs, or upscaling low-resolution images into sharper, higher-resolution versions, all leaned heavily on GAN-based architectures. Even less obvious domains found real use for the underlying adversarial framework, including steganography, where a GAN based approach was used specifically to hide information within images in ways designed to evade detection, illustrating just how flexible the core generator-versus-discriminator structure turned out to be once researchers started applying it outside the narrow context it was originally designed for.

    A Contest That Reshaped What Generative Models Could Do

    What makes GANs genuinely significant, beyond the specific images and applications they enabled, is the underlying training philosophy they introduced into the field. Rather than defining success through a single, static loss function measured against fixed labels, GANs made the definition of success itself a moving target, one network’s improvement directly reshaping what the other network needed to learn next. That dynamic, adversarial tension, difficult to tame as it often proved in practice, pushed generative modeling to a level of visual fidelity that earlier approaches simply could not reach on their own, and it left behind a lasting influence on how researchers think about training models through competition rather than through a fixed, unchanging target alone.

    By: Max Johnson B.