MoreRSS

site iconHackerNoonModify

We are an open and international community of 45,000+ contributing writers publishing stories and expertise for 4+ million curious and insightful monthly readers.
Please copy the RSS to your reader, or quickly subscribe to:

Inoreader Feedly Follow Feedbin Local Reader

Rss preview of Blog of HackerNoon

标准化物流上下文协议 (LCP) 如何释放人工智能在供应链中的全部潜能

2025-11-19 00:47:21

The logistics industry stands at an inflection point. While artificial intelligence promises to revolutionize supply chain operations—with capabilities ranging from real-time route optimization to autonomous fleet coordination—a fundamental bottleneck prevents these innovations from reaching their full potential: the lack of a standardized protocol for logistics providers to communicate.

Consider this: A modern shipper working with 10 carriers must maintain 10 separate integrations, each with its own API structure, data format, and authentication mechanism. When an AI-powered demand forecasting system predicts a surge in orders, it cannot seamlessly orchestrate capacity across multiple carriers because each speaks a different "language." This NxM integration problem—where N shippers must integrate with M carriers, creating N×M point-to-point connections—is the invisible tax on logistics innovation that prevents AI systems from reaching production scale.

The Model Context Protocol (MCP), introduced by Anthropic in 2024, offers a blueprint for solving this exact problem in a different domain. MCP standardized how AI systems connect to data sources and tools, eliminating the need for custom integrations. What if logistics adopted the same approach? A universal Logistics Context Protocol (LCP) could become the missing infrastructure layer that transforms today's AI pilots into production-ready, industry-wide solutions.

The Promise and Frustration of AI in Logistics

The AI revolution in logistics is real—but uneven. In 2025, cutting-edge applications are reshaping specific corners of the industry while leaving fundamental coordination challenges unsolved.

Generative AI: Route Optimization and Demand Forecasting

Generative AI is demonstrating remarkable capabilities in logistics optimization. Maersk uses generative models to analyze historical shipping data, current traffic conditions, and weather patterns to generate dynamic routing plans that adjust to real-time disruptions. Generative AI in demand forecasting has enabled companies to predict patterns with unprecedented accuracy by weaving together diverse data streams—from historical shipping records to social media trends and weather forecasts. Companies implementing these systems report tangible improvements: fitting 23% more cargo on ships and burning 12% less fuel.

Multi-Agent Systems: Orchestrating Complex Workflows

Multi-agent AI systems are emerging as powerful orchestrators for complex logistics workflows. Rather than relying on a single monolithic AI, multi-agent systems deploy specialized agents that handle distinct tasks—one agent forecasts demand, another optimizes routes, and a third manages inventory levels—while coordinating through defined communication protocols. In supply chain management, these agents track stock levels in real-time, communicate with demand forecasting agents to prevent stockouts, and interact with logistics systems to optimize delivery schedules based on inventory availability. Cognizant's multi-agent systems have achieved measurable results: a 24% reduction in report drafting time for investor relations and a 40% boost in RFP productivity.

Autonomous Systems: From Pilots to Production

AI-powered autonomous trucks from companies like Plus use sensors, GPS, computer vision, and advanced machine learning algorithms to navigate roads and assist with long-haul freight. While safety drivers remain on board today, the industry is progressing toward 24/7 autonomous operation—a development that will reduce shipping costs and improve delivery speeds. McKinsey identifies autonomous systems as a defining technology trend for 2025, noting their ability to coordinate last-mile logistics, navigate dynamic environments, and act as virtual coworkers.

Computer Vision: Warehouse Precision at Scale

AI-powered robotic arms now use vision systems and deep learning to pick nearly all items with over 99% inventory accuracy. These systems can identify objects of varying sizes and shapes, adapt to dynamic environments, and make real-time decisions to improve workflows—capabilities that rigid, pre-programmed machinery could never achieve. The market for AI-powered warehouse automation reached nearly USD 3 billion in 2024 and continues to expand rapidly.

Digital Twins: Simulation Meets Real-Time Optimization

Digital twins paired with AI are revolutionizing supply chain simulation and optimization. These virtual replicas of physical supply chains use real-time data to model interactions from product ideation and manufacturing through to shipping and returns. Organizations implementing digital twins have seen up to 30% improvement in forecasting accuracy, and when combined with AI, these systems can make real-time adjustments to delivery routes, balance inventory, and dynamically modify production schedules.

The Critical Gap

Yet despite these advances, a critical gap persists: these AI systems operate in silos. An autonomous delivery fleet cannot seamlessly accept jobs from multiple shippers without custom integrations. A multi-agent demand forecasting system cannot automatically trigger capacity reservations across carriers that use incompatible APIs. A warehouse's computer vision system tracking real-time inventory cannot push updates to external logistics providers unless someone has built bespoke middleware.

This is where standardization becomes essential.

What MCP Teaches Us About Standardization

The Model Context Protocol solved a structurally identical problem in the AI ecosystem. Before MCP, every AI application that needed to connect to external data sources or tools faced the same integration nightmare that logistics platforms face today. Connecting Claude to Google Drive required one custom integration; connecting it to Salesforce required another; connecting it to a company's internal database required yet another. The permutations multiplied exponentially.

MCP's elegance lies in its architectural simplicity. Built on JSON-RPC 2.0, MCP defines a standard client-server contract that any system can implement regardless of programming language or platform. The protocol operates over two transport mechanisms: STDIO for local connections (when an AI model needs to access tools on the same machine) and HTTP with Server-Sent Events (SSE) for remote connections (when distributed systems need to communicate). This dual-transport approach ensures MCP works equally well for lightweight local use cases and enterprise-grade distributed architectures.

Three design principles make MCP particularly instructive for logistics:

Abstraction Over Implementation: MCP doesn't dictate how data sources must structure their internal systems. A file storage provider and a SQL database implement completely different backends, yet both can expose their capabilities through the same MCP interface. For logistics, this means a legacy carrier running decades-old TMS software and a modern tech-forward 3PL using microservices could both participate in a standardized protocol without rearchitecting their core systems.

Streaming-First Communication: MCP's support for Server-Sent Events enables progressive, real-time updates. When an AI model queries a large dataset, results stream back incrementally rather than forcing the client to wait for batch processing. In logistics, this maps perfectly to real-time tracking scenarios where status updates need to flow continuously—vehicle location, delivery exceptions, traffic delays—rather than requiring periodic polling.

Bidirectional Cooperation: MCP blurs traditional client-server boundaries, allowing both sides to initiate actions and shape execution. A carrier implementing a logistics protocol could proactively push exception alerts (traffic delays, vehicle breakdowns) to shippers, while shippers could simultaneously query real-time capacity availability—all through the same channel.

Designing a Logistics Context Protocol

A standardized Logistics Context Protocol (LCP) would mirror MCP's architecture while addressing logistics-specific requirements. The core specification would define request-response contracts using JSON-RPC 2.0, ensuring language-agnostic implementation and battle-tested reliability.

Core Data Models: Establishing the Contract

The foundation of LCP is a set of standardized data models that all participants implement. Here's what that looks like:

typescript// Core standardized Shipment object - identical across all carriers
interface Shipment {
  shipmentId: string;
  status: "pending" | "picked_up" | "in_transit" | "delivered" | "exception";
  origin: Location;
  destination: Location;
  cargo: CargoSpecification;
  serviceLevel: "standard" | "expedited" | "overnight";
  createdAt: ISO8601DateTime;
  updatedAt: ISO8601DateTime;
  estimatedDelivery: ISO8601DateTime;
  actualDelivery?: ISO8601DateTime;
  tracking: TrackingEvent[];
  cost: {
    baseRate: number;
    surcharges: number;
    total: number;
    currency: string;
  };
  exceptions?: ShipmentException[];
}

