# Summary of S4-260112: AI/ML Media Processing and Task Updating

## Document Overview
This contribution proposes updates to AI/ML media processing procedures and task updating call flows for IMS Data Channel (DC) applications. It builds upon TR 26.927 and TS 23.228 Annex AC, incorporating agreements from SA4#134 (S4-252075) and addressing feedback from SA2's reply LS on AIML for Media.

## Main Technical Contributions

### 1. Refinement of AI/ML Task Processing Call Flows

#### Issues Identified with TR 26.927
- **Architectural ambiguity**: Split media processing location (UE vs network) was unclear
- **DC AS introduction timing**: Not properly specified after ADC establishment  
- **Confusing step numbering**: Parallel options (5a, 5b) caused confusion
- **MRF references**: MRF should be removed as SA2 clarified it doesn't play a role in Data Channel (removed from TS 23.228)
- **Incomplete task update procedures**: Steps 9-10 lacked detail on how UE updates AI/ML inference tasks

#### Updated Call Flow Structure (Steps 1-23)
The revised flow incorporates common call flows agreed in S4-252075:

**Initial Setup (Steps 1-13)**:
- UE1 registers to IMS with AI/ML capability indication
- MMTel session establishment between UE1 and UE2
- Bootstrap Data Channel (BbDC) establishment between UE1 and MF
- DCSF creates DC application list based on:
  - Subscription list filter
  - UE static capabilities
- Application list includes AI service information (e.g., intelligent translation service)
- UE1 downloads application list and selects application
- Application Data Channel (AaDC) establishment between UE1 and DC AS
- Task selection and AI/ML model selection

**Media Processing Execution (Steps 14-16)**:
- Media session runs over MMTel session
- UE1 executes selected task and transmits input media streams
- Network runs inference and forwards processed streams to UE2 (or UE1, or both depending on application)
- Different alternatives supported based on inference location (local/remote/split)

### 2. Task Reselection and Update Mechanisms

#### Task Reselection (Step 17)
- **Trigger**: New actions in applications or other triggers during session
- **Process**: UE1 reselects tasks from previously downloaded task metadata
- **Flow**: Returns to step 10 (task selection from app manifest)

#### Task Update (Steps 17-23)
- **Use Case**: New requirements during running IMS session not fulfilled by downloaded tasks
  - Example: New callee (UE3) joins call speaking new language requiring additional translation
  
**Update Procedure**:
- **Step 17**: UE1 sends UPDATE Task request over ADC with:
  - Task ID
  - New parameters
  - Start time (when to apply new parameters)
  - Optional additional parameters
  
- **Steps 18-19**: 
  - MF checks request and reconfigures task
  - MF may reject invalid requests
  - MF may establish new application DC or media flows if needed
  - MF may stop existing flows no longer needed
  - MF forwards UPDATE Task request to DC AS if needed
  - DC AS reconfigures task according to new parameters

**Alternative Execution Paths (Steps 20-22)**:
- **Alt a - Local Inference**:
  - DC AS sends UPDATE Task response (including new models) to UE1 via MF
  - UE1 runs updated inference task locally
  
- **Alt b - Remote/Split Inference**:
  - DC AS sends UPDATE Task response to UE1 via MF
  - UE1 transmits media streams to network for inference
  - Network runs inference and forwards processed streams to UE2

- **Step 23**: Remote UE (UE2) informed when task updates impact it

### 3. Task Control Messages

#### 3.1 START Task Message

**Purpose**: Request to start an inference task (for split or remote inference)

**Message Content**:
- `id`: Message identifier
- `type`: "urn:3gpp:aiml:start-task"
- `task_id`: Task identifier (e.g., "speech-to-speech-translation")
- `parameters`: Task-specific parameters (e.g., inputLanguage, outputLanguage)
- `input`: Protocol and media stream identifier (mid from SDP)
- `output`: Protocol and media stream identifier
- `timestamp`: Timestamp of request

**Response Message**:
- `task_session_id`: Unique identifier for specific task instance
- `response_code`: Status (e.g., "200 OK")
- Echoes task_id and parameters

**Media Stream Identification**: Uses "mid" identifier from RFC 8843 as included in SDP offer/answer. Multiple RTP streams identified by comma-separated mid values.

#### 3.2 UPDATE Task Message

**Purpose**: Update existing task that has already been started (requires prior 200 OK response to START Task)

**Use Cases**:
- Update model, parameters, input or output of existing task
- Indicate new input/output stream (e.g., new UE added to call)

**Message Content**:
- `id`: Message identifier
- `type`: "urn:3gpp:aiml:update-task"
- `task_id`: Task identifier
- `task_session_id`: References task from START Task Response
- `parameters`: Updated parameters
- `output`: Updated output stream information
- `timestamp`: Timestamp of request

**Response Message**:
- `task_session_id`: Same as in request
- `response_code`: Status indication
- Confirms task_id

## Key Technical Clarifications

### Inference Location Flexibility
The specification supports three inference deployment models:
1. **Local inference**: AI model downloaded and executed in UE
2. **Remote inference**: Inference executed in network (MF)
3. **Split inference**: Inference split between UE and network

### Message Exchange Protocol
- Task control messages exchanged over Application Data Channel (AaDC)
- Messages use structured format with JSON-like syntax
- Unique identifiers (task_session_id) maintain task context across updates

### Network Entity Roles
- **DCSF**: Creates and filters DC application list based on subscription and UE capabilities
- **MF**: Manages media flows, coordinates with DC AS, executes inference tasks
- **DC AS**: Provides AI applications and models, reconfigures tasks
- **MRF**: Explicitly removed from procedures (per SA2 clarification)

## Editorial Notes
- Network functional entity for inference task execution depends on SA2's reply LS
- Further details on message formats to be provided in future contributions