Manuscript Offprint
arXiv:2610.25639Privacy-Preserving Robust Monitoring of Dense-Time Temporal Logic
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Charles Koll
Oregon State University
Corvallis, OR, USA
Mike Rosulek
Oregon State University
Corvallis, OR, USA
Houssam Abbas
Oregon State University
Corvallis, OR, USA
Abstract—Motivated by the use of third-party testing, this paper presents a privacy-preserving implementation of the robustness monitoring of Signal Temporal Logic (STL). STL is a specification language for systems whose output traces have real-valued timestamps – most prominently, cyber-physical systems. Its robust semantics, which assign real rather than binary truth values, are an essential ingredient of systems testing and runtime monitoring. In a number of system testing scenarios, the designer and the tester are separate parties. This testing-as-a-service model is common in software, avionics, and semiconductors, and is growing in importance in the red-teaming of machine learning models. In such a model, the designer seeks to preserve the privacy (or secrecy) of its design, while the tester seeks to preserve the privacy of its collateral, including the detailed specification suite. This paper presents a secure multi-party implementation of the robust semantics using arithmetic circuits. This implementation allows one party, which provides a secret trace, and a second party which provides a secret formula, to jointly compute the robustness without either party being able to learn the other party's secret input. We present a number of algorithmic modifications to the robustness computation to enable an efficient multi-party robustness computation. We also present new, semi-linear, robust semantics for STL that take advantage of the efficiencies of arithmetic circuits. The experimental results demonstrate that not only is this privacy-preserving monitor efficient on its own, but also that it can be used in a testing loop without affecting the speed at which bugs are found during robustness-guided system testing.
I. INTRODUCTION
Monitoring, also known as runtime verification, is a key routine in the testing and runtime operation of Cyber-Physical Systems (CPS). The basic setup is one where an executing system generates an output signal s, which is a function of time, that is supposed to satisfy some specification in an appropriate temporal logic. A monitor receives that signal and determines whether it satisfies the specification. Monitoring is used at runtime (during system operation) to detect spec violations, or at design time, during system testing, to guide the test case generator. When monitoring or testing systems with physical components (e.g., cyber-physical systems), the specification is typically formalized in a dense-time logic, i.e., one which places real-time constraints on the signals and is interpreted over traces with real-valued timestamps. Moreover, one is especially interested in robust satisfaction, i.e. in obtaining a real-valued measure of how well the trace satisfies the specification or how badly it violates it, not just in a binary satisfies/violates answer. This paper uses Signal Temporal Logic, or STL, as a specification logic [1], and the max/min robust semantics of STL [2] for quantitative satisfaction. These are very commonly used options in cyber-physical systems monitoring and testing.
In some applications, the monitored trace and the formal specification are owned by two different parties, and there's a need to keep each of them a secret known only to its owner. For example, Testing-as-a-Service (TaaS), which is the practice of outsourcing some testing activities to an outside party, is common in industries like semi-conductor [3]–[5], aerospace [6], fuel cell batteries [7], and software [8]–[11]. There is significant economic incentive in building novel TaaS models: the global TaaS market in software was estimated at USD 4.54 billion in 2023 [12] and at USD 2.5 billions in semiconductors [13]. The design company has clear incentives for keeping its design secret. In particular, this implies keeping the system's output traces secret, since otherwise the tester might learn to map input traces (which it generates) to output traces. The testing company, on the other hand, possesses refined and targeted correctness specifications which it developed over years of experience with different designs. These specifications steer the test case generator towards effective tests. The testing company is thus incentivized to keep them secret. A key challenge of TaaS is therefore the protection of the intellectual properties (IP) of both the design and the testing companies, namely the design's output signals (and the design that produced them), and the tester's correctness specifications.
Thus we are faced with the following problem: given two parties, Designer who owns a secret dense-time trace and Verifier who owns an STL formula, how can they compute the robustness of the trace relative to the formula, so that both learn the robustness, but Verifier does not learn anything else about the monitored trace, and Designer does not learn anything about what formula the trace is monitored against? Such an implementation is called privacy-preserving, or simply private. Non-Disclosure Agreements (NDAs) provide penalties for leaking trace and formula beyond the two parties, but cannot ensure that design and formula secrets are not leaked between parties.
In this paper, we use a cryptographic technique called secure multi-party computation [14], aka MPC, to create a privacy-
doi https://doi.org/
This article is licensed under a Creative Commons Attribution 4.0 International License
CC BY
SUT: the cyber-physical System
Under Test
A combination of software and physical hardware

