Papers
Topics
Authors
Recent
Search
2000 character limit reached

Affix Heuristics: Multidomain Applications

Updated 4 July 2026
  • Affix Heuristics are a family of strategies that exploit recurring affix signals for tasks such as morphological assessment, semantic inference, software debugging, and language stemming.
  • Research applies these heuristics to probe Filipino LLMs, shortcut pharmacological reasoning, augment historical bug-fixing prompts, and perform lexicon-free Uzbek stemming.
  • Effective use of affix heuristics relies on integrating explicit structural constraints, domain-specific rules, and external validations to overcome limitations of token-based methods.

Affix heuristics are procedures that treat affixes—or, in one software-engineering usage, affix-like appended prompt components—as privileged cues for analysis, prediction, or control. Recent work uses the term in at least four technically distinct senses: as a probe of morphophonological competence in token-based LLMs for Filipino, as a shortcut from drug-name suffixes to pharmacological semantics, as history-augmented prompt engineering for bug fixing, and as rule-based affix stripping for Uzbek stemming (Montalan et al., 13 Jun 2026, Mo et al., 4 Jun 2026, Shi et al., 15 Jan 2025, Sharipov et al., 2022).

1. Conceptual range of the term

The literature does not define a single field-wide meaning of affix heuristics. Instead, the term denotes a family of strategies in which recurrent boundary-marked units are used as high-value signals. In morphology-oriented work, the units are literal affixes such as Filipino -um-, -in-, or Uzbek suffix chains. In pharmacology, they are standardized drug-name affixes such as -cillin, -pril, -statin, and -ciclib. In HAFix, the “affix” is metaphorical: historical context is appended to a base prompt as a structured augmentation rather than as a morpheme (Montalan et al., 13 Jun 2026, Mo et al., 4 Jun 2026, Shi et al., 15 Jan 2025, Sharipov et al., 2022).

Domain Meaning of “affix heuristics” Primary role
Filipino LLM diagnostics Detection and manipulation of affixes, infixes, and reduplication Evaluate word-structure competence
Pharmacology Shortcut from a drug-name affix to class-level drug semantics Diagnose hallucination and conflation
Bug fixing History-augmented prompt components affixed to a base prompt Improve LLM bug fixing
Uzbek stemming Rule-based affix stripping under morphotactic constraints Recover roots without a lexicon

This terminological spread is itself significant. It indicates that affix heuristics can be either a target of evaluation, a source of model error, a deliberate prompt-engineering intervention, or the backbone of a symbolic analyzer. A plausible implication is that the term is best understood functionally: it refers to reliance on affix-level regularities, not to a single algorithmic template.

2. Morphophonological affix heuristics in Filipino LLM evaluation

PACUTE is a diagnostic benchmark of 4,600 tasks for Filipino, a language with productive infixation, reduplication, phonologically conditioned alternations, and stress/glottal distinctions usually absent from written text. Its core premise is that token-based LLMs process text as sequences of subword tokens, while Filipino morphology often requires access to characters inside token interiors. The benchmark therefore centers affixes because forms such as kainkumainkain \rightarrow k\text{um}ain and sulatsumulat, sinulatsulat \rightarrow s\text{um}ulat,\ s\text{in}ulat systematically conflict with BPE-style tokenization (Montalan et al., 13 Jun 2026).

PACUTE organizes diagnosis into six compositional levels. L0 tests character recognition; L1 tests character manipulation; L2 tests morpheme decomposition; L3 tests morpheme manipulation; L4 tests morpheme composition; and L5 tests complex multi-step transformations. Affix-related probing begins at L2, where the model must identify root and affix sequence from a surface word, and intensifies at L4 and L5, where the model must recompose surface forms under syllabic and phonological constraints. The benchmark uses deterministic rule-based heuristics for generation, including partial reduplication of the first syllable, insertion of -um- after the onset of the first syllable, vowel-initial prefixal realization, and nasal assimilation for the naNG-/mang- set. Generative tasks are scored with exact-match (EM) and contains-match (CM), the latter motivated by cases where “models often recover the correct affix but not always in the required form.”

The empirical pattern is sharply diagnostic. Open-weight models perform at chance on hierarchical L2 morpheme decomposition, with normalized accuracy from –3.6 to +2.9 across 32 models and mean –0.6, regardless of scale. Frontier models perform much better on morphological extraction and production—Gemini‑3.5‑Flash reaches 89.5% EM / 90.5% CM on extraction and 90.0% CM on production—but remain well below character-level ceilings on hierarchical tasks: GPT‑5.5 obtains 64.7% EM / 77.5% CM on hierarchical tasks despite 100% CM on Manipulation, and Gemini‑3.5‑Flash reaches 62.2% CM on hierarchical tasks despite 90%+ on extraction and production. Patok, a “Filipino morphology-aware expand/contract using Filipino affix rules,” does not improve L2 decomposition or hierarchical composition, which the paper interprets as evidence that tokenization alone does not solve the problem. Error analysis localizes the failure to productive morphophonological abstraction: wrong infix placement such as takinbo for expected tinakbo, reduplication at the wrong edge, residual errors in nasal assimilation and vowel-initial alternations, digraph ng treated as two characters, and a penultimate stress bias.

