heya Contact the team
Heya Labs

Method paper

Gram Projections for Conversation Trajectories: A Polynomial Equivalent of the DCT

20 July 2026 · 17 pages · PDF

Orthogonal polynomials Embedding pooling USS-SGD · USS-MWOZ · PRISM Reproduction kit

Abstract

Fixed orthogonal transforms commonly convert variable-length embedding sequences into fixed-size vectors by retaining the first few transform coefficients, with the discrete cosine transform (DCT) typically as the default. This work introduces the Gram (discrete orthogonal polynomial) projection as an alternative within the same DC-plus-smooth class, motivated by conversational sequences that are short, aperiodic, and drifting, and asks two separate questions: does the basis change downstream task accuracy, and does it change what the retained coefficients mean? Across three conversation-satisfaction corpora with matched dimensionality, DCT and Gram projections are empirically equivalent: truncated spans overlap 94–96%, and downstream accuracy differences fall within the instrument's approximate ±2.5-point resolution. Structural improvements such as speaker-based projection splitting transfer across bases unchanged. On coefficient semantics, Gram coefficients carry stable interpretations regardless of sequence length: degree 0 is the sequence mean, truncation does not alter retained coefficients, and degree 1 is the least-squares drift, reported consistently end-to-end across lengths. DCT shares the first two properties but not the third — its low-order coefficient conflates drift magnitude with sequence length, so a "drift" reading is not comparable across sequences of different lengths. This is a structural distinction, not an accuracy claim, and it holds independent of which corpus is used. A secondary, more tentative observation: on populations with very short per-role sequences (two to three turns per role), the polynomial basis outperformed DCT by a measured 2.5 points there — 2.3 points more than the near-zero gap on longer sequences.

Read it here

Trouble viewing? Open the PDF in a new tab with the button above.

Reproduction. The paper ships as a self-contained kit on GitHub — a portable pipeline spec plus the generator scripts, regenerating every artifact from public data with one command. Details in the reproducibility statement and appendices.