Papers
Topics
Authors
Recent
Search
2000 character limit reached

Suffix Learning (suffL) Overview

Updated 5 July 2026
  • Suffix Learning (suffL) is a framework where the terminal segment of a sequence is treated as a primary object to be learned, optimized, or controlled.
  • It spans multiple regimes including approximate matching in prediction suffix trees, direct activity-suffix prediction in monitoring, adversarial suffix transfer in LLMs, and grammar-enforced generation.
  • Methods in suffL employ adaptive techniques like beam search, attention mechanisms, and transfer learning to improve process prediction and safe, deterministic output formatting.

Searching arXiv for recent and foundational papers directly related to “suffix learning” across the senses represented in the provided data: adversarial suffix optimization in LLMs, suffix prediction in predictive monitoring, and suffix-constrained generation. {"query":"all:(\"suffix learning\" OR \"adversarial suffix\" OR \"suffix prediction\" OR \"suffix-constrained generation\")","max_results":10,"sort_by":"relevance"} {"query":"all:(\"suffix learning\" OR \"adversarial suffix\" OR \"suffix prediction\" OR \"suffix-constrained generation\")","max_results":10,"sort_by":"relevance"} {"query":"id:(Liu et al., 2024) OR id:(Rama-Maneiro et al., 2022) OR id:(Hammal et al., 1 Mar 2026) OR id:(Kim et al., 2018)","max_results":10,"sort_by":"relevance"} Suffix Learning (suffL) is not standardized in the cited literature as a single formalism or benchmark. Taken together, the relevant arXiv work suggests an umbrella category for methods in which the suffix of a sequence is the primary object of learning, optimization, prediction, or control rather than a passive by-product of generic sequence modeling. In this sense, suffL spans at least four technically distinct regimes: approximate suffix matching in prediction suffix trees, direct activity-suffix prediction in predictive monitoring, adversarial suffix optimization and transfer in aligned LLMs, and suffix-constrained generation for deterministic answer extraction (Kim et al., 2018, Rama-Maneiro et al., 2022, Liu et al., 2024, Hammal et al., 1 Mar 2026).

1. Scope of the term

Across the cited work, a “suffix” is not a single mathematical object but the terminal segment of a sequence under domain-specific semantics. In prediction suffix trees, the suffix is the recent context of an observed sequence used for sequence modeling and prediction. In predictive monitoring, the suffix is the unobserved remainder of a running process trace, denoted tlk(σ)tl^k(\sigma), to be inferred from the observed prefix hdk(σ)hd^k(\sigma). In aligned LLM safety, the suffix is an adversarial prompt continuation S\mathbf{S} appended to induce non-refusal behavior. In suffix-constrained generation, the suffix is the final segment of the model output that must satisfy a grammar such as a strict answer template (Kim et al., 2018, Rama-Maneiro et al., 2022, Liu et al., 2024, Hammal et al., 1 Mar 2026).

Setting Suffix object Characteristic mechanism
Prediction suffix trees Recent context in an observed sequence Approximate suffix matching; self-bounded depth growth
Predictive monitoring Future activity suffix tlk(σ)tl^k(\sigma) Encoder-decoder with attention and normalized beam search
LLM red-teaming Adversarial prompt suffix S\mathbf{S} First-Token Searching and Content-Aware Searching
LLM decoding control Final output suffix matching a grammar Greedy pipeline, constrained-hypothesis beam, bifurcation penalty

A common misconception is that suffL denotes only one of these formulations, especially adversarial jailbreak suffix search. The cited literature does not support that restriction. A more accurate reading is that suffix-oriented learning problems recur whenever the terminal portion of a sequence has privileged predictive, operational, or semantic status.

2. Approximate suffix matching and self-bounded prediction suffix trees

Prediction suffix trees (PSTs) are described as an effective tool for sequence modelling and prediction. The cited PST work begins from the observation that current prediction techniques for PSTs rely on exact matching between the suffix of the current sequence and the previously observed sequence. It proposes a provably correct algorithm for learning a PST with approximate suffix matching by relaxing the exact matching condition, and then a self-bounded enhancement in which the depth of the suffix tree grows automatically in response to the model performance on a training sequence. Experiments on synthetic datasets and three real-world datasets are reported to show that the approximate matching PST achieves better predictive performance than other PST variants (Kim et al., 2018).

