Mock Exam · AI4ST

Simulation Exam — Interactive

The full official repository: 21 multiple-choice + 3 open-ended questions, verbatim. Choose your mode, answer, and get an instant graded review with the reasoning behind every answer.

📝 21 MCQ + 3 open ⏱ self-timed ✅ instant graded review
00:00
Answered0/21
Exam mode: answer freely, change your mind, nothing is revealed until you submit.
PART I

Multiple-Choice Questions

1
L2 · IoT
What specific function does an ADC perform in the context of IoT devices?
aADC converts digital signals to analog signals, enabling IoT devices to act on the environment through actuators.
bADC amplifies weak signals to enhance communication range of IoT devices, ensuring data integrity over long distances.
cADC filters out noise from sensor data to improve the accuracy of IoT devices.
dADC converts analog signals into digital signals, enabling IoT devices to process and interpret sensor data.
d — an Analog-to-Digital Converter turns continuous physical signals into digital numbers a device can process. a describes the reverse (a DAC / actuator path); b (amplifier) and c (noise filter) are unrelated functions.
2
L12 · Federated
How does the "membership inference attack" train the attack model?
aThe attack model is generated by perturbing the target model.
bThe attack model is obtained by reconstructing a black-box target model only from its observable inputs and outputs.
cThe attack model is trained by observing the behavior of a "target model" while processing "member" and "non-member" data.
dThe attack model is trained by observing the behavior of a "shadow model" while processing "member" and "non-member" data.
d — the attacker can't see the target's training membership, so it trains shadow models (imitating the target) on data it does know is member/non-member, and learns the tell-tale confidence pattern. c is the one-word swap (shadow → target); b is model extraction, a is a different attack.
3
L13 · XAI
Which information of the neural network does GradCAM use to generate a heatmap highlighting the regions of the input considered important for classification?
aThe gradient on the softmax layer
bThe gradient on the final dense layer
cThe gradient on the final convolutional layer
dThe gradient on each convolutional layer
c — GradCAM weights the last convolutional layer's feature maps by the gradient of the target class: that layer is still spatially located yet semantically rich. d (every conv layer), a (softmax) and b (dense) lose either spatial structure or the slide's exact wording.
4
L10 · Incremental
How does Active Learning select the samples to be labeled?
aby randomly choosing data points from the stream
bby choosing the data points where the model is more uncertain
cby choosing the data points that are different to the ones in the training set, according to a similarity function and a threshold
dby choosing the data points that are better captured by common-sense knowledge
b — active learning queries the user only on the most uncertain points (least-confidence / margin / entropy). c describes label propagation (similarity + threshold); a is random sampling; d is unrelated.
5
L4 · Transformers
In the self-attention mechanism, the "Query", "Key", and "Value" vectors obtained from each element of the input sequence are used to compute the output of the self-attention layers. What is the main role of the "Value" vector?
aGenerating the latent representation of each sequence element, that will be weighted by the self-attention scores.
bComparing the similarity to the "Key" representations of the other elements.
cScaling the attention scores in the range [0,1]
dGiven an element of the sequence, determining the other ones most relevant through the "Query" vector.
a — the Value is each element's content/latent representation, and the output is the Values weighted by the attention scores. b/d describe the Key and Query roles; c (softmax scaling) is a distractor.
6
L5 · Localization · FALSE
Which of these sentences on RSSI values is FALSE?
aRSSI values can only be obtained using Bluetooth Low Energy beacons
bRSSI values are subject to the multi-path effect
cIt is necessary to have at least 3 RSSI values for accurate localization using distance-based approaches
dA single RSSI value can only estimate the distance from the receiver and the transmitter antennas, but it does not provide sufficient information for localization
a is FALSE — RSSI is available on WiFi too, not only BLE; the absolutizer "only" is the tell. b, c and d are all true statements about RSSI.
7
L9 · Multi-Inhabitant
How can wearable devices (e.g., a smartwatch) simplify data association in multi-inhabitant settings?
aBy obtaining additional context information (e.g., micro-localization, gestures), it is possible to use them to perform knowledge-based data association without further training
bWearable devices can automatically detect the environmental sensors that are close to the user
cBy acquiring additional context information (e.g., micro-localization, gestures) it is possible to include them as additional features to train a data-driven data association model
dThere is no advantage of using wearable devices for data association
a — wearables supply context (micro-localization, gestures) enabling knowledge-based association without training. c is the sibling trap (the data-driven, with-training variant); d is a nihilist option (never correct); b is not the point.
8
L6 · Smart Energy
Which of the following is a primary benefit of load disaggregation in smart homes?
aidentifying abnormal situations
bscheduling of deferrable appliances in low-price energy hours
cunderstanding how each appliance contributes to the overall energy consumption obtained by a smart meter
dpredicting the habits of the resident
c — load disaggregation (NILM) recovers per-appliance contributions from a single smart-meter signal. a, b and d are other (downstream) energy tasks, not what disaggregation itself delivers.
9
L14 · Generative
Why is a Variational AutoEncoder better than a "classic" AutoEncoder for Generative AI?
aIts decoder generates multiple variations of the output given the same input in the latent space
bIt is significantly faster during inference
cIt is significantly faster during training
dIt learns a regularized latent space while mitigating overfitting
d — the VAE's KL term regularizes the latent space (so sampling decodes to meaningful outputs) and curbs overfitting. b/c (speed) are false; a sounds plausible but isn't the defining advantage the slide gives.
10
L11 · Transfer / SSL
What is a pretext task in Self-Supervised Learning?
aIt is task of fine-tuning a feature extractor on the target domain by using labeled data
bIt is a supervised learning task that uses labels automatically extracted from unlabeled data. Its role is to generate a reliable feature extractor leveraging a large pool of unlabeled data
cIt is an unsupervised learning task. Its role is to generate a reliable feature extractor leveraging a large pool of unlabeled data
dIt is the task of fine-tuning a feature extractor on the target domain by using unlabeled data
b — a pretext task is framed as supervised, but the labels are auto-extracted from unlabeled data, yielding a reusable feature extractor. c mislabels it "unsupervised"; a/d describe downstream fine-tuning, not the pretext.
11
L10 · Incremental
How does the replay mechanism mitigate catastrophic forgetting in continual incremental learning?
aBy maintaining a small representative buffer of labeled data points about past information. When updating the model with new data, the data in the buffer are also used.
bBy distilling knowledge from the previous model encoding past information to a new model trained on new data.
cBy learning the importance of each model's weight. When updating the model on new data, a loss penalizes the changes of the most important weights.
dBy continuously storing all the data points used to train the model. When updating the model with new data, the old data are also used.
a — replay keeps a small (limited) buffer of old samples and mixes them into each update. b is LwF (distillation), c is EWC (weight importance), d is the "store all data" strawman — a buffer is limited.
12
L10 · Incremental · FALSE
Which one of the following sentences on semi-supervised learning is FALSE?
aIt requires to pre-train a model with a limited amount of labeled data
bIt is a technique to mitigate labeled data scarcity
cOnce pseudo-labels are obtained, it is always necessary to re-train the whole model from scratch
dIts goal is to spread pseudo-labels to unlabeled data points
c is FALSE — pseudo-labels update the model incrementally; you do not "always re-train from scratch" (absolutizer "always"). a, b and d are all true.
13
L3 · Time Series
How to use an autoencoder for anomaly detection in time-series?
aThe autoencoder is trained to reconstruct "anomalous" data. Low reconstruction errors on unseen data may indicate anomalous data points.
bThe autoencoder is trained to reconstruct "normal" data. High reconstruction errors on unseen data may indicate anomalous data points.
cThe autoencoder is trained to reconstruct both "normal" and "anomalous" data. High reconstruction errors on unseen data may indicate anomalous data points.
dThe autoencoder is trained to reconstruct "normal" data. Low reconstruction errors on unseen data may indicate anomalous data points.
b — train on normal data so it reconstructs normality well; a sample it can't reconstruct (high error) is anomalous. d inverts the error direction, a inverts the training data, c trains on both.
14
L7b · HAR Mobile
Which of the following options describes the "model quantization" approach to deploy HAR models on resource-constrained devices?
aThe original model is simplified by pruning unimportant parts (e.g., neurons/weights with minor impact on accuracy).
bA smaller model (i.e., the compressed model) is trained to mimic the behavior of the original model, leveraging the probability distribution emitted by the original model on input data.
cSome components of the original model are merged (e.g., sharing the same weights for similar edges).
dThe numerical precision of the weights in the original model is reduced.
d — quantization = lowering the numeric precision of weights (e.g., float32 → int8). a is pruning, b is knowledge distillation, c is weight merging — the three sibling compression methods.
15
L4 · Seq2Seq
When applying classic Seq2Seq models (without attention) for time series forecasting, which information is provided to the decoder?
athe context vector and a special token to generate the first token
bonly the context vector
conly the last element of the input sequence
dthe context vector and the last element(s) of the input sequence to generate the first token
dfor time series the decoder is seeded with the context vector plus the last input element(s) (there's no <SOS> token). a is the NLP setup (special token); b/c are incomplete. The "for time series forecasting" qualifier selects this specialized slide.
16
L2 · IoT
What is the difference between "push" and "pull" strategies in sensor data acquisition?
aConsidering the 'pull' strategy, data are queried when the gateway detects anomalies with respect to a model. In the 'push' strategy, the sensors transmit data (e.g., when they differ from a model)
bConsidering the 'push' strategy, each sensor immediately transmits data to its neighbors until they reach the gateway. In the 'pull' strategy, sensors periodically transmit data.
cConsidering the 'push' strategy, sensors are queried with a frequency decided by the user. In the 'pull' strategy, the sensors transmit data (e.g., when they differ from a model)
dConsidering the 'pull' strategy, sensors are queried with a frequency decided by the user. In the 'push' strategy, the sensors transmit data (e.g., when they differ from a model)
dpull = sensors queried at a user-defined frequency; push = sensors transmit on their own (e.g., when they differ from a model). c swaps the two labels; a and b garble the mechanism.
17
L12 · Federated
In Federated Learning, how to use transfer learning to mitigate the non-IID problem?
aeach client sends to the server only the local shared layers (e.g., feature extractor), the resulting global model is then adapted locally (using fine-tuning)
bit is not possible to combine transfer learning and federated learning
ceach client sends to the server only the personalized (e.g., the classification head) layers, the resulting global model is then adapted locally (using fine-tuning)
deach client performs local training before sending the whole local model to the server
a — share the common feature-extractor layers federally, then fine-tune the personalized layers locally per client. c is the swap (sharing the personalized head instead); b is a nihilist option; d is plain FedAvg, no transfer.
18
L12 · Federated
Which of these sentences better describes the asynchronous aggregation process "FedAsync" in Federated Learning?
aIn FedAsync, the global model is periodically updated based on some heuristics. FedAsync mitigates the problem of non-IID clients.
bIn FedAsync, the global model is periodically updated based on some heuristics. FedAsync mitigates the problem of "stragger" devices that are slower than others in generating local models.
cIn FedAsync, the global model is updated as soon as a local model update is received. FedAsync mitigates the problem of non-IID clients.
dIn FedAsync, the global model is updated as soon as a local model update is received. FedAsync mitigates the problem of "straggler" devices that are slower than others in generating local models.
d — the async aggregation (the updater thread) updates the global model as soon as each local update arrives, mitigating stragglers (slow devices). "Periodically" (a/b) describes the scheduler thread; "non-IID" (a/c) is the wrong problem.
19
L15 · GNNs
What is the primary goal of adding self-loops for message passing within GNNs?
aEnsuring permutation-dependent graphs, so that isomorphic graphs are treated differently
bRemoving the need for the AGGREGATE step and mitigating overfitting
cEnsuring permutation-invariant graphs, so that isomorphic graphs are treated the same way
dRemoving the need for the UPDATE step and mitigating overfitting
d — folding the node into its own neighborhood lets you drop the UPDATE step and often eases overfitting. b is the one-word swap (UPDATE → AGGREGATE — you still must aggregate); a/c are about permutation invariance, a separate property.
20
L3 · Time Series · FALSE
Which of the following sentences on the cell state of LSTM is FALSE?
aIt can be updated and/or cleared at each time step.
bIts values do not depend on the short-term memory.
cIts role is to capture long-term dependencies
dIt is not directly associated with weights, so that it can mitigate exploding/vanishing gradients.
b is FALSE — the cell state does depend on the short-term memory: the gates read the short-term hidden state to decide what enters/leaves the cell state ("do not depend" is the absolutizer). a, c and d are true.
21
L13 · XAI
Which of the following is a "counterfactual explanation"?
aThe AI model would have classified the activity as 'using treadmill' instead of 'jogging', if it had been carried out in a gym instead of a park.
bThe AI model classified the activity as 'jogging' because it associated a high weight to the feature related to the semantic location "park".
cThe AI model classified the activity as 'jogging' mainly because the subject was at the park. Indeed, when masking the feature about the semantic location "park", the classifier is no confident anymore on 'jogging'.
dThe AI model classified the activity as 'jogging' because the feature vector is similar to a sample in the training set that was labeled as 'jogging'.
a — a counterfactual states the smallest change that would have flipped the prediction ("would have classified as X, if …"). b is feature-importance, c is a perturbation/occlusion explanation, d is example/prototype-based.
PART II

Open-Ended Questions

Write your answer, then reveal the model answer to self-grade. These are not counted in the MCQ score.
22
L3 · Time Series Analysis
a) What is the difference between outlier and anomaly detection? Describe point and subsequence outliers in the time series.
b) Describe what is the idea behind smoothing to mitigate outliers in time series. Which parameter determines the trade-off between utility and outlier removal, and why?
Model answer

