DocsBCILattice Components Reference
Download DOCX
BCILattice Documentation

BCILattice Components Reference

Complete reference for all 28 NeuralFlow block types, 5,400+ MLFlow catalog blocks, and every Workflow Designer component.

v1.0BCINexus Platform · 2026-05-20support@bcinexus.io

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).

DesignerTotal BlocksCategories
NeuralFlow286 (State, Motor Imagery, Motor Action, Cognitive, Cue/Feedback, Control/Utility)
MLFlow (ML Suite)5,409+24 CSV categories + Pipeline Blocks + Analysis
Workflow Designer5,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 NameCategoryDefault CodeColorDescription
RestState0#3d5a80Baseline/rest epoch. Subject at rest, used as the reference class.
ActivityState0#98c1d9General activity epoch for an unspecified active task.
MI Left HandMotor Imagery1#e63946Motor imagery of left hand movement. Standard 4-class MI paradigm.
MI Right HandMotor Imagery2#457b9dMotor imagery of right hand movement.
MI FeetMotor Imagery3#2a9d8fMotor imagery of feet movement.
MI TongueMotor Imagery4#e9c46aMotor imagery of tongue movement.
WalkMotor Action0#f4a261Active walking task for gait/locomotion BCI.
RunMotor Action0#e76f51Running or fast movement task.
GripMotor Action0#264653Hand grip / squeeze action.
JumpMotor Action0#2a9d8fJump action block for lower-limb research.
AttentionCognitive0#6a0572Sustained attention task epoch.
MemoryCognitive0#ab83a1Working memory task (e.g., n-back).
RelaxationCognitive0#5f7c8aRelaxation / mindfulness epoch, alternative to Rest.
Math TaskCognitive0#cb4335Mental arithmetic, often used in SSVEP or ERP paradigms.
Visual SearchCognitive0#1a5276Visual attention / search paradigm.
Mental RotationCognitive0#117a65Mental rotation cognitive task.
Visual CueCue/Feedback0#f39c12Visual stimulus presented to subject, triggers epoch onset.
Auditory CueCue/Feedback0#8e44adAuditory beep or tone as a cue.
Tactile CueCue/Feedback0#1abc9cVibrotactile or haptic cue.
Olfactory CueCue/Feedback0#e67e22Olfactory (smell) stimulus.
Visual FeedbackCue/Feedback0#2ecc71Closed-loop visual feedback after classification.
Auditory FeedbackCue/Feedback0#3498dbAuditory feedback tone after classifier output.
Haptic FeedbackCue/Feedback0#e91e63Haptic feedback after classification.
Start TrialControl-1 (reserved)#ff5252Reserved code -1. Signals trial start to acquisition hardware.
End TrialControl-2 (reserved)#ff5252Reserved code -2. Signals trial end.
Marker (LSL/TTL)Control-3 (reserved)#ffab40Reserved code -3. Sends LSL event or TTL trigger for hardware sync.
Fixed TimeUtility0#607d8bFixed-duration blank period. Used for inter-trial intervals (ITI).
Loop BlockUtility-4 (reserved)#9c27b0Reserved 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 FieldTypeDescription
LabelstrDisplay name for the loop container
Label CodeintAlways -4 (reserved, signals loop start)
Total Repeatint 1–100How many times the entire loop runs
Sub-Block (row)dropdownSelect an existing block on the canvas
Sub-Block Repeatint 1–1000Per-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.

BlockInputsOutputsKey ParametersPurpose
Input Block,Data (Any)port_name = "In_1"External input port. Data is passed in here when the pipeline is called.
Output BlockData (Any),port_name = "Out_1"External output port. Returns data when the pipeline finishes.
Loop BlockLoop InputLoop Outputiterations=1, start_node, end_node, mode=EpochRepeats a subgraph. Modes: Sequential (all data at once) or Epoch (one epoch per iteration).
Custom CodeData (Any)Result (Any)code (code editor)Execute arbitrary Python. Write def custom_process(data): return data.

Analysis Blocks (Custom)

BlockInputsOutputsParametersPurpose
Channel SelectionData, LabelsSelected Data, Selected Channels, Scoresmethod_name, rest_label=0, percentile=5, ignore_classesStatistical channel ranking. Removes least-discriminative channels based on t-Value, ANOVA, etc.
Custom LabelsDataLabelslabel_file, manual_labelsAttach or override class labels from a file or comma-separated string.
Signal ProjectionDataProjected Images, Shapemethod_name, image_size=64Converts 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.

