TraceExtract: Structured Trace Extraction
- TraceExtract is a framework that converts raw, domain-specific traces into reusable, typed representations for systematic analysis.
- It applies a recurrent pipeline of artifact collection, normalization, and semantic enrichment to transform heterogeneous inputs into structured data.
- Empirical evaluations highlight improved signal detection and analysis efficiency, although challenges remain regarding representation bias and causal inference.
TraceExtract is usefully understood as an Editor’s term for extraction-centered workflows that convert raw traces into structured artifacts for analysis, diagnosis, and control. In the surveyed literature, the extracted object varies by domain: transformer hidden-state dynamics become layer-wise linguistic and geometric signals; Ethereum replay logs become invocation trees and decoded storage accesses; test executions become predicted component-membership sets; code-agent run artifacts become hierarchical trace trees; repository code becomes execution-verified caller→callee graphs; reasoning text becomes labeled argumentative states; and manipulation videos become event-captioned 3D traces (Aljaafari et al., 4 Jul 2025, Chen et al., 2024, Li et al., 13 Apr 2026, Li et al., 10 May 2026, Lee et al., 11 Jun 2026). This suggests that TraceExtract is best treated not as a single algorithm, but as a family of methods organized around the same core operation: turning uninterpreted sequential or structural evidence into reusable, typed, and queryable representations.
1. Scope and conceptual definition
Across the literature, the “trace” in TraceExtract is domain-specific. In language-model interpretability, TRACE instruments transformer training and inference to capture hidden states, gradients, and loss signals, then derives linguistic probes, intrinsic dimensionality estimates, Hessian curvature summaries, and output diagnostics (Aljaafari et al., 4 Jul 2025). In blockchain analysis, OpenTracer replays transactions with debug_traceTransaction, consumes opcode-level structLogs, and reconstructs function-level invocation trees enriched with decoded calls and storage accesses (Chen et al., 2024). In software testing, a test trace is the set of functions invoked by a test, and “Learning Test Traces” reframes trace recovery as predicting whether a component belongs to that set without executing the test (Hadad et al., 2019). In code-agent monitoring, CodeTracer reconstructs “traceable agent states” as a hierarchical state-transition history, while another TRACE framework for agent sabotage detection extracts suspect windows and cross-step evidence from long trajectories (Li et al., 13 Apr 2026, Mittapalli et al., 5 Jun 2026).
The same abstraction extends beyond program execution. TraceEval defines runtime call structure as a directed set of observed caller→callee edges, making dynamic call-graph recovery itself the extraction target (Li et al., 10 May 2026). TRACE for CoT evaluation converts sentences into Toulmin- and Flavell-inspired constructive elements and scores the resulting reasoning trace (Kim et al., 28 May 2026). ReTrace turns free-form reasoning text into a phase→subphase→step hierarchy suitable for interactive inspection (Felder et al., 14 Nov 2025). In robot world modeling, TraceExtract is the paper’s own name for a supervision pipeline that converts raw videos into globally aligned 3D traces of salient interaction points, paired with hierarchical language captions (Lee et al., 11 Jun 2026).
A plausible implication is that TraceExtract denotes a shift from end-task outputs toward intermediate evidence structures. Rather than asking only whether a system predicts correctly, passes tests, or completes a task, these works ask what traceable object can be extracted that makes the process inspectable.
2. Recurrent pipeline architecture
A recurring architectural pattern is raw artifact collection, normalization into a stable intermediate representation, semantic enrichment, and downstream analysis. OpenTracer makes this explicit as four stages: download raw traces from an Ethereum archive node, parse raw traces into an invocation tree, decode calls/returns/storage accesses, and analyze targeted trace snippets to extract user-desired data (Chen et al., 2024). CodeTracer similarly decomposes tracing into evolving extraction, tree indexing, and diagnosis, while ReTrace uses a Separator, Annotator, and Visualizer pipeline over reasoning traces (Li et al., 13 Apr 2026, Felder et al., 14 Nov 2025). ETrace defines Data Preprocessing, Prompt Engineering, Event Analysis, and Pattern Matching for event-driven smart-contract vulnerability detection (Peng et al., 18 Jun 2025). The μ0 paper organizes TraceExtract into semantic keypoint sampling, globally aligned 3D trace construction, and event-centric captioning (Lee et al., 11 Jun 2026).
Normalization is the load-bearing step in many systems. OpenTracer lifts sequential structLogs into a call-aware representation; CodeTracer standardizes heterogeneous framework artifacts into typed step records; TraceEval converts runnable programs into a unified caller→callees schema; ReTrace converts newline-delimited reasoning text into indexed steps and then into contiguous labeled subphases (Chen et al., 2024, Li et al., 13 Apr 2026, Li et al., 10 May 2026, Felder et al., 14 Nov 2025). This suggests that TraceExtract workflows depend less on a single downstream model than on a carefully designed intermediate form that survives heterogeneity in the raw source.
Semantic enrichment then adds the information that makes extraction useful rather than merely archival. In TRACE for transformers, probes and geometry estimators make hidden-state learning dynamics legible (Aljaafari et al., 4 Jul 2025). In OpenTracer, ABI-aware decoding and dynamic storage tracking lift low-level traces into human-readable calls and storage semantics (Chen et al., 2024). In ReTrace and the Toulmin-based TRACE metric, the enrichment stage assigns discourse roles and summaries to otherwise opaque reasoning text (Felder et al., 14 Nov 2025, Kim et al., 28 May 2026). In μ0, VLM- and LLM-generated captions align motion segments with local interaction descriptions (Lee et al., 11 Jun 2026).
3. Representational forms
TraceExtract systems differ most sharply in what they treat as the canonical extracted representation.
| Domain | Raw substrate | Extracted representation |
|---|---|---|
| Transformer interpretability | Hidden states, gradients, loss signals | Probe trajectories, ID curves, Hessian metrics, output diagnostics |
| Ethereum analysis | structLogs, receipts, ABI/source |
Invocation tree, decoded calls, decoded storage accesses |
| Test/software tracing | Source code and prior traces | Predicted trace membership set or execution-covered call graph |
| Agent/reasoning analysis | Run artifacts or textual CoT | Hierarchical trace tree or phase→subphase→step structure |
| Robotics/world modeling | Manipulation video | Reference-frame 3D traces with event-level captions |
Some papers formalize these structures explicitly. TraceEval defines runtime call structure as , where iff some invocation site in resolves to at runtime, and ground truth is the union of dynamically observed edges under the harness inputs (Li et al., 10 May 2026). The sabotage-monitoring TRACE defines an agent trajectory as and treats the monitoring problem as a trajectory-level classifier over that sequence (Mittapalli et al., 5 Jun 2026). TraCE similarly scores sequential progress by comparing an observed transition against a target point and then aggregating step-level scores along the trajectory (Clark et al., 2023). In μ0, the extracted target is a reference-frame 3D trace,
which becomes the supervision substrate for world-model pretraining (Lee et al., 11 Jun 2026).
Hierarchical representation is another common pattern. OpenTracer’s invocation tree organizes nested calls; CodeTracer’s trace tree distinguishes exploration steps from state-changing steps; ReTrace’s JSON hierarchy preserves main phases, contiguous subphases, and original step indices; TRACE for agent sabotage detection extracts both local windows and non-adjacent pattern windows (Chen et al., 2024, Li et al., 13 Apr 2026, Felder et al., 14 Nov 2025, Mittapalli et al., 5 Jun 2026). A plausible implication is that TraceExtract becomes especially valuable when flat chronological logs fail to expose latent structure such as nesting, repeated motifs, or persistent state.
4. Domain-specific functions and uses
In interpretability research, TraceExtract-style tooling is used to monitor representational acquisition rather than merely optimization progress. TRACE for LLMs supports training-time, inference-time, and post-hoc analysis, with modules for linguistic probing, intrinsic dimensionality estimation, Hessian/loss-landscape analysis, and output-level diagnostics. Its role is not causal circuit discovery, but dynamic monitoring of linguistic, geometric, and optimization signals (Aljaafari et al., 4 Jul 2025).
In blockchain security and transaction analysis, trace extraction is foundational because raw on-chain logs or EVM execution traces are too low-level for direct reasoning. OpenTracer is a general-purpose extraction and enrichment engine over replayed Ethereum transactions, while ETrace works at a higher semantic level by extracting fine-grained event sequences from transaction logs and using LLM-based analysis plus pattern matching for four vulnerability classes: reentrancy, integer overflow, flash loan attacks, and DoS (Chen et al., 2024, Peng et al., 18 Jun 2025).
In software engineering, three distinct extraction targets appear. “Learning Test Traces” predicts the set of functions invoked by a test from static features and prior traces, reducing the need for dynamic tracing at prediction time (Hadad et al., 2019). TraceEval extracts execution-verified dynamic call graphs from source via LLM-assisted harness generation and language-specific tracers (Li et al., 10 May 2026). “Requirement Tracing using Term Extraction” treats trace extraction as candidate-link generation between textual artifacts, using term weighting and vector-space retrieval to build requirements traceability matrices (Al-Saati et al., 2015). These systems span predicted traces, witnessed traces, and lexical trace links, but all treat traceability as a structured extraction problem.
In reasoning and agentic systems, extraction is increasingly aimed at process visibility. TRACE for CoT evaluation turns sentences into constructive elements such as Claim, Data/Evidence, Warrant, Backing, Qualifier, Rebuttal, Monitoring, and Evaluation, then scores State Validity and Transition Coherence (Kim et al., 28 May 2026). ReTrace uses a validated four-phase taxonomy to structure long reasoning traces for interactive understanding (Felder et al., 14 Nov 2025). CodeTracer reconstructs hierarchical agent state histories from heterogeneous run artifacts and localizes failure onset (Li et al., 13 Apr 2026). Another TRACE framework for long-horizon agent monitoring uses a TIJ loop to triage suspicious regions, inspect them with accumulated evidence, and issue a trajectory-level malicious/benign verdict (Mittapalli et al., 5 Jun 2026).
In robotics, TraceExtract becomes a data-engineering primitive. The μ0 paper’s TraceExtract pipeline automatically extracts 3D supervision by selecting semantic keypoints, aligning traces globally in 3D, and associating motion segments with hierarchical captions, thereby providing an embodiment-agnostic motion interface in place of action labels (Lee et al., 11 Jun 2026).
5. Evaluation regimes and empirical findings
TraceExtract methods are typically justified by showing that extracted traces expose signal missed by coarse end metrics. TRACE for transformer analysis reports early syntactic emergence, delayed semantic acquisition, and representational compression/expansion that are overlooked by scalar metrics such as loss or accuracy; appendix values show average intrinsic dimensionality moving from 18 at step 500 to 12 at 2,000 and then 25 at 10,000 (Aljaafari et al., 4 Jul 2025). The paper’s central claim is that outputs may look stable while internal representations are still reorganizing.
At scale, extraction pipelines are also evaluated by downstream yield. OpenTracer was employed to analyze 350,800 Ethereum transactions and infer 23 different types of invariant from predefined templates (Chen et al., 2024). TraceEval contains 10,583 execution-verified programs from 1,600+ repositories across Python, JavaScript, and Java, and the strongest zero-shot model reaches 72.9% average F1; fine-tuning Qwen2.5-Coder-32B on the train split reaches 71.2%, within 1.7 F1 of zero-shot Claude-Opus-4.6 (Li et al., 10 May 2026). CodeTracer reports macro step-level F1 up to 48.02, versus 19.33 for Mini-CodeTracer and 18.78 for Bare LLM under GPT-5, showing that evolving extraction and tree indexing materially affect failure localization (Li et al., 13 Apr 2026).
Other evaluations emphasize practical adequacy rather than exact reconstruction. “Learning Test Traces” reports AUC 0.795 on Lang and 0.602 on Math, while still finding that predicted traces can support Learn Diagnose and Plan with behavior close to an oracle using real traces (Hadad et al., 2019). The Toulmin-based TRACE metric correlates strongly with benchmark accuracy, with Pearson and Spearman across 26.3K QA samples (Kim et al., 28 May 2026). ReTrace’s user study finds that both structured visualizations enabled more accurate comprehension with less perceived effort than a raw-text baseline (Felder et al., 14 Nov 2025). In μ0, the authors attribute improvements over prior 3D trace approaches in part to stronger TraceExtract supervision and report that the pipeline scales trace curation by about 0 over prior 3D trace datasets (Lee et al., 11 Jun 2026).
These findings suggest that TraceExtract systems are often valued less for perfect reconstruction than for selective concentration of useful evidence. The extracted artifact becomes a more efficient object for inspection, supervision, or diagnosis than the raw trace itself.
6. Limitations, ambiguities, and open directions
Several limitations recur across the literature. Generalization beyond the extraction substrate is often asserted more than exhaustively demonstrated. TRACE for LLMs is validated primarily on ABSynth synthetic corpora, though the paper argues broader applicability (Aljaafari et al., 4 Jul 2025). ETrace is evaluated on four Etherscan-recorded attack events and does not provide large-scale metrics or detailed infrastructure specifications (Peng et al., 18 Jun 2025). OpenTracer depends on archive-node access and ABI/source retrieval for rich decoding, while many EVM edge cases remain unspecified (Chen et al., 2024). TraceEval’s ground truth is only execution-covered behavior under generated harnesses, so valid but unexecuted edges count as negatives (Li et al., 10 May 2026).
A second limitation is that extraction does not automatically yield causal understanding. TRACE for transformer analysis is strongest on diagnostic monitoring rather than mechanistic interpretability (Aljaafari et al., 4 Jul 2025). TRACE for CoT evaluation explicitly scores reasoning structure, not faithfulness or factual validity (Kim et al., 28 May 2026). ReTrace structures articulated reasoning text but “makes no observation to the accuracy of the reasoning trace as a model of the underlying, mechanical processes performed by the LLM” (Felder et al., 14 Nov 2025). TRACE for sabotage monitoring improves long-range evidence linking, yet still fails on some manipulation-style evasion where locally plausible justifications obscure a malicious pattern (Mittapalli et al., 5 Jun 2026).
A third limitation concerns representation bias. Requirements tracing with term extraction is recall-oriented but often suffers low precision (Al-Saati et al., 2015). “Learning Test Traces” predicts set membership rather than order, multiplicity, or path-sensitive behavior (Hadad et al., 2019). The C# Traceability System extracts declarations, calls, and variable uses but intentionally ignores control-flow constructs such as if, else, for, while, switch, and case, which simplifies the trace at the cost of path sensitivity (Kernahan et al., 2015). In μ0, TraceExtract inherits errors from semantic clustering, 3D reconstruction, tracking, and captioning, and the extracted traces still omit forces, tactile feedback, and contact modes (Lee et al., 11 Jun 2026).
Overall, the literature indicates that TraceExtract is most mature when the trace substrate is explicit, the intermediate representation is carefully designed, and the downstream use is tightly coupled to that representation. A plausible implication is that future progress will depend less on broader “trace collection” and more on better synchronization between extraction rules, representation geometry, and the specific analytic question a trace is meant to answer.