<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://stanlee321.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://stanlee321.github.io/" rel="alternate" type="text/html" hreflang="en" /><updated>2026-09-03T02:58:28+00:00</updated><id>https://stanlee321.github.io/feed.xml</id><title type="html">Stanley Salvatierra</title><subtitle>ML engineer and researcher working on language as operator algebra, and building at Deep Microsystems.</subtitle><author><name>Stanley Salvatierra</name></author><entry><title type="html">All You Need Is Non-Commutative Words</title><link href="https://stanlee321.github.io/blog/2026/09/all-you-need-is-non-commutative-words/" rel="alternate" type="text/html" title="All You Need Is Non-Commutative Words" /><published>2026-09-01T00:00:00+00:00</published><updated>2026-09-01T00:00:00+00:00</updated><id>https://stanlee321.github.io/blog/2026/09/all-you-need-is-non-commutative-words</id><content type="html" xml:base="https://stanlee321.github.io/blog/2026/09/all-you-need-is-non-commutative-words/"><![CDATA[<p>Our paper is on arXiv: <a href="https://arxiv.org/abs/2608.29314"><strong>All You Need Is Non-Commutative Words</strong></a> — <a href="https://arxiv.org/abs/2608.29314">abstract</a> · <a href="https://arxiv.org/pdf/2608.29314">PDF</a> · <a href="https://github.com/stanlee321/operator-transformer">code (MIT)</a>. It is joint work with <strong>Carla M. Quispe Flores</strong> (Colorado School of Mines), who is first author and my equal contributor on it, and <strong>Renan Cabrera</strong>, whose 2010 canonical-coset decomposition of unitary matrices is the mathematical foundation the readout and the continual-learning tower are built on. arXiv:2608.29314 [cs.CL], listed 29 Aug 2026.</p>

<figure>
<img src="/assets/img/sentence_path.png" alt="Words are rotations. A sentence is a path." />
<figcaption>Each word is a rotation in a different plane; a sentence applies them in order. The same words in a different order trace a different path and end somewhere else.</figcaption>
</figure>

<h2 id="the-idea-in-one-line">The idea in one line</h2>

<p>Every token becomes a Hermitian generator, exponentiating that generator gives a unitary word operator, and a sentence is the ordered product of its word operators:</p>

\[\text{token } w \;\longrightarrow\; H_w \;\longrightarrow\; U_w = \exp(i\,\varepsilon_w H_w) \;\longrightarrow\; P_L = U_L \cdots U_1 \;\longrightarrow\; \text{readout}\]

<p>Each word $w$ carries a small set of real coordinates that assemble into a Hermitian generator $H_w$. The word operator is $U_w = \exp(i\,\varepsilon_w H_w)$, where $\varepsilon_w$ is a rotation budget — how far this particular word is allowed to turn the state. The document state is the ordered product $P_L = U_L \cdots U_1$, and a flattened readout plus a single linear head produces the label.</p>

<p>Matrix multiplication does not commute, so the product for <em>dog bites man</em> is not the product for <em>man bites dog</em>. Word order is carried by the algebra itself. There is no positional encoding anywhere in the model, because there is nothing left for one to do.</p>

<figure>
  <img src="/assets/img/main_model.png" alt="Diagram of the model: each word becomes a unitary matrix, a sentence is their ordered product, and a flattened readout plus a linear head produces the label." />
  <figcaption>Capturing word order natively: every word is a unitary matrix, and a sentence is their ordered product; because these matrices do not commute, the resulting document state P_L carries word order without positional encoding (PE). A flattened readout and a single linear head then produce the label.</figcaption>
</figure>

<h2 id="what-the-same-algebra-gives-for-free">What the same algebra gives for free</h2>

<p>The part I find most interesting is that once you commit to this representation, several things that normally need their own machinery fall out of the same algebra:</p>

<ul>
  <li><strong>Self-attention with no Q, K, or V projections.</strong> The antisymmetric score between two positions is read directly off their operators, so the three projection matrices that every attention block carries simply are not there.</li>
  <li><strong>Parallel composition of variable-length chunks.</strong> Because a product of products is still a product, chunks of text compose in parallel, at a reduced attention cost.</li>
  <li><strong>A canonical-coset readout.</strong> The document state has redundant coordinates when you flatten it naively. The coset chart encodes all the true unitary degrees of freedom compactly instead.</li>
  <li><strong>Exact continual learning by nested group extension.</strong> A new task enlarges the operator space rather than overwriting it — $U(n) \subset U(n+k)$ — so the earlier task’s representations are preserved exactly, not approximately.</li>
