---
title: 'PRECOG: A Polysemous Framework for Anticipatory Inference'
url: https://www.emergentmind.com/topics/precog
type: topic
---

# PRECOG: A Polysemous Framework for Anticipatory Inference

Searching arXiv for recent and relevant PRECOG-related papers to ground the article.
PRECOG, Precog, and PrecoG are recurrent labels in the research literature, but they do not denote a single framework. The name has been used for at least nine distinct constructs: an online memory-leak detector for cloud virtual machines, a three-stage electrocorticographic decoding pipeline for pre-movement force planning, a pre-failure detector for coding agents based on “strained coherence,” a memorization score for pretrained language models, a goal-conditioned probabilistic forecaster for multi-agent driving, a graph-Laplacian preconditioner for transform-domain LMS, a corpus for text-only LLM performance forecasting, a pre-hoc crowdsourcing quality-control system, and a protocol for strategic foresight [2101.09799] [2106.08938] [1605.05291] [2606.07889] [2305.04673] [1905.01296] [1812.04570] [2509.20645] [2604.09597]. Across these uses, the common theme is anticipatory inference, but the operational object of prediction ranges from resource exhaustion and motor intent to benchmark scores, human text quality, and strategic timing.

## 1. Research usages and nomenclature

The label appears with different expansions and capitalization conventions, including “PREdiction Conditioned On Goals,” “PreCog,” “PrecoG,” and “PRECOG PROTOCOL.” The underlying research programs are unrelated in methodology, data modality, and evaluation target.

| Usage | Research object | Representative paper |
|---|---|---|
| Precog / PrecogMF | Cloud VM memory-leak detection from memory-utilization time series | [2101.09799], [2106.08938] |
| “Precognitive” decoding | Pre-movement ECoG decoding of force direction and onset | [1605.05291] |
| Strained coherence for PRECOG | Pre-failure signal in coding-agent trajectories | [2606.07889] |
| PreCog | Memorization score for pretrained language models | [2305.04673] |
| PRECOG | Goal-conditioned visual multi-agent trajectory forecasting | [1905.01296] |
| PrecoG | Unitary split preconditioner via graph Laplacian regularization | [1812.04570] |
| PRECOG | Corpus for text-only LLM performance forecasting | [2509.20645] |
| PreCog | Pre-hoc crowdsourced data-quality improvement | [1704.02384] |
| PRECOG PROTOCOL | Executable framework for strategic foresight | [2604.09597] |

A persistent misconception is that PRECOG names a single family of models. The literature instead uses the name polysemously. As a result, technical statements about “PRECOG” are only meaningful when anchored to a specific domain and arXiv identifier.

## 2. Cloud-based memory-leak detection

In cloud systems research, Precog is a “black-box,” online algorithm for detecting memory leaks from a single VM’s memory-utilization time series. The setting assumes no access to application internals, heap dumps, object allocations, or language runtime telemetry. The observed signal is \(x=\{x_1,\dots,x_N\}\), where \(x_t\in[0,100]\) is RAM utilization at minute \(t\). Detection is framed over a sliding window \(x_{t-T:t}\): a window is anomalous if its future linear trend will hit a critical utilization \(U\) within a lead time \(C\) [2101.09799] [2106.08938].

The core model is ordinary least squares on a candidate segment or window. In the later comparative formulation, the fitted line is \(h(\tau)=\theta_0+\theta_1\cdot\tau\), with goodness-of-fit measured by \(R^2\), and time to threshold estimated as \(t_U=(U-\theta_0)/\theta_1\) when \(\theta_1>0\). A segment is flagged if \(R^2\ge R^2_{\min}\) and the estimated crossing occurs within \(C\). The earlier online-detection paper expresses the same logic with \(y(\tau)=\alpha+\beta\cdot\tau\), \(\beta>0\), and \(\mathrm{exit\_time}=(100-y(t))/\beta\) [2101.09799] [2106.08938].

Precog’s distinctive step is change-point detection. First differences are computed, transformed to z-scores, and indices exceeding \(3\sigma\) or \(|Z|>3\) are treated as change points; the method enforces a minimum spacing such as \(6\) hours to suppress spurious boundaries. Offline training scans historic series between change points, extracts trends summarized by slope and duration, and stores the resulting historic trend set together with global maxima. Online detection fits a line on segments between recent change points and declares an anomaly if the current slope-duration pair exceeds either the global maxima or one of the stored historic trends. PrecogMF adds an extra maximum-based filter: if a segment is otherwise anomalous but its maximum utilization remains below the historic maximum for an equal-length segment, the anomaly is overridden to normal [2106.08938].

