# Technical Document Extraction: Flowchart Analysis
## Diagram Overview
The image depicts a **sequence-to-sequence prediction workflow** with labeled components, loss calculation, and a textual example. The diagram uses color-coded blocks and arrows to represent data flow and validation.
---
## Key Components and Flow
### 1. **Labels and Predictions**
- **Labels** (Top Left):
- `tails`
- `<EOS>` (End-of-Sequence token)
- **Predictions** (Top Right):
- `tails`
- `heads`
- **Validation**:
- Green checkmark (✓) for correct prediction (`tails` vs. `tails`).
- Red X for incorrect prediction (`heads` vs. `tails`).
### 2. **Loss Calculation**
- **Loss Section** (Middle):
- Two correct predictions (`heads` vs. `heads` and `<EOS>` vs. `<EOS`), both marked with green checkmarks.
- Arrows indicate loss propagation to the next stage.
### 3. **Textual Example**
- **Narrative** (Bottom):
- "A coin’s state is heads. Alice flips, then Bob flips. What’s the state? A: heads."
- **Tokenized Labels**:
- `<EOS>`
- `tails`
- `<EOS>`
- `heads`
- `<EOS>`
---
## Diagram Structure
### 1. **Blocks and Arrows**
- **T Blocks** (Green):
- Represent **target tokens** (e.g., `tails`, `heads`).
- **C Blocks** (Orange):
- Represent **contextual tokens** (e.g., `Alice`, `Bob`).
- **Arrows**:
- Green arrows: Correct predictions/loss propagation.
- Red arrows: Incorrect predictions.
### 2. **Legend and Color Coding**
- **Legend** (Top):
- Green: Correct predictions (`✓`).
- Red: Incorrect predictions (`X`).
- Orange: Contextual tokens (`C` blocks).
---
## Spatial Grounding and Trends
### 1. **Legend Placement**
- **Legend Location**: Top-center.
- **Color Mapping**:
- Green (`✓`): Correct predictions (e.g., `tails` vs. `tails`).
- Red (`X`): Incorrect predictions (e.g., `heads` vs. `tails`).
- Orange (`C`): Contextual tokens (e.g., `Alice`, `Bob`).
### 2. **Data Flow Trends**
- **Labels → Predictions**:
- Correct prediction (`tails` → `tails`).
- Incorrect prediction (`heads` → `tails`).
- **Loss → Textual Example**:
- Loss propagates to the narrative example, where the final prediction (`heads`) matches the label.
---
## Textual Content Extraction
### 1. **Narrative Example**
- **Transcribed Text**: