Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Ethics in pervasive computing

Ethical principles, legal responsibilities and practical risk-mitigation for engineers building pervasive computing systems (privacy, consent, fairness, accountability, security, surveillance dilemmas, and design guidance).

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Pervasive computing systems (sensors, wearables, smart environments) collect continuous personal data and act in people’s daily spaces. An engineer uses ethics to design systems that respect privacy, avoid harm, meet legal duties, maintain user trust, and reduce organisational and personal liability.

Key ideas

Before using each specialised word I define it.

  • Pervasive computing: computing embedded in everyday objects, always available, often sensor-driven. (Used in other course topics such as Smart devices and smart environments, Wearable computing.)
  • Privacy: an individual’s right to control access to personal information about themselves. Exact statement: "Privacy is the right of an individual to determine when, how, and to what extent information about them is communicated to others." Assumption: "personal information" is data that can identify or be linked to an individual.
  • Personal data: any information relating to an identified or identifiable person. Assumption: identifiers include direct (name, ID) and indirect (device id + location history).
  • Informed consent: a person’s voluntary agreement to data collection and processing after being given clear, understandable information about purpose, scope, risks, and rights. Precise requirement used in engineering: consent must be (1) freely given, (2) informed, (3) specific, (4) unambiguous (clear affirmative action), and (5) revocable; explicit consent is required for sensitive data.
  • Data minimization: collect and store the minimum personal data necessary for the stated purpose. Exact statement: "Systems must limit collection, retention and access to what is necessary for the declared purpose."
  • Purpose limitation: data collected for one purpose must not be used for another incompatible purpose without further consent or lawful basis. Common lawful bases include consent, contract performance, legal obligation, vital interests, public task, and legitimate interests (subject to a balancing test).
  • Anonymization: a process that irreversibly prevents identification of the data subject. Assumption: true anonymization means re-identification risk is negligible in practicable terms.
  • Pseudonymization: replacing direct identifiers with pseudonyms such that re-identification requires additional information kept separately.
  • Differential privacy: a formal privacy definition that guarantees outputs of an analysis do not change substantially when any single individual’s data is added or removed. Exact statement: A randomized algorithm M gives ε-differential privacy if for all datasets D1 and D2 differing in one individual, and all outputs S, Pr[M(D1) ∈ S] ≤ exp(ε) · Pr[M(D2) ∈ S]. Assumption: probabilities are over M’s random coins; ε is privacy loss parameter.
  • Fairness: absence of unjustified bias in system behaviour or decisions affecting people. Precise forms: statistical parity, equalized odds, and individual fairness—each defined differently and often incompatible. Definitions: statistical parity requires similar positive decision rates across protected groups; equalized odds requires equal true positive and false positive rates across groups; individual fairness requires that similar individuals receive similar outcomes.
  • Accountability: systems should have mechanisms so responsible parties can be identified and held responsible for actions and harms.
  • Transparency: making system purpose, data flows and decision rules understandable to stakeholders. Also ensure data subject rights: access, rectification, erasure, restriction, portability, objection, and (where applicable) the right not to be subject solely to automated decisions with legal or similarly significant effects.
  • Beneficence / Non-maleficence: design should aim to do good (beneficence) and avoid harm (non-maleficence).
  • Contextual integrity: privacy is maintained when data flows conform to expected norms of information transmission in the context. Exact idea: norms define appropriate senders, receivers, types of data and transmission principles.

Important principles engineers must apply (stateable as exam answers):

  1. Privacy by Design: integrate privacy into system architecture from the start, not as an afterthought. Key measures: data minimization, default privacy-friendly settings, local processing, encryption, access control.
  2. Security as a prerequisite: confidentiality, integrity and availability (the CIA triad) must be preserved for any personal data.
  3. Proportionality and Necessity: data processing should be proportionate to the benefit and necessary for the purpose.
  4. Risk assessment and mitigation: identify harms, estimate likelihood and impact, then apply controls.

Diagrams to draw for exam answers (describe exactly):

  • Data flow diagram for a wearable system: draw four boxes horizontally: (1) Sensor wearable labelled 'Wearable (sensor: HR, accel, GPS)', (2) Personal gateway labelled 'Phone / Edge (local storage, encryption)', (3) Cloud server labelled 'Backend (aggregation, ML models)', (4) Third parties labelled 'Insurer / Researcher / Advertiser'. Draw arrows: sensor -> gateway (label: raw sensor data, frequency e.g., 1 Hz), gateway -> cloud (label: encrypted upload, TLS), cloud -> third parties (label: shared datasets / APIs). Mark points where privacy controls can be applied: local processing, pseudonymization, consent checkpoint, access logs.
  • Ethics decision flowchart: draw top box 'Proposed data use' -> decision diamond 'Is the data personal?' yes/no. If no -> proceed; if yes -> next diamond 'Is purpose legitimate & necessary?' -> yes -> 'Can data be minimized or anonymized?' -> yes -> implement; else -> 'Require informed consent / lawful basis / redesign.'

Assumptions behind principles: that stakeholders have diverse preferences; attacks and re-identification are possible; legal regimes may require consent or lawful basis.

Formulas

Risk = Likelihood × Impact — Risk is a qualitative or quantitative score combining the probability (likelihood) of a harmful event and the severity (impact) if it happens. Units: risk is unitless score or e.g., expected loss in currency when both terms are numeric. Applies in risk assessments for privacy/security decisions.

