Skip to content

leafsleuth-ADR-002 - 4-Pillar Bayesian Behavioral & Stylometric Identity Profiling with Explainable Tells

Status: Accepted Date: 2026-10-27 Extends: leafsleuth-ADR-003, leafsleuth-ADR-001

Context

Moderators and administrators frequently need to determine whether two accounts—either sharing an IP address or operating across dynamic IPs—belong to one human operating an alt/multibox setup or two distinct humans (such as siblings, roommates, or family members).

Single-signal heuristics fail in both directions: - IP matching alone flags every household, dormitory, and CGNAT carrier as an alt. - A single behavioral metric (such as movement speed or chat frequency) is too noisy on its own to be conclusive. - However, humans leave subconscious, orthogonal signatures across how they speak/type (forensic stylometry), how their mouse and fingers move (motor micro-kinematics), how their active inputs interleave in time when both accounts are online (temporal cross-correlation), and what sequence of gameplay goals they pursue (Markov action transitions).

Decision

Implement a 4-pillar factored Bayesian log-likelihood profiler in sleuth-common (net.leaf.sleuth.common.behavior) that combines weak, conditionally independent signals into a calibrated posterior probability $P(\text{SamePerson} \mid E)$ with a 95% credible interval and top human-readable ExplainableTell markers (REQ-SLEUTH-BIO-001 .. 005):

1. Pillar 1: Linguistic Stylometry & Typing Cadence (LinguisticStylometryProfiler)

  • Rare-Word IDF Shibboleths: Tracks server-wide document frequencies $\text{df}(w)$ across $N$ profiled accounts (using privacy-safe normalized token hashing plus bounded display exemplars for rare tokens). When two accounts share rare vocabulary or slang with high Inverse Document Frequency ($\text{IDF}(w) = \ln((N + 1) / (\text{df}(w) + 0.5))$), the shared shibboleths contribute a positive log-likelihood ratio proportional to their IDF leverage.
  • Structural Punctuation & Casing Habits: Tracks empirical rates of lowercase-only messages, trailing ellipses (...), apostrophe/contraction usage, exclamation/question density, and character/word n-gram cosine similarity.
  • Command Alias Preferences: Compares preferred command shorthands within equivalence groups (e.g., /home vs /h, /msg vs /w vs /tell, /tpa vs /tpask).
  • Typing Burst Cadence (WPM): Estimates typing speed in words-per-minute (charsPerSec * 12) from inter-message delta timestamps on rapid consecutive chat/command bursts.

2. Pillar 2: Motor Micro-Kinematics & Sensitivity GCD (MotorKinematicsProfiler)

  • Mouse Sensitivity GCD Quantization: Minecraft client yaw/pitch deltas are quantized by a step size $\delta_{\text{gcd}}$ derived from the player's client mouse sensitivity setting. MotorKinematicsProfiler estimates each account's rotary quantization step via floating-point greatest-common-divisor (GCD) extraction on small non-zero yaw/pitch deltas.
  • Kinematics & Click Cadence: Tracks angular velocity/jerk distributions and click / hotbar-switch inter-arrival cadence (mean ± SD).

3. Pillar 3: Simultaneous Activity Cross-Correlation (SimultaneousActivityCorrelator)

  • Divides overlapping online time into short discrete activity buckets ($\Delta t = 2\text{ s}$) and computes Pearson cross-correlation $r \in [-1, 1]$ and alternating-exclusivity ratios between the two accounts' active input streams:
  • Alternating / Anti-Correlated Activity ($r < -0.30$ or high mutual exclusivity during active play): Strong positive LLR for SamePerson (one human alt-tabbing or switching focus between two clients, or driving one active main while the second only acts during switches).
  • Independent Simultaneous Activity ($r \approx 0$ with frequent concurrent high-entropy input bursts in the same bucket): Strong negative LLR (DistinctPeople, characteristic of two real people playing simultaneously on the same IP).