interface TrackingEvent {
  timestamp: ISO8601DateTime;
  location: Location;
  status: string;
  description: string;
  eventType: "pickup" | "in_transit" | "delivery_attempt" | "delivered" | "exception";
}

interface ShipmentException {
  code: string;
  severity: "warning" | "critical";
  description: string;
  timestamp: ISO8601DateTime;
  resolvedAt?: ISO8601DateTime;
  resolution?: string;
}

Unlike current integrations where each carrier defines shipments differently, LCP defines a universal contract. A shipper receives identical data structures from FedEx, UPS, DHL, or a local 3PL—no translation layer required.

Five Core Capabilities

The protocol would standardize five fundamental operations that account for 80% of logistics interactions:

  1. Shipment Creation: A universal format for submitting shipment requests with origin, destination, cargo specifications, time windows, and service level requirements.
  2. Real-Time Tracking: A streaming interface for continuous location and status updates using Server-Sent Events.
  3. Capacity Discovery: A standardized query mechanism for checking available capacity, service options, and pricing across carriers.
  4. Exception Handling: A structured format for communicating disruptions—traffic delays, weather events, vehicle breakdowns, delivery failures.
  5. Route Optimization Inputs: APIs for carriers to expose real-time data that AI route optimization systems require—vehicle locations, driver availability, current traffic conditions, depot capacity constraints.

The Shipper's Perspective: Querying Multiple Carriers

One of LCP's most powerful capabilities is how it simplifies multi-carrier orchestration. Here's what querying multiple carriers simultaneously looks like:

typescriptclass LCPShipperClient {
  private carriers: Map<string, string> = new Map([
    ["fedex", "https://api.fedex-lcp.io"],
    ["ups", "https://api.ups-lcp.io"],
    ["dhl", "https://api.dhl-lcp.io"],
    ["local_3pl", "http://localhost:3001"],
  ]);

  /**
   * Query multiple carriers simultaneously for available capacity and pricing
   * Returns quotes in standardized format regardless of carrier backend
   */
  async getCarrierQuotes(shipment: Shipment): Promise<Map<string, CarrierQuote>> {
    const quotePromises = Array.from(this.carriers.entries()).map(
      ([carrierName, endpoint]) =>
        this.queryCarrier(carrierName, endpoint, shipment).catch((err) => ({
          carrierName,
          error: err.message,
        }))
    );

    const results = await Promise.all(quotePromises);
    const quotes = new Map<string, CarrierQuote>();

    results.forEach((result) => {
      if ("error" in result) {
        console.warn(`Quote from ${result.carrierName} failed: ${result.error}`);
      } else {
        quotes.set(result.carrierName, result);
      }
    });

    return quotes;
  }

  private async queryCarrier(
    carrierName: string,
    endpoint: string,
    shipment: Shipment
  ): Promise<CarrierQuote> {
    const request = {
      jsonrpc: "2.0",
      id: `quote-${Date.now()}`,
      method: "shipments/quote",
      params: { shipment },
    };

    const response = await fetch(`${endpoint}/lcp`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        Authorization: `Bearer ${process.env[`${carrierName.toUpperCase()}_API_KEY`]}`,
      },
      body: JSON.stringify(request),
    });

    const data = await response.json();
    if (data.error) throw new Error(`${data.error.message}`);
    return data.result;
  }
}

// Usage: Single code path replaces N different carrier integrations
async function selectOptimalCarrier() {
  const client = new LCPShipperClient();

  const shipment = {
    origin: { address: "123 Warehouse St", city: "San Jose", /* ... */ },
    destination: { address: "456 Customer Ave", city: "New York", /* ... */ },
    cargo: { weight: 2.5, dimensions: { /* ... */ }, /* ... */ },
    serviceLevel: "standard",
    /* ... */
  };

  // Query all carriers with identical code
  const quotes = await client.getCarrierQuotes(shipment);

  // Select carrier with best cost-delivery tradeoff
  let bestCarrier = null;
  for (const [name, quote] of quotes) {
    if (!bestCarrier || quote.baseRate < bestCarrier.baseRate) {
      bestCarrier = [name, quote];
    }
  }

  console.log(`Selected carrier: ${bestCarrier}`);
}

This is transformative: one code path now replaces integrations with 10 different carriers. When you add a new carrier, you don't modify application logic—you simply register the new carrier endpoint. The business logic remains unchanged.

Real-Time Tracking via Streaming

Traditional APIs require polling: "Is my package here yet? Is it here now? How about now?" LCP uses Server-Sent Events so carriers push tracking updates as they occur, enabling true real-time visibility:

typescript/**
 * Real-time tracking via Server-Sent Events
 * Eliminates polling; carrier pushes updates as they occur
 */
async trackShipmentRealtime(
  shipmentId: string,
  carrierName: string,
  onUpdate: (event: TrackingEvent) => void
): Promise<void> {
  const endpoint = this.carriers.get(carrierName);

  const request = {
    jsonrpc: "2.0",
    id: `track-${shipmentId}`,
    method: "shipments/track-stream",
    params: { shipmentId },
  };

  const response = await fetch(`${endpoint}/lcp-stream`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      Authorization: `Bearer ${process.env[`${carrierName.toUpperCase()}_API_KEY`]}`,
    },
    body: JSON.stringify(request),
  });

  const reader = response.body.getReader();
  const decoder = new TextDecoder();
  let buffer = "";

  while (true) {
    const { done, value } = await reader.read();
    if (done) break;

    buffer += decoder.decode(value, { stream: true });
    const lines = buffer.split("\n");
    buffer = lines[lines.length - 1];

    for (let i = 0; i < lines.length - 1; i++) {
      const line = lines[i];
      if (line.startsWith("data: ")) {
        const trackingEvent = JSON.parse(line.substring(6));
        onUpdate(trackingEvent); // Real-time callback
      }
    }
  }
}

// Usage
client.trackShipmentRealtime(
  "shipment-12345",
  "fedex",
  (event) => {
    console.log(`[${event.timestamp}] ${event.status}: ${event.description}`);
  }
);

Instead of polling every 30 seconds, the carrier pushes updates the moment status changes. This eliminates latency and reduces server load across the entire industry.

The Carrier's Perspective: Implementing LCP

From a carrier's perspective, LCP is remarkably simple to implement. Here's how a carrier exposes their existing systems through the protocol:

