π AquaTrace AI - Ocean Drift Simulation Model
Model Description
A Physics-Informed Neural Network (PINN) for backward ocean drift simulation to identify pollution sources. Core component of the AquaTrace AI accountability system.
Key Features
- Architecture: Physics-Informed Neural Network (PINN)
- Performance: 6.09 km MAE
- Method: Backward trajectory simulation using ocean currents
- Data: CMEMS ocean velocity fields
Model Architecture
Physics-Informed Neural Network:
- Input: (lat, lon, time, u_velocity, v_velocity)
- Hidden Layers: 6 layers Γ 256 units
- Activation: GELU
- Features: Residual connections, Layer normalization
- Output: (delta_lat, delta_lon) displacement
Physics Integration
The model incorporates:
- Ocean Current Data: CMEMS global reanalysis
- Coriolis Effect: Latitude-dependent forcing
- Wind Drift: Surface current approximation
- Conservation Laws: Momentum conservation
Training Data
- Source: CMEMS Ocean Reanalysis
- Coverage: Global oceans
- Resolution: 1/12Β° (~9km)
- Time Range: 2010-2024
- Training Trajectories: 50,000+ simulated paths
Usage
import torch
import torch.nn as nn
class PhysicsInformedDriftNet(nn.Module):
def __init__(self, input_size=5, hidden_size=256, output_size=2, num_layers=6):
super().__init__()
self.input_layer = nn.Linear(input_size, hidden_size)
self.hidden_layers = nn.ModuleList([
nn.Linear(hidden_size, hidden_size) for _ in range(num_layers)
])
self.layer_norms = nn.ModuleList([
nn.LayerNorm(hidden_size) for _ in range(num_layers)
])
self.output_layer = nn.Linear(hidden_size, output_size)
self.activation = nn.GELU()
self.dropout = nn.Dropout(0.1)
def forward(self, x):
x = self.activation(self.input_layer(x))
for hidden, norm in zip(self.hidden_layers, self.layer_norms):
residual = x
x = self.activation(hidden(x))
x = norm(x)
x = self.dropout(x)
x = x + residual
return self.output_layer(x)
# Load model
model = PhysicsInformedDriftNet()
checkpoint = torch.load("best_model.pth")
model.load_state_dict(checkpoint['model_state_dict'])
model.eval()
# Simulate backward drift
lat, lon = 38.0, -145.0 # Current location
u, v = 0.2, -0.1 # Ocean velocity (m/s)
trajectory = []
for t in range(1000): # 1000 hours backward
input_data = torch.tensor([[lat, lon, float(t), u, v]])
with torch.no_grad():
delta = model(input_data)
lat -= delta[0, 0].item() * 0.5
lon -= delta[0, 1].item() * 0.5
trajectory.append([lat, lon])
print(f"Origin estimate: {trajectory[-1]}")
Performance Metrics
| Metric | Value |
|---|---|
| Mean Absolute Error | 6.09 km |
| Median Error | 4.2 km |
| 90th Percentile | 12.5 km |
| RΒ² Score | 0.94 |
Applications
- Source Attribution: Trace plastic back to origin
- Pollution Forecasting: Predict future drift paths
- Accountability: Legal evidence for source identification
- Policy Making: Inform marine protection policies
Limitations
- Accuracy decreases for simulation periods > 2 years
- Requires ocean current data (CMEMS or similar)
- Does not account for extreme weather events
- Assumes constant plastic properties (no sinking/breaking)
Citation
@software{aquatrace_drift_2026,
author = {AquaTrace AI Team},
title = {AquaTrace AI Ocean Drift Simulation Model},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/Klassy01/aquatrace-ai-drift-simulation}
}
License
MIT License
Related Models
- Downloads last month
- 1