Input trace to the engine
Output trace from the engine
Robustness
TEST CASE
GENERATOR
Select next test
Fig. 1: CPS monitoring-and-testing loop. A CPS System Under Test (SUT) takes an input signal and produces an output signal. The robustness of the output signal w.r.t. to an STL specification is computed by the monitor and used to guide the test generator. The signal is a proprietary secret to the system designer, while the formula is a proprietary secret of the testing company.
preserving implementation of STL robustness monitoring. Our work is offline, meaning that the robustness monitoring only occurs once Designer has a full trace. We seek to answer the following research questions:
-
Can we develop an MPC implementation of robustness monitoring that is fast enough for use in a robustness-guided testing loop?
-
Does private monitoring negatively affect the rate at which robustness-guided testing finds bugs? By bug finding rate, we mean the number of tests needed to find a bug. This is distinct from the time it takes to monitor a given output trace, produced by the system in response to a given test.
MPC is known to add significant computational overhead, so merely dropping an algorithm into a general-purpose MPC framework will not be enough. Algorithmic and domain-specific theoretical modifications will be necessary, and these constitute the core of this paper.
Related Work. There are very few works on private monitoring. The concept of private offline monitoring was introduced for LTL in [15], which also sketched a number of approaches to preserving the privacy of the monitored signal – but not of the LTL formula. Banno et al. [16] define a scheme for preserving the privacy of both a safety-only LTL formula and a signal, using fully homomorphic encryption [17] and the LTL formula's representation as a DFA (Deterministic Finite Automaton). We work with the full Signal Temporal Logic (STL) required for CPS designs, so both our signals and formulas are significantly different. In particular, STL formulas in dense time do not have a DFA representation, so work on oblivious DFA evaluation, like [18] and [19], is not applicable here. Along similar lines, works such as [20] rely on characteristics of discrete-time STL for their approach, which do not work in our dense-time setting. Henzinger et al. [21] have the same goal of private runtime verification, but approach the problem differently – they encode the formula specification as a circuit, while we implement a functionality that takes the formula as an input. Additionally, their experiments focus on simple functionality such as comparators and adders, whereas we compute robustness and assume more complex specifications. Contributions. This work makes the following contributions:
-
An approach for an MPC-based approach to private STL robustness monitoring for any formula up to a given depth;
-
A novel robust semantics of STL that computes more efficiently than traditional robust semantics in arithmetic circuits;
-
An experimental confirmation of the practicality of private monitoring using the MP-SPDZ framework [22].
-
An experimental confirmation that the private computation does not degrade the rate at which robustness-driven testing finds bugs.
Along with this document we have also submitted an artifact containing code for our experiments.
Organization. Section II provides background regarding STL, robustness, and multi-party computation; Section III describes our variants of robustness monitoring algorithms which are efficient for MPC, including new robustness semantics; Section IV presents experimental results; and Section V concludes.
A. Signal Temporal Logic (STL) and its Robustness
Signal Temporal Logic (STL) [1] is commonly used in the formal verification of cyber-physical systems. STL is interpreted over dense-time signals.
Definition II.1. Fix constants , and . A signal is a tuple . This says that at timestamp the signal value is . The timestamps obey for all . We write and as shorthand for and , respectively.
The constants , , and are the same for all signals. We also define an inverse function , where . This function returns the indices of sampling times in .
The STL syntax (in negation normal form) is as follows:
where is a constant, is a closed nonnegative interval, “ ” is an atomic proposition, and and are STL formulas. The Eventually and Always operators are defined via Until and Release respectively – Eventually: , and Always: .
There exist several notions of robustness [2] – we focus on the max/min semantics, which are the most commonly used in testing and monitoring.
Definition II.2 (Robustness [2]). Let be an STL formula, a signal, and a sampling index of . Write
(a) Signal s.
| t | 0.0 | 5.0 | 7.0 | 10.0 |
|---|---|---|---|---|
| x | 3.0 | 11.0 | -2.0 | -3.0 |
(b) The syntax tree of formula given in (1).
(c) DP table for computing .
| 3 | 3 | 7 | |
| -2 | 11 | -1 | |
| -2 | 12 | ||
| -3 | 13 |
Fig. 2: Robustness computation for the example in Section II-B.
for brevity, where is an interval and is defined as the interval . The max/min robustness is computed as follows.
From these semantics it follows that and .
A positive robustness value indicates satisfaction, a negative value indicates violation, 0 is inconclusive, and the magnitude indicates degree of satisfaction or violation [2].
B. Dynamic Program for Robustness Calculation
Robustness calculation is done using a dynamic program (DP) known as DP-TALIRO [23]. We begin describing it with an example.
Monitoring Example. Consider the signal shown in Fig. 2a and the following formula:
The DP constructs a table with rows labeled by the timestamps and columns labeled by the sub-formulas of , as shown in Fig. 2c. The DP then fills in the cells, starting with the bottom right cell, working right to left and bottom to top. Cell contains the value . The calculation ends with filled into the top left cell of the table. For convenience, cell will be referred to simply as . We now detail this calculation.
Cell contains . The next cell to the left similarly contains . The next cell, , is the first that requires previously computed cells. To compute , first the samples that fall within the interval are identified using the BOUNDS routine (see Appendix C for details). In this example, no samples exist in the interval , so is set to as per the semantics.
The DP moves up one row to and performs similar operations. The first two cells, containing atoms, are filled with and . The leftmost cell, , requires a BOUNDS calculation which again yields no samples in the interval and so the result is . When the DP reaches the second row, , on the other hand, BOUNDS determines that sample falls within . The semantics then dictate that the robustness is (after simplification) . The algorithm continues in this way until it fills .
The general DP-TALIRO algorithm is now provided, since our MPC implementation will modify parts of it to obtain an efficient calculation. DP-TALIRO contains two components: the primary robustness calculation, shown in Algo. 1, and a subroutine BOUNDS that selects which elements of a signal fall within the bounds of a temporal interval; this is shown in Appendix C. The two components perform the row-by-row, right-to-left table filling described in the example. Correctness of DP-TALIRO is proved in [23].
The inputs to DP-TALIRO are a sequence representing the signal s, provided by the Designer party; and an STL formula represented as a sequence of its sub-formulas, obtained in a breadth-first traversal of the formula's syntax tree. This is provided by the Tester party. Let that sequence be , with being the root. We assume that the formula's syntax tree is complete – this is necessary for the MPC implementation, which requires all inputs to have a fixed size. There is no loss of generality in this assumption since a formula without a complete tree can be padded with to form a complete tree without affecting the robust semantics of Def. II.2.
The subroutine BOUNDS (called at lines 16 and 27 of Algo. 1) takes two arguments, an index and an interval , and returns the minimum and maximum values in . It does this by simply iterating through the signal starting at . Once found, these two indices are passed to the primary robustness calculation to be used for an Until.
Note that even though Eventually and Always operators are derived from the Until and Release, it is more efficient to provide a custom implementation for them, as shown on line 33. As will be seen in Section III, this is no longer true when implementing the algorithm as a multi-party computation.
Let be the length of the input signal, let be the number of nodes of the input formula's syntax tree, and let be the maximum number of sampling points for any interval in the formula, at most . The complexity of the DP-TALIRO algorithm is [23].
Algorithm 1: DP-TALIRO [23]
Input: in breadth-first traversal of its syntax tree , signal
Output: Robustness
/* hold lower & upper indices of column s interval / (length each) / Iterate row by row through all cells of the table */
4 for , do switch do case do case do end case do case do case do /* Some special cases can be handled quickly */ if and then else if and then else if then max( , ) else // General case BOUNDS( , ) tmpmin := for do max( , ) tmpmin := case do if and then else if and then else if then min( , ) else BOUNDS( , ) tmpmax := for do min( , ) tmpmax := case or do // omitted for brevity end end end end end
return
C. Secure Multi-Party Computation (MPC)
Secure Multi-Party Computation (MPC) is a branch of cryptography that tackles the following problem: Consider two parties, Alice and Bob; Alice holds private value x, and Bob holds private value y. Together they wish to compute the value , for some agreed upon functionality or algorithm f that takes x and y as inputs. For example, x can be a dense-time signal, y can be an STL formula, and f can compute the robustness of x with respect to y. But each would like the other to learn nothing more than the output of f – in particular, that they learn nothing about each other's inputs, even if Alice or Bob behaves adversarially. A secure or privacy-preserving interactive MPC protocol is a sequence of steps that Alice and Bob take in order to
• compute and learn the value , [Correctness]
• and learn nothing else. [Privacy]
What does it mean formally that the parties ‘learn nothing more than the output of ? For instance, under what assumptions on the parties’ computational power? These questions have all received a rigorous treatment in the MPC literature – e.g. [14], [24], and [25]. A self-contained overview of security definitions is far beyond the scope of the current paper, but we do give a minimal set of definitions in Appendix A for completeness. The informal statement of security is as follows:
Definition II.3 (Secure protocol (Intuitive)). An MPC protocol implements functionality f in a secure manner w.r.t. semi-honest parties (parties that implement the protocol without deviation, but might try to learn something extra based on the messages they see) if it is highly improbable that the parties could learn anything from executing the protocol, that they couldn't learn anyway just from knowing their inputs and the value .
The intuitive understanding of security is sufficient to follow the rest of this paper, but whenever we reference a ‘secure protocol’, formally this means secure in the sense of the definitions of Appendix A. The following is a well-known result. Arithmetic circuits are explained below.
Theorem II.1. Any functionality f that can be computed in time that is polynomial in the input sizes can also be computed by any secure interactive MPC protocol. In particular, it can be computed by a secure interactive MPC protocol for arithmetic circuits [24].
There are indeed general-purpose compilers that accept a description of f and implement such an interactive protocol. In this work, we use one such compiler called MP-SPDZ [22], in which f is specified in a subset of Python. While compilers like MP-SPDZ give a turnkey solution for MPC, the resulting protocol is often prohibitively inefficient in practice. It is usually necessary to tailor the computation f to be more “MPC-friendly.” The following are the most important factors affecting the performance of MPC protocols. They will guide our modifications to DP-TALIRO to make it more efficient within an MPC.
Circuits: all MPC protocols relevant for our purposes first express the desired functionality f as a strictly combinational circuit and then, using cryptographic techniques, “blindly evaluate” the circuit on private data. The circuit may be boolean (consisting of AND, OR, NOT gates) or arithmetic (addition and multiplication gates in a finite field): both can implement any computable function [24]. MPC protocols represent intermediate secret values in a way that is only compatible with one of these two classes of operations. Because robustness calculation uses max, min and addition, which are most naturally expressed as numerical calculations, we opt for an arithmetic circuit protocol in this paper.
Circuits imply fixed input size: given that f is represented as a circuit, this circuit has a fixed number of input wires, so the inputs x, y must have fixed sizes. In this paper this means all signals have the same length, and all formulas have the same depth and have complete syntax trees. As explained earlier, a formula with an incomplete tree can be padded without changing its semantics.
Flow control / branching: Circuits have no flow control, so a corollary of the above is that flow control based on private data is extremely expensive for MPC protocols. For example, consider the expression “[if b then else ]”. If b is a secret value (one that cannot be inferred from the overall function’s output), then the parties must not learn which branch of this if-statement is active. To convert the expression to a circuit, one must include sub-circuits for both and . Both sub-circuits must be evaluated, and the “correct” result is chosen by a multiplexer controlled by bit b.
Any form of flow control based on private data leads to a significant blow-up in the size of the resulting circuit. In fact, MP-SPDZ's dialect of Python explicitly forbids static branching on private data, having a for-loop with data-dependent bounds, etc. Typically one must unroll all branching (as in the if-statement example) and pad for-loops to their worst-case maximum length, etc.
Linearity is free: The parties in an MPC protocol will collectively hold a “blind” representation of the values along every wire of the circuit. These representations are linearly homomorphic, meaning that they can perform linear operations on private data without any communication between the parties. In an arithmetic circuit, the linear operation is the field’s addition operation. Consequently, multiplication by a public constant is also free. The freeness of addition will motivate the creation of a new ‘semi-linear’ semantics for STL.
Circuit depth and parallelism: MPC uses interactive protocols, where the parties communicate. In an arithmetic MPC protocol, the parties must exchange protocol messages for each (non-free) gate of the circuit. Furthermore, if the output of gate g influences the input of gate , then the communication for g and must happen sequentially. Gates that do not influence each other in the circuit can have their messages sent in parallel. So an entire layer of a circuit can be processed in the same network round-trip, but consecutive layers require additional round-trips. Thus, often the limiting factor in MPC is the depth of the circuit (the maximum path-length from an input gate to an output gate).
It is preferable, therefore, to tailor the computation f so that its corresponding circuit f is “wide and shallow,” with minimal depth. When we describe a computation as “parallel”, we are referring to how amenable it is to reducing circuit depth, and the resulting effect on the MPC protocol’s network latency. This kind of parallelism is orthogonal to whether the MPC participants perform their (local) cryptographic operations in a single thread or multiple threads.
III. A SECURE MULTI-PARTY COMPUTATION OF ROBUSTNESS
Robustness is computed by a dynamic program, which takes time polynomial in the size of the inputs s and . Thus by Theorem II.1 in Section II-C, any interactive MPC protocol to securely evaluate using an arithmetic circuit can be used. This simple observation is captured in the following for later reference.
Theorem III.1. The robustness functionality described in Def. II.2, with inputs and s, can be computed in a secure manner by an interactive MPC protocol for arithmetic circuits.
Simply feeding the DP-TALIRO code to MP-SPDZ yields a very inefficient private calculation. So we first did a number of functionality-preserving modifications to DP-TALIRO, guided by an understanding of which MPC operations are efficient - yielding variant V1 below. From there, we explored two orthogonal approaches, based on the observation that the max/min operations of the robust semantics are the biggest bottleneck: first, we modified the robust semantics by replacing some of the max/min operations by additions, which are free in MPC. Second, we restricted ourselves to the unbounded fragment of STL, which eliminates all n-ary max/min operations with n > 2. Because these two approaches are orthogonal, they can be mixed-and-matched, yielding four variants in total: V1 (with full STL and min/max semantics), V1-LIN (with linearized semantics), V1-UNB (for the unbounded STL fragment), and V1-LIN-UNB. We start with the variant V1, which forms the basis of the other variants.
A. V1: Algorithmic Optimizations for MPC
V1 is shown in Algo. 2. Its correctness as a robustness monitor is inherited from that of DP-TALIRO, as all modifications preserve functionality. V1 focuses on parallelizations: as explained in Section II-C, parallelization means reducing the number of operations that require sequential communication within the MPC. Additionally, V1 avoids conditionals that compute the same thing across multiple branches. That's because in MPC, all branches of a conditional are computed, because determining the correct branch by testing a secret value is forbidden. This fact results in optimizations which would otherwise appear very unintuitive in traditional algorithm design. V1 introduces four significant modifications:
M1. Separation of the outer loop into three independent loops;
M2. Traversing the table diagonally along the depth of the formula;
Algorithm 2: Variant V1
Input: in breadth-first traversal of its syntax tree , signal
Output: the robustness .
// Cells for atomic propositions can be computed concurrently.
2 for , do in parallel
switch do
case do
case do
// Fill bottom row. .
7 for do
for do in parallel
switch do
case do
case do
case do
case do
case do
if then
else
case do
if then
else
/* Traverse remaining cells diagonally from bottom right to top left. */
21 for do
for do in parallel
for do in parallel
switch do
case
do same as above
case do
for do
if then
case do
for do
if then
return
TABLE I: A robustness table illustrating modifications M1 and M2 of V1 (Algo. 2). As indicated, sub-formulas and are at depth 2 in the syntax tree, and are at depth 3. The first loop of V1 fills all the cells on the right half of the table concurrently; the second loop fills the cells in the last row concurrently; and the third loop iterates over the remaining cells in the order , with all cells with a given symbol being filled concurrently.
| p | q | ...... | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Depth 1 | Depth 2 | Depth 3 | Depth 4 | ||||||||
| ★ | △ | △ | ● | ● | ● | ● | Atoms & Constants:First Loop | ||||
| △ | ● | ● | + | + | + | + | |||||
| ● | + | + | × | × | × | × | |||||
| Last Row: Second Loop | |||||||||||
M3. Removing the BOUNDS subroutine, building its operation directly into the algorithm; and
M4. Removing the Eventually/Always operators, which are inefficient in MPC. Instead, they are evaluated by rewriting them using the Until.
M1: Separation of the outer loop. We separate the outer loop of DP-TALIRO (line 4 in Algo. 1) into smaller loops at lines 2, 7, and 21 in Algo. 2. This allows for increased parallelism. The first loop, line 2, computes all cells in the right half of the DP table concurrently, since they contain logical constants and atoms. This is the right half of Table I page 6.
The second loop in Algo. 2, line 7, computes the cell values for the last element of the signal, . We separate these because the temporal operators, evaluated at the last element of the signal, require fewer computations than they would elsewhere in the signal. In Table I, this is the left half of the last row. The third loop, line 21, computes all cell values not otherwise addressed by the first and second loops, and is described in M2 below.
M2: Traversing the table diagonally (line 21). The third loop increases parallel computation: rather than the row-by-row approach provided by Algo. 1, Algo. 2 traverses the left half of the table (which contains the robustnesses of non-atoms) in a diagonal fashion as shown in Table I. With an input signal of length 4 and input formula (depth 4, length 15), the loop has 5 iterations: in the first iteration it computes all cells marked by concurrently, in the second it fills all cells marked by concurrently, etc. This significantly increases parallelism.
M3: Removing the BOUNDS subroutine. In DP-TALIRO (Algo. 1), the BOUNDS subroutine identifies the signal timestamps that fall within a given temporal interval . To do so it must compare timestamps with interval bounds, both of which are secret values. In MPC, no control flow based on testing secret values is allowed (as explained in Section II-C). So in MPC, all comparisons would have to be made, where is the current timestamp index. Furthermore, the loop after the BOUNDS subroutine iterates over the secret values returned by BOUNDS (see line 19 in Algo. 1), and thus must also perform iterations when done in MPC. These two sets of iterations are highly inefficient in MPC. So for the
MPC variant V1, we combine these two sets into a single loop of iterations, e.g. line 29 of Algo. 2. This loop checks if the iteration's timestamp is inside the bounds, and performs its calculations if so. This modification is applied to both Until and Release cases.
M4: Removing the Eventually and Always cases. Because every branch of a switch statement is executed in MPC, a switch statement with fewer cases executes faster than one with more cases. Therefore, we remove the Eventually and Always cases (line 33 in DP-TALIRO). Any such operators in the input formula are first re-written using Until.
Complexity. The complexity of this algorithm when executed in the clear (not in MPC) is ; the added complexity of Algo. 2 compared to Algo. 1 is due to removal of data-dependent bounds on loops in the temporal operators. This algorithm's sequential complexity, i.e. its amount of sequential operations, is . This is from the sequential cell traversal of the table (see Table I), and the operations per cell for the temporal operators.
Algorithm V1 can be naturally transformed into an arithmetic circuit using MP-SPDZ, yielding the following.
Theorem III.2. V1 can be expressed as an arithmetic circuit of size over a suitably large field, and therefore there is an interactive MPC protocol that securely computes robustness with cost .
B. V1-LIN: Leveraging Free Additions
Much of the computational cost of V1 stems from the max/min operations which are used for evaluating every logical operator. These calculations are expensive due to their nonlinearity. We now propose a novel semi-linear semantics of robustness, , which replaces some (but not all) of the max/min calculations with linear operations. By using this new semantics in V1 instead of the max/min semantics, and slightly modifying the Until calculation as described below, we obtain variant V1-LIN.
Definition III.1. Abbreviate . The semi-linear semantics of STL are as follows.
The soundness of the new semantics is captured in the following theorem, which is proved in Appendix B.
Theorem III.3. Given a signal s, an index i, and formula , the following hold
Algorithm 3: V1-LIN: Until Case
case do
for do
if then
// dot product
Aside from using the new semantics, V1-LIN mostly follows V1. The Until case (Algo. 2 line 27) is implemented slightly differently, taking advantage of slight efficiencies of the dot product operation compared to max when implemented in MPC (namely, reduced binary operations; see Section IV for results supporting these efficiencies). We show only this case in Algo. 3 for space reasons; this case and other modifications match the semantics in Def. III.1.
Complexity. When evaluated in the clear (not in an MPC protocol), the complexity of V1-LIN is the same as that of V1: . The runtime gains come when implemented in MPC. Sequential operations are the same as V1 as well: .
The one-sided aspect of the semi-linear semantics, evident in Thm. III.3, has an effect on duality – for example, with formulas such as and , is not the negation of . We accept this unusual property of the semantics because we are testing until we find a bug; negative robustness values do not continue our testing loop, and so we only need positive values to inform testing. The experiments in the following section illustrate no penalty from using semi-linear semantics in a closed-loop falsification setting using simulated annealing.
C. V1-UNB: Restricting to Unbounded Temporal Operators
Our next variant looks at one significant source of computational cost: evaluating Untils, which requires calling the BOUNDS routine, then doing N-ary max or min (where N is a function of the interval size). Therefore this variant, which is based on V1, restricts itself to formulas where all temporal operators are known to be of the form , which is the largest possible interval. We call it V1-UNB.
In such a case, for the bottom row of the DP table (Algo. 2 lines 14 and 17), the Until evaluation is simplified to a single case . For the other
TABLE II: The four variants and their complexities.
| Variant | Linear Robustness? | STL Fragment? | Complexity |
|---|---|---|---|
| V1 | No | Full STL | |
| V1-LIN | Yes | Full STL | |
| V1-UNB | No | ||
| V1-LIN-UNB | Yes |
rows, the Until case (Algo. 2 line 27) is replaced with and the Release case (Algo. 2 line 34) is replaced with .
Complexity. The complexity of this algorithm in the clear is , much less than that of V1. This is because for a single cell of the table we can compute a temporal operator in constant time, rather than the time required in V1. The sequential complexity reduces similarly: . Table traversal does not become more or less sequential with V1-UNB than with V1.
D. V1-LIN-UNB: Unbounded Fragment of STL with Semi-Linear Semantics
This last variant replaces the max/min semantics in V1-UNB with the semi-linear semantics.
Complexity. Like V1-UNB, the complexity of V1-LIN-UNB is . Sequential operations are likewise .
The four variants are summarized in Table II.
E. Communication Complexity
The amount of data passed between parties (communication complexity) is dependent on the protocol used. The specifics for MASCOT are provided in [26]. For example, for preprocessing, Section 7.1 of [26] states that the communication cost of a single triple, which is a unit of data generated in preprocessing, is bits where is the number of parties (2 in our case, Designer and Verifier), is the security parameter (40 in our case, the default provided by MP-SPDZ), and is the number of bits of the modulo field (106 bits in our case). This suggests that the communication cost for a single pre-processing triple in our case is approximately 4 KB. Empirically, in our case the pre-processing data for signal length of 250 is approximately 4.2 GB. In the online phase, the data sent between parties is approximately 227 MB for that same signal length. Other details on communication complexity can also be found in [26].
IV. EXPERIMENTS
We aim to show that closed-loop testing is still practical when computing robustness privately. This involves two evaluations: first, we must determine whether the runtimes of the various private variants are acceptable, and which variant is faster under which conditions. Secondly, since variants V1-LIN and V1-LIN-UNB use the new semi-linear semantics, we must determine whether testing – aka falsification – still successfully finds bugs when guided by this new robustness notion. (The other two variants use the classical semantics and so this question does not arise for them). All experiments were conducted on a machine with a AMD Ryzen 7 PRO 7840U CPU and 16 GB of LPDDR5 RAM.

