gps_config(
maxGenes = 2000,
cpmNormalize = TRUE,
logTransform = TRUE,
zScore = TRUE,
peDim = 16,
spdMaxDist = 5,
coexpressionTopK = 0,
minCoexpression = 0.7,
dModel = 128,
nLayers = 3,
nHeads = 8,
ffnDim = 256,
dropout = 0.1,
geneEmbedDim = 32,
useSpdBias = TRUE,
useGlobalAttention = TRUE,
useLocalMpnn = TRUE,
window = 5,
gruHidden = 128,
useUncertainty = FALSE,
pretrainEpochs = 30,
finetuneEpochs = 100,
learningRate = 0.0001,
autofocusGamma = 1,
lambdaDir = 0.5,
lambdaL1 = 0.0001,
lambdaPrior = 0,
gradientClip = 1,
earlyStopPatience = 15,
maskRatio = 0.15,
trainRatio = 0.7,
validationRatio = 0.15,
seed = 2024,
significanceZScore = 0.5,
cascadeSteps = 5,
CheckpointIntervalEpochs = 1,
denseAttentionMaxNodes = 1024,
attentionNeighbors = 32,
attentionRandomLinks = 8,
attentionHubGenes = 8,
knockdownResidual = 0.2,
edgeNormalization = "sqrt",
perturbationChannel = TRUE,
perturbationChannelGain = 1,
perturbationChannelCoRegulation = FALSE);
maxGenes
maximum number of genes used for modelling; 0 disables the high variance filter and keeps every gene of the input matrix. When the limit is exceeded the most variable genes are kept, together with all transcription factors of the prior network. Default 2000, because the global attention layer scales as O(N^2). [as integer]
cpmNormalize
apply a CPM library size normalization to every sample column before modelling. Default True. [as boolean]
logTransform
apply the log2(x + 1) variance stabilizing transformation after the CPM normalization. Default True. [as boolean]
zScore
standardize every gene across the samples (per gene z-score) so that genes with very different expression levels share a comparable scale. Default True. [as boolean]
peDim
dimension of the Laplacian positional encoding, that is, the number of the smallest non-trivial Laplacian eigenvectors that are projected into the node embedding. 0 disables the positional encoding. Default 16. [as integer]
spdMaxDist
maximum shortest path distance that receives its own attention bias bucket; longer and disconnected gene pairs are merged into dedicated buckets. The bucket count is spdMaxDist + 2. Default 5. [as integer]
coexpressionTopK
number of co-expression edges that are added for every gene (the GEARS style covariance graph); 0 keeps the prior regulatory edges only. Default 0. [as integer]
minCoexpression
minimum absolute Pearson correlation required for a co-expression edge. Only used when coexpressionTopK is greater than zero. Default 0.7. [as double]
dModel
hidden dimension of the model (d_model). Must be divisible by nHeads. Default 128. [as integer]
nLayers
number of stacked GPS fusion layers, that is, the number of message passing hops that can be captured. Default 3. [as integer]
nHeads
number of attention heads of the global attention branch. Must divide dModel. Default 8. [as integer]
ffnDim
hidden dimension of the feed forward network inside every GPS layer. Default 256. [as integer]
dropout
dropout rate applied to the GRU output representation; must be in [0, 1). Default 0.1. [as double]
geneEmbedDim
dimension of the learnable gene identity embedding. Default 32. [as integer]
useSpdBias
enable the Graphormer style shortest path attention bias. Switching it off is the ablation setting for "global attention without topology awareness". Default True. [as boolean]
useGlobalAttention
enable the global attention branch; False degenerates the model into a pure GNN. Default True. [as boolean]
useLocalMpnn
enable the local message passing branch; False degenerates the model into a pure Transformer. Default True. [as boolean]
window
length of the input time window (w); at least 2 and at most the number of distinct time points minus one. Default 5. [as integer]
gruHidden
hidden dimension of the GRU time encoder. Default 128. [as integer]
useUncertainty
add a softplus variance head and switch the main loss to the Gaussian negative log likelihood, so the model reports a per-gene uncertainty together with the prediction. Default False. [as boolean]
pretrainEpochs
number of epochs of the masked reconstruction pre-training stage; 0 skips it. Default 30. [as integer]
finetuneEpochs
maximum number of epochs of the next-step prediction fine-tuning stage. Default 100. [as integer]
learningRate
Adam learning rate used by both training stages. Default 0.0001. [as double]
autofocusGamma
exponent increment of the autofocus loss, the total exponent is 2 + autofocusGamma; larger values put more weight on strongly changed genes. Default 1.0. [as double]
lambdaDir
weight of the direction aware loss term. Default 0.5. [as double]
lambdaL1
weight of the L1 sparse regularization term. Default 0.0001. [as double]
lambdaPrior
weight of the prior distance regularization term; it is only meaningful for a learnable adjacency matrix and therefore defaults to 0 in the current fixed A_prior version. Default 0. [as double]
gradientClip
global L2 norm clip threshold applied to the gradients before every Adam step; 0 disables the clipping. Default 1.0. [as double]
earlyStopPatience
number of consecutive epochs without validation improvement before the fine-tuning stage stops and rolls back to the best parameters; 0 disables early stopping. Default 15. [as integer]
maskRatio
fraction of genes whose last time frame is masked during the pre-training stage; must be in [0, 1). Default 0.15. [as double]
trainRatio
fraction of the sliding windows used for training; the split is always performed in time order, never randomly. Default 0.7. [as double]
validationRatio
fraction of the sliding windows used for validation (early stopping). trainRatio + validationRatio must be smaller than 1. Default 0.15. [as double]
seed
random seed of the parameter initialization, the dropout masks and the pre-training masks; a fixed seed makes the whole run reproducible. Default 2024. [as integer]
significanceZScore
a gene is flagged as significantly changed when the absolute Z-score of its perturbation effect exceeds this threshold. Default 0.5. [as double]
cascadeSteps
default number of recursive steps used by the temporal cascade simulation of a virtual perturbation. Default 5. [as integer]
denseAttentionMaxNodes
gene count up to which the exact dense attention (an N×N score matrix) and the exact Laplacian positional encoding are used. Above this threshold the model switches to the sparse candidate attention (O(N·c·d)) and to the random walk positional encoding, which is what makes the whole genome scale (N around 60 thousand) trainable. Default 1024. [as integer]
attentionNeighbors
number of attention candidates per gene in the sparse mode (including the gene itself): self + graph neighbourhood (budget truncated BFS) + hub genes + random long range links. Default 32. [as integer]
attentionRandomLinks
number of random long range links per gene in the sparse mode; the slots left over by a small graph neighbourhood are filled with additional random links, so even a prior network without any edge still keeps a global receptive field. Default 8. [as integer]
attentionHubGenes
number of high degree genes included as global hubs in every candidate set of the sparse mode. Default 8. [as integer]
knockdownResidual
the fraction of the wild type expression level that is kept for the target gene of an in silico knockdown experiment, applied in linear CPM space on the baseline of the current cell context: cpm_mut = knockdownResidual * cpm_ctrl, then transformed back to log2(CPM + 1). 0.2 corresponds to the CRISPRi setting of the Virtual Cell Challenge (more than 80 percent on target knockdown). Default 0.2. [as double]
edgeNormalization
how the graph convolution normalises the aggregated edge weights: "mean" (the legacy convex averaging, attenuates a single gene perturbation by about 1e-4 after three hops), "sqrt" (default, keeps about 5 to 8 times more magnitude per hop) or "sum" (no normalisation, strongest but easiest to saturate). [as string]
perturbationChannel
inject the change of the perturbed gene into the input window of its downstream targets along the prior edges, so a knockdown does not have to survive several rounds of degree normalisation. Default TRUE. [as boolean]
perturbationChannelGain
injection gain of the perturbation channel; 0 disables it. Default 1. [as double]
perturbationChannelCoRegulation
when the perturbed gene has no outgoing edge (every non transcription factor in a TF to target prior), spread its change to the genes sharing the same upstream regulators. Heuristic, therefore FALSE by default. [as boolean]
Every argument is optional and carries exactly the same default value as the corresponding property of GPSConfig, so calling gps_config() without any argument is equivalent to new("gps_config"). The assembled object is validated by GPSConfig.Validate() before it is returned: an invalid combination (for example nHeads not dividing dModel, window smaller than 2, or trainRatio + validationRatio greater than or equal to 1) raises an ArgumentException instead of failing later during training.