Pr[M(D1) ∈ S] ≤ exp(ε) · Pr[M(D2) ∈ S] — definition of ε-differential privacy. Symbols: M = randomized mechanism; D1, D2 = datasets differing in one individual; S = any subset of outputs; ε (epsilon) = privacy parameter (smaller ε → stronger privacy). Units: ε is unitless. Applies when using randomized algorithms to protect aggregate outputs.

Noise scale ∝ 1/ε — informal relationship: to achieve smaller ε (stronger privacy) you must add larger random noise. For the Laplace mechanism, the noise scale b equals the L1-sensitivity Δ of the query divided by ε; for the Gaussian mechanism under (ε, δ)-DP, σ ≥ (L2-sensitivity Δ divided by ε) · sqrt(2 ln(1.25/δ)). Units: noise units same as query output. Applies to additive-noise mechanisms such as Laplace mechanism.

When applying these formulas in exams, state assumptions (the dataset adjacency definition for differential privacy; for risk, clearly define how likelihood and impact are scaled and combined—no independence assumption is required for a single risk calculation).

Worked examples

  1. Case analysis — Fitness wearable shared with an insurer. Problem statement: A wearable records heart rate and location continuously and uploads to cloud; an insurer requests access to create a premium-risk model. Answer model (exam style, numbered):
  1. Identify stakeholders: user, insurer, wearable vendor, cloud provider, family members (if location reveals visits), regulator.
  2. Identify personal data: heart rate time series (health-related), location (sensitive for patterns), device id (identifier).
  3. Legal / ethical requirements: health data often requires explicit informed consent; apply data minimization and purpose limitation.
  4. Risk assessment: Likelihood = medium (cloud breach possibility); Impact = high (insurance discrimination, privacy harms). Using Risk = Likelihood × Impact → overall high risk.
  5. Mitigations: enforce explicit, revocable consent for insurer sharing; perform local feature extraction (share aggregated risk score, not raw data); pseudonymize before sharing; apply contractual controls and access logs; offer opt-out; perform DPIA (data protection impact assessment).
  6. Decision: If insurer insists on raw data, ethically reject unless legal basis and very strong safeguards exist. If aggregated/pseudonymized data suffices, allow with audit trail. Final: state clearly the recommended technical controls and the ethical justification referencing principles (privacy by design, beneficence, accountability).
  1. Design trace — Smart home camera with face recognition. Task: Show step-by-step what you would do to reduce ethical risk. Trace:
  1. Purpose: home security — define exact scope (detect intruders vs identify guests).
  2. Data minimization: avoid storing raw video; perform face detection locally and only store event timestamps.
  3. Consent: obtain explicit consent from residents and visitors where possible; use visible notices at property entry for visitors.
  4. Transparency: in-app explanation of what is processed, retention time, how to request deletion.
  5. Technical: run recognition on edge device, encrypt any cloud backup, use pseudonyms for logs, maintain access logs.
  6. Policy: restrict sharing with law enforcement to legal requests only; publish transparency report.
  1. Short-theory answer — Define and contrast anonymization and differential privacy (model graduate-level answer):
  • Define anonymization: irreversible removal of identifiers such that re-identification is not reasonably practicable. State limitations: technical re-identification using auxiliary data often defeats naive anonymization.
  • Define differential privacy with formula and explain it provides a mathematical, provable privacy guarantee against arbitrary auxiliary information. Compare: anonymization is aimed at data release; differential privacy offers quantifiable privacy loss (ε). Conclude: for high-risk releases, differential privacy is preferable; note trade-off with utility.

Common mistakes

  • Treating consent as always sufficient; many legal regimes need additional safeguards for sensitive data.
  • Saying "encrypt data" without specifying where (in transit, at rest) and key management.
  • Mixing legal names: citing a law or article number incorrectly. Always state the statute by name and add a note to verify details.
  • Ignoring context: giving blanket statements like "face recognition is always unethical" without discussing purpose, consent and safeguards.

For your exam

Types of questions you will get:

  • Definitions: define privacy, informed consent, differential privacy, anonymization.
  • Short notes: privacy by design, data minimization, transparency, accountability.
  • Case analyses: ethical risk analysis of a pervasive system; propose technical and policy mitigations.
  • Diagrams: draw a data flow diagram for a wearable system and mark controls.
  • Derivations: explain the differential privacy inequality and interpret ε; show the risk = likelihood × impact usage in a DPIA.

What a full-marks answer includes:

  • Clear definitions of all bolded terms used.
  • Identification of stakeholders and explicit list of personal data elements.
  • A structured risk assessment (use the risk formula, list likelihood and impact qualitatively or quantitatively).
  • Concrete technical controls (local processing, encryption details, differential privacy with ε, access controls), policy controls (consent, retention policy), and governance (audits, logs).
  • A labelled diagram if asked.
  • Caveats and limitations: trade-offs (privacy vs utility), re-identification risk, and legal uncertainties.

Quick check

  1. What is data minimization?
  2. State in one line the differential privacy guarantee (use symbols).
  3. Give two technical steps you would take to reduce privacy risk for a smart watch that records GPS.

Answers: 1. Collect and retain only the minimum personal data necessary for the stated purpose. 2. For all adjacent datasets D1, D2 and all outputs S: Pr[M(D1) ∈ S] ≤ exp(ε) · Pr[M(D2) ∈ S]. 3. (a) Do local aggregation on the device and upload only coarse-grained location; (b) encrypt data at rest and in transit and use pseudonymization before cloud upload.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?