This guy has a transformer-based election forecasting model
Harvey Olden writes:
I’ve developed an election prediction model based on a transformer architecture; I thought you might find it interesting. The model will update its information automatically in the run-up to the midterm elections; you can also click on a state/district to see what information the model is leaning on to make its predictions. You can find an explainer for exactly how it works in the website.
I can’t follow the explanation myself, but that’s on me, that I’ve never actually learned exactly what a transformer is. This is not a boast—I’d be a better statistician if I understood such things—just my honest admission of imperfection.
So, given that, I can’t say much about the above forecast, but I thought it might interest some of you, at least from a methodological perspective. There must be some aspects of forecast uncertainty that are well captured by this model and also some weaknesses, corners of probability space where the model architecture induces artifacts (by analogy to the edge-case absurdities we found in a different sort of forecasting models a few years ago and which made their way into Section 8.1 of our Bayesian Workflow book, under the heading, “Exploring inferences to reveal problems with a model”). I haven’t been following the 2026 races closely enough to know what problems to look for, and I don’t see a Github site or anything else with the model’s data, code, or predictive simulations. But if that’s out there somewhere, then youall can take a look.