3. Pharmacological affix heuristics as shortcut learning

In pharmacology, affix heuristics are a shortcut in which an LLM infers what a drug “is” and how it behaves mainly from its morphological affix rather than from drug-specific factual knowledge. The study starts from the AMA pharmacological affix list of 655 affixes and constructs triplets consisting of a real drug, a fake drug formed from a nonce stem plus a real affix, and a nonce word formed from the same nonce stem plus a length-matched nonce affix; after formatting exclusions, the analysis covers 653 drugs. The central diagnostic contrast is therefore between nonce + real affix and nonce + nonce affix, isolating the semantic lift provided by the affix alone (Mo et al., 4 Jun 2026).

The paper formalizes this with a 2×2 factorial perturbation over real stem SrS_r and real affix ArA_r: RR, NR, RN, and NN. For each condition XX, it defines a probability pXp_X of the affix-consistent definition in multiple choice or of a “Yes” judgment that the term is treated as a real medication in open-ended evaluation. Total semantic signal is measured as the lift of RR over NN, and normalized decomposition yields AffixScore, StemScore, and HolisticScore. The affix contribution is:

AffixScore(RR)=1ni=1npNR(i)pNN(i)pRR(i)pNN(i).\mathrm{AffixScore}(RR) = \frac{1}{n} \sum_{i=1}^{n} \frac{ p_{NR}^{(i)} - p_{NN}^{(i)} }{ p_{RR}^{(i)} - p_{NN}^{(i)} }.

If the largest of the three scores exceeds the second largest by at least 0.1, the drug is categorized as Affix-dependent, Stem-dependent, or Holistic; otherwise it is Mixed. If mean minus standard deviation of TotalSignal is at most 0.1, it is categorized as No signal.

Behaviorally, fake drugs built from real affixes are consistently treated as real drugs. dimicillin elicits β-lactam-antibiotic descriptions; inhibitor affixes produce detailed cancer-drug narratives; and forms such as tablecillin can override the obvious semantics of a common noun stem. Holistic drugs achieve the highest behavioral accuracy, but among recognized items the main categories are Affix-dependent and Holistic, while Stem-dependent and Mixed are rare. Affix-dependent drugs remain largely affix-driven even when the stem is replaced, whereas Holistic drugs mostly collapse into No signal after stem perturbation. The study also shows that models rarely surface this reliance in explanation: for sampled affix-dependent cases, models often choose the affix-consistent definition without explicitly mentioning the affix, so chain-of-thought is characterized as post-hoc rationalization rather than a faithful report of causal feature use. Mechanistically, activation patching localizes affix signals to early–mid layers, especially at the last token of the drug name and the final decision token, and Distributed Alignment Search finds a low-rank “affix reliance” direction in early–mid layers around layers 7–10. The practical consequence is a safety risk: fictitious names are treated as real medications, and real drugs can inherit mechanisms, trials, indications, or regimens from affix-sharing neighbors.

4. History-augmented affix heuristics in bug fixing

HAFix uses affix heuristics in a different sense: carefully selected pieces of version-control history are appended to a standard bug-fixing prompt. The system mines temporal context from the blame commit and its predecessor, serializes that history as text, and affixes it to baseline context consisting of project name, buggy file path, buggy line, buggy function, function code before and after fix, and a cleaned bug description. The model is Code Llama 7B Instruct, evaluation uses 51 single-line bugs from 11 open-source Python projects, and a bug is considered fixed if at least one generated sample passes all tests (Shi et al., 15 Jan 2025).

The seven heuristics are distinct views of blame-based repository history.

Heuristic Full name Historical signal
CFN-modified Co-evolved Functions’ Names in the Modified Buggy File Modified function names in the buggy file
CFN-all Co-evolved Functions’ Names in All Modified Files Modified function names across all files changed in the blame commit
FN-modified All Functions’ Names in the Modified Buggy File All function names in the buggy file
FN-all All Functions’ Names in All Modified Files All function names in all files changed in the blame commit
FLN-all Co-evolved Files’ Names Paths or names of all files changed in the blame commit
FN-pair Function Code Pairs Buggy function code before and after the blame commit
FL-diff File Diff Patch Unified diff between the blame commit and its predecessor