ModelKey ParametersDescription
ATCNetn_channels=22, n_classes=4, eegnet_F1=16, tcn_depth=2, dropout=0.3Attention Temporal Convolutional Network. Combines EEGNet, TCN, and multi-head attention.
EEGNetn_channels=64, n_classes=4, F1=8, D=2, dropout=0.5, kernel_length=64Compact depthwise separable CNN. The standard BCI baseline, low parameter count.
DeepConvNetn_channels=64, n_classes=4, n_filters_start=25, dropout=0.54-stage temporal/spatial convolution blocks. Strong for raw EEG.
ShallowConvNetn_channels=64, n_classes=4, n_filters=40, filter_length=25, pool_length=75Shallow CNN baseline. Strong for oscillatory BCI signals.
EEGConformern_channels=22, n_classes=4, n_filters=40, depth=6, attn_heads=8CNN + self-attention Conformer architecture for EEG.

Sequence & Transformer Models

ModelModuleDescription
BiLSTMClassifiernm_models.sequenceBidirectional LSTM, captures forward and backward temporal dependencies.
GRUClassifiernm_models.sequenceGated Recurrent Unit, lighter than LSTM, similar accuracy.
LSTMClassifiernm_models.sequenceStandard LSTM for temporal EEG sequences.
TCNClassifiernm_models.sequenceTemporal Convolutional Network with dilated causal convolutions.
MambaSSMnm_models.sequenceState Space Model (Mamba), linear-time sequence modelling, new SOTA option.
EEGTransformernm_models.transformersMulti-head self-attention encoder for EEG classification.
BrainBERTnm_models.transformersBERT architecture pre-trained on large EEG corpora.
PatchTSTnm_models.transformersPatch-based Transformer, segments EEG into patches for efficient attention.
ViTEEGnm_models.transformersVision Transformer applied to 2-D EEG spectrograms.

Edge & GPT Models

ModelModuleDescription
MobileEEGNetnm_models.edgeMobileNet-style EEGNet variant. <50K parameters, Raspberry Pi compatible.
QuantizedEEGNetnm_models.edgeINT8-quantized EEGNet for MCU / Jetson edge deployment.
TinyEEGNetnm_models.edgeUltra-compact EEGNet for extreme edge targets.
GPT2BCInm_models.gpt_modelsGPT-2 (gpt2/gpt2-medium/gpt2-large) adapted for EEG sequence classification. Param: gpt2_size.
BioGPTBCInm_models.gpt_modelsBioGPT backbone fine-tuned for BCI token classification.
LaBraMBCInm_models.gpt_modelsLaBraM large-scale BCI foundation model.
MiniGPT / TinyGPTnm_models.gpt_modelsCompact GPT variants for low-resource and edge deployment.

Feature Selection, sklearn.feature_selection (19 blocks)

BlockKey ParametersPurpose
SelectKBestscore_func=f_classif, k=10Select top-k features by univariate score.
SelectPercentilescore_func=f_classif, percentile=10Select top percentile of features.
RFEn_features_to_select, step=1Recursive Feature Elimination, wraps any estimator.
RFECVstep=1, cv=None, scoring=NoneRFE with cross-validation to select optimal feature count.
SelectFromModelthreshold, prefit=FalseFeature importance threshold from a fitted model.
VarianceThresholdthreshold=0.0Remove features with low variance.
SequentialFeatureSelectorn_features_to_select="auto", direction="forward", cv=5Forward or backward sequential selection.
mutual_info_classifn_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)

BlockKey ParametersPurpose
GridSearchCVscoring, cv, n_jobs, refit=TrueExhaustive hyperparameter search.
RandomizedSearchCVn_iter=10, scoring, cvRandomised hyperparameter search.
KFoldn_splits=5, shuffle=FalseK-fold cross-validator.
StratifiedKFoldn_splits=5, shuffle=FalseStratified K-fold (preserves class proportions).
LeaveOneOut,Leave-one-subject-out, common in BCI benchmarks.
GroupKFoldn_splitsGroup-stratified K-fold (no group overlap across folds).
cross_val_scorecv=5, scoring, n_jobsEvaluate model with cross-validation, return scores.

