Skip to content

Configuration Reference

Model training and evaluation are configured via YAML files. Config files for the Container Quickstart workflow live in configs_container_qs/; configs used for the paper's experiments live in configs/.


Example

# configs/ps_attack/exp1_ps_attack_ec1e1.yaml

data_file_name: "./data/ps_attack_with_timestamps.csv"
result_root:    "./results/for_paper/ps_attack/multirun/ec1e1_gc1em2_gr1em2/"

state_dict:   ["R1-PA1:VH", "R1-PM1:V", "R1-PA2:VH", "R1-PM2:V"]
measure_dict: ["R1-PA4:IH", "R1-PM4:I", "R1-PA5:IH", "R1-PM5:I"]

LSTMhiddensize: 20
LSTMlayers:      1
FFhiddensize:    5
num_epoch:     650
batch_size:      1

la_mse:      1
la_nll_r:    0
la_nll_h:    1
la_CPCT_cov: 1
la_K:        0
lr:          1e-3

lookback_bptt: 128

init_time:          "2020-01-01 00:00:01"
start_time:         "2020-01-01 00:00:01"
attack_start_time:  "2020-01-01 00:02:53"
attack_id:          "ps1"
attack_duration:    426
duration:           600

training_data_fraction: 1.0
test_window:     150
forecast_window: 155
type:            'any'

Fields

Data

Key Type Description
data_file_name str Path to the input CSV dataset
result_root str Directory where results and model weights are written
state_dict list[str] Column names in the CSV that are treated as EKF state variables
measure_dict list[str] Column names in the CSV that are treated as observations (measurements)

Model architecture

Key Type Description
LSTMhiddensize int Hidden size of the LSTM state transition sub-model
LSTMlayers int Number of stacked LSTM layers
FFhiddensize int Hidden size of the feed-forward observation decoder

Training

Key Type Description
num_epoch int Number of training epochs
batch_size int Batch size (typically 1 for sequential BPTT)
lr float Adam learning rate
lookback_bptt int BPTT window length — the dataset is sliced into chunks of this length and shuffled across epochs
training_data_fraction float Fraction of the training split to actually use (1.0 = all)

Loss weights

Key Type Description
la_mse float Weight on the state MSE loss term
la_nll_r float Weight on the observation NLL loss term
la_nll_h float Weight on the state NLL loss term
la_CPCT_cov float Weight on the innovation covariance NLL loss term
la_K float Weight on the Kalman gain consistency loss term

Temporal windowing

Key Type Description
init_time str Timestamp of the first row in the dataset (ISO 8601)
start_time str Timestamp to begin evaluation from
attack_start_time str Timestamp of the first injected attack sample
attack_id str Identifier string for the attack scenario
attack_duration int Duration of the attack in timesteps
duration int Total evaluation duration in timesteps
test_window int Number of timesteps in the test split
forecast_window int Number of timesteps used for forecast evaluation
type str Evaluation type tag (e.g. 'any')

Environment variables

The Trainer class also reads the following environment variables at runtime, which override config-file values where applicable:

Variable Default Description
D_VAL 120 DVAL interval length (EKF steps per proof)
HYP_TEST_INT 128 Hypothesis test interval in timesteps
GEN_PREDICTION_PROOFS 1 Set to 0 to skip prediction proof generation
GEN_HYPOTHESIS_PROOFS 1 Set to 0 to skip hypothesis proof generation
PRELOADED_PROOF_ROOT — Path where VK/PK artefacts are stored and read from. Always set by zkstarctl.sh to results/proofs/<dataset>/<config>/. After utility-setup completes, a zero-byte tolerance marker file (tol.svd=<val>.kcr=<val>) is written here as a permanent record of the circuit parameters used.
MAX_SVD_TOL 0.1 Absolute tolerance (atol) for SVDReconstructionCheck inside the hypothesis circuit. Baked into the circuit at utility-setup time; has no effect if passed to utility-gen-witness or utility-prover.
MAX_KCR_TOL 0.1 Absolute tolerance (atol) for KalmanReconstructionCheck inside the prediction circuit. Baked into the circuit at utility-setup time; has no effect if passed to utility-gen-witness or utility-prover.
ALPHA 0.005 Significance level α for the chi-squared test
NUM_THREADS — PyTorch CPU thread count
TRAIN_RATIO 0.8 Fraction of data used for training
WRITE_WEIGHT_FILE UUID-based Output path for trained model weights
VECTORIZED 1 Set to 0 to disable vectorized covariance updates
DIAG_COV — Set to use diagonal-only covariance approximation