4. Pillar 4: Gameplay Goal Markov Chains (GoalMarkovProfiler)

  • Tracks first-order transition probabilities $P(S_{t+1} \mid S_t)$ across coarse gameplay states (MINING, BUILDING, CRAFTING, COMBAT, CONTAINER_SORT, COMMAND_CHAT, AFK) plus Jaccard overlap of visited chunks and interacted containers.

5. Bayesian Synthesis & Sample-Size Shrinkage (BayesianIdentityLinker)

  • Each pillar $k$ emits a sample-size shrunk log-likelihood ratio: $$\tilde{\ell}k = \frac{n},k}}{n_{\text{eff},k} + \kappa_k} \cdot \text{LLRk, \qquad \text{LogOdds}}} = \text{LogOdds{\text{prior}} + \sum_k$$}^{4} \tilde{\ell
  • Posterior probability is $P(\text{SamePerson} \mid E) = \sigma(\text{LogOdds}_{\text{post}})$, where $\sigma(z) = (1 + e^{-z})^{-1}$.
  • Uncertainty in log-odds $\sigma_{\text{logit}} = \sqrt{\sum_k \text{Var}(\tilde{\ell}k) + \sigma_0^2 / (1 + \sum_k n},k})}$ is mapped through $\sigma(\text{LogOdds{\text{post}} \pm 1.96 \cdot \sigma)$ to form a calibrated 95% credible interval (}ConfidenceInterval), classifying the pair into LIKELY_SAME_PERSON, LIKELY_DISTINCT_PEOPLE, SHARED_ENV_AMBIGUOUS, or INSUFFICIENT_EVIDENCE.

6. Safeguards Against Historical "ML Anticheat" Failure Modes

Early Minecraft "machine learning" anticheat systems failed in production due to six structural flaws. LeafSleuth enforces explicit mathematical guardrails against each failure mode:

Historical ML Anticheat Failure Why It Failed in Production LeafSleuth Mathematical & Architectural Guardrail
1. Black-Box Opacity ("Neural net says 93% cheater") Opaque feature weights gave moderators no verifiable evidence to audit or explain on appeal. Mandatory White-Box ExplainableTell Synthesis: Every pillar computes closed-form log-likelihood ratios and emits human-readable tells citing exact shared rare words + IDF, WPM burst intervals, mouse GCD step in degrees, and temporal correlation $r$.
2. Base-Rate Fallacy (Ignoring low prior probability across $O(N^2)$ pairs) A 2% false-positive rate across 500 innocent player pairs flags 10 innocent pairs. Conservative Prior Odds: Defaults to a skeptical prior ($P_0 = 0.20$ for non-shared IPs, $P_0 = 0.50$ neutral for shared IPs so roommates start at 50/50 rather than presumed guilty).
3. Ping Spike & Tick-Compression Confounding Client packet batching during Wi-Fi jitter or server TPS drops compressed multiple moves into 1 ms, triggering false kinematic flags. Packet-Batch & Teleport Sanitization: MotorKinematicsProfiler filters sub-5ms packet-batched bursts and large teleport/respawn snap angles ($> 90^\circ$); SimultaneousActivityCorrelator aggregates over coarse $2\text{ s}$ buckets immune to $100\text{–}300\text{ ms}$ ping jitter.
4. Single-Feature Overfitting Over-weighting one habit (e.g. CPS or a popular server slang word) flagged legitimate players who shared one trait. Per-Pillar LLR Clamping & Multi-Pillar Corroboration Gate: Each pillar's shrunk LLR is clamped to $[-3.0, +3.0]$, and LIKELY_SAME_PERSON requires corroboration from at least two independent pillars (or extreme multi-feature certainty with tight CI).
5. Cold-Start Overconfidence Classifying players on < 30 seconds of movement or 1–2 chat lines caused massive early-session false positives. Hyperbolic Sample-Size Shrinkage: Pillar weight $w_k(n_{\text{eff}}) = \frac{n_{\text{eff}}}{n_{\text{eff}} + \kappa_k}$ shrinks low-sample LLRs toward $0.0$ and widens the 95% credible interval, returning INSUFFICIENT_EVIDENCE when interval width exceeds $0.45$.
6. Automated Punitive Action on Probabilistic Scores Auto-banning directly from a noisy classifier turned statistical tail events into false bans. Diagnostic Attribution Only: LeafSleuth never executes automated bans or kicks; it is a forensic triage surface for human operators.