Fig. 3: Online runtimes (seconds), log-linear scaling.
A. Monitoring Results
For implementing the robustness computation in MPC we use MP-SPDZ [22], a commonly-used framework for MPC. From this framework we select the MASCOT [26] protocol, modified for semi-honest security. A run of this computation consists of three phases – (1) pre-processing, which generates random data to be used in the MASCOT protocol; (2) setup, which performs initialization of the protocol; and (3) online, which runs the protocol with the provided inputs and . Phases (1) and (2) do not require the inputs: (1) can be run far in advance, and (2) is run immediately before the provision of inputs. In closed-loop testing, (2) can be run while the model is being simulated to generate the trace .
In this set of experiments in MP-SPDZ we use three altitude signals from the FASER 05 dataset of [27] with various lengths: 10, 50, 100, and 250. We use the following five formulas, where .
We run all combinations of inputs, with the three signals of four different lengths each and five formulas, for each of our four algorithms, for a total of 240 combinations. When producing results in this section, we average the online runtime across all runs for a given pairing of algorithm and signal length. Since execution is done within MPC, all inputs of the same size yield the same runtime and memory consumption; the only differences in execution times or memory arise from input sizes and the algorithms being computed.
Online phase. In Fig. 3 we can see that the overall fastest variant is V1-UNB, with a runtime of 0.009 seconds at signal length 10 and 0.13 seconds at signal length 250. For the bounded variants, the semi-linear semantics yield runtime

