NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Ordinary Least Squares as an Attention Mechanism

Philippe Goulet Coulombe

NeurIPS page · OpenReview · alphaXiv · Open on the map

Category: Time Series, PDEs & Probabilistic ML › Time Series Foundation Models · Type: new method · Keywords: ordinary least squares, attention mechanism, regression, transformer, tabular data, parameter efficiency

Areas: Model Architectures & Sequence Modeling › Dynamic and relational architectures › Time Series Forecasting

Summary

The paper shows that ordinary least squares can be expressed as a restricted attention module and introduces a nonlinear regression approach that matches transformer performance with far fewer parameters.

Explained to a 5-year-old

A simple math rule called ordinary least squares finds the best line that fits many points. This rule can be seen as a tiny version of how computers use attention to match new things to old ones. It works by checking how similar the new data is to the data it has seen before. Using this idea helps computers make predictions without needing a lot of memory or many calculations. It also lets big models replace their complicated attention parts with this simpler math.

Explained to a 5-year-old, longer

Ordinary least squares is a basic way to draw a straight line that best fits a bunch of points on a graph. It calculates the line by looking at how far each point is from the line and trying to make those distances as small as possible. The paper shows that this simple line-drawing rule can be rewritten as a kind of attention, which is like a computer’s way of paying attention to similar things. In attention, a new piece of information is compared to old information using a similarity score, and the most similar old pieces are used to make a prediction. By thinking of ordinary least squares this way, we can see it as a very restricted form of attention that only uses a few simple calculations. The authors extend this idea to handle more complicated situations, like reducing the number of dimensions and adding non-linear relationships. They also connect the idea to time-series econometrics, showing that the same principle works in other fields. They test the new approach on many public datasets and find that it works just as well as popular machine-learning methods. In addition, they replace the attention blocks in a transformer model for tabular data with a simpler regression that uses polynomial features, achieving the same or better results while using far fewer parameters.

For a technical reader

The work demonstrates that OLS can be reinterpreted as a limited attention module, providing a bridge between classical statistics and modern transformers. By mapping OLS to query-key-value inner products, the authors derive a regression formulation that supports dimensionality reduction and nonlinearity. Experiments on standard benchmarks show the proposed regression matches baseline performance while using substantially fewer parameters, and replacing attention blocks with this regression yields comparable or superior accuracy in tabular transformers.

Problem

There is a need to understand the relationship between classical regression methods and modern attention mechanisms, and to develop efficient models that achieve comparable performance with fewer parameters.

Method

The approach reformulates OLS predictions as a similarity-based rule in an embedding space, mapping them to the query-key-value structure of attention, and extends this to dimensionality reduction and nonlinearities, yielding a regression method that uses attention-like matching with fewer parameters.

Results

The approach performs competitively against standard baselines on UCI/OpenML benchmarks and matches or exceeds transformer accuracy with far fewer parameters when replacing attention blocks with regression on polynomial features.

Contributions

It establishes a theoretical equivalence between OLS and a restricted attention module, extends the framework to nonlinearities and dimensionality reduction, and demonstrates that attention blocks can be replaced by efficient regression models in tabular transformers.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction