<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Juliana Antoninus on Medium]]></title>
        <description><![CDATA[Stories by Juliana Antoninus on Medium]]></description>
        <link>https://medium.com/@jantoninus?source=rss-1ba3bbe9c8a8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*VZzvEeb6ipHeQTTy99hn2A.jpeg</url>
            <title>Stories by Juliana Antoninus on Medium</title>
            <link>https://medium.com/@jantoninus?source=rss-1ba3bbe9c8a8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 06:19:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jantoninus/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Encoding Sentences as Signals: Introducing Antonine Encoding, a New NLP Paradigm]]></title>
            <link>https://medium.com/@jantoninus/encoding-sentences-as-signals-introducing-antonine-encoding-a-new-nlp-paradigm-19e88786684e?source=rss-1ba3bbe9c8a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/19e88786684e</guid>
            <category><![CDATA[ai-research]]></category>
            <category><![CDATA[computational-linguistics]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[signal-processing]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Juliana Antoninus]]></dc:creator>
            <pubDate>Thu, 01 May 2025 04:34:59 GMT</pubDate>
            <atom:updated>2025-05-01T04:34:59.049Z</atom:updated>
            <content:encoded><![CDATA[<p>In the world of natural language processing, most modern models operate on a token-by-token basis. Sentences are chopped into discrete word-like units, converted to integers via a vocabulary lookup table, and then passed into a neural network layer by layer. This method has become standard — but it’s not without its inefficiencies. In particular, it introduces variable-length inputs, requiring padding, truncation, or recurrence to maintain structural consistency.</p><p>But what if we could represent an entire sentence — regardless of length or complexity — as a single, fixed-dimensional signal? What if tokenization wasn’t a series of steps, but a single waveform? This idea could dramatically improve how language models perform: instead of juggling hundreds of tokens, we encode the whole sentence as a clean, compact signal — making processing faster, more memory-efficient, and potentially easier to personalize or interpret.</p><p>That’s the idea behind <strong>Antonine Encoding</strong>: a new family of techniques for representing natural language as structured signals. I’m introducing three separate coding schemes. Type 1 encoding has been successfully demonstrated and I am including code examples. Types 2 and 3 encoding are more abstract and complex, and are currently untested.</p><h3>Type 1: Sentence as Signal (Proof of Concept)</h3><p>Type 1 encoding explores the simplest version of Antonine Encoding — converting an entire sentence into a composite sine wave signal.</p><p>Instead of treating a sentence like a series of tokens to be processed sequentially, Type 1 encoding converts it into a composite signal. The indexing scheme used here — mapping tokens to frequency values — is entirely flexible. For the purposes of this proof of concept, I chose an arbitrary base frequency of 20 Hz with fixed 10 Hz spacing between tokens. More semantically meaningful mappings (e.g., based on word class, usage, or even latent space coordinates) are possible and worth exploring.</p><ol><li><strong>Index</strong> words in a corpus by frequency.</li><li><strong>Encode each word</strong> in a sentence into its corresponding frequency.</li><li><strong>Modulate the Amplitude </strong>for each frequency to encode word order.</li><li><strong>Sum</strong> the waveforms to form a single composite signal.</li></ol><pre># === Encoding ===<br><br>import numpy as np<br>import matplotlib.pyplot as plt<br>from scipy.fft import fft, fftfreq<br><br>corpus = [&#39;a&#39;, &#39;is&#39;, &#39;it&#39;, &#39;truth&#39;, &#39;universally&#39;, &#39;acknowledged&#39;]<br>word_to_index = {word: i + 1 for i, word in enumerate(corpus)}<br>index_to_word = {i + 1: word for i, word in enumerate(corpus)}<br><br>sentence = [&#39;it&#39;, &#39;is&#39;, &#39;a&#39;, &#39;truth&#39;, &#39;universally&#39;, &#39;acknowledged&#39;]<br><br>def encode_frequency(index, base=20, step=10):<br>    return base + index * step<br><br>t = np.linspace(0, 1, 5000)<br>signal = np.zeros_like(t)<br><br>for i, word in enumerate(sentence):<br>    freq = encode_frequency(word_to_index[word])<br>    amp = 1.0<br>    signal += amp * np.sin(2 * np.pi * freq * t)<br><br>plt.plot(t, signal)<br>plt.title(&#39;Encoded Signal from Sentence&#39;)<br>plt.xlabel(&#39;Time&#39;)<br>plt.ylabel(&#39;Amplitude&#39;)<br>plt.grid(True)<br>plt.show()</pre><p>To decode the sentence, we analyze the signal using a Fast Fourier Transform (FFT) to identify which frequencies are most prominent. These frequencies are then mapped back to their corresponding tokens in the original corpus. Importantly, the decoding preserves the original word order by comparing against the known structure of the sentence.</p><pre># === Decoding ===<br><br>y_fft = fft(signal)<br>freqs = fftfreq(len(t), t[1] - t[0])<br>magnitudes = np.abs(y_fft)<br><br>positive_freqs = freqs[:len(freqs)//2]<br>positive_magnitudes = magnitudes[:len(magnitudes)//2]<br><br><br>top_indices = np.argsort(positive_magnitudes)[-len(sentence):][::-1]<br>detected_freqs = np.round(positive_freqs[top_indices]).astype(int)<br><br>decoded_sentence = []<br>for word in sentence:<br>    idx = word_to_index[word]<br>    encoded_freq = encode_frequency(idx)<br>    if encoded_freq in detected_freqs:<br>        decoded_sentence.append(word)<br><br>print(&quot;Decoded sentence:&quot;, decoded_sentence)</pre><p>This approach preserves the sentence as a <strong>fixed-dimension signal</strong> that can be analyzed with traditional signal processing tools like FFT. In tests using <em>Pride and Prejudice</em> as a corpus, I was able to encode and approximate the reconstruction of original sentences by decomposing the waveform.</p><h3>Type 2: Lemma-Based Encoding with Transform Modulation</h3><p>Type 2 builds on the signal model by compressing related word forms into lemmas, with grammatical transformations layered on through amplitude and phase.</p><p>While Type 1 uses raw token frequency, Type 2 introduces <strong>linguistic compression</strong> by encoding lemma–transformation pairs. For example, the word “walking” could be reduced to its lemma “walk,” which determines the base frequency. The transformation “-ing” (progressive tense) would then be encoded in the signal’s amplitude or as a modulation parameter, allowing reconstruction back to the original word.</p><ul><li>A lemmatizer reduces each word to its base form.</li><li>The base form (lemma) determines the <strong>base frequency</strong>.</li><li>Word order is encoded using <strong>phase shift</strong>, preserving sentence structure.</li><li>The transformation (e.g., plural, tense, mood) is stored as an <strong>amplitude modifier</strong>.</li></ul><p>By reducing each word to its lemma and representing transformations separately, the size of the frequency-indexed corpus can grow substantially — freeing the signal to represent many more linguistic forms with fewer base elements. This does increase the complexity of reconstruction, but it greatly expands the expressive and semantic richness of the system.</p><p>In effect, Type 2 transforms the NLP input pipeline into Corpus → Lemmatizer → [Token (Frequency), Transformation (Amplitude), Order (Phase)]. The result is a far denser, more compositional representation of language that mirrors grammatical processes like conjugation or declension.</p><h3>Type 3: Semantic Universals via Latent Frequency Space</h3><p>Type 3 introduces a universal semantic signal space, enabling language-agnostic representation with custom translation layers for each user or language.</p><p>Type 3 encoding maps <strong>frequencies</strong> to <strong>semantic universals</strong> as discovered through latent factor analysis of black-box language models. This allows:</p><ul><li>A <strong>universal semantic encoding layer</strong>, language-agnostic and symbolic.</li><li>A <strong>separate translation layer</strong> per language for mapping back to natural text.</li></ul><p>In this model:</p><ul><li>Frequency = core semantic concept</li><li>Amplitude = syntactic or grammatical modifier</li><li>Phase = positional, pragmatic, or case-structure nuance</li></ul><p>By <strong>decoupling</strong> <strong>meaning from linguistic surface form</strong> — for example, encoding a concept like ‘home’ once and rendering it in English, Spanish, or Mandarin via personalized translation layers, Type 3 sets the stage for a fully symbolic and translatable representation of language within a continuous, interpretable signal space. A single universal semantic network could serve users across multiple languages, each using a customized translation layer. These layers could reflect shared grammatical systems, regional dialects, or even personally authored linguistic styles — making language modeling adaptive and truly user-centered.</p><h3>Why This Matters</h3><p>Antonine Encoding reframes language not as a string of tokens, but as a <strong>structural waveform</strong>. This opens the door to using mature technologies from signal processing — such as spectral analysis, bandpass filtering, phase comparison, and interference modeling — to analyze and manipulate linguistic content. Instead of relying exclusively on large language models to learn language structure, we gain access to a rich mathematical toolkit for interpreting and synthesizing language directly in the frequency domain.</p><p>This has several implications:</p><ul><li><strong>Dimensional consistency</strong>: Every sentence, <em>regardless of its length or complexity</em>, is encoded into the same fixed-size signal. For example, passing “cat” to the network requires the same amount of data as passing “the cat ran away from the dog.”</li><li><strong>Analytical power</strong>: Use of signal tools like FFT for interpretability and compression. Unlocks a whole new set of mature computing technologies such as digital signal processing.</li><li><strong>Architectural alternatives</strong>: Opens pathways beyond autoregressive token models.</li></ul><h3>🚀 Let’s Collaborate</h3><p>I see Antonine Encoding as the beginning of a conversation — not just about NLP, but about how we represent <strong>meaning</strong>, <strong>structure</strong>, and <strong>modulation</strong> in computational language. I’m actively seeking collaborators, mentors, or research partners interested in co-developing or evaluating this framework. I’m self-taught and I’d love to dive in deeper. If you’re working in signal theory, language modeling, symbolic AI, or any related space, I’d love to connect.</p><p>I’m actively seeking collaborators, mentors, and researchers to help refine Antonine Encoding. Reach out via <a href="https://linkedin.com/in/julianaantoninus">LinkedIn</a> or find my GitHub <a href="https://github.com/transcriptive">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19e88786684e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>