PSTrajs: Problem-Solving Trajectories
- Problem-Solving Trajectories (PSTrajs) are explicit representations of the evolving solution process, detailing intermediate or partial solutions over time.
- They unify diverse methodologies—ranging from algorithmic iterations, human trial sequences, to qualitative route maps—to enhance process supervision and decision support.
- PSTrajs drive innovations in visualization, comparison, and reusability of problem-solving steps across domains like education, software engineering, and optimization.
Problem-solving trajectories (PSTrajs) are explicit representations of how a solution is progressively constructed, revised, or selected over time. Across recent work, the term denotes a family of objects rather than a single canonical formalism: a PSTraj can be a sequence of intermediate or partial solutions produced during an algorithm’s execution, a task-centered sequence of repeated human trials with error reflections, a chain of subproblem states and sub-solutions in a state machine, or a path through a shared representation space of decision states (Zhang et al., 3 Mar 2026). In this sense, PSTrajs function as a unifying abstraction for process supervision, trajectory comparison, memory and reuse, visualization, and search control across web-based human problem solving, reasoning and planning systems, educational interaction data, software-engineering agents, qualitative route reasoning, and parametric optimization (Zhang et al., 8 Apr 2026).
1. Conceptual scope and defining features
The literature treats a trajectory as an ordered structure whose semantics depend on the domain. In human web problem solving, a trajectory is defined at task level: “Each task trajectory contains a pre-task assessment, one or more trials, and a terminal annotation (post-task on success, cancellation on giving up).” A trial is one attempt to solve a question and submit an answer; within a trial, the observable sequential units are page visits and interaction events, and every failed trial is linked to a reflection at trial that diagnoses why the trial failed and specifies a corrective plan for trial (Zhang et al., 8 Apr 2026). In algorithmic settings, a trajectory is often a sequence of intermediate solutions, stepwise reasoning paths, partial search-tree paths, or revised plans after verifier feedback (Parmar et al., 22 Feb 2025).
This breadth matters because PSTrajs are not confined to a single representational level. In the State Machine of Thoughts framework, a full reasoning trajectory is represented as
where states are decomposed sub-problems and actions are sub-solutions (Liu et al., 2023). In zero-shot in-context learning, the searched trajectory is not an intra-problem reasoning chain at all, but a sequence over problem instances: the state is the set of already solved examples together with the current pseudo-demonstration set, the action is the selection of the next unsolved problem, and the reward is the confidence of the model’s prediction (Tang et al., 2024). In discrete route design, a route or trajectory is an ordered path through a discrete “design/solving space” whose nodes are decision situations and whose edges are feasible transitions (Levin, 2015).
The same literature also shows that trajectories need not be single-valued curves. In parametric semidefinite programming, the central object is the set-valued optimal map , and the paper proves that only six distinct local behaviors can occur near a point on the solution trajectory: regular, non-differentiable, discontinuous isolated multiple, discontinuous non-isolated multiple, continuous bifurcation, and irregular accumulation (Bellon et al., 2021). This suggests that PSTrajs are best understood as a family of sequential structures ranging from symbolic paths and interactive logs to branching or set-valued solution maps.
A recurring misconception is that PSTrajs are synonymous with chain-of-thought strings. The surveyed work repeatedly rejects that narrowing. PlanGEN explicitly supports full candidate plans, partial trajectories or search paths in Tree-of-Thought, pruned tree trajectories in REBASE, verification traces, and algorithm-selection traces (Parmar et al., 22 Feb 2025). DAWN-ICL treats example ordering itself as the trajectory object (Tang et al., 2024). Earlier route-design work already used “route,” “trajectory,” and “strategy” interchangeably for multistage decision making over graph-structured spaces (Levin, 2015).
2. Representational primitives and formalizations
One of the clearest formalizations appears in behavior-based algorithm analysis. For iterative algorithms of the form
the trajectory is
where is the current intermediate solution at iteration (Zhang et al., 3 Mar 2026). The state type is task-dependent: vectors in optimization, visited-node prefixes in traversal, partial routes in TSP, current sets in admissible-set construction, or intermediate array states in sorting. The point of the representation is to encode problem-solving dynamics rather than code surface form.
A second formal family models trajectories as state-transition systems over decomposed subproblems. SMoT defines a knowledge state machine
with as sub-problem states, 0 as sub-solutions, and transition function
1
It additionally defines a conducive-sub-solution query 2 and a solvability query 3, allowing stored successful and failed trajectory fragments to guide future search (Liu et al., 2023). In this formulation, a trajectory is both a path and a reusable decomposition into local transitions.
A third family formalizes trajectories as paths through abstract state spaces rather than explicit action logs. ProjectionPathExplorer defines a state-space representation
4
a distance metric
5
and an embedding
6
All states from all trajectories are embedded jointly, and successive embedded states are connected to visualize each sequence as a path in a shared space (Hinterreiter et al., 2020). This makes the state representation and distance function constitutive parts of the PSTraj definition.
Search-based planning work adds a control-theoretic layer. DAWN-ICL formulates zero-shot in-context learning as an MDP 7, with state 8 given by solved examples plus the current pseudo-demonstration set, action 9 as the next problem to solve, and reward 0 given by model confidence. Its demonstration-aware score is
1
with
2
so action value depends both on future reward estimates and on the quality and relevance of currently available demonstrations (Tang et al., 2024).
The literature on curation and process supervision introduces still richer trajectory semantics. In Patches-to-Trajectories, a software-engineering trajectory is scored against a latent process graph 3 derived from a developer-authored reference patch 4. The established-node set is
5
the available frontier is
6
and per-step progress is
7
This turns trajectory quality into an explicitly dependency-respecting notion of progress (Ma et al., 21 May 2026).
3. Construction, supervision, and curation
Recent work distinguishes sharply between trajectories that are merely logged and trajectories that are deliberately constructed for supervision. TEC is a fully instrumented collection platform for human trial-and-error with web search. It uses a Chrome extension, a Django-based backend/frontend system, and a multi-stage replay-based workflow. For each visited page during a trial, the extension logs “(1) a replayable copy of the page via rrweb … (2) interaction events (clicks, hovers, key-presses, etc.) with timestamps and element identifiers; and (3) continuous mouse position and scroll offset for reading pattern analysis,” together with page-level metadata such as title, dwell time, and referrer URL (Zhang et al., 8 Apr 2026). The task-level schema includes pre-task records, trial outcomes, evidence annotations, reflections, post-task assessments, and cancellation records. The resulting dataset comprises 46 participants, 58 questions, 2,424 task trajectories, 5,370 total trials, and 41,229 webpages visited, with 2,946 reflection annotations (Zhang et al., 8 Apr 2026).
Automated trajectory generation systems increasingly build supervision around explicit search and verification. PlanGEN introduces three agents—constraint, verification, and selection agents—and wraps inference-time generators such as Best-of-8, Tree-of-Thought, and REBASE. The verification agent provides natural-language feedback and an integer reward score from 9 to 0, with thresholds such as 95 or higher indicating a verified high-quality plan. In the mixture variant, low-scoring trajectories trigger iterative refinement under a modified-UCB selection policy over algorithms (Parmar et al., 22 Feb 2025). EduFlow applies an analogous design in multimodal educational reasoning: EduMCTS uses six functionally distinct node types—caption, summary, sub_task, thinking, self-reflection, and answer—while EduPRM critiques each step with labels, explanations, and scores. Its supervision pool, EduPRM-420K, is built from 150K MCTS-guided trajectories, 150K error-injected critiques, and 120K teacher-student dialogues; the resulting EduMCTS-160K dataset stores multimodal inputs paired with verified action sequences (Zhu et al., 12 Jul 2025).
Trajectory curation is now a research topic in its own right. P2T argues that high-quality software-engineering trajectories must be effective and efficient: effective because each step is grounded and narrows the agent’s epistemic gap toward the correct fix, and efficient because each step is information-bearing rather than redundant or looping. Its global selection rule is
1
with groundedness checks that block leakage from privileged patch information into student-visible traces (Ma et al., 21 May 2026). This formulation makes trajectory shortening a first-class objective rather than a post hoc compression step.
Human trajectory supervision raises an additional issue: observed actions need not be aligned with latent intention. Work on ARCTraj/O2ARC formalizes three misalignment types—Functional Inadequacies in Tools, User Unfamiliarity with Tools, and Cognitive Dissonance in Users—and proposes a heuristic detector over state-action sequences
2
to distinguish underexpressive toolsets, inefficient tool use, and wrong or contradictory execution (Kim et al., 2024). This suggests that PSTraj curation is not only about recording more process data, but also about separating intention-bearing signal from interface artifacts and execution noise.
4. Comparison, visualization, and trajectory reuse
A major research direction treats trajectories as objects to compare, classify, and query. BehaveSim defines local distances between intermediate solutions and aligns trajectories with dynamic time warping: 3 It then converts this to trajectory similarity,
4
and lifts the notion to algorithms through
5
This formalism is used both for measuring behavioral similarity and for organizing search populations into behavioral niches in FunSearch and EoH (Zhang et al., 3 Mar 2026).
A second comparison paradigm is qualitative rather than metric. The trajectory calculi TC-6 and TC-10 define base relations such as Equal, Alternative, Start, Finish, Intersect, Disjoint, Reverse, Return, Extends, and Extended By over trajectories represented as sequences of externally connected regions of a partitioned map (Baryannis et al., 2018). Reasoning proceeds through a composition table 6 and a model-existence problem over assignments 7. The ASP encodings CTSA, CTSA2, and GEN show that relational reasoning over whole trajectories can be formulated as a global consistency problem rather than as pairwise similarity scoring.
Visualization systems make a complementary move by embedding or aggregating many trajectories in a shared analytic view. ProjectionPathExplorer jointly embeds all states from all trajectories into a common 2D space and identifies recurring pattern families such as dense and sparse starting points, intermediate points, and end points, as well as bundles, bundle direction differences, bundle velocity differences, and similar shapes in different regions (Hinterreiter et al., 2020). QLens works at a different granularity: it models students’ multi-step problem solving as a hybrid state transition graph and renders it as a glyph-embedded Sankey diagram in which the 8-axis is step, the 9-axis is stage, links encode transition counts, and glyphs encode condition-level correctness, time elapse, and cursor trajectory length (Xia et al., 2020). In both cases, visualization is not merely descriptive; it is used to identify bottlenecks, path families, and design mismatches.
Trajectory reuse introduces yet another analytic function. SMoT records successful transitions 0 and failed transitions 1, then uses the state machine directly at proposal and evaluation time to select the most conducive next sub-solutions and avoid non-conducive ones (Liu et al., 2023). This turns PSTrajs from static logs into an actionable memory structure over recurring subproblems.
5. Domains, benchmarks, and empirical findings
The breadth of empirical settings is substantial. PSTrajs appear in human interactive information-seeking, algorithm design, planning and reasoning benchmarks, zero-shot in-context learning, educational multimodal reasoning, software-engineering agents, and educational analytics.
| Setting | Trajectory object | Representative finding |
|---|---|---|
| Human web search and browsing | Pre-task 2 multi-page trial 3 answer/feedback 4 reflection 5 revised trial | Humans reach SR@5 = 88.9 from SR@1 = 56.6, with Recovery Rate = 74.5% after first-trial failure (Zhang et al., 8 Apr 2026) |
| Behavioral algorithm comparison | Sequence of intermediate solutions aligned by DTW | BehaveSim scores 1.00 on Type-3 and 0.46 on Type-4, distinguishing behaviorally similar and dissimilar algorithms despite code-level ambiguity (Zhang et al., 3 Mar 2026) |
| Planning and reasoning search | Full plans, partial search paths, revised plans, verifier feedback | On GPQA, PlanGEN Mixture reaches 59.6% versus 46.2% for Gemini-1.5-Pro (Parmar et al., 22 Feb 2025) |
| Zero-shot ICL planning | Order of problem solving with evolving pseudo-demonstration memory | On BBH-mini with Llama3.1-8B, DAIL random gives 35.33, DAIL sequential 39.13, and DAWN-ICL 43.48 (Tang et al., 2024) |
| Multimodal educational reasoning | Typed action sequence with self-reflection | Search success rises from 67.8% in vanilla MCTS to 73.3% with action nodes and 87.1% with EduPRM (Zhu et al., 12 Jul 2025) |
| Software-engineering agents | Investigation/edit/validation trajectory curated against 6 | On SWE-bench Verified, P2T raises Pass@1 by up to 10.8 points while reducing per-instance inference cost by about 15% (Ma et al., 21 May 2026) |
The TEC results are especially informative because they separate first-shot competence from iterative recovery. Humans are not dramatically better than the strongest agentic baseline at first-shot answering—Vanilla Agent GPT-4o-mini attains SR@1 58.6 versus 56.6 for humans—but they are markedly better at post-error adaptation: human SR@5 is 88.9 versus 79.3 for the same baseline, and human Recovery Rate is 74.5 versus 50.0 (Zhang et al., 8 Apr 2026). The paper’s query-reformulation analysis further reports that “Humans progressively diverge in semantic space, while LLMs show only surface-level lexical changes,” indicating a trajectory-level adaptation gap rather than a simple answer-quality gap.
PlanGEN provides corresponding evidence in synthetic and benchmark reasoning. Using Gemini-1.5-Pro as base model, it reports Mixture = 55.94% on OlympiadBench MATH versus 50.68% for the strongest baseline, Mixture = 59.6% on GPQA, and Best-of-7 = 31.16% accuracy and 29.45% F1 on DocFinQA (Parmar et al., 22 Feb 2025). The paper’s interpretive claim is that better intermediate trajectories arise from instance-specific constraint extraction, constraint-guided reward verification, iterative revision, and complexity-aware routing among trajectory generators.
The educational trajectory literature supplies a different kind of evidence. QLens is evaluated on 230,644 records, 5,266 students, and 1,718 mathematical questions from an online platform, using three case studies and three expert interviews to show that aggregate trajectory structure can reveal mismatches between design intent and actual solving logic, grade-appropriateness, and the feasibility of data-driven hints (Xia et al., 2020). EduFlow uses trajectory construction directly for model improvement: Best-of-8 reranking with EduPRM reaches 43.28 at 9 and 43.45 at 0 on K12Vista, and the paper reports that EduMCTS-160K achieves an 18% higher success rate than LLaVA-CoT in science domains (Zhu et al., 12 Jul 2025).
P2T shows that trajectory quality matters independently of data scale. On SWE-bench Verified with a Qwen2.5-Coder-32B student and a Qwen3-Coder-480B teacher curator, Test-pass rejection sampling yields 39.6 Pass@1 at \$\mathcal{T} = (x_0, x_1, \dots, x_T),$10.85, and P2T full reaches 50.4 at \$0.78 (Ma et al., 21 May 2026). The size-matched result isolates better trajectories from larger datasets, while the full result supports the claim that privileged curation recovers supervision on hard instances where ordinary teacher rollouts fail.
6. Limitations, misconceptions, and open problems
A central limitation is that recorded trajectories rarely coincide with full cognition. TEC explicitly states that it captures browser-visible behavior and self-reported reflections, not continuous internal reasoning (Zhang et al., 8 Apr 2026). QLens assumes that mouse interactions reflect students’ thinking logic reasonably well, and notes that whether this always holds requires further research (Xia et al., 2020). The ARCTraj/O2ARC alignment paper goes further: observed human trajectories are treated as imperfect observable proxies for latent intention, and the absence of a defined human intention set 2 is identified as the main blocker for reliable end-to-end misalignment detection (Kim et al., 2024). This suggests that PSTrajs are often best interpreted as partial, interface-mediated traces rather than transparent records of thought.
A second limitation is task specificity. BehaveSim requires that meaningful intermediate solutions exist and that task-specific instrumentation define what counts as an intermediate state and how distances are computed (Zhang et al., 3 Mar 2026). TEC is limited to 58 open-domain factoid web QA questions sourced from cases where WebGPT had failed, with no canonical train/dev/test split (Zhang et al., 8 Apr 2026). QLens notes that long questions and large numbers of conditions strain visual scalability (Xia et al., 2020). Early route-design work is strongest in symbolic and combinatorial spaces with expert-constructed state spaces and ordinal compatibility judgments, not in continuous control or learned abstractions (Levin, 2015).
A third limitation is computational and methodological overhead. PlanGEN acknowledges reliance on predefined heuristics in selection, computational overhead, and limited benchmark scope (Parmar et al., 22 Feb 2025). DAWN-ICL notes that MCTS is time-consuming because each simulated state may require an LLM inference, and that better planners and learned value models remain open directions (Tang et al., 2024). EduFlow leaves some formal details under-specified, including a full transition grammar over action types and explicit loss equations for EduPRM (Zhu et al., 12 Jul 2025). P2T requires developer-authored reference patches and executable tests, and although its groundedness checks are designed to block privileged leakage, the safeguards are empirical rather than formal (Ma et al., 21 May 2026).
A fourth limitation concerns reliability of trajectory labels and reuse. SMoT warns that a state labeled non-conducive may only appear unsolvable because the underlying search did not sample enough sub-solutions, so failed trajectories can be informative but also dangerous if treated too definitively (Liu et al., 2023). PlanGEN reports that some failures still receive high verifier scores, so reward is informative but imperfect (Parmar et al., 22 Feb 2025). The visualization literature adds a different caution: trajectory patterns depend heavily on the chosen representation space and similarity metric, and 2D embeddings necessarily introduce distortion (Hinterreiter et al., 2020).
These limitations clarify several persistent misconceptions. PSTrajs are not inherently one-shot reasoning strings; they can be inter-instance curricula, state-machine memories, qualitative route relations, or set-valued optimization maps. They are not automatically high-quality supervision; the literature on misalignment, filtering, and privileged curation shows the opposite. Nor are they always directly comparable across domains. A plausible implication is that future work will need to combine richer state abstractions, stronger anti-leakage and groundedness guarantees, better uncertainty handling for failure labels and reflections, and more principled ways to align latent intention, observable behavior, and downstream learning objectives (Kim et al., 2024).
Across these works, the most stable conclusion is not that there is one definitive PSTraj formalism, but that trajectories provide a common process-level substrate for modeling, evaluating, and improving problem solving. Whether the underlying object is a human multi-trial search session, a planning trace, a software investigation path, a qualitative route, or an optimization solution map, the research program is the same: expose the sequence, formalize its structure, compare alternatives, and use that structure for better reasoning, better supervision, or better design.