Fig. 4: Preprocessing runtimes (seconds), log-linear scaling.
savings; e.g. for signal length 250, 1.59 seconds vs 1.25 seconds for V1 and V1-LIN, respectively. But in the unbounded variants, the new semantics do not yield improvements (in fact it's a bit slower). This might be because the unbounded STL fragment only uses 2-place max/min operations, and replacing some of these by a dot product is not noticeably faster, but rather requires extra time to convert to.

Fig. 5: Setup runtime (seconds), log-linear scaling.

Fig. 6: RAM of setup and online calculations (MB), log-linear scaling.
Pre-processing and setup phases. Figures 4 and 5 show the runtimes for the pre-processing and setup phases, respectively. In the unbounded case, the max/min semantics do better than the semi-linear semantics (at signal length 250, 5.55 seconds for V1-UNB vs 6.86 seconds for V1-LIN-UNB). There is no significant difference between the semantics in the bounded case. For the setup phase, the only significant difference between semantics is in the bounded case – V1-LIN beats V1 with a time of 6.42 seconds versus 9.31 seconds, respectively for a signal length of 250. It is unclear what causes this increased performance; for setup in particular, performance gains are likely caused by implementation details within MP-SPDZ. Finally, recall that pre-processing is done ahead of time independently of input formula and signal, and that setup can run in parallel with the system simulation. So as long as simulation is on the order of setup runtime, the overhead is negligible.
Across all runtime phases, we can see that V1-LIN is up to 30% faster than V1, while V1-LIN-UNB is up to 20% slower than V1-UNB. Moreover, the unbounded variants are considerably faster than the bounded variants. All runtimes grow polynomially as signal lengths increase (figures are log-linear scaling).
RAM usage. The bounded variants use the most RAM: V1-LIN uses 1.3 GB for signal length 250, and V1 uses 1.9 GB. The unbounded variants use considerably less – about 46 MB for signal length 250.
These are trends similar to what we see with the runtimes. In addition to the unbounded variants outperforming the bounded variants, V1-LIN appears to outperform V1 in RAM usage especially as signal lengths increase – at signal length 250, V1-LIN uses approximately 45% less RAM than V1, demonstrating that V1-LIN is useful for reducing both runtime and RAM usage. RAM scaling as a whole appears to match runtime scaling as signal lengths increase.
B. Closed-Loop Testing
Robustness-guided testing, aka falsification, searches for bugs by minimizing robustness over the space of system control signals: if it finds a control signal such that the system's output signal has negative robustness, then this is a specification violation. We ran four system models: a bicycle, kite, quadcopter, and an F16 model from [28], We used three unique formulas per model, each with a depth 4 syntax tree. Formulas were chosen such that falsification rate was between 55% and 90% for V1 after running a general simulated annealing loop with PSY-TaLiRo [29] 1000 times. For the closed-loop testing we evaluated V1 and V1-LIN.
We minimized robustness using General Simulated Annealing within PSY-TaLiRo [29]. The minimization terminates when a negative robustness is found. We performed 100 trials of each system/formula/variant pairing, identifying 1) whether the trial produced a negative robustness, and 2) the iteration of Simulated Annealing at which there has been no change in the minimum robustness found so far in the past 300 iterations, suggesting a local minimum. We call this convergence speed.

