εΌηδΊΊι (Hongik Ingan)
"Benefit all humanity through standardized AI model exchange - enabling models to move freely between platforms while preserving their capabilities and intent."
In the first phase of the WIA AI Interoperability Standard, we establish the foundational data format that enables AI models to be exchanged, shared, and deployed across different platforms and environments. This chapter provides comprehensive coverage of the WIA Model Exchange Schema, including detailed JSON specifications, validation rules, and practical implementation examples.
The WIA Model Exchange Format is designed as a platform-agnostic, extensible schema that wraps existing model formats (ONNX, TensorFlow SavedModel, PyTorch, etc.) with rich metadata and standardized structure. Rather than replacing existing model formats, WIA provides a universal envelope that ensures models can be understood, validated, and deployed consistently across different AI platforms.
The WIA Model Exchange Format supports the complete model lifecycle:
The complete WIA Model Exchange Schema is defined in JSON Schema format. Below is the core schema structure with all required and optional fields:
{
"wiaVersion": "1.0.0",
"schemaVersion": "1.0.0",
"modelMetadata": {
"id": "string (UUID v4)",
"name": "string",
"version": "string (semver)",
"description": "string",
"author": {
"name": "string",
"email": "string (optional)",
"organization": "string (optional)"
},
"created": "string (ISO 8601 timestamp)",
"modified": "string (ISO 8601 timestamp)",
"license": "string (SPDX identifier)",
"tags": ["string"],
"homepage": "string (URL, optional)",
"repository": "string (URL, optional)"
},
"modelFormat": {
"framework": "string (enum)",
"frameworkVersion": "string",
"format": "string (enum)",
"architecture": "string",
"quantization": "string (optional)",
"precision": "string (enum)"
},
"modelCapabilities": {
"task": "string (enum)",
"domain": "string",
"inputModalities": ["string"],
"outputModalities": ["string"],
"languages": ["string (ISO 639-1)"],
"maxInputLength": "integer (optional)",
"maxOutputLength": "integer (optional)"
},
"modelSignature": {
"inputs": [
{
"name": "string",
"dtype": "string",
"shape": ["integer or -1"],
"description": "string (optional)"
}
],
"outputs": [
{
"name": "string",
"dtype": "string",
"shape": ["integer or -1"],
"description": "string (optional)"
}
]
},
"performance": {
"metrics": {
"accuracy": "number (optional)",
"f1Score": "number (optional)",
"perplexity": "number (optional)",
"bleuScore": "number (optional)",
"customMetrics": {}
},
"benchmarks": [
{
"dataset": "string",
"metric": "string",
"value": "number",
"date": "string (ISO 8601)"
}
],
"hardwareRequirements": {
"minMemoryGB": "number",
"recommendedMemoryGB": "number",
"gpu": "boolean",
"minVRAMGB": "number (optional)",
"tpu": "boolean (optional)"
}
},
"artifacts": [
{
"type": "string (enum)",
"path": "string",
"size": "integer (bytes)",
"checksum": {
"algorithm": "string (enum)",
"value": "string"
},
"compressionFormat": "string (optional)"
}
],
"dependencies": {
"python": "string (version spec, optional)",
"packages": [
{
"name": "string",
"version": "string"
}
],
"systemLibraries": ["string"]
},
"security": {
"signature": {
"algorithm": "string",
"publicKey": "string",
"signature": "string"
},
"vulnerabilities": [],
"scanDate": "string (ISO 8601, optional)"
},
"provenance": {
"trainingDataset": {
"name": "string",
"version": "string (optional)",
"source": "string (optional)",
"size": "integer (optional)"
},
"trainingConfig": {
"epochs": "integer (optional)",
"batchSize": "integer (optional)",
"optimizer": "string (optional)",
"learningRate": "number (optional)"
},
"parentModels": ["string (model ID)"],
"derivedFrom": "string (optional)"
},
"deployment": {
"servingFramework": ["string"],
"apiEndpoints": [
{
"type": "string",
"path": "string",
"method": "string"
}
],
"scalingPolicy": {
"minInstances": "integer",
"maxInstances": "integer",
"targetCPU": "integer (percentage)"
}
},
"extensions": {}
}
extensions field allows organizations to add custom metadata while maintaining WIA compliance. Extensions should be namespaced to avoid conflicts.
WIA Model Exchange Format supports wrapping models from all major ML frameworks. The modelFormat section specifies the underlying model format, enabling receiving systems to properly handle the model binary.
| Framework | Format | File Extension | WIA Support |
|---|---|---|---|
| ONNX | onnx | .onnx | β Full |
| TensorFlow | saved_model | /saved_model/ | β Full |
| TensorFlow | keras_h5 | .h5, .keras | β Full |
| PyTorch | torch_script | .pt, .pth | β Full |
| PyTorch | state_dict | .pth | β Full |
| JAX | flax | .msgpack | β Full |
| Hugging Face | transformers | /model/ | β Full |
| scikit-learn | pickle | .pkl | β οΈ Limited |
| XGBoost | xgboost | .json, .ubj | β Full |
| LightGBM | lightgbm | .txt | β Full |
ONNX is the preferred format for maximum interoperability. Models in other formats should ideally be converted to ONNX when possible. ONNX provides standardized operators and is supported across all major inference frameworks.
SavedModel format includes the complete computational graph, variables, and assets. WIA packages should include the entire SavedModel directory structure with metadata pointing to the root directory.
TorchScript provides both tracing and scripting modes. WIA metadata should specify which mode was used and any known limitations of the traced/scripted model.
Transformers models include model weights, tokenizer, and configuration files. WIA packages should include all components and specify the model architecture (BERT, GPT, T5, etc.).
The metadata sections provide comprehensive information about the model, enabling intelligent discovery, validation, and deployment decisions.
Core identification and administrative information about the model:
{
"modelMetadata": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "sentiment-analyzer-bert-base",
"version": "2.1.0",
"description": "BERT-based sentiment analysis model trained on customer reviews with support for 5-point scale classification",
"author": {
"name": "AI Research Team",
"email": "ai-team@example.com",
"organization": "Example Corp"
},
"created": "2025-01-15T08:30:00Z",
"modified": "2025-03-20T14:45:00Z",
"license": "Apache-2.0",
"tags": [
"sentiment-analysis",
"bert",
"nlp",
"customer-feedback",
"production-ready"
],
"homepage": "https://models.example.com/sentiment-analyzer",
"repository": "https://github.com/example/sentiment-models"
}
}
Defines what the model can do, enabling capability-based discovery:
{
"modelCapabilities": {
"task": "text-classification",
"domain": "sentiment-analysis",
"inputModalities": ["text"],
"outputModalities": ["classification"],
"languages": ["en", "es", "fr"],
"maxInputLength": 512,
"maxOutputLength": 1,
"supportedLabels": [
"very_negative",
"negative",
"neutral",
"positive",
"very_positive"
]
}
}
Quantified performance metrics and hardware requirements:
{
"performance": {
"metrics": {
"accuracy": 0.94,
"f1Score": 0.93,
"precision": 0.95,
"recall": 0.91
},
"benchmarks": [
{
"dataset": "SST-2",
"metric": "accuracy",
"value": 0.92,
"date": "2025-03-15T00:00:00Z"
},
{
"dataset": "IMDB",
"metric": "accuracy",
"value": 0.89,
"date": "2025-03-15T00:00:00Z"
}
],
"hardwareRequirements": {
"minMemoryGB": 4,
"recommendedMemoryGB": 8,
"gpu": false,
"inferenceLatencyMs": {
"p50": 45,
"p95": 120,
"p99": 200
},
"throughputQPS": 100
}
}
}
WIA Model Exchange packages must pass comprehensive validation before being accepted by receiving systems. Validation occurs at multiple levels:
| Rule Category | Validation | Severity |
|---|---|---|
| Required Fields | All required fields must be present | ERROR |
| Type Checking | All fields must match specified types | ERROR |
| Format Validation | UUIDs, timestamps, URLs must be valid | ERROR |
| Enum Validation | Enumerated values must be from allowed set | ERROR |
| Semver Validation | Version strings must follow semver | ERROR |
| Checksum Verification | Artifact checksums must be verifiable | ERROR |
| Signature Verification | Cryptographic signatures must be valid | ERROR |
| Dependency Resolution | Dependencies must be resolvable | WARNING |
| Hardware Compatibility | Target system meets requirements | WARNING |
| License Compatibility | License allows intended use | WARNING |
Beyond schema validation, semantic rules ensure logical consistency:
modified must be >= createdPython validation example using JSON Schema:
import jsonschema
import hashlib
import json
def validate_wia_model(model_json, model_files):
"""
Validate WIA model package.
Args:
model_json: Parsed WIA metadata JSON
model_files: Dict mapping artifact paths to file contents
Returns:
ValidationResult with errors and warnings
"""
errors = []
warnings = []
# 1. Schema validation
try:
jsonschema.validate(
instance=model_json,
schema=WIA_SCHEMA
)
except jsonschema.ValidationError as e:
errors.append(f"Schema validation failed: {e.message}")
return ValidationResult(errors, warnings)
# 2. Checksum validation
for artifact in model_json.get("artifacts", []):
path = artifact["path"]
expected_checksum = artifact["checksum"]["value"]
algorithm = artifact["checksum"]["algorithm"]
if path not in model_files:
errors.append(f"Missing artifact: {path}")
continue
if algorithm == "sha256":
actual = hashlib.sha256(model_files[path]).hexdigest()
elif algorithm == "sha512":
actual = hashlib.sha512(model_files[path]).hexdigest()
else:
errors.append(f"Unsupported hash: {algorithm}")
continue
if actual != expected_checksum:
errors.append(
f"Checksum mismatch for {path}: "
f"expected {expected_checksum}, got {actual}"
)
# 3. Semantic validation
created = model_json["modelMetadata"]["created"]
modified = model_json["modelMetadata"]["modified"]
if modified < created:
errors.append(
"Modified timestamp cannot be before created timestamp"
)
# 4. Hardware requirements check
reqs = model_json.get("performance", {}).get(
"hardwareRequirements", {}
)
if not check_hardware_compatibility(reqs):
warnings.append(
"Model hardware requirements exceed system capabilities"
)
return ValidationResult(errors, warnings)
{
"wiaVersion": "1.0.0",
"schemaVersion": "1.0.0",
"modelMetadata": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "bert-base-sentiment-classifier",
"version": "1.2.0",
"description": "BERT base model fine-tuned for sentiment classification on product reviews",
"author": {
"name": "NLP Team",
"email": "nlp@acmecorp.com",
"organization": "Acme Corporation"
},
"created": "2024-11-01T10:00:00Z",
"modified": "2025-02-15T14:30:00Z",
"license": "MIT",
"tags": ["bert", "sentiment", "nlp", "classification"],
"homepage": "https://models.acmecorp.com/bert-sentiment",
"repository": "https://github.com/acmecorp/nlp-models"
},
"modelFormat": {
"framework": "transformers",
"frameworkVersion": "4.36.0",
"format": "transformers",
"architecture": "BertForSequenceClassification",
"precision": "fp32"
},
"modelCapabilities": {
"task": "text-classification",
"domain": "sentiment-analysis",
"inputModalities": ["text"],
"outputModalities": ["classification"],
"languages": ["en"],
"maxInputLength": 512,
"classes": ["negative", "neutral", "positive"]
},
"modelSignature": {
"inputs": [
{
"name": "input_ids",
"dtype": "int64",
"shape": [-1, 512],
"description": "Tokenized input text"
},
{
"name": "attention_mask",
"dtype": "int64",
"shape": [-1, 512],
"description": "Attention mask for input"
}
],
"outputs": [
{
"name": "logits",
"dtype": "float32",
"shape": [-1, 3],
"description": "Classification logits for 3 classes"
}
]
},
"performance": {
"metrics": {
"accuracy": 0.92,
"f1Score": 0.91,
"precision": 0.93,
"recall": 0.89
},
"benchmarks": [
{
"dataset": "product-reviews-test",
"metric": "accuracy",
"value": 0.92,
"date": "2025-02-15T00:00:00Z"
}
],
"hardwareRequirements": {
"minMemoryGB": 4,
"recommendedMemoryGB": 8,
"gpu": false,
"minVRAMGB": 0
}
},
"artifacts": [
{
"type": "model",
"path": "model/pytorch_model.bin",
"size": 438238976,
"checksum": {
"algorithm": "sha256",
"value": "a3c5f19b2e8d7c4f9e1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r9s0t1u2v3w"
}
},
{
"type": "config",
"path": "model/config.json",
"size": 684,
"checksum": {
"algorithm": "sha256",
"value": "b4d6g20c3f9e8d5g0f2b3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y"
}
},
{
"type": "tokenizer",
"path": "tokenizer/tokenizer.json",
"size": 466062,
"checksum": {
"algorithm": "sha256",
"value": "c5e7h31d4g0f9e6h1g3c4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z"
}
}
],
"dependencies": {
"python": ">=3.8,<4.0",
"packages": [
{"name": "transformers", "version": "4.36.0"},
{"name": "torch", "version": "2.1.0"},
{"name": "numpy", "version": "1.24.3"}
],
"systemLibraries": []
},
"security": {
"signature": {
"algorithm": "RSA-SHA256",
"publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...\n-----END PUBLIC KEY-----",
"signature": "5f8a9b7c6d4e3f2g1h0i9j8k7l6m5n4o3p2q1r0s9t8u7v6w5x4y3z2a1b0c..."
},
"vulnerabilities": [],
"scanDate": "2025-02-15T14:30:00Z"
},
"provenance": {
"trainingDataset": {
"name": "product-reviews-v2",
"version": "2.0.0",
"source": "internal",
"size": 1500000
},
"trainingConfig": {
"epochs": 3,
"batchSize": 32,
"optimizer": "AdamW",
"learningRate": 2e-5
},
"parentModels": ["bert-base-uncased"],
"derivedFrom": "google/bert-base-uncased"
},
"deployment": {
"servingFramework": ["fastapi", "torchserve", "triton"],
"apiEndpoints": [
{
"type": "http",
"path": "/predict",
"method": "POST"
}
],
"scalingPolicy": {
"minInstances": 2,
"maxInstances": 10,
"targetCPU": 70
}
}
}
{
"wiaVersion": "1.0.0",
"schemaVersion": "1.0.0",
"modelMetadata": {
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"name": "resnet50-image-classifier",
"version": "3.0.1",
"description": "ResNet-50 image classification model converted to ONNX format",
"author": {
"name": "Computer Vision Team",
"organization": "OpenCV Foundation"
},
"created": "2024-08-10T00:00:00Z",
"modified": "2025-01-20T12:00:00Z",
"license": "Apache-2.0",
"tags": ["resnet", "image-classification", "onnx", "imagenet"]
},
"modelFormat": {
"framework": "onnx",
"frameworkVersion": "1.15.0",
"format": "onnx",
"architecture": "ResNet-50",
"precision": "fp16",
"quantization": "dynamic"
},
"modelCapabilities": {
"task": "image-classification",
"domain": "computer-vision",
"inputModalities": ["image"],
"outputModalities": ["classification"],
"imageSize": [224, 224],
"channels": 3,
"numClasses": 1000
},
"modelSignature": {
"inputs": [
{
"name": "input",
"dtype": "float32",
"shape": [-1, 3, 224, 224],
"description": "Normalized RGB image tensor"
}
],
"outputs": [
{
"name": "output",
"dtype": "float32",
"shape": [-1, 1000],
"description": "ImageNet class probabilities"
}
]
},
"performance": {
"metrics": {
"accuracy": 0.761,
"top5Accuracy": 0.929
},
"benchmarks": [
{
"dataset": "ImageNet-1K-val",
"metric": "top1_accuracy",
"value": 0.761,
"date": "2025-01-20T00:00:00Z"
}
],
"hardwareRequirements": {
"minMemoryGB": 2,
"recommendedMemoryGB": 4,
"gpu": true,
"minVRAMGB": 2
}
},
"artifacts": [
{
"type": "model",
"path": "resnet50.onnx",
"size": 97781580,
"checksum": {
"algorithm": "sha256",
"value": "e6f8i42e5h1g0f7i2h4d5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a"
},
"compressionFormat": "gzip"
},
{
"type": "preprocessing",
"path": "preprocessing.json",
"size": 523,
"checksum": {
"algorithm": "sha256",
"value": "f7g9j53f6i2h1g8j3i5e6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a7b"
}
}
],
"dependencies": {
"packages": [
{"name": "onnxruntime", "version": "1.16.3"}
]
},
"security": {
"signature": {
"algorithm": "ECDSA-SHA256",
"publicKey": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE...\n-----END PUBLIC KEY-----",
"signature": "3045022100ab12cd34ef56..."
}
}
}
{
"wiaVersion": "1.0.0",
"schemaVersion": "1.0.0",
"modelMetadata": {
"id": "9d8c7b6a-5e4f-3d2c-1b0a-9f8e7d6c5b4a",
"name": "credit-risk-xgboost",
"version": "2.3.0",
"description": "XGBoost model for credit risk assessment",
"author": {
"name": "Risk Analytics Team",
"organization": "FinTech Corp"
},
"created": "2024-06-01T00:00:00Z",
"modified": "2025-03-01T00:00:00Z",
"license": "Proprietary",
"tags": ["xgboost", "credit-risk", "finance", "tabular"]
},
"modelFormat": {
"framework": "xgboost",
"frameworkVersion": "2.0.3",
"format": "xgboost",
"architecture": "GradientBoostedTrees",
"precision": "fp32"
},
"modelCapabilities": {
"task": "binary-classification",
"domain": "finance",
"inputModalities": ["tabular"],
"outputModalities": ["probability"],
"numFeatures": 47
},
"modelSignature": {
"inputs": [
{
"name": "features",
"dtype": "float32",
"shape": [-1, 47],
"description": "Customer financial features"
}
],
"outputs": [
{
"name": "default_probability",
"dtype": "float32",
"shape": [-1],
"description": "Probability of default"
}
]
},
"performance": {
"metrics": {
"auc": 0.87,
"precision": 0.82,
"recall": 0.79,
"f1Score": 0.805
},
"hardwareRequirements": {
"minMemoryGB": 1,
"recommendedMemoryGB": 2,
"gpu": false
}
},
"artifacts": [
{
"type": "model",
"path": "model.json",
"size": 2847563,
"checksum": {
"algorithm": "sha256",
"value": "h8j0k64g7j3i2h9k4j6f7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a7b8c"
}
},
{
"type": "feature_schema",
"path": "features.json",
"size": 3421,
"checksum": {
"algorithm": "sha256",
"value": "i9k1l75h8k4j3i0l5k7g8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a7b8c9d"
}
}
],
"dependencies": {
"python": ">=3.8",
"packages": [
{"name": "xgboost", "version": "2.0.3"},
{"name": "numpy", "version": "1.24.3"},
{"name": "pandas", "version": "2.0.3"}
]
}
}
Organizations transitioning to WIA Model Exchange Format from existing model management approaches need clear migration strategies. This section provides guidance for common migration scenarios.
| Legacy Format | Migration Strategy | Complexity |
|---|---|---|
| MLflow Models | Extract metadata from MLmodel file, map to WIA schema | Low |
| Hugging Face Hub | Convert model card to WIA metadata, preserve artifacts | Low |
| TensorFlow Hub | Extract SavedModel metadata, add WIA envelope | Medium |
| Custom Formats | Manual metadata authoring, artifact packaging | High |
| Model Registries | Export registry metadata, transform to WIA schema | Medium |
# MLflow Model
mlflow_model/
βββ MLmodel
βββ conda.yaml
βββ python_env.yaml
βββ model/
βββ model.pkl
# Convert to WIA
wia_package/
βββ wia-model.json # WIA metadata
βββ artifacts/
β βββ model.pkl
βββ mlflow/ # Preserved MLflow metadata
β βββ MLmodel
β βββ conda.yaml
β βββ python_env.yaml
βββ signature.txt
Python migration script:
import mlflow
import json
from datetime import datetime
def migrate_mlflow_to_wia(mlflow_model_uri, output_path):
"""Convert MLflow model to WIA format."""
# Load MLflow model
model = mlflow.pyfunc.load_model(mlflow_model_uri)
mlflow_metadata = model.metadata
# Create WIA metadata
wia_metadata = {
"wiaVersion": "1.0.0",
"schemaVersion": "1.0.0",
"modelMetadata": {
"id": str(uuid.uuid4()),
"name": mlflow_metadata.run_id,
"version": "1.0.0",
"description": mlflow_metadata.signature.to_dict(),
"created": datetime.utcnow().isoformat() + "Z",
"modified": datetime.utcnow().isoformat() + "Z",
"license": "Unknown",
"tags": []
},
"modelFormat": {
"framework": mlflow_metadata.flavors.get("python_function", {}).get("loader_module", "unknown"),
"format": "mlflow"
},
"artifacts": extract_artifacts(mlflow_model_uri)
}
# Write WIA package
with open(f"{output_path}/wia-model.json", "w") as f:
json.dump(wia_metadata, f, indent=2)
# Copy artifacts
copy_artifacts(mlflow_model_uri, f"{output_path}/artifacts")
return wia_metadata
WIA packages should preserve original model metadata when possible to enable backward compatibility:
extensions field to preserve legacy metadata that doesn't map directly to WIA schema. Example: "extensions": {"mlflow": {...}, "custom": {...}}
This chapter established the foundation of WIA AI Interoperability through the Model Exchange Format:
The WIA Model Exchange Format provides the data foundation that enables all higher-level interoperability capabilities. By standardizing how models are packaged and described, we enable:
With the Model Exchange Format established, we now have a standardized way to package and describe AI models. However, models are only useful when they can be deployed and invoked. In Chapter 5, we'll explore Phase 2: Protocol Specifications, covering:
The protocol layer brings models to life, enabling applications to discover, invoke, and orchestrate AI capabilities across heterogeneous platforms. Together, the Model Exchange Format and Protocol Specifications form the technical foundation of WIA's vision for universal AI interoperability.
WIA-Official/wia-standards-public/tree/main/ai-interoperability β open standard initiative providing source code for simulator, spec, API, and ebook assets cited throughout this volume; serves as the canonical verification record for all primary-source citations made by the WIA standard committee in this chapter. Canonical ENUM tokens used in this volume include GPT_4, CLAUDE_3, LLAMA_2, LLAMA_3, MISTRAL, GEMINI, KOBERT, HYPERCLOVA_X, EXAONE, KO_GPT, ONNX, TENSORFLOW_SAVED_MODEL, PYTORCH_JIT, HUGGINGFACE_HUB, SAFETENSORS, GGUF, MLFLOW, KUBEFLOW, NVIDIA_TRITON, BENTOML, KSERVE, OPENINFERENCE, VLLM, SGLANG, OLLAMA, LITELLM, LANGCHAIN, LLAMAINDEX, MCP, A2A, OPENAPI_3_1, GRPC, REST_API, WEBSOCKET, JSON_RPC_2_0, FUNCTION_CALLING, TOOL_USE, SCHEMA_MAPPING, TENSOR_CONVERSION, FEDERATED_LEARNING, UNIVERSAL_ADAPTER, MODEL_CARD, SBOM, NIST_AI_RMF, ISO_42001, EU_AI_ACT, KOREAN_AI_GOVERNANCE, NIA, NIPA, MSIT, KISA, KAIST, POSTECH.