Alternatives Considered

Alternative Why Rejected
Deterministic threshold rules (e.g. "flag if IP matches and WPM within 5") Produces false positives on short sessions and cannot weigh conflicting cues (e.g. shared IP + shared base, but simultaneous independent motor inputs and distinct mouse GCDs).
Retaining unbounded raw chat logs in memory High memory footprint and privacy risk; bounded stylometric counters, Welford estimators, and IDF token sketches preserve forensic accuracy in $O(1)$ space per player.

6. False-Negative Countermeasures for Silent, VPN-Spoofed, DPI-Rescaled Ban Evaders

When a ban evader joins on a new IP/subnet (sameSubnet = false, skeptical LogOdds_prior), never chats (LLR_ling = 0), has no simultaneous overlap with their banned main (LLR_temporal = 0), and alters their camera mouse sensitivity or hardware DPI over a short session: 1. Inventory & Early-Session Ergonomics (MotorKinematicsProfiler + GoalMarkovProfiler): - MotorKinematicsProfiler#recordInventoryInteraction captures sensitivity-invariant 2D GUI slot-to-slot transition speeds ($\text{slots/sec}$), inter-click cadence distributions, and shift-click / hotbar-key ratios during chest and inventory interactions, alongside first-60s action-sequence bigrams (earlySessionBigrams: non-default hotbar slot cycles, offhand $F$-swaps, sprint-jump turns, and state transition trigrams in GoalMarkovProfiler). - Matching sensitivity-invariant inventory and early-session muscle memory rapidly accumulates $n_{\text{eff}}$ and cancels camera GCD mismatch penalties when a player alters their camera sensitivity or hardware DPI. 2. Two-Tier Lead Surfacing (IdentityVerdict.EMERGING_WATCHLIST_LEAD & MODERATE_INVESTIGATE_LEAD): - LIKELY_SAME_PERSON (CORROBORATED_HIGH_CONFIDENCE) stays strict so innocent players are never falsely accused, while BayesianIdentityLinker distinguishes EMERGING_WATCHLIST_LEAD from INSUFFICIENT_EVIDENCE when samePersonProbability.upperBound95() >= 0.80 and at least one behavioral pillar exhibits rawLlr >= 1.5 (and MODERATE_INVESTIGATE_LEAD once estimate >= 0.72 and lowerBound95 >= 0.50), reporting estimatedSampleDeficit and sampleDeficitDiagnostic ("Needs ~N more motor/inventory samples to collapse 95% CI") and queuing a ModeratorInvestigationCase (CaseType.BAN_EVASION_IDENTITY_LINK).

7. Modal Base-Rate Discounting & Near-Identical Doppelganger Collision Bounds