typescriptclass LCPCarrierServer {
  private app = express();
  private shipments = new Map<string, Shipment>();

  constructor(port: number = 3000) {
    this.setupMiddleware();
    this.setupRoutes();
    this.startServer(port);
  }

  private setupRoutes() {
    // Standard JSON-RPC endpoint for request-response calls
    this.app.post("/lcp", (req, res) => {
      this.handleLCPRequest(req, res);
    });

    // Streaming endpoint for Server-Sent Events
    this.app.post("/lcp-stream", (req, res) => {
      this.handleStreamingRequest(req, res);
    });
  }

  private async handleLCPRequest(req, res) {
    const { method, params, id } = req.body;

    try {
      let result;
      switch (method) {
        case "shipments/create":
          result = await this.createShipment(params);
          break;
        case "shipments/quote":
          result = await this.quoteShipment(params);
          break;
        case "capacity/query":
          result = await this.queryCapacity(params);
          break;
        default:
          return res.status(400).json({
            jsonrpc: "2.0",
            id,
            error: { code: -32601, message: "Method not found" },
          });
      }

      res.json({ jsonrpc: "2.0", id, result });
    } catch (error) {
      res.status(400).json({
        jsonrpc: "2.0",
        id,
        error: { code: -32603, message: "Internal error", data: error.message },
      });
    }
  }

  /**
   * Carrier's internal business logic stays unchanged
   * LCP just provides the interface
   */
  private async quoteShipment(params) {
    const { shipment } = params;

    // Your existing rate calculation logic
    const distance = this.calculateDistance(shipment.origin, shipment.destination);
    const baseCost = 10 + distance * 0.5;
    const deliveryDays = shipment.serviceLevel === "overnight" ? 1 : Math.ceil(distance / 500);

    // Return standardized response
    return {
      carrierName: "FedEx",
      baseRate: baseCost,
      estimatedDelivery: new Date(Date.now() + deliveryDays * 24 * 60 * 60 * 1000).toISOString(),
      serviceOptions: ["standard", "expedited"],
      availability: "available",
    };
  }

  /**
   * Server-Sent Events for real-time tracking
   */
  private async handleStreamingRequest(req, res) {
    const { method, params } = req.body;

    if (method !== "shipments/track-stream") {
      return res.status(400).json({
        jsonrpc: "2.0",
        error: { code: -32601, message: "Method not found" },
      });
    }

    const { shipmentId } = params;
    const shipment = this.shipments.get(shipmentId);

    if (!shipment) {
      return res.status(404).json({
        jsonrpc: "2.0",
        error: { code: -32603, message: "Shipment not found" },
      });
    }

    // Set up Server-Sent Events
    res.setHeader("Content-Type", "text/event-stream");
    res.setHeader("Cache-Control", "no-cache");
    res.setHeader("Connection", "keep-alive");

    // Simulate tracking updates (in production: real vehicle data)
    const events = [
      { status: "picked_up", description: "Package picked up from origin", delay: 1000 },
      { status: "in_transit", description: "Package in transit", delay: 5000 },
      { status: "delivered", description: "Package delivered", delay: 2000 },
    ];

    for (const event of events) {
      const trackingEvent = {
        timestamp: new Date().toISOString(),
        location: shipment.destination,
        status: event.status,
        description: event.description,
        eventType: event.status,
      };

      res.write(`data: ${JSON.stringify(trackingEvent)}\n\n`);
      await new Promise(resolve => setTimeout(resolve, event.delay));
    }

    res.end();
  }
}

// Start server
new LCPCarrierServer(3000);

Notice what's missing: a carrier doesn't need to rebuild its backend. They wrap their existing systems with this thin interface layer. Legacy TMS? No problem—proxy through it. Microservices? Direct integration. Modern cloud platform? Perfect. The carrier's internal architecture stays unchanged; LCP just provides the standardized facade.

AI-Powered Use Cases Enabled by Standardization

The true power of a logistics protocol emerges when combined with advanced AI capabilities. Several transformative use cases become feasible only with standardization:

Multi-Agent Orchestration Across Carriers

An AI-powered Transportation Management System (TMS) managing shipments for a large retailer faces a sudden capacity crunch—a major carrier experiences mechanical failures affecting 20% of its fleet. Rather than scrambling to manually rebook shipments, the AI system queries alternative carriers through the protocol, receives real-time capacity and pricing information in a standardized format, and automatically redirects shipments based on cost optimization, service level agreements, and delivery commitments. The entire orchestration happens in seconds, with no human intervention.

Here's how multiple AI agents would coordinate through LCP:

typescriptclass MultiAgentLogisticsOrchestrator {
  private agents = [
    { name: "demand_agent", role: "demand_forecaster", endpoint: "http://ai-agents:5001" },
    { name: "capacity_agent", role: "capacity_planner", endpoint: "http://ai-agents:5002" },
    { name: "routing_agent", role: "route_optimizer", endpoint: "http://ai-agents:5003" },
  ];

  private lcpClient = new LCPShipperClient();

  /**
   * Orchestrate shipment workflow with multiple AI agents
   * Each agent specializes in a domain; LCP unifies carrier integration
   */
  async orchestrateShipment(orderData) {
    // Step 1: Demand forecasting agent predicts surge
    const forecastResult = await this.callAgent("demand_agent", {
      method: "predict_demand",
      params: { orderData },
    });

    console.log(`Demand forecast: ${forecastResult.forecastedVolume} units`);

    // Step 2: Capacity planning agent queries carriers via LCP
    const shipment = this.buildShipment(orderData);
    const quotes = await this.lcpClient.getCarrierQuotes(shipment);

    const capacityDecision = await this.callAgent("capacity_agent", {
      method: "optimize_capacity",
      params: {
        forecastedVolume: forecastResult.forecastedVolume,
        availableCarriers: Array.from(quotes.entries()).map(([name, quote]) => ({
          name,
          cost: quote.baseRate,
          capacity: quote.availability,
        })),
      },
    });

    // Step 3: Route optimizer selects optimal carrier based on all factors
    const routingDecision = await this.callAgent("routing_agent", {
      method: "optimize_route",
      params: {
        shipment,
        carrierOptions: Array.from(quotes.entries()),
        demand: forecastResult,
        capacity: capacityDecision,
      },
    });

    const selectedCarrier = routingDecision.selectedCarrier;

    // Step 4: Create shipment with selected carrier using LCP
    const result = await this.lcpClient.createShipment(selectedCarrier, shipment);
    console.log(`Shipment booked with tracking: ${result.trackingNumber}`);

    // Step 5: Subscribe to real-time tracking
    this.lcpClient.trackShipmentRealtime(
      result.shipmentId,
      selectedCarrier,
      (event) => {
        if (event.eventType === "exception") {
          // Exception handling agent intervenes
          this.callAgent("exception_agent", {
            method: "handle_exception",
            params: { exception: event, shipmentId: result.shipmentId },
          });
        }
      }
    );
  }

  private async callAgent(agentName, request) {
    const agent = this.agents.find(a => a.name === agentName);
    const response = await fetch(`${agent.endpoint}/invoke`, {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify(request),
    });
    return response.json();
  }
}

Before LCP: Each agent had to integrate with each carrier individually, creating an explosion of complexity.

After LCP: Agents integrate with the protocol once, then coordinate with any carrier seamlessly.

Predictive Exception Management with Generative AI

Generative AI models analyze diverse data streams—weather forecasts, traffic patterns, historical delay data, social media reports—to predict disruptions before they occur. When the model identifies a high probability of delays affecting a specific route, it generates contingency plans by querying carriers through the standardized protocol for alternative routing options, evaluating each scenario's cost and time implications, and proactively rerouting shipments. The system also generates natural language notifications to customers.

Autonomous Fleet Integration

A warehouse equipped with AI-powered robotic picking completes order fulfillment. Rather than waiting for manual carrier selection, an AI agent evaluates the optimal delivery method based on destination, time sensitivity, and cost. It queries available carriers through the protocol, selects last-mile providers—potentially including autonomous delivery fleets, gig economy platforms, or traditional couriers—and transmits standardized pickup instructions. The carrier's system acknowledges receipt and begins streaming real-time status updates back through the protocol.

