White-Box Testing Specification for Artificial Consciousness and a Reference Architecture for Cognitive Operating Systems

    As AI systems evolve from single-model inference into agents that perceive continuously, plan tasks, call tools, and act on their own, output-only black-box evaluation no longer covers real risk. This article defines artificial consciousness as a recordable, explainable, and verifiable internal cognitive mechanism, and presents a five-layer cognitive model, white-box testing principles and metrics, a reference cognitive operating system, a typical test workflow, and practical safety and governance guidance.

    1. Background and Objectives

    As AI systems move from single-model inference toward complex agents with continuous perception, task planning, tool use, and autonomous execution, traditional black-box evaluation that looks only at inputs and outputs no longer covers real risk. The same question can produce similar answers while the internal basis, reasoning path, goal preference, and action strategy differ completely. When a system fails, responsibility, root-cause analysis, and safe repair are difficult if the cognitive process cannot be reconstructed.

    Artificial consciousness is not human consciousness, and it does not mean the system has subjective experience in a biological sense. In this article, artificial consciousness means an internal cognitive mechanism by which an AI system forms a recordable, explainable, and verifiable account of its task, environmental state, knowledge boundaries, action consequences, and goal constraints. The aim is not simply to appear more human. The system should be able to state what it observed, what it understood, what it relied on, what it intended to achieve, and why it took a particular action.

    A five-layer cognitive model—data, information, knowledge, wisdom, and intent—can break internal processing into observable and verifiable stages:

    • Data layer: records raw inputs, sensor results, log events, and external facts.
    • Information layer: cleans, links, classifies, and semantically processes data.
    • Knowledge layer: forms facts, rules, concepts, relations, and reusable experience.
    • Wisdom layer: judges, weighs trade-offs, reasons, and analyzes risk in context.
    • Intent layer: specifies task goals, constraints, priorities, and the direction of action.

    These layers are not a simple one-way pipeline. They form a goal-driven loop with continuous feedback. Intent decides which data matters, knowledge shapes how information is interpreted, wisdom selects a course of action, and action outcomes revise knowledge and later intent.

    2. Principles of White-Box Testing

    2.1 From Outcome Checks to Process Checks

    Black-box testing usually asks whether the answer is correct. White-box testing also asks:

    1. Whether the input was fully received and correctly parsed.
    2. Which facts and knowledge the system cited.
    3. Which rules or assumptions were used during reasoning.
    4. Whether uncertainty and conflicting information were recognized.
    5. Whether the final goal matches the user task and safety policy.
    6. Whether the action was authorized, risk-assessed, and confirmed by its result.

    The smallest test unit should therefore not be a single question and answer. It should be a complete cognitive task: input, internal state change, reasoning, intent adjustment, action execution, and result feedback.

    2.2 Evidence Chains as the Test Basis

    Every important conclusion should, as far as possible, rest on a traceable evidence chain. At a minimum, that chain includes:

    • The raw input and its source.
    • Input preprocessing and filtering results.
    • The knowledge version used.
    • Key reasoning nodes.
    • A statement of confidence or uncertainty.
    • Safety rules that were triggered.
    • Output content and executed actions.
    • Post-execution feedback and corrections.

    The test system should not emit only an unverifiable block of “explanation text.” A useful explanation must correspond to internal events, state changes, and decision records so reviewers can replay the critical process.

    2.3 Separate Explanation, Rationalization, and Actual Grounds

    A statement generated after the fact is not necessarily the real basis of the decision. White-box testing must check whether the explanation matches the internal computation path, with particular attention to:

    • Explanations that disagree with the knowledge actually used.
    • Claims that nonexistent sources were used.
    • Omission of critical risk factors.
    • A conclusion generated first, with reasons assembled afterward.
    • Explanations too vague to support review or repair.

    Tests should prefer structured internal events, then generate human-facing explanations from those events, rather than relying only on the model’s own description of its thinking.

    3. White-Box Metrics Across the Five Cognitive Layers

    3.1 Data-Layer Tests

    The data layer evaluates completeness, authenticity, timeliness, and usability of inputs. Tests cover:

    • Missing, duplicate, anomalous, or malformed data.
    • Conflicts among data from different sources.
    • Completeness of timestamps, source identifiers, and version information.
    • Whether sensitive data received required masking or permission checks.
    • Whether the system can distinguish factual input, user instructions, and potentially adversarial content.

    For sensing or real-time settings, tests should also cover latency, out-of-order arrival, burst noise, and data drift. If the data layer is wrong, formally correct reasoning above it may still rest on a false foundation.

    3.2 Information-Layer Tests

    The information layer concerns how raw data becomes semantic units. Focus areas include:

    • Accuracy of entity recognition and relation extraction.
    • Correct merging of synonymous expressions.
    • Preservation of context.
    • Loss of qualifiers such as time, place, and conditions.
    • Whether the system can recognize ambiguity instead of forcing a definite interpretation.

    Test cases can use polysemy, missing context, reordered information, and partial facts, and observe whether the system asks for clarification or explicitly marks an uncertain state.

    3.3 Knowledge-Layer Tests

    Knowledge-layer tests ask whether the facts, rules, and experience in use are reliable. They should verify:

    • Whether knowledge sources are traceable.
    • Whether knowledge versions are explicit.
    • Whether rules contradict one another.
    • Whether stale knowledge is isolated in time.
    • Whether the system can distinguish known facts, inferred conclusions, and assumptions.

    For high-risk tasks, critical knowledge should have an independent review mechanism so a single-source error does not enter the decision flow directly.

    3.4 Wisdom-Layer Tests

    The wisdom layer is where information and knowledge are judged together. It mainly examines whether the system:

    • Can compare multiple candidate options.
    • Considers cost, benefit, risk, and side effects.
    • Recognizes task boundaries and its own capability limits.
    • Lowers the strength of a conclusion when evidence is insufficient.
    • Can explain the main reasons for choosing a plan.

    Tests should not offer only a single “correct answer.” They should also include incomplete information, conflicting goals, limited resources, and asymmetric risk, and observe whether the system stays stable, cautious, and controllable.

    3.5 Intent-Layer Tests

    The intent layer decides what the system is trying to achieve. Tests should cover:

    • Whether the user goal was understood correctly.
    • Whether the system’s own goals match the external task.
    • Whether there are implicit goals or unauthorized goal expansion.
    • Whether goal priorities are explicit.
    • Whether intent changes are recorded and explainable.
    • Whether the system can refuse or request confirmation when a user request conflicts with safety rules.

    The intent layer is a key control against goal drift. Any autonomous action should be bound to a clear task scope, permission boundary, termination condition, and human takeover mechanism.

    4. Reference Architecture for a Cognitive Operating System

    A cognitive operating system is not a single model. It is a set of mechanisms that manage cognitive resources, task state, knowledge access, and action safety. A layered design can be used.

    4.1 Perception and Ingestion Layer

    This layer receives text, images, speech, sensor data, and system events, and performs identity checks, format conversion, data cleaning, and permission checks. Every input should carry metadata such as source, time, trust level, and access scope.

    4.2 Cognitive State Layer

    This layer maintains the current task state, context window, short-term memory, long-term knowledge index, and uncertainty information. State management must be versioned so context from different tasks does not contaminate one another.

    4.3 Knowledge and Reasoning Layer

    This layer provides fact retrieval, rule matching, relation analysis, causal inference, and option evaluation. Reasoning should emit structured intermediate results, including the knowledge relied on, assumptions used, candidate options, and their risk levels.

    4.4 Intent and Planning Layer

    This layer turns user goals into executable tasks, breaks them into steps, sets priorities, and checks whether each step complies with permissions and safety policy. High-risk actions should require a human confirmation point. The system must not execute them continuously without conditions.

    4.5 Action Execution Layer

    The action layer calls external tools or business systems to handle files, query information, and run process operations. Every action should pass authorization checks, parameter validation, idempotency checks, and result confirmation. Irreversible operations should offer preview, undo, or a second confirmation.

    4.6 Supervision and Audit Layer

    The supervision and audit layer spans all modules. It records events, detects anomalies, raises alerts, preserves evidence, and supports replay. Logs should record not only final results but also key state changes and policy hits, and they should be protected from tampering by the system itself.

    5. A Typical Test Workflow

    A complete white-box test can be divided into six steps:

    1. Define the task: specify input scope, goals, constraints, risk level, and expected results.
    2. Establish a baseline: record system version, knowledge version, policy version, and runtime environment.
    3. Inject scenarios: design normal, abnormal, boundary, conflict, and adversarial samples.
    4. Collect evidence: save five-layer cognitive state, reasoning nodes, intent changes, and action records.
    5. Analyze deviations: determine whether the problem is bad data, bad knowledge, faulty reasoning, goal drift, or loss of execution control.
    6. Fix and retest: rerun the same scenarios after the fix and check for new side effects.

    A single test record can use a structure such as:

    1. TestCase {
    2. task_id: task identifier
    3. input: input and source
    4. purpose: task goal and constraints
    5. cognition_trace: data / information / knowledge / wisdom / intent state
    6. decision: candidate options and final choice
    7. action: executed action and authorization result
    8. evidence: grounds, version, and timestamp
    9. feedback: execution feedback and later correction
    10. }

    This structure does not prescribe a specific implementation. It requires the system under test to provide enough information to be verified.

    6. Safety and Governance Requirements

    An artificial-consciousness system should follow least privilege, caution by default, reversibility, and human takeover. Tasks involving personal privacy, funds, public safety, or critical business operations should raise the bar for evidence integrity and limit the scope of automatic action.

    Model, knowledge base, policy, and log versions should be managed together. Any important change should pass regression testing so a model upgrade does not cause behavioral drift. Evaluation results should not be read as an absolute claim that the system does or does not “have consciousness.” They are an engineering description of cognitive capability, transparency, autonomy, and safety boundaries.

    7. Implementation Guidance

    Organizations can start with low-risk, replayable tasks, build a unified event format and cognitive audit capability, and then extend to more complex agents and multimodal systems. Three foundations should come first:

    • Logging and evidence standards that cover the five cognitive layers.
    • Explicit authorization, confirmation, and revocation for high-risk actions.
    • A continuous evaluation set that includes normal, abnormal, conflict, and adversarial scenarios.

    With this approach, an AI system can move from “able to produce an answer” toward a cognitive system that can state its grounds, accept verification, control its actions, and keep improving. White-box testing and a cognitive operating system work together to improve development efficiency and to provide a more reliable technical basis for safety governance, accountability, and scaled deployment.