A reading notebook

Latin, connected.

Follow the relationships across a sentence. Write your own translation, then connect words that belong together.

How Latin connects to transformer attention

Read the source text

Read & connect

Choose a relationship, then select two words in order. Each word’s number identifies its position in the passage.

Select a first word.

Your connections

Colors identify relationship types. The list gives the same information without relying on color or lines. These are your annotations, not an automatic grammar analysis.

    No connections yet.

    Your translation

    Drafts stay in this browser on this device. They are not sent anywhere or published on the site. Export a JSON copy to keep your work.

    Mark grammar

    Record your own analysis. Leave any field unmarked; partial analyses are welcome. Case and sentence role are separate—these tags do not create connections.

    Word form
    Declension & agreement
    Conjugation

    Use whichever fields apply, including both groups for participles. Voice describes the form; you can note deponent usage or other distinctions below.

    Reading across distance

    Words can agree or refer to the same thing while standing far apart. Subjects, verbs, and objects have a different kind of relationship: a grammatical role, rather than a shared referent. Keeping those connections separate makes room for both.

    This first version is a personal reading workspace, built with AI assistance using plain JavaScript and SVG. No translations or grammatical solutions are supplied. The excerpts are public-domain Latin; source links identify the editions used.

    From Latin to transformer attention

    Studying Latin gave me an intuitive starting point for understanding attention in machine learning. A translation emerges from relationships across the sentence: an adjective may belong to a distant noun; an ending helps identify a subject or object; a pronoun sends the reader back to an earlier referent. The nearest word is not always the most relevant one.

    A transformer also combines information across positions. In self-attention, each token’s representation produces a query, key, and value. Query–key comparisons produce scores; a softmax converts them into weights, which determine how value vectors are combined. Multiple heads and successive layers build contextual representations. Tokens may be word fragments, and positional information keeps word order available. A causal model restricts attention to earlier positions and the current one; an encoder can use context on both sides. See Vaswani et al., Attention Is All You Need, §3.2.

    The useful analogy is gathering context across distance. The lines in this notebook record explicit interpretations made by a reader. A model computes numerical attention weights using learned projections; those weights do not carry labels such as “subject,” “object,” or “same person.” A large weight is not a probability that two words share a referent, nor sufficient evidence of why the model gave an answer. Jain and Wallace’s Attention is not Explanation examines this interpretability problem.

    That distinction suggests a practical experiment: ask a model to propose grammatical links, then compare them with a reader’s annotations. Subject and object links are a dependency-parsing task; identifying expressions that refer to the same entity is a coreference task. Agreement can draw on morphology as well as syntax. These predictions should be checked separately rather than treated as a single measure of “understanding Latin.” The notebook currently records human annotations only.