Cross-Border Supply Chain Visibility

A multinational manufacturer sources components from suppliers across three continents. AI-powered analytics systems aggregate data from dozens of carriers through uniform LCP endpoints. Because all carriers implement the standardized protocol, the analytics platform receives uniform tracking data, enabling machine learning models to detect patterns invisible in fragmented data. The system identifies that shipments from a specific port consistently experience 2-3 day delays and proactively adjusts procurement timelines.

Sustainable Logistics Optimization

AI systems focused on reducing carbon emissions require comprehensive data across the entire logistics network—vehicle fuel efficiency, route distances, load optimization, modal choices. A standardized protocol enables carriers to expose emissions-related data in uniform formats, allowing AI optimization engines to make sustainability-focused routing decisions. The system automatically selects carriers with better environmental performance and generates verified carbon footprint reports for regulatory compliance.

Error Handling and Protocol Robustness

A production-grade protocol must handle failure gracefully. LCP defines standardized error codes inspired by JSON-RPC 2.0:

typescriptenum LCPErrorCode {
  // Standard JSON-RPC errors
  ParseError = -32700,
  InvalidRequest = -32600,
  MethodNotFound = -32601,
  InvalidParams = -32602,
  InternalError = -32603,

  // Logistics-specific errors
  ShipmentNotFound = -32000,
  InvalidShipment = -32001,
  CapacityExceeded = -32002,
  ServiceUnavailable = -32003,
  RouteNotServicable = -32005,
  ExceptionOccurred = -32006,
}

Shippers implement intelligent retry logic with fallback carriers:

typescriptclass LCPErrorHandler {
  /**
   * Execute operation with automatic retry and fallback logic
   */
  static async executeWithRetry(operation, fallbacks, maxRetries = 3) {
    let lastError = null;

    // Try main operation with exponential backoff
    for (let attempt = 0; attempt < maxRetries; attempt++) {
      try {
        return await operation();
      } catch (error) {
        lastError = error;

        // If error is retryable, wait before retry
        if (this.isRetryable(error)) {
          const backoffMs = Math.pow(2, attempt) * 1000;
          console.log(`Attempt ${attempt + 1} failed, retrying in ${backoffMs}ms`);
          await new Promise(resolve => setTimeout(resolve, backoffMs));
        } else {
          break;
        }
      }
    }

    // If main operation fails, try fallbacks
    for (const fallback of fallbacks) {
      try {
        console.log("Trying fallback carrier");
        return await fallback();
      } catch (error) {
        lastError = error;
        continue;
      }
    }

    throw lastError;
  }

  private static isRetryable(error) {
    return error.code === LCPErrorCode.ServiceUnavailable ||
           error.code === LCPErrorCode.InternalError;
  }
}

// Usage
async function robustMultiCarrierShipment(shipment, preferredCarriers) {
  const client = new LCPShipperClient();
  const operations = preferredCarriers.map(
    carrier => () => client.createShipment(carrier, shipment)
  );

  try {
    const result = await LCPErrorHandler.executeWithRetry(
      operations,
      operations.slice(1),
      3
    );
    console.log(`Shipment created: ${result.shipmentId}`);
  } catch (error) {
    console.error(`All carriers unavailable: ${error.message}`);
    // Escalate to manual intervention
  }
}

Integration with Emerging Technologies

A logistics protocol must anticipate and accommodate the technologies reshaping the industry:

Multi-Agent Systems

LCP serves as the communication backbone for distributed AI agents. When a demand forecasting agent predicts a surge, it triggers a capacity planning agent, which queries carriers through the protocol and coordinates with inventory agents to optimize fulfillment locations.

Edge Computing and IoT

Modern logistics increasingly relies on IoT sensors embedded in vehicles, containers, and warehouses. A standardized protocol defines how edge devices expose their data streams—temperature readings from cold chain sensors, location updates from GPS trackers, inventory counts from warehouse vision systems—enabling AI systems to consume this data uniformly across providers.

Blockchain for Provenance

As supply chains demand greater transparency, blockchain-based traceability systems are recording every transaction in tamper-proof distributed ledgers. A logistics protocol should define standard interfaces for querying blockchain-verified provenance data, enabling shippers to track products from origin to delivery with cryptographic certainty.

Digital Twins

AI-powered digital twins simulate entire supply chain networks, modeling everything from warehouse operations to transportation routes. These systems require continuous data feeds from physical operations—real-time vehicle positions, inventory levels, machine states. A standardized protocol ensures digital twins can ingest data from any carrier or warehouse operator without custom integration.

Autonomous Vehicles

As autonomous delivery fleets scale, they need standardized mechanisms to receive job assignments, report progress, and handle exceptions. A startup building autonomous last-mile delivery vehicles could implement the protocol and immediately integrate with any shipper using the standard.

Overcoming Barriers to Adoption

Standardization efforts in logistics have historically struggled to gain traction. EDI protocols, despite decades of establishment, remain cumbersome and batch-oriented. What would make an LCP succeed?

Network Effects and Early Adoption

The protocol needs critical mass among both carriers and shippers. MCP achieved this by securing support from Anthropic and enabling rapid third-party implementations. An LCP should follow a similar path: partner with 2-3 forward-thinking carriers and a major shipper to build reference implementations. Once these initial participants demonstrate ROI through reduced integration costs and improved operational efficiency, network effects drive broader adoption.

Economic Incentives

Carriers may initially resist standardization, fearing it commoditizes their services. However, the counterargument is compelling: a standardized protocol grows the total addressable market. Small and mid-sized shippers currently avoid multi-carrier strategies because integration complexity makes them uneconomical. A protocol eliminates this barrier, allowing these shippers to distribute volume across more carriers. Rather than 100 large shippers each locked into 2-3 carriers, the market could support 1,000 shippers flexibly allocating volume across 10+ carriers based on real-time performance and pricing.

Addressing Heterogeneity

Logistics encompasses vastly different modes—parcel shipping, less-than-truckload (LTL), full-truckload (FTL), ocean freight, air cargo—each with unique requirements. Critics might argue a single protocol cannot accommodate this diversity. The solution lies in designing the protocol at the appropriate level of abstraction. The core specification defines operations common across all modes: create shipment request, query status, report exceptions, provide capacity information. Mode-specific extensions handle specialized needs: container specifications for ocean freight, hazmat certifications for chemical transport, temperature monitoring for cold chain.

Progressive Adoption Path

A carrier doesn't need to implement LCP for every shipment immediately. Organizations can wrap existing legacy systems with a thin API layer that translates between internal formats and the standardized protocol, implementing support incrementally—starting with tracking, adding capacity queries later, and eventually supporting the full specification.

The Path Forward: Implementation Roadmap

Transitioning from concept to industry-wide standard requires a phased, pragmatic approach:

Phase 1 - Specification and Reference Implementation (6-12 months): Develop the core protocol specification with input from logistics domain experts and software architects. Build reference implementations in TypeScript, Python, and Java demonstrating both carrier and shipper perspectives. Publish comprehensive documentation and open-source the implementations.

Phase 2 - Pilot Partnerships (12-18 months): Partner with 2-3 carriers and 1-2 shippers willing to implement the protocol in production environments for specific lanes or use cases. Focus on high-value scenarios where AI integration delivers measurable ROI—multi-carrier bid optimization, real-time exception management, autonomous last-mile coordination. Document quantitative results: integration time reduction, cost savings, delivery performance improvements.