In a large server population ($N \ge 80$, $\binom{N}{2} \ge 3,160$ pairs), many distinct players cluster around modal Minecraft defaults (~50% leave mouse sensitivity at the 100% vanilla default 0.1500 deg, ~55% type casual lowercase chat at 50-72 WPM using default /home and /msg commands and everyday survival vocabulary, and ~55% follow the standard MINING -> CONTAINER_SORT -> CRAFTING -> BUILDING loop), and by the Birthday Paradox two distinct players can behave near-identically: 1. Domain Vocabulary & Modal Habit Prior Discounting (LinguisticStylometryProfiler, MotorKinematicsProfiler, GoalMarkovProfiler): - Common Minecraft survival nouns (COMMON_MINECRAFT_LEXICON: diamonds, villager, nether, redstone, hopper, etc.) carry a baseline virtual document frequency prior so everyday game vocabulary never triggers RARE_SHIBBOLETH_MIN_IDF (3.6) during cold start. - Matching modal defaults—such as plain lowercase chat without trailing ellipsis, default /home and /msg roots, 48-74 WPM typing speed without shared rare words, 100% vanilla default 0.1500 deg sensitivity without locomotion/inventory-sweep signatures, or a coarse survival Markov loop across completely disjoint world bases (spatialOverlapJaccard == 0.0)—is discounted according to its low self-information $-\log P(x)$. 2. Forensic Anchor Corroboration & Doppelganger Guard (BayesianIdentityLinker): - Distinct-IP Behavioral Doppelgangers: Two accounts on distinct IPs and subnets that share zero high-entropy forensic connectors (no shared rare personal shibboleths, no shared world chunks/containers or drop-mule transfers, no shared contraption signatures, and no matching bot script fingerprint) are capped at MODERATE_INVESTIGATE_LEAD even if their passive motor and chat habits are near-identical (0.000% false-conviction rate at LIKELY_SAME_PERSON, ~1.30% soft review rate at MODERATE_INVESTIGATE_LEAD across 3,148 innocent modal/doppelganger pairs in BehavioralIdentityCalibrationTest). - Shared-IP Disjoint-Base Household Doppelgangers: Two accounts on a shared IP or /24 subnet playing in separate world bases (spatialOverlapJaccard == 0.0) with zero shared rare shibboleths and zero alternating multibox handovers classify as SHARED_ENV_AMBIGUOUS / MODERATE_INVESTIGATE_LEAD rather than LIKELY_SAME_PERSON. - Irreducible Collision Boundary: If two distinct humans simultaneously share a household IP, play non-overlapping time-shifted sessions, access the same community chest chunks, use the same rare shibboleth slang, and exhibit identical non-default motor and typing habits, they are statistically indistinguishable from a sequential alt (LIKELY_SAME_PERSON), which is why LeafSleuth remains an explainable diagnostic triage surface rather than an automated ban executor. 3. Hardware X/Y GCD Aspect Scaling, 2D Fitts's Law Cursor Trajectory Reconstruction & Wald's SPRT (MotorKinematicsProfiler, BayesianIdentityLinker): - Per-Axis Hardware Quantization (pitchToYawGcdScaleRatio, exactHardwareGcdCanopyKey): Separates pitch and yaw small-angle GCD quantization steps ($\delta_{\text{pitch}} / \delta_{\text{yaw}}$) to detect asymmetric X/Y DPI driver configurations and partition non-modal sensitivity floats into narrow canopy blocking buckets prior to full kinematic evaluation. - 2D Fitts's Law Container Cursor Reconstruction (inventoryFittsLawFit): Regresses container slot transition duration $\Delta t$ (ms) against Shannon's Index of Difficulty $ID = \log_2(1 + D)$ across 9-column GUI slot coordinates via EwmaLinearFit ($\Delta t = a_{\text{react}} + b_{\text{fitts}} \log_2(1 + D)$), recovering cognitive click-initiation latency $a_{\text{react}}$ (ms) and Index of Performance throughput $\text{IP} = 1000 / b_{\text{fitts}}$ (bits/s) invariant to both 3D camera sensitivity and slot jump distance $D$. - Wald's Sequential Probability Ratio Test (evaluateWaldSprt): Accumulates sequential log-likelihood ratios $\Lambda_T$ across five independent causal contexts (3D_CAMERA_KINEMATICS, 2D_FITTS_INVENTORY_GUI, LINGUISTIC_STYLOMETRY, MARKOV_SPATIAL_CONTRAPTION, TEMPORAL_CORRELATION) against stopping boundaries $A_{\text{upper}} = \ln((1 - \beta)/\alpha)$ and $B_{\text{lower}} = \ln(\beta/(1 - \alpha))$, requiring multi-context coherence before crossing $A_{\text{upper}}$ so transient single-domain kinematic collisions remain in CONTINUE_SAMPLING.

Consequences

  • Positive:
  • Combines subtle linguistic shibboleths, typing rhythm, mouse GCD quantization, temporal input exclusivity, and gameplay Markov habits into a single calibrated probability and 95% credible interval.
  • Surfaces human-readable ExplainableTell summaries so moderators see why two accounts matched or diverged.
  • Negative / Trade-offs:
  • Silent accounts (zero chat messages) provide no linguistic evidence ($\text{LLR}_{\text{ling}} = 0$), requiring motor, temporal, and goal pillars to carry the inference.