a) Outlier detection targets individual data points that deviate markedly from the rest of the series; anomaly detection targets patterns/behaviors that are abnormal and usually meaningful (e.g., signalling a fault), often spanning a stretch of the signal and depending on temporal context — an anomaly is an outlier that is "interesting". Point outlier: a single sample that is far from its neighbours/expected value. Subsequence outlier: a consecutive run of points that is collectively abnormal even though each individual value might look ordinary on its own.

b) Smoothing replaces each point with an aggregate (e.g., a moving average) computed over a window of surrounding points, so isolated noise/outliers are averaged out. The window size sets the trade-off: a larger window removes more outliers/noise but also erases genuine detail (loss of utility/information), while a smaller window preserves detail (utility) but removes fewer outliers. So the window length balances utility vs outlier removal.

23
L6 · Smart Energy Management
a) What is the role of short-term load forecasting in smart-home environments? Which additional context variables may be relevant?
b) Which categories of appliances may be re-scheduled based on load forecasting? Briefly summarize how to re-schedule based on reinforcement learning.
Model answer

a) Short-term load forecasting predicts near-future energy consumption (a short forecast horizon from a window of past observations) so the home can plan ahead: shift load to low-price hours, support demand-response, avoid peaks, and flag anomalies. Relevant context variables: weather (temperature), calendar information (time of day, day of week, holidays/season), occupancy/presence, and recent appliance usage.