Phase 3 - Ecosystem Development (18-30 months): Encourage middleware vendors, TMS providers, and logistics SaaS platforms to add native protocol support. Once established platforms like Oracle Transportation Management or SAP TM implement LCP, adoption accelerates organically as their customers gain instant multi-carrier connectivity.

Phase 4 - AI Integration Showcase (24-36 months): Build demonstration systems that highlight AI capabilities unlocked by standardization—multi-agent orchestration systems coordinating dozens of carriers, generative AI models optimizing global supply chains, autonomous fleets seamlessly integrating with traditional carriers, digital twins simulating entire logistics networks using standardized data feeds.

Phase 5 - Industry Standardization (36-48 months): Transition governance to an industry consortium or standards body. Establish processes for protocol evolution, certification, compliance testing, and dispute resolution. Work with regulators to explore mandates or incentives that accelerate adoption in specific geographies.

Conclusion: The Infrastructure for Intelligent Logistics

The logistics industry doesn't lack AI innovation—it lacks the connective tissue that allows innovations to compound. Generative AI can optimize routes brilliantly, but only if it can communicate with carriers uniformly. Multi-agent systems can orchestrate complex supply chains elegantly, but only if they're not spending 80% of their logic handling integration edge cases. Autonomous vehicles can revolutionize last-mile delivery efficiently, but only if they can plug into existing shipper workflows seamlessly.

A standardized Logistics Context Protocol represents the missing infrastructure layer—the equivalent of TCP/IP for logistics coordination or USB-C for data connectivity. It doesn't replace the sophisticated AI systems being built today; it amplifies them by eliminating the integration tax that currently prevents these systems from reaching their full potential.

The parallel to MCP is striking. Before MCP, AI developers spent more time writing integration glue code than building intelligent features. After MCP, they focus on what makes their AI unique, knowing connectivity is solved. The same transformation awaits logistics. Once carriers and shippers speak a common protocol, AI researchers can focus on advancing routing algorithms, forecasting models, and autonomous systems rather than wrestling with API incompatibilities.

The question isn't whether logistics needs standardization—the pain points are undeniable and quantifiable. The question is whether the industry can coordinate around a common vision before fragmentation becomes too entrenched. LCP built on the same simplicity, backing, and openness that made MCP successful could unlock the next decade of AI-driven supply chain innovation, transforming logistics from a fragmented collection of proprietary systems into an intelligent, interoperable network that moves the world's goods with unprecedented efficiency.

The infrastructure for intelligent logistics is within reach. All it takes is one standardized protocol.


About the Author

Balaji Solai Rameshbabu is a Product Leader with expertise in AI, product management, e-commerce and supply chain technology. Passionate about standardization and interoperability in logistics. Based in the San Francisco Bay Area.

\

像人工智能 PM 一样思考

2025-11-19 00:25:06

AI Product Management is reshaping how products are built, demanding a new mindset from traditional product leaders. Unlike deterministic software development, AI products thrive on data, experimentation, and probabilistic outcomes, requiring PMs to collaborate closely with ML teams, manage stakeholder expectations, and continuously refine models post launch. Success isn’t just shipping features, it’s navigating uncertainty, defining nuanced success metrics, and ensuring ethical, user centric outcomes. This guide unpacks the key differences, skills, and pitfalls to help product leaders thrive in the AI first era.

利用零信任架构确保 Java 微服务的安全

2025-11-19 00:10:27

\ Suppose someone gets hold of your API key. Suddenly, they have access to everything inside your internal microservices — free roaming, no questions asked. By the time you even realize something’s wrong, they’ve already siphoned off data, exercised every permission you never meant to grant, and left you with a hefty bill and an even heavier task: rebuilding customer trust.

So how does this kind of breach even happen? In large part, it’s because most microservices assume they can trust each other simply because they sit on the same network. Not because it’s real security — but because we treat proximity like protection.

In simple terms:

A leaked trusted key becomes the thief’s passport.

In the past, with a single application and a single data store, as well as a single network perimeter, security was much simpler, as everything was running on-premises with a local data center.

However, once you switched to microservices, all of this changed. Now you have many (dozens) of applications/services, hundreds of APIs, and many different teams are releasing code each and every day. In addition, most services will communicate with other services and assume that since they are communicating across a common network, they should be able to trust each service.

Your architectural design has grown and evolved; however, your "security" thinking has not. Your home now looks like it is wide open. Anyone who can get a key for the front door can go into every room, open every drawer, and unlock every safe locker in the building.

\ Current System

The Philosophy That Changed The Way Of Thinking About Architecture: Zero Trust

Zero Trust is a change in the way you think about trust, not an improvement in security trends.

It used to be, "Trust but Verify." It isn't anymore. This principle can be summarized simply as, "Don't ever trust; always verify."

All connections (user, service & internal network) must identify themselves, state what they can do, and say if the connection is safe. No exceptions.

Basically, it looked like this for the microservices Mutual TLS all the way: All of a service connection's communication is confirmed by the use of mutual TLS (mTLS) before any of the parties can communicate with each other.

API-based permissions are replacing firewall-based permissions. Each call/transaction is being verified login.

We’ve had to rethink how we build and how we trust anything inside our architecture to meet Zero Trust principles — but in doing so, we’ve ended up with a far safer system.

\

Our systems are now much safer due to Zero Trust, and it has changed the way that we design, communicate, and trust other services in our architecture, whether internal or external.

New Architecture/Zero Trust Architecture

\ \

Zero Trust: Not Optional — Not Anymore

Are you running microservices without Zero Trust? If you wait too long, your business won’t just fall behind — it may hit a wall. Now is the time to start, long before your systems stall out. Our own rollout wasn’t flawless. We dealt with outages, pushed through developer resistance, and learned a few hard lessons along the way. But after six months, we shipped it — and proved that security isn’t something you stumble into. It’s something you design for, deliberately, from day one.

Solution/Tools

Here are some of the technologies we used to transition our trust model, which is based on networks, to an identity-based trust model:

  • For Service Identity: SPIFFE/SPIRE
  • service mesh/service-to-service encrypted communications: Istio mTLS
  • Code of policies: Open Policy Agent (openpolicyagent.org)
  • Active secrets management, Dynamic secrets management: HashiCorp Vault
  • Dynamic threat analysis: Falco.
  • Rate-Limiting, Audit Logging, OAuth2: Kong API Gateway

Optimization

  • Decisions made by OPA are cached (Redis/Caffeine).
  • Connection Pooling for mTLS
  • Audit logs of Kafka are asynchronously rewritten.

Next, I will describe the implementation of a Zero Trust model for my Java-based microservice applications, including how identities are verified, mTLS is used, and secrets are rotated within the application, as well as provide real-world examples of code and configurations used.

JWT Using Identity Service

Each service acquires its identity. We generate and sign a JWT using RSA-256 keys.

