About This Reference
This document covers every component available in BCILattice's three designer environments: NeuralFlow (timeline/paradigm designer), MLFlow (ML Suite node-graph), and the Workflow Designer (orchestration graph).
| Designer | Total Blocks | Categories |
|---|
| NeuralFlow | 28 | 6 (State, Motor Imagery, Motor Action, Cognitive, Cue/Feedback, Control/Utility) |
| MLFlow (ML Suite) | 5,409+ | 24 CSV categories + Pipeline Blocks + Analysis |
| Workflow Designer | 5,412+ | All MLFlow + 3 workflow-only blocks |
Part 1, NeuralFlow Block Types
NeuralFlow is BCILattice's timeline-based paradigm designer. Blocks are arranged left-to-right to define the temporal sequence of a BCI experiment. Each block represents one epoch type, a control marker, or a structural element.
Every block has three editable properties: Label (display name), Label Code (integer sent to EEG hardware as epoch marker), and Duration in seconds (1–600). Special control blocks have reserved codes.
All 28 Block Types
| Block Name | Category | Default Code | Color | Description |
|---|
| Rest | State | 0 | #3d5a80 | Baseline/rest epoch. Subject at rest, used as the reference class. |
| Activity | State | 0 | #98c1d9 | General activity epoch for an unspecified active task. |
| MI Left Hand | Motor Imagery | 1 | #e63946 | Motor imagery of left hand movement. Standard 4-class MI paradigm. |
| MI Right Hand | Motor Imagery | 2 | #457b9d | Motor imagery of right hand movement. |
| MI Feet | Motor Imagery | 3 | #2a9d8f | Motor imagery of feet movement. |
| MI Tongue | Motor Imagery | 4 | #e9c46a | Motor imagery of tongue movement. |
| Walk | Motor Action | 0 | #f4a261 | Active walking task for gait/locomotion BCI. |
| Run | Motor Action | 0 | #e76f51 | Running or fast movement task. |
| Grip | Motor Action | 0 | #264653 | Hand grip / squeeze action. |
| Jump | Motor Action | 0 | #2a9d8f | Jump action block for lower-limb research. |
| Attention | Cognitive | 0 | #6a0572 | Sustained attention task epoch. |
| Memory | Cognitive | 0 | #ab83a1 | Working memory task (e.g., n-back). |
| Relaxation | Cognitive | 0 | #5f7c8a | Relaxation / mindfulness epoch, alternative to Rest. |
| Math Task | Cognitive | 0 | #cb4335 | Mental arithmetic, often used in SSVEP or ERP paradigms. |
| Visual Search | Cognitive | 0 | #1a5276 | Visual attention / search paradigm. |
| Mental Rotation | Cognitive | 0 | #117a65 | Mental rotation cognitive task. |
| Visual Cue | Cue/Feedback | 0 | #f39c12 | Visual stimulus presented to subject, triggers epoch onset. |
| Auditory Cue | Cue/Feedback | 0 | #8e44ad | Auditory beep or tone as a cue. |
| Tactile Cue | Cue/Feedback | 0 | #1abc9c | Vibrotactile or haptic cue. |
| Olfactory Cue | Cue/Feedback | 0 | #e67e22 | Olfactory (smell) stimulus. |
| Visual Feedback | Cue/Feedback | 0 | #2ecc71 | Closed-loop visual feedback after classification. |
| Auditory Feedback | Cue/Feedback | 0 | #3498db | Auditory feedback tone after classifier output. |
| Haptic Feedback | Cue/Feedback | 0 | #e91e63 | Haptic feedback after classification. |
| Start Trial | Control | -1 (reserved) | #ff5252 | Reserved code -1. Signals trial start to acquisition hardware. |
| End Trial | Control | -2 (reserved) | #ff5252 | Reserved code -2. Signals trial end. |
| Marker (LSL/TTL) | Control | -3 (reserved) | #ffab40 | Reserved code -3. Sends LSL event or TTL trigger for hardware sync. |
| Fixed Time | Utility | 0 | #607d8b | Fixed-duration blank period. Used for inter-trial intervals (ITI). |
| Loop Block | Utility | -4 (reserved) | #9c27b0 | Reserved code -4. Container that repeats sub-blocks. Duration computed. |
Loop Block, Detail
The Loop Block is a container that repeats a set of sub-blocks. It cannot be nested inside another Loop Block. Duration is auto-computed as: sum(sub_duration × sub_repeat) × total_repeat.
| Inspector Field | Type | Description |
|---|
| Label | str | Display name for the loop container |
| Label Code | int | Always -4 (reserved, signals loop start) |
| Total Repeat | int 1–100 | How many times the entire loop runs |
| Sub-Block (row) | dropdown | Select an existing block on the canvas |
| Sub-Block Repeat | int 1–1000 | Per-sub-block repeat within one loop iteration |
Part 2, MLFlow (ML Suite) Components
The ML Suite canvas is a node-graph pipeline builder. Drag blocks onto the canvas, connect ports, then Compile and Train. All blocks have typed input/output ports that are validated at compile time. The catalog is loaded from pipeline_catalog_final2.csv at runtime.
Pipeline Blocks (Built-in)
These blocks are injected at runtime, not from the CSV catalog. Available in both MLFlow and Workflow.
| Block | Inputs | Outputs | Key Parameters | Purpose |
|---|
| Input Block | , | Data (Any) | port_name = "In_1" | External input port. Data is passed in here when the pipeline is called. |
| Output Block | Data (Any) | , | port_name = "Out_1" | External output port. Returns data when the pipeline finishes. |
| Loop Block | Loop Input | Loop Output | iterations=1, start_node, end_node, mode=Epoch | Repeats a subgraph. Modes: Sequential (all data at once) or Epoch (one epoch per iteration). |
| Custom Code | Data (Any) | Result (Any) | code (code editor) | Execute arbitrary Python. Write def custom_process(data): return data. |
Analysis Blocks (Custom)
| Block | Inputs | Outputs | Parameters | Purpose |
|---|
| Channel Selection | Data, Labels | Selected Data, Selected Channels, Scores | method_name, rest_label=0, percentile=5, ignore_classes | Statistical channel ranking. Removes least-discriminative channels based on t-Value, ANOVA, etc. |
| Custom Labels | Data | Labels | label_file, manual_labels | Attach or override class labels from a file or comma-separated string. |
| Signal Projection | Data | Projected Images, Shape | method_name, image_size=64 | Converts 1-D EEG/fNIRS time-series to 2-D images (GAF, MTF, or Recurrence Plot) for CNN input. |
BCI EEG Models
Custom EEG architectures built with PyTorch. Module: nm_models.bci_eeg.
| Model | Key Parameters | Description |
|---|
| ATCNet | n_channels=22, n_classes=4, eegnet_F1=16, tcn_depth=2, dropout=0.3 | Attention Temporal Convolutional Network. Combines EEGNet, TCN, and multi-head attention. |
| EEGNet | n_channels=64, n_classes=4, F1=8, D=2, dropout=0.5, kernel_length=64 | Compact depthwise separable CNN. The standard BCI baseline, low parameter count. |
| DeepConvNet | n_channels=64, n_classes=4, n_filters_start=25, dropout=0.5 | 4-stage temporal/spatial convolution blocks. Strong for raw EEG. |
| ShallowConvNet | n_channels=64, n_classes=4, n_filters=40, filter_length=25, pool_length=75 | Shallow CNN baseline. Strong for oscillatory BCI signals. |
| EEGConformer | n_channels=22, n_classes=4, n_filters=40, depth=6, attn_heads=8 | CNN + self-attention Conformer architecture for EEG. |
Sequence & Transformer Models
| Model | Module | Description |
|---|
| BiLSTMClassifier | nm_models.sequence | Bidirectional LSTM, captures forward and backward temporal dependencies. |
| GRUClassifier | nm_models.sequence | Gated Recurrent Unit, lighter than LSTM, similar accuracy. |
| LSTMClassifier | nm_models.sequence | Standard LSTM for temporal EEG sequences. |
| TCNClassifier | nm_models.sequence | Temporal Convolutional Network with dilated causal convolutions. |
| MambaSSM | nm_models.sequence | State Space Model (Mamba), linear-time sequence modelling, new SOTA option. |
| EEGTransformer | nm_models.transformers | Multi-head self-attention encoder for EEG classification. |
| BrainBERT | nm_models.transformers | BERT architecture pre-trained on large EEG corpora. |
| PatchTST | nm_models.transformers | Patch-based Transformer, segments EEG into patches for efficient attention. |
| ViTEEG | nm_models.transformers | Vision Transformer applied to 2-D EEG spectrograms. |
Edge & GPT Models
| Model | Module | Description |
|---|
| MobileEEGNet | nm_models.edge | MobileNet-style EEGNet variant. <50K parameters, Raspberry Pi compatible. |
| QuantizedEEGNet | nm_models.edge | INT8-quantized EEGNet for MCU / Jetson edge deployment. |
| TinyEEGNet | nm_models.edge | Ultra-compact EEGNet for extreme edge targets. |
| GPT2BCI | nm_models.gpt_models | GPT-2 (gpt2/gpt2-medium/gpt2-large) adapted for EEG sequence classification. Param: gpt2_size. |
| BioGPTBCI | nm_models.gpt_models | BioGPT backbone fine-tuned for BCI token classification. |
| LaBraMBCI | nm_models.gpt_models | LaBraM large-scale BCI foundation model. |
| MiniGPT / TinyGPT | nm_models.gpt_models | Compact GPT variants for low-resource and edge deployment. |
Feature Selection, sklearn.feature_selection (19 blocks)
| Block | Key Parameters | Purpose |
|---|
| SelectKBest | score_func=f_classif, k=10 | Select top-k features by univariate score. |
| SelectPercentile | score_func=f_classif, percentile=10 | Select top percentile of features. |
| RFE | n_features_to_select, step=1 | Recursive Feature Elimination, wraps any estimator. |
| RFECV | step=1, cv=None, scoring=None | RFE with cross-validation to select optimal feature count. |
| SelectFromModel | threshold, prefit=False | Feature importance threshold from a fitted model. |
| VarianceThreshold | threshold=0.0 | Remove features with low variance. |
| SequentialFeatureSelector | n_features_to_select="auto", direction="forward", cv=5 | Forward or backward sequential selection. |
| mutual_info_classif | n_neighbors=3, discrete_features="auto" | Mutual information score for classification. |
| f_classif / chi2 / f_regression | , | Scoring functions for use with SelectKBest, SelectFdr, etc. |
Cross Validation, sklearn.model_selection (32 blocks)
| Block | Key Parameters | Purpose |
|---|
| GridSearchCV | scoring, cv, n_jobs, refit=True | Exhaustive hyperparameter search. |
| RandomizedSearchCV | n_iter=10, scoring, cv | Randomised hyperparameter search. |
| KFold | n_splits=5, shuffle=False | K-fold cross-validator. |
| StratifiedKFold | n_splits=5, shuffle=False | Stratified K-fold (preserves class proportions). |
| LeaveOneOut | , | Leave-one-subject-out, common in BCI benchmarks. |
| GroupKFold | n_splits | Group-stratified K-fold (no group overlap across folds). |
| cross_val_score | cv=5, scoring, n_jobs | Evaluate model with cross-validation, return scores. |
Dimensionality Reduction, sklearn.decomposition (33 blocks)
| Block | Key Parameters | Purpose |
|---|
| PCA | n_components, whiten=False, svd_solver="auto" | Principal Component Analysis, most common EEG dim reduction. |
| FastICA | n_components, algorithm="parallel", whiten=True, max_iter=200 | Independent Component Analysis, used in EEG artifact removal. |
| NMF | n_components, init, max_iter=200 | Non-negative Matrix Factorisation. |
| KernelPCA | n_components, kernel="linear", gamma, degree | Non-linear PCA via kernel trick. |
| IncrementalPCA | n_components, whiten=False, batch_size | Memory-efficient PCA for large datasets. |
| TruncatedSVD | n_components=2, algorithm="randomized" | Truncated SVD (LSA), works on sparse matrices. |
| FactorAnalysis | n_components, max_iter=1000, tol=0.01 | Generative linear model for latent factor extraction. |
ML Linear, sklearn.linear_model (44 blocks)
Classifiers and regressors based on linear models. Key BCI-relevant blocks:
| Block | Key Parameters | Use in BCI |
|---|
| LogisticRegression | C=1.0, solver, max_iter=100, multi_class | Binary and multi-class EEG classification. |
| LinearDiscriminantAnalysis | solver, shrinkage, n_components | LDA, classic BCI classifier, often matches deep learning on small datasets. |
| Ridge | alpha=1.0, fit_intercept=True | Regression with L2 regularisation. |
| SGDClassifier | loss, penalty, alpha, max_iter | Online learning for large BCI datasets. |
| SVC (via sklearn) | C, kernel, gamma, degree | Support Vector Classifier, strong baseline for EEG. |
ML Ensemble, sklearn.ensemble (48 blocks)
| Block | Key Parameters | Description |
|---|
| RandomForestClassifier | n_estimators=100, max_depth, min_samples_split | Ensemble of decision trees, fast and robust BCI baseline. |
| GradientBoostingClassifier | n_estimators=100, learning_rate=0.1, max_depth=3 | Sequential boosting, strong performance on tabular BCI features. |
| ExtraTreesClassifier | n_estimators=100, max_depth | Extra randomised trees, often faster than Random Forest. |
| AdaBoostClassifier | n_estimators=50, learning_rate=1.0 | Adaptive boosting. |
| BaggingClassifier | n_estimators=10, max_samples, bootstrap=True | Bootstrap aggregation with any base estimator. |
| VotingClassifier | estimators, voting="hard" | Ensemble voting across multiple different classifiers. |
ML Neighbors, sklearn.neighbors (24 blocks)
| Block | Key Parameters | Description |
|---|
| KNeighborsClassifier | n_neighbors=5, weights="uniform", algorithm="auto", metric="minkowski" | k-NN classifier, non-parametric, good for small BCI datasets. |
| KNeighborsRegressor | n_neighbors=5, weights, algorithm | k-NN regression. |
| RadiusNeighborsClassifier | radius=1.0, weights, algorithm | Classify based on neighbours within a fixed radius. |
| NearestNeighbors | n_neighbors=5, algorithm, metric | Unsupervised nearest neighbours for distance computation. |
| KDTree / BallTree | leaf_size=40, metric | Efficient spatial data structures for neighbour lookups. |
ML Clustering, sklearn.cluster (29 blocks)
| Block | Key Parameters | Description |
|---|
| KMeans | n_clusters=8, init="k-means++", n_init=10, max_iter=300 | k-Means, common for unsupervised BCI analysis. |
| DBSCAN | eps=0.5, min_samples=5, metric="euclidean" | Density-based clustering, no need to specify number of clusters. |
| AgglomerativeClustering | n_clusters=2, linkage="ward", metric | Hierarchical clustering. |
| GaussianMixture | n_components=1, covariance_type="full" | Probabilistic clustering via Gaussian mixture models. |
| SpectralClustering | n_clusters=8, affinity="rbf", n_init=10 | Graph-based spectral clustering. |
Preprocessing, sklearn.preprocessing / sklearn.impute (32 blocks)
| Block | Key Parameters | Description |
|---|
| StandardScaler | with_mean=True, with_std=True, copy=True | Zero-mean unit-variance normalisation, most common for BCI features. |
| MinMaxScaler | feature_range=(0,1), copy=True | Scale to [0, 1] range. |
| RobustScaler | with_centering=True, with_scaling=True, quantile_range=(25,75) | Scaler robust to outliers. |
| Normalizer | norm="l2", copy=True | Normalize each sample to unit norm. |
| LabelEncoder | , | Encode class labels as integers. |
| SimpleImputer | strategy="mean", missing_values=NaN | Replace missing values with mean/median/constant. |
| KNNImputer | n_neighbors=5, weights="uniform" | Impute missing values using k-nearest neighbours. |
Evaluation, sklearn.metrics (84 blocks)
Key metrics for BCI classification evaluation:
| Block | Key Parameters | Description |
|---|
| accuracy_score | normalize=True | Overall classification accuracy. |
| f1_score | average="binary", pos_label=1, zero_division="warn" | Harmonic mean of precision and recall. |
| roc_auc_score | average="macro", multi_class="raise" | Area under the ROC curve. |
| matthews_corrcoef | , | MCC, best single metric for imbalanced BCI datasets. |
| balanced_accuracy_score | adjusted=False | Accuracy adjusted for class imbalance. |
| cohen_kappa_score | weights=None | Inter-rater reliability / classification agreement beyond chance. |
| confusion_matrix | normalize=None | Per-class confusion table. |
| classification_report | digits=2, output_dict=False | Full precision/recall/F1 per class as text or dict. |
Model Interpretation, SHAP (63 blocks)
Module: shap. All 63 blocks provide SHAP-based explainability, attributing feature importance to individual predictions. Key explainers:
- TreeExplainer, for tree-based models (Random Forest, Gradient Boosting)
- DeepExplainer, for PyTorch/TensorFlow deep learning models
- LinearExplainer, for linear models (LDA, Logistic Regression)
- KernelExplainer, model-agnostic, any estimator
- GradientExplainer, gradient-based explanations for PyTorch models
- Explainer, unified auto-selecting explainer
- Visualisations: summary_plot, waterfall_plot, force_plot, bar_plot, beeswarm_plot
Signal Processing (MNE), 273 blocks
Module: mne. Key block groups:
| Group | Example Blocks |
|---|
| Raw I/O | RawArray, RawEDF, RawBDF, RawFIF, RawBrainVision, RawEEGLAB |
| Epochs & Events | Epochs, BaseEpochs, EvokedArray, Evoked, find_events, make_fixed_length_epochs |
| Preprocessing | ICA, Covariance, Annotations, set_eeg_reference, filter_data, notch_filter |
| Source Analysis | SourceEstimate, MixedSourceEstimate, make_forward_solution, minimum_norm |
| Spatial Filters | CSP, SPoC, LCMV, DICS, xDAWN |
| Time-Frequency | tfr_morlet, tfr_multitaper, tfr_stockwell, psd_welch |
| Connectivity | spectral_connectivity_epochs, phase_locking_value |
Signal Processing (General), 228 blocks
Libraries: pywt, scipy.signal, librosa.
- PyWavelets, dwt, wavedec, wavedec2, ContinuousWavelet, DiscreteWavelet, tree nodes
- SciPy signal, spectrogram, stft, hilbert, butter, sosfilt, filtfilt, correlate
- librosa, mfcc, chroma_stft, mel_spectrogram, spectral_centroid, zero_crossing_rate
Large Catalog Categories
| Category | Count | Module | Notes |
|---|
| Deep Learning Models | 3,376 | torchvision.models | Full PyTorch model zoo: ResNet, EfficientNet, ViT, ConvNeXt, Swin, DenseNet, MobileNet… Used after Signal Projection. |
| Computer Vision | 371 | cv2 (OpenCV) | Image processing for 2-D EEG projections: AKAZE, ORB, SIFT, filters, morphological ops, histograms. |
| Math Operations | 315 | scipy.linalg | LU, QR, SVD, Cholesky, eigenvalue solvers, matrix functions. |
| Data Manipulation | 173 | numpy | Array reshaping, concatenation, linear algebra: concatenate, reshape, transpose, dot, linalg.svd. |
| Deep Learning Layers | 167 | torch.nn | Conv1d/2d, LSTM, GRU, TransformerEncoder, MultiheadAttention, BatchNorm, Dropout, Linear, all activations. |
| Optimization | 16 | torch.optim | Adam, AdamW, SGD, RMSprop, Adagrad, Adadelta, NAdam, LBFGS, Rprop… |
| NLP | 46 | nltk | Stemmers, tokenisers, taggers for imagined speech BCI experiments. |
Part 3, Workflow Designer Components
The Workflow Designer shares all MLFlow blocks and adds three workflow-only blocks for file selection, REST API exposure, and result saving. It orchestrates multi-step processes across entire datasets rather than single training runs.
Workflow-Only Custom Blocks
| Block | Inputs | Outputs | Key Parameters | Purpose |
|---|
| Select Files | , | Files (Any) | modality, data_source, session, selected_files, selected_subjects | Data source selector. Picks which BCILattice session files or subjects feed into the workflow. |
| Graph Endpoint | Graph, Files | Response | endpoint_name, route="/api/workflow/graph/run", http_method=POST, output_path | Exposes the workflow as an HTTP API endpoint via FastAPI. Trigger a full workflow run from external apps. |
| Graph Output | Graph Data | Graph File | graph_name, save_path, image_format=png | Saves result charts (accuracy plots, feature importance) to disk in PNG, JPG, or PDF format. |
A typical complete workflow graph follows this pattern:
- Select Files → choose sessions, modality, and data source
- Channel Selection → rank and remove low-discriminability channels
- Preprocessing blocks → StandardScaler, feature extraction
- ML Pipeline → run a compiled MLFlow pipeline per file
- Evaluation blocks → accuracy, confusion matrix, F1 scores
- Graph Output → save result plots to disk
- Graph Endpoint (optional) → expose results via REST API
Summary
| Designer | Total Blocks | Source |
|---|
| NeuralFlow | 28 block types | Hardcoded in ComponentPalette (utils.py) |
| MLFlow (ML Suite) | 5,409+ | pipeline_catalog_final2.csv (5,396) + 13 custom |
| Workflow Designer | 5,412+ | All MLFlow + 3 workflow-only custom blocks |