MATIH Platform is in active MVP development. Documentation reflects current implementation status.
15. Workbench Architecture
DNN Builder

DNN Builder

The Deep Neural Network Builder at frontend/ml-workbench/src/components/DNNBuilder/ provides a visual interface for designing neural network architectures with a layer palette, interactive graph editor, conversational AI builder, and code generation.


Components

ComponentFilePurpose
DNNBuilder (index)index.tsxMain builder layout with panels
LayerPaletteLayerPalette.tsxDraggable layer type catalog
NetworkGraphNetworkGraph.tsxReact Flow graph for network topology
LayerNodenodes/LayerNode.tsxCustom React Flow node for layers
LayerPropertyPanelLayerPropertyPanel.tsxLayer configuration side panel
ConversationalBuilderConversationalBuilder.tsxAI chat for network design
CodeEditorCodeEditor.tsxGenerated PyTorch/TensorFlow code

Layer Catalog

File: frontend/ml-workbench/src/components/DNNBuilder/layerCatalog.ts

Pre-defined layer types with default configurations:

CategoryLayers
InputInput, Embedding
CoreDense, Dropout, BatchNorm
ConvolutionConv1D, Conv2D, Conv3D
RecurrentLSTM, GRU, Bidirectional
PoolingMaxPool, AvgPool, GlobalPool
AttentionMultiHeadAttention, SelfAttention
NormalizationLayerNorm, GroupNorm
OutputSoftmax, Sigmoid, Linear

DNN Builder State

File: frontend/ml-workbench/src/stores/dnnBuilderStore.ts

Zustand store managing the network topology:

interface DNNBuilderState {
  layers: LayerConfig[];
  connections: Connection[];
  selectedLayerId: string | null;
  addLayer: (layer: LayerConfig) => void;
  removeLayer: (layerId: string) => void;
  updateLayerConfig: (layerId: string, config: Partial<LayerConfig>) => void;
  addConnection: (from: string, to: string) => void;
}

ConversationalBuilder

AI-powered network design through natural language:

User: "Build a CNN for image classification with 3 conv layers"
AI: Creates Conv2D -> MaxPool -> Conv2D -> MaxPool -> Conv2D -> Flatten -> Dense -> Softmax

WebSocket Integration

File: frontend/ml-workbench/src/hooks/useDNNWebSocket.ts

Real-time training progress and architecture validation via WebSocket.