```

java package com.zero.trust.common; import com.auth0.jwt.JWT; import com.auth0.jwt.algorithms.Algorithm; import java.security.; import java.security.interfaces.; import java.util.*; public class IdentityServiceManager {

private final String serviceName;
private final Algorithm algorithm;

public IdentityServiceManager(String serviceName) {
    this.serviceName = serviceName;
    try {
        KeyPairGenerator gen = KeyPairGenerator.getInstance("RSA");
        gen.initialize(2048);
        KeyPair pair = gen.generateKeyPair();
        this.algorithm = Algorithm.RSA256(
                (RSAPublicKey) pair.getPublic(),
                (RSAPrivateKey) pair.getPrivate());
    } catch (Exception e) {
        throw new RuntimeException("KeyPair creation failed", e);
    }
}

public String generateTokenData() {
    return JWT.create()
            .withIssuer(serviceName)
            .withClaim("service", serviceName)
            .withExpiresAt(new Date(System.currentTimeMillis() + 3600_000))
            .sign(algorithm);
}

public boolean verifyTokenData(String token) {
    try { JWT.require(algorithm).build().verify(token); return true; }
    catch (Exception e) { return false; }
}

}


java

\
## Service Auth using SpringSecuirty Filter

Every request is validated to check whether the token is valid or not.  \n No token/Invalid token: it's 401. Only valid JWTs proceed.

java


java package com.zero.trust.demo.config;


java import org.springframework.web.filter.OncePerRequestFilter;


java import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.web.*; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;


java //few importing missing refer git hub as i am getting error to copy the all imports


javascript

@Configuration public class ZeroTrustSecurityConfig {

@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
    http.csrf(AbstractHttpConfigurer::disable)
            .authorizeHttpRequests(req -> req
                    .requestMatchers("/health").permitAll()
                    .anyRequest().authenticated())
            .addFilterBefore((Filter) new TokenFilter(), UsernamePasswordAuthenticationFilter.class);
    return http.build();
}

static class TokenFilter extends OncePerRequestFilter {
    @Override
    protected void doFilterInternal(HttpServletRequest req,
                                    HttpServletResponse res,
                                    FilterChain chain)
            throws ServletException, IOException {

        String auth = req.getHeader("Authorization");
        if (auth == null || !auth.startsWith("Bearer ")) {
            res.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Missing token");
            return;
        }
        String jwt = auth.substring(7);
        IdentityServiceManager manager = new IdentityServiceManager("user-service");
        if (!manager.verifyTokenData(jwt)) {
            res.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Invalid token");
            return;
        }
        Authentication a = new UsernamePasswordAuthenticationToken("service", null, List.of());
        SecurityContextHolder.getContext().setAuthentication(a);
        chain.doFilter(req, res);
    }
}

}

## Dynamic Secrets using Vault Simulator

In the real world, we will use HashiCorp Vault. But locally, we simulate rotating DB credentials in-memory every minute.

java


javascript package com.zero.trust.valut;

import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import java.util.UUID;

@Component public class VaultServ { private String username = "dbuser"; private String password = UUID.randomUUID().toString();

@Scheduled(fixedRate = 60000)
public void rotate() {
    password = UUID.randomUUID().toString();
    System.out.println("[VaultSim] Rotated password -> " + password);
}

public String getUsername() { return username; }
public String getPassword() { return password; }

}


java

\
## Gateway Code

The Gateway generates a JWT with its own identity and connects to the User Service over mutual TLS. The User Service then authenticates both the token and the certificate — ensuring that only trusted, verified services can communicate.

java


javascript package com.damu;

import com.zero.trust.common.IdentityServiceManager; import org.springframework.boot.; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; import org.springframework.web.bind.annotation.; import org.springframework.web.client.RestTemplate; import org.springframework.http.*;

@SpringBootApplication @RestController public class Main {

public static void main(String[] args) {
    SpringApplication.run(Main.class, args);
}

@Bean
public RestTemplate restTemplate() { return new RestTemplate(); }

private final IdentityServiceManager identity = new IdentityServiceManager("gateway-service");
private final RestTemplate rest = new RestTemplate();

@GetMapping("/gatewaytest")
public String test() {
    String token = identity.generateTokenData();
    HttpHeaders h = new HttpHeaders();
    h.set("Authorization","Bearer "+token);
    HttpEntity<Void> entity = new HttpEntity<>(h);
    ResponseEntity<String> res = rest.exchange(
            "https://localhost:8443/api/users/1",
            HttpMethod.GET, entity, String.class);
    return "Gateway → " + res.getBody();
}

}


java ```

Check out our GitHub for a more detailed flow.

Zero-Trust is not a current trend, but rather an attitude . This end-to-end demo will show you how to implement this with pure Java and Spring Boot. This end-to-end demo will show you how to implement this with pure java and spring boot.

\

黑客午报:以下是您如何编写代码并帮助社区 (11/18/2025)

2025-11-19 00:03:06

How are you, hacker?


🪐 What’s happening in tech today, November 18, 2025?


The HackerNoon Newsletter brings the HackerNoon homepage straight to your inbox. On this day, A Weird Monolith was Found in the Utah Desert in 2020, NASA launched the MAVEN probe to Mars in 2013, Disney’s Steamboat Willie was released in 1928, and we present you with these top quality stories. From Final Project Report 1: Schema Evolution Support on Apache SeaTunnel Flink Engine to Heres How You Can Code It Forward and Help Out Your Community, let’s dive right in.

Researchers Develop AI to Spot Early Signs of Cerebral Palsy in Infants


By @yuliabusygina [ 10 Min read ] Researchers at Saint Petersburg State Pediatric Medical University developed an AI solution for assessing infant brain development from MRI scans. The solution Read More.

Heres How You Can Code It Forward and Help Out Your Community


By @zachflower [ 6 Min read ] I thought Id share some of the lessons learned and highlight different ways that my former peers can lend their expertise to the next generation of engineers. Read More.

The AI Reality Gap: What 11 Professionals Revealed About AI at Work That MIT Studies Wont Tell You


By @alexwrites [ 9 Min read ] The article covers a series of interviews with professionals and reflects their views on where AI really stands in todays business landscape. Read More.

Final Project Report 1: Schema Evolution Support on Apache SeaTunnel Flink Engine


By @williamguo [ 4 Min read ] This new feature ensures seamless schema updates for CDC data sources, enhancing flexibility and data consistency. Read More.

Google to Invest $40 Billion in Texas for Cloud and AI Infrastructure


By @toptechcompanies [ 1 Min read ] The investment includes new data center campuses in Armstrong and Haskell Counties and a $30 million Energy Impact Fund. Read More.


🧑‍💻 What happened in your world this week?

It's been said that writing can help consolidate technical knowledge, establish credibility, and contribute to emerging community standards. Feeling stuck? We got you covered ⬇️⬇️⬇️


ANSWER THESE GREATEST INTERVIEW QUESTIONS OF ALL TIME


We hope you enjoy this worth of free reading material. Feel free to forward this email to a nerdy friend who'll love you for it.See you on Planet Internet! With love, The HackerNoon Team ✌️


您还拥有 NFT 吗?数据说明了数字收藏品的现状

2025-11-19 00:00:04

Hey Hackers!

\ Welcome back to 3 Tech Polls, HackerNoon's Weekly Newsletter that curates results from our Poll of the Week, and 2 related polls around the web. Thank you for having voted in our polls in the past.

This week, we’re talking about a subject that has seemingly come and gone: NFTs.

Just a few years ago, they were all the rage. In 2022, Justin Bieber bought one for $1.3 million. Paris Hilton and Jimmy Fallon discussed NFTs on The Tonight Show. Even U.S. President Donald Trump got in on the action.

But the hype for NFTs has seemingly gone away; according to a report from dappGambl, 95% of NFTs are now worthless. So, where does the HackerNoon community stand on all of this? Well, let’s look at the results.

\

:::tip Vote in this week’s poll: Would you use a smart toilet that analyzes your waste for health insights?

