IGraphInferenceModel<T>

Interfaces ยท AiDotNet.Interfaces

Marker interface for models that support graph-aware inference: bind an adjacency matrix, forward node features, get per-node predictions. Implemented by NodeClassificationModel and any custom GNN (GCN, GAT, GraphSAGE, etc.) that follows the same shape.

Known implementations: NodeClassificationModel<T>

How It Works

Introduced to replace the concrete-class gate in AiModelResultGraphExtensions โ€” extension methods now gate on this interface so custom GNN subclasses can plug in without deriving from NodeClassificationModel.

Methods

Method Summary
Tensor<T> ForwardOnGraph(Tensor<T> nodeFeatures) Runs a forward pass through the network.
void SetAdjacencyMatrix(Tensor<T> adjacencyMatrix) Binds the graph structure into every graph-convolutional layer prior to inference.