Dimensionality Reduction, sklearn.decomposition (33 blocks)

BlockKey ParametersPurpose
PCAn_components, whiten=False, svd_solver="auto"Principal Component Analysis, most common EEG dim reduction.
FastICAn_components, algorithm="parallel", whiten=True, max_iter=200Independent Component Analysis, used in EEG artifact removal.
NMFn_components, init, max_iter=200Non-negative Matrix Factorisation.
KernelPCAn_components, kernel="linear", gamma, degreeNon-linear PCA via kernel trick.
IncrementalPCAn_components, whiten=False, batch_sizeMemory-efficient PCA for large datasets.
TruncatedSVDn_components=2, algorithm="randomized"Truncated SVD (LSA), works on sparse matrices.
FactorAnalysisn_components, max_iter=1000, tol=0.01Generative linear model for latent factor extraction.

ML Linear, sklearn.linear_model (44 blocks)

Classifiers and regressors based on linear models. Key BCI-relevant blocks:

BlockKey ParametersUse in BCI
LogisticRegressionC=1.0, solver, max_iter=100, multi_classBinary and multi-class EEG classification.
LinearDiscriminantAnalysissolver, shrinkage, n_componentsLDA, classic BCI classifier, often matches deep learning on small datasets.
Ridgealpha=1.0, fit_intercept=TrueRegression with L2 regularisation.
SGDClassifierloss, penalty, alpha, max_iterOnline learning for large BCI datasets.
SVC (via sklearn)C, kernel, gamma, degreeSupport Vector Classifier, strong baseline for EEG.

ML Ensemble, sklearn.ensemble (48 blocks)

BlockKey ParametersDescription
RandomForestClassifiern_estimators=100, max_depth, min_samples_splitEnsemble of decision trees, fast and robust BCI baseline.
GradientBoostingClassifiern_estimators=100, learning_rate=0.1, max_depth=3Sequential boosting, strong performance on tabular BCI features.
ExtraTreesClassifiern_estimators=100, max_depthExtra randomised trees, often faster than Random Forest.
AdaBoostClassifiern_estimators=50, learning_rate=1.0Adaptive boosting.
BaggingClassifiern_estimators=10, max_samples, bootstrap=TrueBootstrap aggregation with any base estimator.
VotingClassifierestimators, voting="hard"Ensemble voting across multiple different classifiers.

ML Neighbors, sklearn.neighbors (24 blocks)

BlockKey ParametersDescription
KNeighborsClassifiern_neighbors=5, weights="uniform", algorithm="auto", metric="minkowski"k-NN classifier, non-parametric, good for small BCI datasets.
KNeighborsRegressorn_neighbors=5, weights, algorithmk-NN regression.
RadiusNeighborsClassifierradius=1.0, weights, algorithmClassify based on neighbours within a fixed radius.
NearestNeighborsn_neighbors=5, algorithm, metricUnsupervised nearest neighbours for distance computation.
KDTree / BallTreeleaf_size=40, metricEfficient spatial data structures for neighbour lookups.

ML Clustering, sklearn.cluster (29 blocks)

BlockKey ParametersDescription
KMeansn_clusters=8, init="k-means++", n_init=10, max_iter=300k-Means, common for unsupervised BCI analysis.
DBSCANeps=0.5, min_samples=5, metric="euclidean"Density-based clustering, no need to specify number of clusters.
AgglomerativeClusteringn_clusters=2, linkage="ward", metricHierarchical clustering.
GaussianMixturen_components=1, covariance_type="full"Probabilistic clustering via Gaussian mixture models.
SpectralClusteringn_clusters=8, affinity="rbf", n_init=10Graph-based spectral clustering.

Preprocessing, sklearn.preprocessing / sklearn.impute (32 blocks)

BlockKey ParametersDescription
StandardScalerwith_mean=True, with_std=True, copy=TrueZero-mean unit-variance normalisation, most common for BCI features.
MinMaxScalerfeature_range=(0,1), copy=TrueScale to [0, 1] range.
RobustScalerwith_centering=True, with_scaling=True, quantile_range=(25,75)Scaler robust to outliers.
Normalizernorm="l2", copy=TrueNormalize each sample to unit norm.
LabelEncoder,Encode class labels as integers.
SimpleImputerstrategy="mean", missing_values=NaNReplace missing values with mean/median/constant.
KNNImputern_neighbors=5, weights="uniform"Impute missing values using k-nearest neighbours.