The experimental setting is explicit. The later comparative paper uses 60 cloud VMs over 5 days at 1-minute resolution, with 20 VMs experiencing real leaks and Huawei labels. Data are resampled to 5-minute intervals and median-smoothed over a 1-hour window. Shared hyperparameters are a minimum trend duration of 6 hours, \(C=7\) days, \(U=100\%\), and \(R^2_{\min}=0.8\). Under this comparison, LBR attains \(F_1=0.568\) in \(\approx97.96\) s, LBRCPD \(F_1=0.625\) in \(\approx23.92\) s, Precog \(F_1=0.666\) in \(\approx19.51\) s, and PrecogMF \(F_1=0.857\) in \(\approx19.52\) s, corresponding to an \(\approx80\%\) time reduction relative to LBR [2106.08938].

The earlier online-detection paper reports a closely related but not identical headline result. On 60 real VMs, it gives \(TP=15\), \(FP=0\), \(FN=5\), hence Precision \(=1.00\), Recall \(=0.75\), \(F_1=0.857\), with average prediction time \(0.32\) s per 500-point test window; it also reports overall \(F_1=0.90\) on a synthetic 90-positive/90-negative dataset spanning linear, linear+noise, and sawtooth patterns [2101.09799]. Reported headline scores therefore differ across the two papers: the earlier work reports \(F_1=0.857\) for Precog itself, whereas the later four-way comparison reports \(F_1=0.666\) for Precog and \(F_1=0.857\) for PrecogMF.

The same line of work classifies leak traces into three visual classes: linearly-increasing, random, and saw-tooth. Linear growth is directly compatible with the regression criterion; random patterns are “not reliably detectable by single-metric regression”; and saw-tooth traces encode repeated growth-reset cycles, such as container restart after OOM. This classification is operational rather than merely descriptive, because parameters such as \(W_{\min}\) are chosen relative to reset intervals [2106.08938].

## 3. Precognition as precursor detection: motor planning and coding-agent failure

One use of “precognitive” in the literature is literal early decoding of human motor intent from neural data. The ECoG study on upper-limb 3D isometric force application introduces a three-stage pipeline combining jPCA reduced-rank hidden Markov models, regularized shrunken-centroid discriminant analysis, and LASSO regression. High-dimensional wavelet/LMP signals \(X\in\mathbb{R}^{D\times T}\) are projected into a \(d=10\) dimensional jPCA subspace, clustered into 12 observed symbols, and modeled with six left-to-right HMMs, one for each force direction, each with 8 hidden states and 12 observed symbols. Leave-one-out cross-validation yields a 6-way direction-classification accuracy of \(35.6\%\), versus \(17\%\) chance [1605.05291].

The same study evaluates a direct discriminative alternative. RDA regularizes class covariances and shrinks class centroids toward the global mean; the best grid-searched setting retains 27 spectral-channel-time features and yields \(27.0\%\) accuracy, again above chance. The surviving features localize direction-sensitive pre-movement information to approximately \(400\) ms before onset over ipsilateral dorsal premotor cortex, then approximately \(200\) ms in adjacent premotor cortex, and finally approximately \(100\) ms pre-onset in contralateral M1. A separate LASSO model for continuous force prediction identifies \(60\%\) of true onsets within \(\pm250\) ms and \(80\%\) within \(\pm500\) ms, with a \(22\%\) false-positive rate [1605.05291].

A different precursor-detection usage appears in LLM-agent safety. “Strained coherence” is defined formally on a trajectory \(T=(s_1,\dots,s_n)\) of think steps and actions:
\[
\mathrm{SC}(T)\Longleftrightarrow \exists\,i<j:\;\mathrm{Ack}(s_i)\wedge \mathrm{Act}(s_j)\wedge \neg\mathrm{Resolves}(s_i,s_j).
\]
The failure mode is therefore not generic inconsistency but a specific pattern in which the agent explicitly acknowledges a conflict and then proceeds without resolving it. Detection is implemented by a Claude Sonnet 4.6 judge over full ATIF-v1.5 JSON trajectories, outputting span-level JSON with start/end indices, quoted acknowledgment, quoted action, conflict type, and a 1–5 confidence score [2606.07889].

