Tree Routing And Decoding

The model builds context from the leaves toward the root, then each requested field decoder reads the context available along its schema path. The tutorial has one trxns branch containing earlier payments and the latest payment. Its fields build transaction context, and disputed=rf.Boolean(mask=True) requests a dispute prediction at every retained transaction coordinate.

This routing explanation was checked against the 0.2.4 execution plan.

Context Moves Toward The Root

An account snapshot has one repeated trxns branch containing earlier and latest payments. Each transaction has DateParts booked_at, Number amount, Category merchant, and Boolean disputed. Every dispute label is hidden and supervised for the same 30-day window after the common review cutoff.

An account snapshot has one repeated trxns branch containing earlier and latest payments. Each transaction has DateParts booked_at, Number amount, Category merchant, and Boolean disputed. Every dispute label is hidden and supervised for the same 30-day window after the common review cutoff.

Figure 1: Connections show schema ownership. The transaction collection builds context, and the dispute decoder reads its path at every retained position.

Each active leaf first supplies a field representation with its presence information. The runtime sends it to its owning branch. Branches execute from the deepest level upward, so a parent receives representations from its nested branches after those branches have encoded and reduced their own children.

For this model, trxns processes the fields at its transaction positions first. The root then receives the branch’s output, without duplicate root amount or merchant fields. With more nesting, the same rule repeats at each level. Branches at one depth form a group in the execution plan; this grouping describes dependencies, without promising parallel execution.

The root is anonymous at rf.Address(). account in the figure describes the observation; it does not add an address prefix. For schema construction and addresses, see Model Tree.

A Decoder Reads Its Path

A target decoder receives the representations retained along its heritage: the schema path through its ancestors to the field. A nested target can therefore use both local branch context and broader root context. Decoding starts after context has been built; it does not reconstruct the input tree one parent prediction at a time.

Query pooling uses learned queries shaped for the target’s coordinates. Where sibling representations align with those coordinates, the decoder can also condition those queries on sibling context. The field’s decoder then produces the datatype-specific answer, such as the Boolean output for disputed. See the reviewed decoder implementation.

The tutorial’s disputed=rf.Boolean(mask=True) keeps every dispute label out of the input and requests predictions at all retained positions. Training supplies Boolean labels for all of them. Prediction can omit this directly bound target from every transaction while retaining the input records that establish those positions.

embed=True requests an exported contextual representation and adds no reconstruction objective. These roles have their own explanations in Masking And Objectives and Embeddings.

The branch can use the full collection through the latest transaction’s booking time, the common review cutoff. Every target concerns a new dispute during the following 30 days. These are forecasts from that shared cutoff, not from each transaction’s original booking time.

Read The Result

Output format 2 returns decoded fields in a predictions tree and requested embeddings in a separate representations column. Only selected columns appear. Repeated decoded siblings share one record collection; branch representations retain their own output indices and ancestor coordinates. Follow Read Predictions for one payment’s output and its state, content, and inference flag.

Continue with Branch Summaries for the information passed between levels, or How Fields Interact for the context built inside each branch.