TRANSMISSION // 2612.00427v1

An AI agent builds a cross-platform Fourier transform library

Source published

A researcher-guided coding agent built FFTL, a fast Fourier transform library for CPUs and graphics processors. A specific benchmark campaign found strong results on several platforms, while revealing limits and the influence of testing choices.

AI-generated conceptual illustration for An AI agent builds a cross-platform Fourier transform library
AI-generated conceptual illustration; not documentary evidence.

Can a coding agent help build scientific software that competes with tools refined by experts over decades? In one documented case, an agent and a Fourier-methods researcher developed FFTL, a portable fast Fourier transform library. The results are promising, but the study also shows why benchmark choices, expert review and independent scrutiny matter.

The fast Fourier transform, or FFT, speeds up calculations that reveal frequency patterns in data. It is used in areas such as signal processing and imaging. Although the mathematics is well established, making an FFT library fast is a demanding engineering task: the best approach can depend on the data size and on details of a processor or graphics processor.

A new arXiv preprint asks whether a coding agent, guided by a domain expert, can build a library competitive with highly optimized alternatives—and what the expert contributes. The author chose the FFT as a challenging test, with FFTW, a long-established library, among the benchmarks.

Building and testing FFTL

The library, called FFTL, was developed from an empty repository using Claude Code, with Tobias Knopp, a researcher in Fourier methods. The paper describes about 60 hours of active work over seven days leading up to public release. The version used in the main benchmark came later, after eight pull requests from outside developers. Written in Julia, FFTL runs on ARM and x86 processors, Apple and NVIDIA graphics processors, and as a C library.

The agent proposed the core design and carried out much of the implementation. The researcher set goals and constraints, checked claims and results, and prompted the work to cover features the agent might otherwise have left out. The researcher also chose what to measure against. In the paper’s account, selecting competitors and benchmark cases helped define the task, not just assess the finished library.

The benchmark campaign compared FFTL, case by case, with the fastest other library that supported that case on the same platform. Coverage was not identical: some competitors could not perform every transform type, and comparisons were made on the cases each library supported. The cases varied in transform type, size, precision and number of dimensions, and included sizes held out from tuning. The campaign measured numerical error as well as speed. Its results apply to the particular machines, software versions, cases and settings tested—not to every computer or workload.

The paper provides benchmark data, analysis code and derived information about development. The underlying conversation transcripts are private; the paper reports counts and other data derived from them, not the full conversations.

Promising results, with important exceptions

In this campaign, FFTL was faster than the fastest competing library in 76–85% of tested cases across the processor and thread-count panels, and in 73% on Apple’s graphics processor. On the NVIDIA graphics processor, it was faster in 45% of cases and close to parity with VkFFT overall. That overall comparison varies by precision: FFTL was ahead of VkFFT in double precision and behind in single precision.

Held-out sizes provide evidence about how the tuning performed beyond the sizes used to develop it. The CPU results remained strong on these sizes, but the GPU results were weaker than on tuned sizes—particularly on NVIDIA. The paper therefore does not show that tuning generalizes equally well across platforms.

After release, an outside developer identified another blind spot: lengths combining a smooth factor with a large prime factor. These cases were measured separately on a development machine, not included in the main benchmark campaign. FFTL initially lagged on them; the author and agent improved its performance after the issue was reported. An outside contribution also added an AVX-512 code path. Because the tested machines did not support AVX-512, performance on that hardware remains unmeasured.

The paper’s accuracy results cover the benchmark cases and compare outputs with FFTW in double precision. They do not establish correctness for all inputs. Review of the code by three agents with fresh context found bugs in paths the tests had not exercised, including a race that returned wrong results for threaded real transforms at lengths with a large prime factor.

What this case can tell us

Benchmark choices affected which weaknesses were noticed and treated as priorities. For example, a GPU transform that was slow relative to FFTL’s own other transforms became a competitor-facing gap when the benchmark included VkFFT, which also supported that transform type. The paper reports that inspection was the most frequent function in the researcher’s coded messages, while choices of comparison standards were rare but consequential in documented episodes. This is a description of this collaboration, not a measured ranking of the researcher’s total contributions.

The study is a single case involving one expert, one coding-agent setup and one programming language. Two language models coded the researcher’s messages, without a human coder, and their agreement varied; the paper does not base claims on their poorly agreed measure of initiative. The author also notes that the agent may have encountered FFTW during training. The analysis finds a different core design for FFTL, but cannot rule out every possible influence from remembered material.

This is an arXiv preprint; the supplied source does not establish that it has been peer reviewed. Its detailed benchmarks, code and stated limitations make parts of the work inspectable, but independent replication would help show how the findings hold with other experts, agents, machines and workloads. The cautious takeaway is that an agent contributed substantially to a complex numerical library in this case, while human choices shaped what was measured and review helped check the result.

Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.