Quantitatively, on 44 Terminal-bench-2 trajectories generated by a Qwen3.5-35B-A3B backbone, flagged trajectories fail \(94\%\) of the time, versus \(46\%\) for unflagged trajectories, a 47-point gap with Fisher’s exact \(p=0.003\). At matched selectivity of 16 flags, the detector reaches \(94\%\) precision versus \(88\%\) for a lexical discourse-marker baseline; the 10-trajectory intersection of the two methods has a \(100\%\) failure rate with Clopper–Pearson \(95\%\) CI \([69\%,100\%]\). On Gemma4-31B, the overall pattern is directionally consistent but not statistically significant, with a 20-point gap and \(p=0.31\), and the paper attributes attenuation largely to 13 trajectories with zero think content. The first flag appears late: median \(84\%\) elapsed trajectory time for Qwen and \(83\%\) for Gemma, making the signal suitable for late-stage intervention rather than early compute reallocation [2606.07889].

Taken together, these two uses share a precise temporal logic: the signal is useful because it appears before the event of interest. In one case the event is force onset; in the other it is execution failure. The underlying measurement substrates, however, are entirely different: ECoG dynamics in one instance, deliberative language-and-action traces in the other.

## 4. PRECOG in language-model research

In NLP, PreCog has been introduced as a memorization measure for pretrained masked language models. For a token sequence \(x=(x_1,\dots,x_T)\), each position is masked in turn to form \(\hat{x}^{(i)}\), the pretrained BERT MLM is queried for its top-\(\ell\) prediction set at the masked position, and the score is
\[
\mathrm{PreCog}(x)=\frac{1}{T}\sum_{i=1}^{T}\mathbb{I}\bigl(x_i\in \mathrm{BERT}_{MLM}(\hat{x}^{(i)})\bigr).
\]
In the reported experiments \(\ell=1\), so the score is the fraction of positions whose original token is recovered as the single most likely MLM prediction. The measure uses only the original pretrained BERT-base MLM head and no fine-tuning labels [2305.04673].

The main empirical question is whether memorization, as measured by PreCog, correlates with downstream task accuracy. The protocol computes PreCog for each GLUE example, sorts examples into five equal-sized bins, fine-tunes BERT in the standard way, and reports accuracy by bin. Across all GLUE bins, Pearson correlation between Length and accuracy is \(r=-0.5922\) with \(p=0.292\), between LexCov and accuracy \(r=+0.9014\) with \(p=0.037\), and between PreCog and accuracy \(r=+0.9737\) with \(p=0.005\). In task-specific comparisons, examples with PreCog in \((80,100]\%\) are reported as 5–15 points more accurate than examples with PreCog \(\le80\%\); the summary highlights approximately \(0.759\) versus \(0.690\) on MNLI, approximately \(0.644\) versus \(0.549\) on RTE, and approximately \(0.970\) versus \(0.918\) on SST-2 [2305.04673].

A separate LLM line of work uses PRECOG to denote a forecasting corpus rather than a score. The corpus contains 767 experimental records spanning 528 unique datasets and 631 unique papers, covering seven metric families normalized to a 0–100 scale: Accuracy, F1, Recall, Precision, Exact Match, ROUGE, and BLEU. Each instance pairs a fully self-contained redacted description \(x_i\), approximately 200–600 tokens, with a normalized target performance \(y_i\in[0,100]\). Source papers are excluded from the retrieval corpus in the zero-leakage setting, and a second LLM pass plus rule-based checks enforce anonymization. A 30-sample human audit reports \(100\%\) anonymization pass rate, mean schema coverage \(4.61\), and mean source grounding \(4.87\) [2509.20645].

The forecasting task is regression from description to score. On the full 767-instance benchmark, the test-set mean baseline yields MAE \(=21.4\), E5-Mistral + kNN \(19.9\) with \(r=0.30\), E5-Mistral + XGBoost \(20.3\) with \(r=0.30\), GPT-5 without search \(14.7\) with \(r=0.69\), and GPT-5 with arXiv retrieval \(14.0\) with \(r=0.73\); the reported GPT-5 and Qwen3 correlations marked with a dagger are significant at \(p<0.05\) by one-sided binomial sign test [2509.20645].