:::

\

HackerNoon Poll: Do You Still Own NFTs?

\

It's been a few years since the world was in an NFT craze, and it seems that many people have moved on. However, there are still some who believe in NFTs. So, the question remains, do you still own NFTs?

\

We asked the question: Do you still own NFTs? More than 240 people responded, letting us know whether they were still on the hype train or not.

42% of voters declared that they never liked NFTs to begin with. 26% of voters are still actively interested in them. 20% are definitely done with them. And lastly, 12% still own some but no longer care for them.

So, it appears that 74% of all voters don’t want anything to do with NFTs, while 26% still care. That’s the HackerNoon community’s stance on the whole subject, but what does the rest of the web think? Let’s find out.

\

:::tip Want to say your piece? Share your thoughts on the poll results here.

:::

\

🌐 From Around the Web: Polymarket Pick

What floor price will CryptoPunks hit in 2025?

The last time CryptoPunks’ floor price was above 60 ETH was in January 2024. The last time it was above 70 ETH was in August 2022. And the last time it surpassed 100 ETH was in October of 2021.

https://nftpricefloor.com/cryptopunks

It seems unlikely that it will go over 70 or 100 ETH this year. However, it did get close to reaching 60 ETH. On August 12th, CryptoPunks’ floor price hit 53 ETH. So, it is somewhat conceivable that CryptoPunks reaches 60 ETH before the end of the year.

\

🌐From Around The Web: Kalshi Pick

Will Donald Trump launch an NFT this year?

We’ve already discussed how President Trump has sold NFTs in the past, but people are wondering if that’s a business venture he would pursue once again. According to Kalshi voters, there’s a 1% chance that President Trump launches an NFT by the end of the year. There’s only a little over a month before 2026 arrives, so it seems unlikely that we’ll see some sort of presidential NFT before the new year.

\ That’s it for this week, folks. Until next time!

研究人员开发人工智能,发现婴儿脑瘫的早期症状

2025-11-18 23:57:27

Brain MRIs play a vital role in diagnosing serious health conditions in infants, from tumors to neurodegenerative diseases. Detecting abnormal brain development during infancy can guide early interventions that may prevent or reduce the impact of conditions like cerebral palsy. However, scanning such young patients carries risks, as the procedure requires general anesthesia. That's why doctors need tools that speed up diagnosis, reduce risks, and make timely, informed decisions.

\n Researchers at the Saint Petersburg State Pediatric Medical University partnered with the Yandex School of Data Analysis (SDA) and the Yandex Cloud Center for Technologies and Society to develop an AI solution for assessing infant brain development from MRI scans. For suspected cases of cerebral palsy and other central nervous system disorders, the solution acts as a decision-support tool, reducing MRI analysis time from several days to just minutes.

\n My name is Yulia Busygina, and I'm the project lead at Yandex Cloud. Together with Professor Alexander Pozdnyakov, I'll take you behind the scenes — and share how we designed the AI solution, trained the model, and tested it to see how it performs in real-world scenarios. To learn more about the project, check out our Github.

Why MRI scans are critical for infants

An infant's brain develops at an incredible pace, changing almost week by week during the first year of life. But it’s not just about getting bigger — the brain is also going through critical processes collectively known as cerebral development. One of the most important of these is myelination.

\

Myelination is the formation of a lipid-rich sheath around nerve fibers, which increases lipid content and reduces water. This process begins in the fifth month of fetal development and continues at full pace until about age two.  In the central nervous system, myelin is found mainly in white matter, where it acts as an electrical insulator.

Healthy myelination allows for a rapid, reliable communication between neurons in the later years. If the brain develops more slowly than expected, it can lead to developmental delays. Тhe human brain is a complex system that requires careful attention from the very first days of life. Disorders can arise if brain growth is either too slow or too fast. \n \n Moreover, the complexity goes beyond growth rate. In some conditions, the brain's volume remains unchanged while its tissue density shifts. Whether myelination is abnormally slow or excessively fast (hypermyelination), it can create conditions that lead to neurological disorders.

— Alexander Pozdnyakov, MD, Professor and Head of the Department of Medical Biophysics, Saint Petersburg State Pediatric Medical University.

\ Infants with abnormally slow myelination have a higher risk of developing cerebral palsy. Cerebral palsy is one of the leading causes of childhood disability that affects 2–3 out of every 1,000 newborns. Monitoring cerebral maturation in the first six months of life can be crucial for timely intervention. For patients at risk, acting quickly with the right therapies and rehabilitation can prevent damage and halt cell death.

\

Some patients present with conditions that are poorly understood and difficult to classify. But even in these cases, we can anticipate risks and safely intervene in brain development.

Such interventions may include medication or brain-stimulation techniques to accelerate maturation when needed, or slow it to normal levels when it's abnormally fast.

— Alexander Pozdnyakov, MD, Professor and Head of the Department of Medical Biophysics, Saint Petersburg State Pediatric Medical University.

\ On MRI scans, myelinated white matter stands out clearly from areas where myelination is incomplete. In patients under 12 months, however, distinguishing white matter from gray matter is often difficult. This is important because gray matter forms the cerebral cortex, the brain's hub for cognitive processes.

When radiologists analyze MRI scans during this stage of brain development, they face two main challenges:

\

  1. Differentiating between white matter and gray matter.

  2. Determining the volume of gray matter and white matter.

    \

Through radiologists’ analysis, clinicians can study how nerve cells move through white matter toward the cortex, creating the brain's neural pathways. Observing these changes over time reveals whether the cortex is thinning or thickening and if the white matter is fully developed.

\ This is the type of image radiologists usually work with. Without a trained eye, the boundary between white matter and gray matter is difficult to distinguish.

\ For infants, an MRI is ordered by the attending physician only when there are serious clinical indications. These may include birth-related nervous system injury, brain trauma, seizures, or suspected epilepsy. Because patients under six years of age require general anesthesia to stay still during the procedure, MRIs are performed on young children only when truly necessary.

Here's how the procedure usually goes:

\

  1. The medical team places the patient under general anesthesia, positions them in the MRI scanner, and captures the images. The procedure typically takes about 30 minutes but can last up to 40–50 minutes.

    \

  2. These images are then processed. A specialist can calculate the volumes of white matter and gray matter using a three-axis formula. Clinical guidelines define the timeframe for this analysis, which can take up to 72 hours in complex cases.

If it's a follow-up scan, the analysis takes even longer because the data must be evaluated against previous results from different time points.

How AI can help

Existing methods for assessing brain myelination in children under one year old often involve subjective factors. Experienced radiologists can usually determine from the images whether the white matter volume is sufficient. In straightforward cases, 30 minutes to 2 hours of review directly at the MRI console is adequate, and AI is not needed.

The task becomes much more challenging when radiologists need to compare several studies over time. Even a single brain MRI involves reviewing multiple images (at least 22 slices). In complex cases, analyzing more than a thousand images may be necessary, making it impossible to review everything quickly.

Computer vision can help radiologists by flagging areas where changes in the contours of white matter and gray matter are most likely. This could also serve as an invaluable training aid for junior doctors and residents. This solution provides several benefits for early-age scanning: \n

  • Speed up the analysis process.

  • Optimize follow-up schedules to ensure scans are performed only as often as needed, avoiding unnecessary anesthesia.

  • Enhance radiologists’ capacity to examine more patients.

    \

At first glance, it might seem like we could simply reuse available open-source datasets and pretrained models for this purpose. \n