Evaluation, sklearn.metrics (84 blocks)

Key metrics for BCI classification evaluation:

BlockKey ParametersDescription
accuracy_scorenormalize=TrueOverall classification accuracy.
f1_scoreaverage="binary", pos_label=1, zero_division="warn"Harmonic mean of precision and recall.
roc_auc_scoreaverage="macro", multi_class="raise"Area under the ROC curve.
matthews_corrcoef,MCC, best single metric for imbalanced BCI datasets.
balanced_accuracy_scoreadjusted=FalseAccuracy adjusted for class imbalance.
cohen_kappa_scoreweights=NoneInter-rater reliability / classification agreement beyond chance.
confusion_matrixnormalize=NonePer-class confusion table.
classification_reportdigits=2, output_dict=FalseFull 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:

GroupExample Blocks
Raw I/ORawArray, RawEDF, RawBDF, RawFIF, RawBrainVision, RawEEGLAB
Epochs & EventsEpochs, BaseEpochs, EvokedArray, Evoked, find_events, make_fixed_length_epochs
PreprocessingICA, Covariance, Annotations, set_eeg_reference, filter_data, notch_filter
Source AnalysisSourceEstimate, MixedSourceEstimate, make_forward_solution, minimum_norm
Spatial FiltersCSP, SPoC, LCMV, DICS, xDAWN
Time-Frequencytfr_morlet, tfr_multitaper, tfr_stockwell, psd_welch
Connectivityspectral_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

CategoryCountModuleNotes
Deep Learning Models3,376torchvision.modelsFull PyTorch model zoo: ResNet, EfficientNet, ViT, ConvNeXt, Swin, DenseNet, MobileNet… Used after Signal Projection.
Computer Vision371cv2 (OpenCV)Image processing for 2-D EEG projections: AKAZE, ORB, SIFT, filters, morphological ops, histograms.
Math Operations315scipy.linalgLU, QR, SVD, Cholesky, eigenvalue solvers, matrix functions.
Data Manipulation173numpyArray reshaping, concatenation, linear algebra: concatenate, reshape, transpose, dot, linalg.svd.
Deep Learning Layers167torch.nnConv1d/2d, LSTM, GRU, TransformerEncoder, MultiheadAttention, BatchNorm, Dropout, Linear, all activations.
Optimization16torch.optimAdam, AdamW, SGD, RMSprop, Adagrad, Adadelta, NAdam, LBFGS, Rprop…
NLP46nltkStemmers, 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

BlockInputsOutputsKey ParametersPurpose
Select Files,Files (Any)modality, data_source, session, selected_files, selected_subjectsData source selector. Picks which BCILattice session files or subjects feed into the workflow.
Graph EndpointGraph, FilesResponseendpoint_name, route="/api/workflow/graph/run", http_method=POST, output_pathExposes the workflow as an HTTP API endpoint via FastAPI. Trigger a full workflow run from external apps.
Graph OutputGraph DataGraph Filegraph_name, save_path, image_format=pngSaves result charts (accuracy plots, feature importance) to disk in PNG, JPG, or PDF format.

A typical complete workflow graph follows this pattern:

  1. Select Files → choose sessions, modality, and data source
  2. Channel Selection → rank and remove low-discriminability channels
  3. Preprocessing blocks → StandardScaler, feature extraction
  4. ML Pipeline → run a compiled MLFlow pipeline per file
  5. Evaluation blocks → accuracy, confusion matrix, F1 scores
  6. Graph Output → save result plots to disk
  7. Graph Endpoint (optional) → expose results via REST API

Summary

DesignerTotal BlocksSource
NeuralFlow28 block typesHardcoded in ComponentPalette (utils.py)
MLFlow (ML Suite)5,409+pipeline_catalog_final2.csv (5,396) + 13 custom
Workflow Designer5,412+All MLFlow + 3 workflow-only custom blocks
For the full DOCX with detailed parameter tables for all 5,400+ blocks: Download BCILattice_Components_Reference.pdf
BCILattice Components Reference v1.0 · BCINexus Platform · 2026-05-20 Download DOCX