The same paper reports a high-confidence regime in which models self-report confidence categories and evaluation is restricted to a retained subset \(S_\tau\). On the Accuracy subset, MAE falls as the confidence threshold rises, with the best reported high-confidence MAE reaching \(8.7\). Retrieval behavior is also quantified: GPT-5 averages \(3.06\) search calls per instance with \(\sigma=0.87\), versus \(0.89\) and \(\sigma=0.32\) for Qwen3-32B; aggregate query-token diversity is 2,140 unique tokens for GPT-5 and 794 for Qwen3-32B [2509.20645].

These two NLP usages employ the same name for different epistemic objects. One estimates how much a pretrained MLM “recalls” from pretraining; the other estimates how well an LLM will score on a task from a redacted task description.

## 5. Goal conditioning and numerical conditioning

The 2019 driving paper expands PRECOG as “PREdiction Conditioned On Goals in Visual Multi-Agent Settings.” The setting consists of \(A\) interacting agents with joint future trajectories
\[
S_{1:T}=\{S_t^a\in\mathbb{R}^2\}_{t=1,\dots,T}^{a=1,\dots,A},
\]
past history \(S_{-\tau:0}\), and robot-centric observation \(\chi\in\mathbb{R}^{H\times W\times C}\). Standard forecasting models \(p(S_{1:T}\mid S_{-\tau:0},\chi)\), whereas conditional forecasting additionally conditions on a robot goal \(g\), implemented in experiments as a Gaussian likelihood on the final robot state. The model is a multi-agent normalizing flow \(f_\theta\) that maps factorized Gaussian latents \(Z_{1:T}^{1:A}\sim\mathcal{N}(0,I)\) to joint trajectories, with per-agent past-trajectory GRUs of size 128, an 8-layer fully convolutional LIDAR encoder, social features, whisker-features, and an autoregressive invertible “Verlet-step”
\[
S_{t+1}^a=2S_t^a-S_{t-1}^a+m_t^a+\Sigma_t^a Z_{t+1}^a.
\]
Because the flow is invertible, the model supports exact log-likelihood training and goal-conditioned latent optimization [1905.01296].

The reported datasets are CARLA and nuScenes. In CARLA, the paper extracts 60,701 train, 7,586 validation, and 7,567 test scenes from 900 episodes, with 2 s past and 2 s future at 10 Hz. In nuScenes, it samples 2 s past and 4 s future at 5 Hz from 850 real-world episodes. Metrics are \(\mathrm{minMSD}_K\) and normalized forward cross-entropy (“extra nats”). For forecasting with \(A=2\), the ESP model with LIDAR reduces CARLA \(\hat{m}_{12}\) from \(0.4542\) to \(0.3925\) and \(\hat{e}\) from \(0.5773\) to \(0.5499\) relative to R2P2-MA; on nuScenes, ESP+RoadMask reduces \(\hat{m}\) from \(1.3363\) to \(1.0809\) and \(\hat{e}\) from \(0.9505\) to \(0.9288\). Under conditional forecasting, PRECOG reduces joint \(\hat{m}_{12}\) from \(0.337\) to \(0.241\) in CARLA Town02 and from \(1.0937\) to \(0.5143\) in nuScenes, while also improving forecasts for other agents once the robot goal is known [1905.01296].

A mathematically unrelated use appears in adaptive signal processing. “PrecoG” is an efficient unitary split preconditioner for transform-domain LMS, learned through graph Laplacian regularization. The input taps are modeled as a weighted graph \(G=(V,E,W)\) with graph Laplacian \(L=D-W=B W_E B^\top\). Its eigendecomposition \(L=U\Lambda U^\top\) provides an orthonormal transform \(U\), yielding transformed data \(\tilde{x}_k=U^\top x_k\). The design objective is to make the power-normalized transformed autocorrelation close to the identity, minimizing Frobenius-norm penalties involving \(U^\top R U\), its diagonal, and a regularizer on edge weights. Weight updates use first-order eigenvector perturbation, and the resulting transform acts as a unitary split preconditioner in both LMS and linear system solution [1812.04570].

The paper emphasizes condition-number reduction as the target. After transformation and power normalization, the conditioned autocorrelation is intended to have eigenvalues in \([1-\epsilon_2,1+\epsilon_1]\), so the condition number approaches \((1+\epsilon_1)/(1-\epsilon_2)\). In the fully connected case, each gradient update over all edge weights is \(O(N^3)\), though sparsity can reduce this. On regularized Hilbert matrices, random positive-definite Gaussian matrices, sparse systems, AR(1), AR(2), and Hebb-LMS settings, PrecoG is reported to outperform DCT, DFT, Gauss-Seidel, Jacobi, and ILU in condition-number reduction or convergence behavior [1812.04570].