</ul>

<p>This construction is inspired by the mathematics of quantum mechanics, but every computation here is classical and we claim no quantum advantage.</p>

<h2 id="what-it-does-and-does-not-claim">What it does and does not claim</h2>

<p>I want to be precise here, because this is the easiest thing in the world to oversell. Across standard text-classification benchmarks the method <strong>matches</strong> bag-of-words baselines; it achieves higher accuracy on IMDB, through the learned per-word rotation budget, and comparable performance on AG News. The QKV-free attention sits at parity with a matched transformer. That is the claim, and there is nothing beyond it.</p>

<p>Best validation accuracy (%), three-seed means, on 10k-train / 2k-validation subsets. The bag-of-words row is the reference baseline reported in the paper; the other rows are reconstructed from the raw logs in the public repository:</p>

<div class="table-scroll">

  <table>
    <thead>
      <tr>
        <th>Configuration</th>
        <th style="text-align: right">IMDB</th>
        <th style="text-align: right">AG News</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>Predicted per-word epsilon</td>
        <td style="text-align: right">86.53</td>
        <td style="text-align: right">87.68</td>
      </tr>
      <tr>
        <td>Global epsilon</td>
        <td style="text-align: right">85.28</td>
        <td style="text-align: right">87.45</td>
      </tr>
      <tr>
        <td>Bag-of-words reference</td>
        <td style="text-align: right">85.25</td>
        <td style="text-align: right">87.45</td>
      </tr>
      <tr>
        <td>QKV-free operator attention</td>
        <td style="text-align: right">84.4</td>
        <td style="text-align: right">87.1</td>
      </tr>
      <tr>
        <td>Matched transformer</td>
        <td style="text-align: right">84.6</td>
        <td style="text-align: right">84.5</td>
      </tr>
    </tbody>
  </table>

</div>

<p>The result worth attention is not the accuracy column but what it costs to get there. A conventional vocabulary space of roughly 30,000 dimensions is replaced by a dense, 64-parameter real-valued encoding — the same benchmark numbers out of a far smaller parameterization. That expressive efficiency is the finding.</p>

<h2 id="how-to-cite">How to cite</h2>

<div class="language-bibtex highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">@article</span><span class="p">{</span><span class="nl">quispeflores2026noncommutative</span><span class="p">,</span>
  <span class="na">title</span>   <span class="p">=</span> <span class="s">{All You Need Is Non-Commutative Words}</span><span class="p">,</span>
  <span class="na">author</span>  <span class="p">=</span> <span class="s">{Quispe Flores, Carla M. and Salvatierra, Stanley and Cabrera, Renan}</span><span class="p">,</span>
  <span class="na">journal</span> <span class="p">=</span> <span class="s">{arXiv preprint arXiv:2608.29314}</span><span class="p">,</span>
  <span class="na">year</span>    <span class="p">=</span> <span class="s">{2026}</span><span class="p">,</span>
  <span class="na">eprint</span>  <span class="p">=</span> <span class="s">{2608.29314}</span><span class="p">,</span>
  <span class="na">archivePrefix</span> <span class="p">=</span> <span class="s">{arXiv}</span><span class="p">,</span>
  <span class="na">primaryClass</span>  <span class="p">=</span> <span class="s">{cs.CL}</span><span class="p">,</span>
  <span class="na">url</span>     <span class="p">=</span> <span class="s">{https://arxiv.org/abs/2608.29314}</span>
<span class="p">}</span>
</code></pre></div></div>

<p>The reproducibility code is at <a href="https://github.com/stanlee321/operator-transformer">github.com/stanlee321/operator-transformer</a> under MIT: the model, the mathematical and parity tests, an entry point behind every table in the paper, and the curated raw logs. One command rebuilds every table from those logs, downloading nothing and training nothing.</p>

<p>More on each component in coming posts.</p>]]></content><author><name>Stanley Salvatierra</name></author><category term="paper" /><category term="operator-algebra" /><category term="nlp" /><summary type="html"><![CDATA[Our paper is on arXiv: words as unitary matrices and sentences as their ordered product, so word order comes from the algebra instead of a positional encoding.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://stanlee321.github.io/assets/img/sentence_path.png" /><media:content medium="image" url="https://stanlee321.github.io/assets/img/sentence_path.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry></feed>