TxRay: Imaging & Blockchain Analysis
- TxRay is a dual system that integrates precise X-ray transform algorithms for computational imaging with an LLM-driven framework for blockchain postmortem analysis.
- The imaging component employs advanced ray-cell intersection logic and basis-function adaptations to achieve efficient O(N) complexity and high reconstruction fidelity.
- The cybersecurity component automates evidence collection and exploit reconstruction in decentralized finance, achieving over 92% incident accuracy with deterministic proof-of-concepts.
TxRay is a term denoting two distinct, high-impact systems: (1) a family of algorithms for efficient and accurate computation of the X-ray transform and tomographic projector operators in computational imaging, and (2) an LLM-driven autonomous postmortem system for reconstructing and validating live blockchain attacks in decentralized finance. Both applications emphasize algorithmic precision, verifiability, and rigorous validation, but operate in disparate scientific domains: computational tomography and cybersecurity, respectively.
1. X-ray Transform Algorithms: Foundational Principles
The original TxRay system, as introduced in "A Fast and Adaptive Algorithm to Compute the X-ray Transform" (Chen et al., 2020), addresses the efficient and exact computation of the X-ray transform
for an image represented on a discrete grid by constant values per pixel or voxel. The transform reduces to computing line integrals, mathematically identical to calculating the intersection lengths of a ray with each cell of a discretized domain.
For generalized imaging models, the "Generalized Ray Tracing with Basis functions for Tomographic Projections" algorithm (Haouchat et al., 26 Mar 2025) extends this formalism to images represented as linear combinations of arbitrary, typically overlapping, basis functions , including spline and box-spline families. The forward (and adjoint/back-projection) operators thus require evaluation of weighted sums of line integrals through basis function supports, necessitating pre-integration and efficient enumeration of overlapping contributions. In both cases, core concerns include data sparsity, analytic intersection calculation, and adaptability to scanning geometry.
2. Algorithmic Framework: Intersection Logic and Implementation
TxRay (Chen et al., 2020) establishes the necessary and sufficient condition for a ray to intersect a given cell. In 2D, for a parallel beam at angle and signed distance , the relevant interval intersection constraints are
where is the cell index. The intersection length is given analytically as (Equation 3.14).
The 3D extension utilizes nested intervals along the axes, parametrized either by Euler angles or geometry-specified mappings (circular/helical cone-beam). The algorithm eschews explicit sorting of intersections or edge traversals (as in Siddon's method), resulting in per-ray complexity for both 2D and 3D with optimal data sparsity.
For images described by overlapping spline or box-spline basis functions (Haouchat et al., 26 Mar 2025), TxRay generalizes the ray tracing algorithm to account for the overlap radius , exhaustively enumerating up to neighboring cells per main intersection to gather all relevant contributions. The per-ray forward projection is implemented via efficient pre-integration of the basis generators, allowing for closed-form or convolutionally-derived interpolants along the projected ray.
3. Adaptations to Scanning Geometry and Computational Properties
TxRay explicitly supports a wide range of tomographic geometries:
- 2D/3D parallel-beam scanning (cartesian, arbitrary center and scale)
- 2D fan-beam (via analytical mapping to parallel-beam parameters)
- 3D circular and helical cone-beam (parameterized by source position, detector angles, and possible axial motion)
Any ray-parameterization analytically convertible to parallel-beam coordinates is admissible. Non-unit cell sizes, image center shifts, and rectangular or polyhedral grids are accommodated by affine transformations of the boundary conditions and intersection interval logic.
The algorithm is highly parallelizable. Each ray is processed independently, and, within a ray, all relevant intersection calculations are per cell. Both the classic and basis-function-adapted TxRay methods are well-suited for vectorized, multi-threaded, or GPU-based execution (Chen et al., 2020, Haouchat et al., 26 Mar 2025).
4. Empirical Evaluation and Comparative Metrics
Empirical validation of TxRay (Chen et al., 2020) demonstrates exact, zero-error line integrals on small-scale synthetic test suites for 2D/3D, parallel and fan/cone-beam geometries, confirming analytic correctness. Comparisons with Siddon's method indicate that TxRay achieves exact intersection lengths via purely arithmetic operations without explicit intersection sorting, resulting in a reduction from to operations per ray.
In the context of generalized basis function projections (Haouchat et al., 26 Mar 2025), TxRay achieves high reconstruction fidelity in computed tomography (CT) benchmarks. For example, in reconstructions of lung CT phantoms at downsampling factor , pixel-driven methods yield a PSNR of dB and SSIM , while box-spline degree 2 projections reach PSNR dB and SSIM . GPU-accelerated implementations deliver sub-millisecond per-ray performance for large grids (–$2000$) with only a overhead for cubic splines, and the extension to fan- and parallel-beam geometries further improves sampling efficiency, allowing for lower angle counts at equivalent reconstruction quality.
5. Intrinsic Ambiguities, Limitations, and Extensions
TxRay addresses inherent ambiguities in ray-cell intersection: if a ray exactly coincides with a grid line or plane, two adjacent cells may be simultaneously "touched" with a maximal-length intersection. The system resolves these by deterministic tie-breaking: assignment is made to the cell with the higher linear index, ensuring matrix consistency across runs.
Limitations of current reference implementations include reliance on single-precision floating point, though double precision is trivial to incorporate. Planned future work comprises full C++/CUDA implementations, deeper integration with CT software stacks, and expanded support for higher-dimensional or non-polytopal basis functions (Chen et al., 2020, Haouchat et al., 26 Mar 2025).
6. Agentic Postmortem Pipeline for Blockchain Attacks
Independently, "TxRay: Agentic Postmortem of Live Blockchain Attacks" (Wang et al., 1 Feb 2026) refers to an LLM-agentic framework for automated, end-to-end, evidence-backed reconstruction of Anyone-Can-Take (ACT) exploits in DeFi. TxRay starts from one or more seed transactions and chains together a series of tool-calling subagents: evidence collection, root-cause analysis, iterative challenge/feedback, semantic oracle extraction, PoC synthesis (in Foundry), and validation.
Correctness is enforced through the generation of incident-specific oracles as executable Solidity assertions within a self-contained proof-of-concept that deterministically reproduces the exploit on a pinned fork, using only public state at the pre-incident block. The PoCEvaluator component independently tests PoC quality against explicit correctness (C1–C3) and quality (Q1–Q6) criteria; in the primary evaluation, TxRay produced expert-aligned root causes and successful PoCs for of incidents, with a avoidance rate of attacker address hard-coding—substantially outperforming prior public datasets.
Median time-to-root-cause is 40 minutes and to PoC is 59 minutes in live deployments. TxRay enables comprehensive coverage of ACT exploit classes, supporting future research in vulnerability detection and MEV assessment by contributing a standardized, parameter-free, executable incident dataset (Wang et al., 1 Feb 2026).
7. Context and Impact Across Domains
TxRay, in both its computational imaging and cybersecurity instantiations, exemplifies the integration of analytic rigor, algorithmic efficiency, and reproducibility in complex, adversarial or ill-posed domains. In tomography, it sets a standard for reference projector and back-projector design, supporting both classical unit-cell and advanced spline-based representations. In the DeFi context, it operationalizes agentic workflows for incident forensics, providing a benchmark for postmortem automation and correctness in high-value, adversarial ecosystems.
A plausible implication is that the generalized abstraction of TxRay—precise, adaptable, and verifiably correct computation of operator-driven transformations—may find application in domains as varied as medical imaging, computational physics, and automated security analytics.