Within the suffL perspective, the important point is not merely that the model uses suffixes, but that suffix matching itself becomes learnable and adaptive. The exact-match assumption is replaced by approximate string matching, and the model order is no longer fixed a priori because tree depth is tied to training-sequence performance. This suggests a form of structural adaptation in which the suffix representation is jointly shaped by data similarity and empirical error rather than by a rigid context horizon.

3. Direct activity-suffix prediction in predictive monitoring

In predictive monitoring, suffix learning refers to forecasting how the rest of a running case will unfold after observing a prefix of events. The cited formulation defines the task as learning a function ΩSA\Omega_{SA} that maps a prefix directly to the full future sequence of activities, rather than learning only a next-activity predictor ΩA\Omega_A. The underlying motivation is that recursive next-event prediction causes error accumulation: an early mistake propagates into later predictions, especially for long traces and logs with many alternative execution patterns (Rama-Maneiro et al., 2022).

The proposed architecture, ASTON (“Activity Suffix predicTiOn based on eNcoder-decoder”), is an encoder-decoder recurrent neural network with attention specialized for direct suffix prediction. The encoder is a GRU that consumes activity, time, and resource information. Activities are represented as embeddings rather than one-hot vectors. Temporal features include time since previous event, time since start of trace, time since midnight, day of week, month, and hour; highly variable time intervals are processed with log transform plus z-score, while others use max normalization. The decoder is also a GRU and is trained to generate the entire activity suffix. During training, teacher forcing is used, and the decoder input at time tt is

It=ctAt1.I_t = c_t \oplus A'_{t-1}.

The attention mechanism is additive attention. For decoding step tt, the attention score for encoder state hdk(σ)hd^k(\sigma)0 is

hdk(σ)hd^k(\sigma)1

with normalized weights

hdk(σ)hd^k(\sigma)2

and context vector

hdk(σ)hd^k(\sigma)3

Training optimizes cross-entropy at each suffix position,

hdk(σ)hd^k(\sigma)4

Inference is a central part of the method. ASTON uses beam search rather than argmax or random sampling because greedy decoding can repeat activities or overpredict suffix length, while random sampling does not optimize the global suffix probability. The beam-search score is the joint conditional log-probability of a partial suffix,

hdk(σ)hd^k(\sigma)5

with length normalization

hdk(σ)hd^k(\sigma)6

using hdk(σ)hd^k(\sigma)7 and beam width hdk(σ)hd^k(\sigma)8. Reported beam-search complexity is hdk(σ)hd^k(\sigma)9.

The evaluation uses 12 public event logs, six baselines, and 5-fold cross-validation; each training fold is further split into 80/20 train/validation. ASTON is trained for 150 epochs with batch size 64, embedding dimension 32, a 2-layer GRU with hidden size 32, dropout 0.1, and Adam with learning rate 0.005. The main metric is Damerau-Levenshtein normalized similarity,

S\mathbf{S}0

ASTON obtains the best score in 5 of 12 logs, second best in 6, and third best in 1. In the Bayesian Plackett-Luce ranking, it has the highest posterior probability of being the best method, S\mathbf{S}1, versus S\mathbf{S}2 for the second-ranked method. It significantly outperforms Evermann’s model in every log except one. In suffL terms, this is a direct-learning formulation: the whole suffix is the training target, and normalized beam search is part of the learned system’s effective behavior rather than a secondary decoding detail (Rama-Maneiro et al., 2022).

4. Adversarial suffix transfer learning in aligned LLMs

A different suffL line treats the suffix as an adversarial control variable used to jailbreak aligned LLMs. The starting point is Greedy Coordinate Gradient (GCG), which optimizes a suffix S\mathbf{S}3 against a target response sequence using the token-level negative log-likelihood objective

S\mathbf{S}4

The cited work argues that GCG is computationally inefficient because it optimizes the whole target sequence at once, so the hardest part of the target—typically the first generated token—is mixed with easier later tokens, producing noisy gradients. The challenge is stated to be “primarily associated with the first-token optimization” (Liu et al., 2024).