The most effective individual heuristic is FLN-all. Under Instruction-style prompting, baseline pass@1 / pass@5 / pass@10 is 19.41% / 33.44% / 39.22%, whereas FLN-all achieves 19.22% / 35.55% / 43.14%; the paper describes this as a 10% improvement relative to baseline at pass@10. FLN-all fixes 22 of 51 bugs against 20 of 51 for the baseline and is the only individual heuristic that is statistically significant against baseline after Bonferroni correction, with p=0.006p=0.006 and rank-biserial effect size approximately –0.51. HAFix-Agg aggregates outputs from all seven heuristics at the result level rather than by constructing one large prompt, and fixes 29 of 51 bugs, or 56.86%, compared with 20 of 51 for the baseline. Prompt style matters strongly: Instruction is best for baseline, FLN-all, and HAFix-Agg, while InstructionMask is consistently poor. The trade-off analysis shows that exhaustive execution has median inference time 303 seconds and median per-bug price $0.07$, whereas early-stopping variants reduce these to 145 or 104 seconds and $0.03$ or sulatsumulat, sinulatsulat \rightarrow s\text{um}ulat,\ s\text{in}ulat0. In this usage, affix heuristics are not morphological cues but prompt augmentations whose value depends on retrieval granularity, prompt length, and test-based external validation.

5. Finite-state affix heuristics in Uzbek stemming

The Uzbek finite-state approach is a lexicon-free morphological analyzer and stemmer built entirely from affix classification, morphotactic constraints, and right-to-left affix stripping. The paper explicitly contrasts this algorithmic design with dictionary approaches: it avoids memory for keeping vocabulary, can analyze previously unseen forms that follow regular patterns, and is intended for large-scale text processing, but it cannot validate whether the remaining stem is a real word. The canonical structural template is “Prefix + Root + Derivational suffixes + Lexical suffixes + Grammatical suffixes (Inflectional suffixes),” while analysis proceeds in reverse order from the right edge of the word (Sharipov et al., 2022).

Affixes are classified into seven classes: Tense & Person suffixes, Verb suffixes, Relative verb suffixes, Derivational suffixes, Noun suffixes, Number suffixes, and Prefixes. The paper reports 77 derivational affixes with 87 allomorphs and 95 inflectional affixes with 135 allomorphs. Each class is modeled by a finite-state machine first designed left to right, then inverted to obtain a right-to-left NFA, and finally converted to a DFA for analysis. The global “head machine” combines the class-level FSMs so that valid stripping paths follow Uzbek morphotactics. Two heuristics are central. First, stripping is right to left, because outer morphology such as tense, person, and case occurs at the end of the word. Second, the analyzer prefers longer undivided suffixes over decompositions into adjacent shorter suffixes, as in preferring -chilik over -chi + -lik.

The method is illustrated by the analysis of bajartirilmayaptimi as bajar-tir-il-ma-yap-ti-mi: stem bajar; relative verb suffixes -tir and -il; negative verb suffix -ma; continuous tense -yap; third-person singular -ti; and question suffix -mi. The same machinery is used to encode ambiguity such as -lar as plural or as a greeting/honorific suffix, with interpretation constrained by position and co-occurrence. The system’s limitations are the classic ones for lexicon-free affix heuristics: over-stemming, under-stemming, ambiguity among valid segmentations, and lack of semantic validation for the residual stem.

6. Cross-cutting patterns, misconceptions, and implications

Across these four settings, affix heuristics are neither uniformly beneficial nor uniformly superficial. PACUTE shows that character access is necessary but not sufficient for productive morphology: models can manipulate characters yet fail at infix placement, reduplication, and syllabification. The pharmacology study shows the complementary failure mode: affix cues can be strong enough to produce fluent but fabricated knowledge. HAFix shows that coarse appended signals such as co-evolved file names can improve bug fixing even when richer historical context, such as full diffs or all function names, is less effective. The Uzbek analyzer shows that affix-only reasoning can be operationally useful when it is constrained by explicit morphotactics rather than by unconstrained statistical analogy (Montalan et al., 13 Jun 2026, Mo et al., 4 Jun 2026, Shi et al., 15 Jan 2025, Sharipov et al., 2022).

Several common misconceptions are directly challenged by the literature. One is that better tokenization is sufficient for morphology; PACUTE’s Patok results do not support that conclusion. Another is that model explanations reveal the cues actually used; the pharmacology study finds that explicit affix reasoning is rare even when decisions are affix-driven. A third is that more context is automatically better; HAFix reports that compact FLN-all outperforms larger, more OOM-prone heuristics such as FN-all and FL-diff. A fourth is that lexicon-free affix stripping is merely a crude approximation; the Uzbek work shows that detailed class structure, allomorph modeling, and longest-match heuristics can produce a systematic analyzer, though not one with lexical validation.

The broader research agenda implied by these results is domain-specific but convergent. PACUTE argues for training signals that encourage morphophonological abstraction rather than tokenization changes alone. The pharmacology study proposes RR/NR/RN/NN perturbations, Affix/Stem/Holistic decomposition, and low-rank mechanistic interventions as a reusable auditing template for morphology-driven shortcuts. HAFix suggests ensembles of small, well-targeted history affixes with early stopping rather than monolithic prompts. The Uzbek analyzer suggests modular expansion by inserting new affixes into class-specific FSMs. Taken together, these works suggest that affix heuristics are most reliable when paired with explicit structure or external checks—morphophonological rules, categorical diagnostics, software tests, or finite-state morphotactics—rather than treated as self-sufficient cues.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Affix Heuristics.