These two usages share only the abstract notion of conditioning. In autonomous driving, prediction is conditioned on a goal variable. In adaptive filtering, a linear system or autocorrelation structure is conditioned numerically through a learned unitary transform.

## 6. Pre-hoc quality control and strategic foresight

In crowdsourcing, PreCog denotes a pre-hoc interface-optimization system for improving data quality before submission. Its central design pattern is Segment-Predict-Explain. Offline, the system segments historical documents, extracts 47 features in five categories—Informativeness, Topic, Subjectivity, Readability/Grammar, and Similarity—and trains Random Forest classifiers for document-level and segment-level quality. Online, new worker text is segmented, featurized, and scored; low-quality segments are highlighted, and an Explanation Generator selects prescriptive feedback through Feature Explanation Functions (FEFs) and the TCruise heuristic over Random Forest paths [1704.02384].

Segmentation is handled by TopicTiling by default: the document is tokenized into sentences, LDA topic distributions are computed over sliding windows, and a boundary is emitted when the \(L_1\) distance between adjacent topic windows exceeds a threshold. Explanation is formalized by a responsibility score over feature perturbations, normalized by perturbation magnitude and modulated by model confidence. Exact solution is exponential in feature count, so TCruise approximates the selection of influential feature changes in time linear in the number of tree paths. The paper reports interactive latency of approximately \(0.1\) s [1704.02384].

The reported evaluation spans hard constraints and ambiguous text tasks. For simple relational-style constraints, two Precog interfaces yield \(1.7\times\) and \(1.9\times\) more valid tuples than no-Precog. For text acquisition, Precog collects at least \(2\times\) more high-quality reviews and at least \(2.6\times\) more high-quality host profiles than the baseline at selected quality thresholds. Mean rubric-score improvements are \(+0.55\) versus \(+0.14\) for reviews and \(+0.65\) versus \(+0.07\) for host profiles. The document-level Random Forest achieves approximately \(85\%\) accuracy on Amazon DVD reviews and approximately \(79\%\) on Airbnb trustworthiness; segment-level RF predictions show approximately \(71\%\) agreement with human segment labels [1704.02384].

A separate 2026 usage, PRECOG PROTOCOL, is an executable framework for strategic foresight rather than a predictive model. It systematizes horizon scanning, weak-signals theory, and scenario planning into five steps: Signal Map, Convergence Analysis, Contrarian View, Timing Grid, and Action Window. A single session is designed to take 1–2 hours. Step 1 records 3–8 signals, each tagged by strength \( \{W,E,S\} \), direction \( \{\uparrow,\rightarrow,\downarrow\} \), and confidence \(\{ \text{Verified}, \text{Reported}, \text{Speculative} \}\). Step 2 groups convergent signals into hypotheses \(H_k\) with confidence levels. Step 3 constructs contrarian scenarios with explicit preconditions, collapse triggers, and probability estimates. Step 4 places the thesis on four timing axes: Market Phase, Competitive Timing, Organizational Readiness, and External Window. Step 5 maps the result into Now, Soon, Watch, and Kill action buckets, each with triggers and cost or resource estimates [2604.09597].

The protocol includes explicit anti-pattern detection. In version 2, if all four timing axes align in an unambiguously favorable or unfavorable direction, an escalated Contrarian View is triggered to counter confirmation bias. Longitudinal re-runs of the protocol delta-tag signals as Strengthened, Stable, Weakened, New, or Dead, and version 2 adds a “Signal Freshness” check when more than 50% of signals are unchanged. Across the paper’s three evaluation modes, the batch experiment covers eight random domain pairings with success rate \(87.5\%\) and failure rate \(12.5\%\), and a blind evaluation scores protocol output \(74/80\) versus \(49/80\) for brainstorming [2604.09597].

These systems are pre-hoc in different senses. PreCog intervenes before data acquisition to improve the quality of worker submissions; PRECOG PROTOCOL intervenes before strategic commitment by forcing explicit signal collection, contrarian testing, and timing judgments. The shared emphasis is procedural anticipation rather than post-hoc correction.

Source: https://www.emergentmind.com/topics/precog