The 2026 monitoring platform planning framework (Sponsored)Uncover the 11 requirements for evaluating enterprise monitoring platforms anchored to operational outcomes. Use it to identify the capabilities that actually matter, eliminate overlap with tools you already have, and build a monitoring stack that reduces risk and improves collaboration across your DevOps teams. You’ll learn how to:
In 1822, Joseph Fourier published his work on how heat spreads through materials. One of his key mathematical tools was a way to represent complicated temperature patterns using combinations of sine and cosine functions. Nearly two centuries later, those same functions appear inside a very different technology: the transformer architecture behind modern language models. The applications seem to be quite far apart. Fourier studies temperature across a physical object. On the other hand, a language model processes tokens arranged in a sequence. Yet, sine and cosine functions provide a useful structure in both settings. This is because sine and cosine functions can turn positions into structured numerical patterns. A transformer model can then use those patterns to learn how the order of words affects their meaning. The waves supply position information. The model’s training teaches it how to use that information. In this article, we are going to understand how this connection works and why a model needs help understanding the order of the words even when the words already arrive in an ordered list. Here’s what we will cover:
Disclaimer: This post is based on publicly shared details from various sources. References at the end. Please comment if you notice any inaccuracies. The Physics Behind Heat Measurement and LLMsIn the early nineteenth century, Joseph Fourier studied how heat spreads through materials. Consider a metal bar with some sections hotter than others. In order to predict how its temperature changes, we need a way to describe that temperature pattern mathematically. Fourier developed methods to represent complicated patterns as combinations of simpler sine and cosine functions. Eventually, these functions became the key tools for studying heat, vibrations, sound, and many other physical phenomena. For reference, a sine wave is a smooth, repeating pattern. Combining waves that repeat at different rates creates a way to describe much more complicated patterns. For example, a broad temperature variation might require slowly changing components, while smaller variations require faster ones. The temperature itself doesn’t have to oscillate over time. A wave can describe how temperature varies across space at a particular moment. Similarly, in the field of LLMs, the mathematical input doesn’t have to represent time or physical distance. It can represent a token’s position in a sequence. Though sine and cosine functions predate Fourier, the 19th century saw their greater use in mathematical physics. Positional encoding, which is a critical way in which LLMs interpret word order, also belongs to the same mathematical family. How Word Order Carries InformationWord order carries information that the words alone cannot provide. Consider these two sentences: |