Morpheus: A Morphology-Aware Neural Tokenizer and Word Embedder for Turkish

Tolga Şakar
6/17/2026
cs.CLcs.AI

Official code: lonewolf-rd/TurkishMorpheus (4 stars, MIT, PyTorch, last commit 2026-06-18).

Abstract

Turkish is agglutinative: meaning is carried by morphemes, yet the subword tokenizers that drive modern language models split words by corpus statistics, fragmenting semantically loaded suffixes and -- in the case of WordPiece and rule-based analyzers -- failing to decode their output back to the original text. This paper presents \textbf{Morpheus}, a neural morpheme-boundary model for Turkish that is at once a lossless, morphology-aware tokenizer and a word-embedding producer. A differentiable Poisson-binomial dynamic program turns per-character boundary probabilities into soft morpheme memberships during training and exact segments at inference, with no string normalization, so $\mathrm{decode}(\mathrm{encode}(w)) = w$ holds by construction. Because the model is neural, the same forward pass that tokenizes also emits a structured word embedding. Among reversible tokenizers -- the only ones valid for generation -- Morpheus attains the lowest bits-per-character ($1.425$), roughly doubles the gold morphological alignment of the subword family (MorphScore macro-F1 $0.61$ vs.\ ${\sim}0.32$), and uses ${\sim}19\%$ less GPU memory than 64K-vocabulary subword tokenizers. As an embedder, frozen Morpheus vectors lead on lexical retrieval (root-family MAP $0.85$) and same-root verification (ROC-AUC $1.00$), surpassing the multilingual retriever BGE-M3 and BERTurk; on context- and inflection-dependent tasks (NER, case/number probing) the heavier contextual encoders remain ahead -- a trade-off we attribute to Morpheus's root-centric geometry. Code: https://github.com/lonewolf-rd/TurkishMorpheus; model: https://huggingface.co/lonewolflab/Morpheus-TR-50K; interactive demo: https://huggingface.co/spaces/lonewolflab/morpheus-tr-demo.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

Morpheus is the only lossless, morphology-aware tokenizer for Turkish that is usable in a generative LLM — and among reversible tokenizers it achieves the lowest BPC, while uniquely producing structured root-family embeddings and using ~19% less GPU memory than 64K-vocab subword tokenizers.

41PythonApr 29, 20264 months agoMIT
agglutinativehuggingfacemorphologyneural-tokenizerpytorch+2 more

Similar Papers

Cite this paper

@article{akar2026morpheus,
  title  = {Morpheus: A Morphology-Aware Neural Tokenizer and Word Embedder for Turkish},
  author = {Tolga Şakar},
  year   = {2026},
  eprint = {2606.18717},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.18717v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.18717.svg)](https://codeofpaper.com/paper/2606.18717)

Discussion