The proposed framework, DeGCG, decouples search into behavior-agnostic pre-searching and behavior-relevant post-searching. In pre-searching, First-Token Searching (FTS) optimizes only a generic first token such as “Sure” or “Here,” with objective

S\mathbf{S}5

In post-searching, Content-Aware Searching (CAS) fine-tunes that initialization toward a behavior-relevant target: S\mathbf{S}6

The paper frames this as a transfer-learning problem analogous to pre-training and fine-tuning. FTS yields a suffix that encourages non-refusal and is more transferable across models and data. CAS then specializes that suffix toward the intended harmful continuation. Three transfer scenarios are studied: cross-model transfer, cross-data transfer, and self-transfer.

The interleaved variant, i-DeGCG, alternates between S\mathbf{S}7 and S\mathbf{S}8, using each stage’s current suffix as initialization for the other. The stage-flagged loop alternates over iterations S\mathbf{S}9, updates the suffix batch with gradients

tlk(σ)tl^k(\sigma)0

switches stages when losses fall below tlk(σ)tl^k(\sigma)1 or tlk(σ)tl^k(\sigma)2 or after maximum stage length tlk(σ)tl^k(\sigma)3, and expands the behavior set when both losses are sufficiently low. The explicit claim is that search efficiency and suffix transferability are tightly coupled: solving the first-token task first creates a more transferable initialization and reduces subsequent search difficulty.

The experiments use HarmBench, specifically the text-only standard behavior subset, with validation used as search/training and test used for evaluation. The six semantic categories are Chemical Biological, Misinformation, Illegal, Cybercrime, Harmful, and Harassment Bullying. The four main open-source 7B models are Llama2-chat-7b, Mistral-Instruct-7b, OpenChat-3.5-7b, and Starling-LM-alpha-7b. Performance is measured by classifier-based attack success rate (ASR) using the HarmBench classifier, a fine-tuned Llama2-13b model. On Llama2-chat-7b, i-DeGCG reaches ASRs of tlk(σ)tl^k(\sigma)4 on the validation set and tlk(σ)tl^k(\sigma)5 on the test set, improving over the baseline by tlk(σ)tl^k(\sigma)6 and tlk(σ)tl^k(\sigma)7. In self-transfer at suffix length 100, it reaches tlk(σ)tl^k(\sigma)8 on Llama2-chat and tlk(σ)tl^k(\sigma)9 on OpenChat-3.5. Training-dynamics plots reportedly show that DeGCG reaches near-zero first-token loss in about 100 steps, whereas GCG-M remains far higher. In this branch of suffL, the suffix is neither a predictive context nor a future trace segment; it is an optimized adversarial artifact whose transferability is itself a learned property (Liu et al., 2024).

5. Suffix-constrained generation and deterministic answer extraction

Suffix learning can also be realized at decoding time rather than in parameter learning. The cited framework of suffix-constrained generation addresses the problem that free-form LLM outputs are difficult to evaluate automatically because the final answer may be embedded in reasoning, incorrectly formatted, repeated later in the output, or never reached before the decoding budget expires. The goal is to let the model reason freely in the prefix while forcing the ending suffix to match a grammar such as “The answer is: S\mathbf{S}0.” (Hammal et al., 1 Mar 2026)

Formally, with vocabulary S\mathbf{S}1 and end-of-generation symbol S\mathbf{S}2, the autoregressive model defines

S\mathbf{S}3

and standard decoding seeks

S\mathbf{S}4

Free outputs are

S\mathbf{S}5

while grammar-constrained outputs are

S\mathbf{S}6

The prefix language is

S\mathbf{S}7

and the allowed next-token set is defined via S\mathbf{S}8.

The paper’s key definition is the suffix-constrained grammar

S\mathbf{S}9

It then proves that ordinary constrained greedy decoding is ineffective for this objective: ΩSA\Omega_{SA}0 Thus the grammar does not constrain intermediate tokens at all, so standard constrained decoding gives no useful guidance toward the desired final format.