Fig. 7: Falsification rate across models and formulas.

Fig. 8: Convergence speed across models and formulas. The Y axis shows the iteration at which there has been no change in the minimum robustness found so far in the last 300 iterations.
Falsification rates are shown in Fig. 7, and convergence speeds are shown in Fig. 8.
We conducted a two-sided Student’s t-test for each model/formula pairing (tested data is shown in Fig. 7). The minimum p-value produced for a given model/formula pairing is 0.066 (the kite/phi12 pairing). Thus, at the 0.05 significance threshold, there is no statistically meaningful evidence that V1-LIN falsifies more or less often than V1.
For convergence testing we conducted a one-sided Student’s t-test for each model/formula pairing (tested data is shown in Fig. 8), with a null hypothesis that V1-LIN converges no more slowly than V1. The minimum p-value produced in these tests for a given model/formula pairing is 0.28 (the quadcopter/phi5 pairing). There is no statistical evidence suggesting that V1-LIN converges more slowly than V1. Rather, from our results, it seems as though V1-LIN outperforms V1 in converging to a minimum, though this wasn’t an objective when designing the semi-linear semantics.
Considering our results with falsification and convergence in the closed-loop setting and runtime/RAM capabilities in MPC, the semi-linear robustness V1-LIN is a suitable replacement for V1 in a closed-loop MPC setting. Comparing the bounded and unbounded algorithms, the unbounded variants (V1-UNB and V1-LIN-UNB) significantly outperform the bounded ones (V1 and V1-LIN). This is expected, as the bounded variants address more complex formulas.
V. CONCLUSION
We presented the first privacy-preserving robustness monitor for dense-time STL interpreted over timed state sequences. The monitor uses the MASCOT protocol as implemented in the MP-SPDZ MPC framework. Working with the unbounded fragment of STL, and using a new, semi-linear, robust semantics were shown to yield significantly faster monitors. Closed-loop testing appears practical for the semi-linear robustness measure, falsifying at least as quickly as the max/min robustness.
REFERENCES
[1] O. Maler and D. Nickovic, “Monitoring temporal properties of continuous signals,” in International symposium on formal techniques in real-time and fault-tolerant systems. Springer, 2004, pp. 152–166.
[2] G. E. Fainekos and G. J. Pappas, “Robustness of temporal logic specifications for continuous-time signals,” Theoretical Computer Science, vol. 410, no. 42, pp. 4262–4291, 2009.
[3] “Cadence,” https://cadence.com, 2024, accessed February 15, 2024.
[4] “Gf micro,” https://gfmicro.com, 2024, accessed February 15, 2024.
[5] “Rambus,” https://rambus.com, 2024, accessed February 15, 2024.
[6] “Collins Aerospace Test Labs,” https://www.collinsaerospace.com/what-we-do/industries/commercial-aviation/aerostructures/aerospace-test-labs, 2024, accessed February 15, 2024.
[7] Darko Stern (AVL), “Personal communication,” https://avl.com, 2024, accessed February 15, 2024.
[8] “Global semiconductor third-party testing services market growth (status and outlook) 2024-2031,” https://www.reliableresearchreports.com/, 2024, accessed February 15, 2024.
[9] “Rainforest qa,” https://www.rainforestqa.com/features/test-automation, 2024, accessed March 10, 2024.
[10] “Testlio,” https://testlio.com, 2024, accessed March 10, 2024.
[11] W. Council, “Third-party testing and the quality of software components,” IEEE Software, vol. 16, no. 4, pp. 55–57, 1999.
[12] “Testing as a service market size, share & trends analysis report by test type (functionality, security, compliance), by deployment type, by end-use, by region, and segment forecasts, 2024 - 2030,” https://www.grandviewresearch.com/industry-analysis/testing-as-a-service-market-report, 2024, accessed September 11, 2024.
[13] “Third-party laboratory testing of semiconductor market: Trends, opportunities and competitive analysis [2023-2028],” https://www.researchandmarkets.com/reports/5782362/third-party-laboratory-testing-semiconductor, 2023, accessed September 11, 2024.
[14] D. Evans, V. Kolesnikov, M. Rosulek et al., “A pragmatic introduction to secure multi-party computation,” Foundations and Trends® in Privacy and Security, vol. 2, no. 2-3, pp. 70–246, 2018.
[15] H. Abbas, “Work-in-progress: Private runtime verification,” in 2019 International Conference on Embedded Software (EMSOFT). New York, NY, United States: Association for Computing Machinery, 2019, pp. 1–2.
[16] R. Banno, K. Matsuoka, N. Matsumoto, S. Bian, M. Waga, and K. Suenaga, “Oblivious online monitoring for safety ltl specification via fully homomorphic encryption,” in Computer Aided Verification, S. Shoham and Y. Vizel, Eds. Cham: Springer International Publishing, 2022, pp. 447–468.
[17] I. Chillotti, N. Gama, M. Georgieva, and M. Izabachène, “Tfhe: fast fully homomorphic encryption over the torus,” Journal of Cryptology, vol. 33, no. 1, pp. 34–91, 2020.
[18] M. Blanton and M. Aliasgari, “Secure outsourcing of dna searching via finite automata,” in Data and Applications Security and Privacy XXIV, S. Foresti and S. Jajodia, Eds. Berlin, Heidelberg: Springer Berlin Heidelberg, 2010, pp. 49–64.
[19] H. Sasakawa, H. Harada, D. duVerle, H. Arimura, K. Tsuda, and J. Sakuma, “Oblivious evaluation of non-deterministic finite automata with application to privacy-preserving virus genome detection,” in Proceedings of the 13th Workshop on Privacy in the Electronic Society, ser. WPES '14. New York, NY, USA: Association for Computing Machinery, 2014, p. 21–30. [Online]. Available: https://doi.org/10.1145/2665943.2665954
[20] M. Waga, K. Matsuoka, T. Suwa, N. Matsumoto, R. Banno, S. Bian, and K. Suenaga, “Oblivious monitoring for discrete-time stl via fully homomorphic encryption,” in Runtime Verification, E. Ábrahám and H. Abbas, Eds. Cham: Springer Nature Switzerland, 2025, pp. 59–69.
[21] T. A. Henzinger, M. Karimi, and K. Thejaswini, “Privacy-preserving runtime verification,” in Proceedings of the 2025 ACM SIGSAC Conference on Computer and Communications Security, 2025, pp. 2774–2787.
[22] M. Keller, “MP-SPDZ: A versatile framework for multi-party computation,” in Proceedings of the 2020 ACM SIGSAC Conference on Computer and Communications Security, 2020. [Online]. Available: https://doi.org/10.1145/3372297.3417872
[23] H. Yang, G. Fainekos, H. Sarjoughian, and A. Shrivastava, “Dynamic programming algorithm for computing temporal logic robustness,” Ph.D. dissertation, Arizona State University, 2013.
[24] R. Cramer, I. B. Damgård, and J. B. Nielsen, Secure Multiparty Computation and Secret Sharing. Cambridge University Press, 2015.
[25] R. Canetti, “Universally composable security: a new paradigm for cryptographic protocols,” in Proceedings 42nd IEEE Symposium on Foundations of Computer Science, 2001, pp. 136–145.
[26] M. Keller, E. Orsini, and P. Scholl, “MASCOT: Faster malicious arithmetic secure computation with oblivious transfer,” Cryptology ePrint Archive, Paper 2016/505, 2016. [Online]. Available: https://eprint.iacr.org/2016/505
[27] H. Mokhtarzadeh, “Reference position and attitude together with raw sensor data from seven small uav flights during 2011-12,” 2014, retrieved from the University Digital Conservancy. [Online]. Available: https://hdl.handle.net/11299/165567
[28] P. Heidlauf, A. Collins, M. Bolender, and S. Bak, “Verification challenges in f-16 ground collision avoidance and other automated maneuvers.” ARCH@ ADHS, vol. 2018, 2018.
[29] Q. Thibeault, J. Anderson, A. Chandratre, G. Pedrielli, and G. Fainekos, "Psy-taliro: A python toolbox for search-based test generation for cyber-physical systems," in Formal Methods for Industrial Critical Systems, A. Lluch Lafuente and A. Mavridou, Eds. Cham: Springer International Publishing, 2021, pp. 223–231.
APPENDIX A
SECURITY DEFINITIONS AND GUARANTEES
This section provides the formal definitions for protocol security that apply to our work. The material here is standard in the cryptography literature. We refer to [14] and [24] for textbook treatments of this material, and to [25] for a more in-depth treatment of the security model for MASCOT specifically.
We assume that there are two parties: Designer and Tester. An interactive MPC protocol, or simply a protocol, is a pair of instructions , one for Designer and one for Tester, such that at each interaction round, the Tester and the Designer send messages to each other as dictated by the protocol. A protocol has a setup phase, in which the parties generate random data for later use in the protocol, among other things. We can think of the setup phase as round 0.
We assume the two parties are honest-but-curious, aka semi-honest. This means that they follow the steps of the protocol, but might store a transcript of the exchanged messages and their own random numbers, in order to perform extra calculations ‘on the side’, to try and learn more than just .
a) Designer’s private input.: The Designer’s input is a signal of length , as per Def. II.1. When doing calculations in the clear (without MPC) the signal values and timestamps are treated as type DOUBLE, say. For MPC, formally, the entries of and are elements of a sufficiently large field, which allows to perform addition and multiplication with sufficient accuracy.
b) Tester’s private input.: The Tester’s input is an STL formula over a finite set of atomic propositions. This is represented as a list of all its sub-formulas. Note that unlike in [21] for instance, an STL specification has no automaton representation. Note also that the formula is an input to the robustness functionality, whereas in [21] it is fixed and compiled as part of the circuit.
c) Indistinguishability: An ensemble is a sequence of random variables , ranging over strings of bits of length polynomial in . For a given , the notation will mean that is drawn according to the distribution of . We will need the following notion to define security of a protocol.
Definition A.1. The ensembles X and Y are computationally indistinguishable if for every probabilistic polynomial-time algorithm , every positive polynomial p, and all sufficiently large , it holds that
If X and Y are computationally indistinguishable, we write .
Algorithm D is known as the distinguisher. Intuitively, D tries to distinguish the two ensembles by computing a test that is sufficiently likely (probability more than ) to return different results on at least one random variable chosen from the two ensembles. The definition says that no such distinguisher exists for the two ensembles X and Y: no matter what distinguisher is selected, there exist long enough random variables (via choice of ) that it cannot distinguish with any likelihood.
d) The ideal and real worlds.: The definition of security refers to an ideal world, in which a trusted (or incorruptible) third party receives the inputs of Designer and Tester via secure channels, performs the computation , and reveals the result to the two parties. In this ideal setting, by definition, Designer and Tester can only learn whatever they can compute using their input and . This much is inevitable, which is why this is considered ‘ideal’.
In the real world, there is no trusted third party; rather, the two parties, Designer and Tester, execute the steps of the protocol . What each of them gets to see is their own inputs, the messages they exchange with the other party, and any random numbers they draw. This constitutes their view, for Tester and for Designer. Here is the security parameter. The protocol is considered secure (or private) if anything a party can compute based on their view in the real world is something they could compute anyway even in the ideal world. So we also define an ideal, or simulated, view for each party. The ideal view for a party is whatever they can compute using a probabilistic polynomial-time algorithm (known as a simulator) based on what they see in the ideal world, namely their own input and the final functionality output. These ideal views are denoted for Tester and for Designer.
Note that a view, whether real or ideal, is a random variable, so as we vary the inputs to the protocol, we obtain an ensemble. To say that the real and ideal views are practically the same, we have to consider indistinguishability of the ensembles of views. We thus arrive at the following definition.
Definition A.2 (2-party privacy w.r.t. semi-honest behavior and deterministic functionality). A protocol privately computes a deterministic functionality f iff there exists simulators and s.t.
Note that the correctness of the protocol (the fact that it computes the correct value) is included in the definition of security: the trusted third party in the ideal world reveals the correct value , which is thus part of the ideal view. We pick a distinguisher (in Def. A.1) that simply returns the computed value from both ideal and real views. If the probability of error of the protocol cannot be made negligible (smaller than any inverse polynomial in ) then this would be able to distinguish the two ensembles, which contradicts security.
APPENDIX B
PROOF OF SOUNDNESS OF SEMI-LINEAR ROBUSTNESS
The following is a proof for Thm. III.3.
Proof. For clarity, let and for and .
We start with the case , and argue by induction on the structure of the formula. Case is excluded since and case is true by definition.
Case : We have that . Thus .
Case : We have that . Thus .
Case : we have that and . By the induction hypothesis, and thus .
Case : at least one of and is non-positive. Without loss of generality, say it is . Then by the induction hypothesis and , and so .
Case : For all , we have that . Then by the same reasoning as the case, we have . Summing these over all equates to 0, so .
Case : For at least one , we have that . Call the first instance of this occurrence . Then . The summation of these is 0, so .
Next we consider the case . The base cases (logical constants and atoms) are immediate.
Case : It holds that . Without loss of generality, suppose , so a fortiori . By the induction hypothesis, ; if then and if then . Either way, . Since and the average of the two must be greater than 0, and since and then the average must also be less than . Thus . Therefore .
Case : Both and , and so and . The result follows from the induction hypothesis.
Case : Let and let , for all . There is some where . By similar logic to the previous case , we have . Then by similar reasoning to the case , we say the maximum of is greater than or equal to the average of , i.e., we have . Thus . All other for are greater than or equal to 0, since every element in is greater than or equal to 0 by the induction hypothesis. Therefore , since every element of the average is at least 0 and is strictly positive. Summarizing, we have .
Case : Let
and let , for all . Since the maximum of values upper bounds their average, for all . This holds for all , so and so . But we still need to show that - to see this, consider that for all , . therefore at least one element in is positive. Let be the maximum of these elements; then and . By the induction hypothesis we have that . Thus there is at least one element in that is positive, and so is also positive. The minimum of positive elements is positive, therefore . Summarizing, we have .
APPENDIX C THE BOUNDS SUBROUTINE
Here we provide the pseudocode for the BOUNDS subroutine.
Algorithm 4: BOUNDS
Input: a non-negative interval , current index , sampled times of the signal , the length of the signal, interval index lower bound from the previous iteration, interval index upper bound from the previous iteration
Output: Return minimum and maximum indices of values contained in the interval
Procedure BOUNDS( )
if then
else
if then else
for do
if then
break
end
if then else
for do
if then
else break
end
return