b) Deferrable appliances (can be delayed but not interrupted once started, e.g., washing machine/dishwasher) and controllable appliances (adjustable power levels) can be re-scheduled; non-deferrable ones cannot. RL re-scheduling: model the home as an environment and the scheduler as an agent that chooses when/at-what-power to run appliances; it learns a policy (e.g., Q-learning with ε-greedy exploration) maximising a reward that trades off energy cost/peak reduction against user comfort and waiting time, subject to the appliances' constraints.

24
L9 · Multi-Inhabitant HAR
a) Define the data association problem. Why is it a challenge in Multi-Inhabitant settings? What is the difference compared to Subject Separation?
b) Describe one of the multi-label approaches for data-driven data association. In general, what are the limits of multi-label approaches for Multi-Inhabitant HAR?
Model answer

a) Data association is the problem of attaching each sensor event/observation to the specific inhabitant who generated it. It is hard in multi-inhabitant settings because environmental (binary) sensors cannot tell who triggered them, and several residents act concurrently so their events interleave. Subject separation is the weaker problem of splitting the stream into per-person sequences without assigning real identities — it groups events by an (anonymous) person, whereas data association also attaches the actual identity.

b) Multi-label approaches include FHMM (factorial HMM with shared observations), combined labels (treat each combination of simultaneous activities as one class), binary relevance (one binary classifier per activity), and multi-output deep models. Example — combined labels: enumerate all activity combinations as distinct classes and train a single multi-class classifier. Limits: all combinations must appear in the training data, there is no generalization to unseen combinations, it scales poorly as residents/activities grow (Nᴹ blow-up), binary relevance ignores dependencies between activities, and rare combinations suffer from data scarcity.

0/21
Answered 0/21