aicomply.
Lesson10 minChapter 4 of 14

Record-Keeping and Logging

Article 12 automatic logging capabilities.

Record-Keeping and Logging (Article 12)

Learning Objectives

By the end of this chapter, you will be able to:

  • Design AI logging systems that meet Article 12 requirements
  • Determine appropriate log retention periods for different contexts
  • Implement technical controls for log integrity and accessibility
  • Establish logging procedures for different actor types
  • Integrate logging with incident investigation and post-market monitoring

Article 12 mandates automatic logging capabilities for high-risk AI systems. Logs serve as the "flight recorder" for AI—enabling traceability, accountability, incident investigation, and regulatory oversight throughout the system's operational life.

Why Logging Matters

Traceability

Logs provide an audit trail of AI system operations, enabling reconstruction of what happened, when, and why.

Accountability

When issues arise, logs identify who was involved and what decisions were made.

Regulatory Compliance

Authorities use logs to investigate incidents and verify ongoing compliance.

Continuous Improvement

Post-market monitoring relies on log data to identify performance issues.


Article 12 Requirements

Core Logging Obligation

High-risk AI systems shall technically allow for automatic recording of events (logs) over the lifetime of the system.

Key elements:

  • Automatic: Logging must be built into the system, not manual
  • Events: System activities and decisions must be captured
  • Lifetime: From deployment through decommissioning

Traceability Standard

Logging capabilities must ensure traceability appropriate to the intended purpose:

Intended PurposeTraceability LevelExample Logs
Medical diagnosisHighAll inputs, outputs, confidence scores, clinician interactions
Credit decisionsHighApplication data, model outputs, human overrides
Recruitment screeningMedium-HighCandidate data processed, decisions, human review
Critical infrastructureHighAll operational decisions, alerts, interventions

What Must Be Logged

Article 12(3) Specific Requirements

For remote biometric identification systems referred to in Annex III, point 1(a), logs must specifically enable monitoring of:

Log ElementDescription
Period of useStart and end time of each use session
Reference databaseWhich database was used for matching
Matching inputsInput data that resulted in matches
Human verifiersNatural persons who verified results

General Logging Requirements

For all high-risk AI systems, capture:

CategoryLog Elements
InputsData submitted to the system
OutputsDecisions, predictions, recommendations made
ConfidenceCertainty levels of outputs
ContextEnvironmental and operational conditions
UsersWho used the system and when
InterventionsHuman overrides or modifications
ErrorsSystem errors and anomalies
PerformanceAccuracy and reliability metrics

Technical Implementation

Logging Architecture

ComponentRequirements
Log GenerationAutomatic capture at system level
Log StorageSecure, scalable, searchable storage
Log IntegrityTamper-evident, immutable records
Log AccessControlled access with audit trails
Log RetentionConfigurable retention periods

Log Integrity Controls

ControlPurpose
Append-only storagePrevent deletion or modification
Cryptographic hashingDetect tampering
Digital signaturesAuthenticate log entries
Secure timestampsEstablish reliable chronology
Access loggingTrack who accessed logs

Expert Insight

Consider blockchain-based or immutable database solutions for high-stakes AI systems. These provide cryptographic proof of log integrity that can withstand regulatory scrutiny.

Log Format Standards

Structure logs for machine readability and human analysis:

Recommended elements per log entry:

  • Timestamp (ISO 8601 format)
  • Event type
  • System component
  • User identifier (where applicable)
  • Input summary/hash
  • Output details
  • Confidence score
  • Decision rationale (if available)
  • Session identifier

Retention Requirements

Retention Period Determination

Article 19(1) (providers) and Article 26(6) (deployers) require log retention of at least 6 months. Article 12 itself does not specify a retention period. Retention considerations by context:

ContextMinimum RetentionRationale
Medical/health decisionsDuration of clinical relevance + legal retentionPatient safety, medical records law
Employment decisionsDuration of employment + limitation periodEmployment tribunal claims
Credit/financialDuration of relationship + regulatory periodFinancial services requirements
Law enforcementPer national requirementsCriminal justice needs
Critical infrastructureOperational lifetime + investigation periodSafety investigations

Deployer Retention Obligations

Article 26(6) specifically requires deployers to:

  • Keep logs generated automatically (while under their control)
  • Retain for period appropriate to the intended purpose
  • Retain for at least 6 months unless otherwise provided

Provider Retention Obligations

Providers must retain logs:

  • While under their control, for at least 6 months per Article 19(1). Technical documentation (not logs) must be retained for 10 years per Article 18(1).

Access and Availability

Who Can Access Logs

ActorAccess RightPurpose
ProviderFull accessDevelopment, monitoring, compliance
DeployerOperational accessUse monitoring, incident response
Market surveillance authoritiesOn requestEnforcement, investigations
Notified bodiesDuring assessmentConformity verification
Affected individualsSubject access rightsGDPR/fundamental rights

Facilitating Regulatory Access

Implement mechanisms for:

  • Rapid log retrieval upon authority request
  • Log export in standard formats
  • Secure transmission to authorities
  • Query and filtering capabilities

Integration with Other Requirements

RequirementLogging Connection
Risk Management (Art. 9)Logs feed continuous risk monitoring
Technical Documentation (Art. 11)Logging capabilities documented
Human Oversight (Art. 14)Log human interventions and overrides
Post-Market Monitoring (Art. 72)Logs are primary monitoring data source
Incident Reporting (Art. 73)Logs support incident investigation

Logging Compliance Checklist

Technical Requirements:

  • Automatic logging capability implemented
  • All required events captured
  • Appropriate traceability level achieved
  • Log integrity controls in place
  • Secure storage implemented

Operational Requirements:

  • Retention periods defined and enforced
  • Access controls implemented
  • Regulatory access mechanisms ready
  • Log monitoring procedures established
  • Incident investigation procedures using logs

Documentation:

  • Logging architecture documented
  • Retention policy documented
  • Access procedures documented

What You Learned

Key concepts from this chapter

**Automatic logging is mandatory** for all high-risk AI systems

Logs must enable **traceability appropriate to intended purpose**

Capture **inputs, outputs, users, interventions, and performance**

Implement **integrity controls** to prevent tampering

**Retention periods** depend on context but minimum 6 months for deployers

Chapter Complete

High-Risk AI Compliance

4/14

chapters