Three decoding algorithms are introduced. The greedy pipeline first runs standard greedy decoding, removes the final ΩSA\Omega_{SA}1, and then continues decoding under the answer grammar ΩSA\Omega_{SA}2. Constrained-hypothesis beam search maintains a free greedy hypothesis ΩSA\Omega_{SA}3 and a constrained hypothesis ΩSA\Omega_{SA}4, deciding whether to continue or replace the constrained path using the score comparison

ΩSA\Omega_{SA}5

The main heuristic is the bifurcation penalty algorithm, which measures the probability loss incurred by forcing a valid answer suffix to begin at the current point: ΩSA\Omega_{SA}6 or in log space,

ΩSA\Omega_{SA}7

Two return policies are studied: minimum-penalty hypothesis and last hypothesis; the reported empirical finding is that the last-hypothesis variant is usually best.

Experiments use OLMo 2 in 1B and 13B sizes, both pre-trained and instruction-tuned, on GSM8K, MATH500, SVAMP, ARC-Challenge, and CommonsenseQA. Greedy pipeline and bifurcation penalty with last-hypothesis selection usually outperform unconstrained greedy decoding. Constrained-only decoding often hurts math tasks badly but can work well on multiple-choice tasks. Constrained-hypothesis beam and minimum-penalty selection are reported as unstable and often worse. The bifurcation-penalty variants achieve 100% finished generations in the tested settings. In suffL terms, this line does not learn a suffix-specific model; instead, it enforces a structured suffix at inference time so that answer extraction is trivial and deterministic (Hammal et al., 1 Mar 2026).

6. Terminological boundaries and adjacent suffix research

A persistent source of ambiguity is the proximity between suffix learning and classical suffix processing. The latter includes suffix arrays, LCP arrays, sparse suffix arrays, suffix selection, and suffix sorting. These are foundational for string algorithms and compressed indexing, but they are not learning frameworks in the machine-learning sense. The cited literature includes the first in-place algorithms for building SSA and SLCP in ΩSA\Omega_{SA}8 expected time, an optimal cache-aware suffix-selection algorithm requiring ΩSA\Omega_{SA}9 block transfers under the tall-cache assumption, an ΩA\Omega_A0-bit LCP representation with query time ΩA\Omega_A1, NP-completeness and constructive inference results for reconstructing strings from LCP arrays under different models, and a concise description of DivSufSort together with an extension that computes the LCP-array during suffix-array construction (Prezza, 2016, 0902.1737, 0910.3123, Kärkkäinen et al., 2016, Fischer et al., 2017).

These works matter to suffL mainly as neighboring infrastructure and as conceptual boundaries. They show how suffix order, longest common prefixes, sparse suffix subsets, and suffix-tree simulation can be represented or recovered efficiently. They do not, however, optimize a suffix as a behavioral controller, map a prefix directly to a future suffix, or constrain the terminal output of a generative model. A plausible implication is that suffL should be distinguished from suffix data structures in the same way that structured prediction is distinguished from indexing: the former treats suffixes as targets or control variables, while the latter treats them as combinatorial objects for storage, retrieval, or comparison.

The same boundary applies to the term “inference.” In the LCP-array literature, inference means reconstructing a string or deciding whether an integer array is a valid LCP array. In predictive monitoring, inference means generating the future activity suffix. In adversarial transfer learning, it means searching over a discrete suffix space to maximize jailbreak success. In suffix-constrained generation, it means decoding under a terminal grammar. The shared vocabulary is genuine, but the objectives, guarantees, and failure modes are fundamentally different.

A second misconception is that suffL is inherently adversarial or safety-related. The cited corpus does not support that claim. Adversarial suffix transfer learning is one branch, but direct process-suffix prediction and suffix-constrained answer formatting are non-adversarial, and approximate matching in PSTs is a sequence-modeling problem. Conversely, suffix-constrained generation is not a jailbreak method: it is a decoding procedure designed to guarantee a well-formed, trivially parseable suffix. The literature therefore supports a plural rather than unitary understanding of suffL.

In aggregate, the field designated here as suffix learning is best read as a family of suffix-centric methods whose common feature is preferential treatment of the terminal segment of a sequence. What varies across formulations is whether the suffix is a predictive context, a future target, an adversarial control string, or a required output schema. That variation is not incidental; it defines the methodological landscape.

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 Suffix Learning (suffL).