After all, similar problems have already been tackled using AI in machine learning competitions. For example, the 2019 MICCAI Grand Challenge focused on segmenting MRI images of infant brains under six months. Developers from around the world attempted to solve the challenge using the iSeg-2019 dataset.

\ However, the existing dataset lacked the necessary annotations — the segmentation masks that identify which areas of an image correspond to gray matter or white matter. The iSeg-2019 dataset included only 15 annotated images, while the university's six-year archive contained MRI scans from 1500 patients with no annotations at all.

This meant our first step was preparing the data.

How to turn MRI scans into a dataset for machine learning

The Yandex Cloud team came up with a cloud-based application architecture, helped select the right tools, and assisted with configuring and testing the final web service. Guided by mentor Arseniy Zemerov, students from the Yandex School of Data Analysis handled the core ML tasks: choosing the neural network architecture, running experiments, and training the model on the annotated data. The most complex task — data annotation — was a true team effort, with expert radiologists from the Saint Petersburg State Pediatric Medical University providing critical expertise.

Here's a high-level overview of the data pipeline.

\n Let's look at the first stage.

\ Loading the raw data. MRI scans are stored in a picture archiving and communication system (PACS) designed for managing medical images in DICOM format. This system archives and processes anonymized scans, which form the core of the model's training dataset. To deploy this system, we set up a virtual machine in Yandex Compute Cloud. We uploaded anonymized MRI studies of children under 12 months from the university's archive, together with the iSeg-2019 data.

Each study is a collection of MRI images captured in different modes: T1, T2, FLAIR, and DWI. These modes highlight different tissue characteristics, helping clinicians better differentiate between various conditions (for details, see this article). To meet these requirements, this system stores additional metadata and treats multiple MRI slices as a single, unified study. This ensures that no personal data is stored on the server because we work only with an anonymized dataset.

\ Annotating the collected data. For patients over a year old, radiological brain images can be annotated using automated tools such as the open-source 3D Slicer, which calculates white matter and gray matter volumes. However, these methods are not effective for younger patients. On MRI scans of newborns, even seasoned radiologists may find it hard to distinguish white matter from gray matter, making annotation a meticulous, pixel-by-pixel task.

Initially, we planned for expert radiologists to annotate the raw data from scratch, but the process proved far too time-consuming: a single study with just a few slices could take eight hours or more. With this manual approach, the experts annotated about 30 studies, each containing three slices. \n

Brain MRI with annotation overlay

\ To accelerate the process, our ML specialists proposed performing pre-annotation using an open-source model called Baby Intensity-Based Segmentation Network (BIBSNet). The network is based on the nnU-Net framework and is designed to identify white matter and gray matter.

After reviewing the pre-annotation results, we found there was still plenty of room to improve many of the metrics. The inference time for a single volume was about 2.5 minutes. To accelerate the process, the team scaled up the computations:

\

  • The BIBSNet Docker container was adapted for parallel execution.

  • The container was deployed on 20 virtual machines, each processing data independently.

    \

This cut the pre-annotation time for the entire dataset, making it possible to assess the algorithm's performance on it. According to our expert radiologists, pre-annotations were useful in 40% of cases, and that alone helped reduce the manual workload. Our ML specialists also benchmarked BIBSNet’s performance in segmenting gray matter (GM) and white matter (WM) on T1-weighted (sagittal) and T2-weighted (axial) MRI scans.

*Intersection over Union (IoU, or Jaccard Index) is a metric used to evaluate the similarity between two sets: the predicted region and the ground-truth region.

As a result, pre-annotation helped us build an annotated dataset of about 750 slices. This was enough to train and evaluate machine learning models for segmentation and detection. Before running the experiments, we split the dataset into training and validation sets, using the latter to check our metrics.

\

Inside our model training experiments

Initially, we planned to try a more advanced architecture, the Vision Transformer. However, we soon realized that this architecture was well-suited for healthcare purposes. The model was prone to hallucinations, which could do more harm than good.

So, we chose a segmenter built from two types of neural networks:

\

  1. Convolutional neural networks serve as feature extractors (backbones), adapting well to tasks beyond classification (such as segmentation).
  2. Architectures explicitly developed for medical imaging, with the U-Net as the primary choice.

\ The Yandex School of Data Analysis team aimed to develop a segmentation model that could be as accurate as BIBSNet but deliver a much faster inference time.

To achieve this, the students ran a series of experiments on the iSeg-2019 dataset. For the neural network architectures, they examined U-Net, U-Net++, and DeepLabV3. For the feature extraction backbones, they tested ResNet-50, ResNet-101, ResNeXt-50, ResNeXt-101, and DenseNet-161.

During the experiments, the team tried several approaches:

\

  1. Training purely on target slices (2D):

    We trained a 2D segmentation model exclusively on manually annotated slices (the initial 30 studies).

    However, the small amount of training data limited the model's capacity to generalize.

    \

  2. Training on combined iSeg-2019 and target data (3D):

    The model was trained on a combined dataset that included the fully annotated iSeg-2019 data and our target data.

    For slices in the target studies without annotations, we applied a mask that zeroed out their contribution to the loss function. This ensured that only annotated slices from the target data were used, preventing errors during training.

What we discovered

Here's what our experiments with different feature extraction backbones showed:

Gray matter segmentation metrics by backbone

\ \ White matter segmentation metrics by backbone

\ Validation loss curves by backbone

training loss curves by backbone

Experiments with the network architecture:

Gray matter segmentation metrics by network architecture

White matter segmentation metrics by network architecture

\ The best-performing experiment was training a U-Net with a ResNeXt50 backbone using the DiceLoss function.

Here's how the model performs on the validation set. Original study from the validation set:

\

Example output from the algorithm

Final metrics:

| \n | iou void | iou GM | iou WM | iou mean | |----|----|----|----|----| | unetresnext5032x4ddice1 | 0.981 | 0.629 | 0.501 | 0.703 |

The inference speed of the trained neural network running on a CPU is about 3 seconds.

How it currently works

Our solution, now available on GitHub, was designed as a web service for radiologists performing MRI scans on infants. They can upload the acquired files to the service right after the procedure. The system anonymizes the uploaded data, removing all personally identifiable information, such as the patient's name, from the records.

The solution automatically identifies gray matter and white matter areas on each MRI slice, providing predictions with confidence scores.

The service is primarily morphometric, meaning it measures tissue volumes. Once processing is complete, users see the model's predicted volumes of gray matter, white matter, and cerebrospinal fluid, along with descriptions of the largest structures.

\ From the summary table, you can select a specific study to view the scan with the white matter and gray matter masks applied.

Our experiments show an accuracy of over 90%. We expect this figure to improve as we expand the dataset and continue fine-tuning the model, which was initially trained on limited data.

Looking ahead, the project's roadmap goes beyond basic segmentation. Our next step is to calculate the GM-to-WM ratio, which can provide clinicians with deeper insights.

The neural network has been tested at the Saint Petersburg State Pediatric Medical University, and the researchers are ready to share their findings with other medical institutions. The solution reduces MRI interpretation time for radiologists from several days to just a few minutes.

Once testing is complete, we plan to release the solution as open source for use in medical institutions and research projects worldwide. The solution also has significant scientific potential. Because infant brain volumes weren't previously measured at scale, no fundamental studies have yet examined changes in brain volume across large cohorts. For various conditions and pathologies, this research can help refine medical care standards. \n