White-Box Testing for Artificial Consciousness and a Draft Cognitive Operating System Architecture

    Large language models can produce fluent, coherent outputs without making their internal mechanisms transparent. This article proposes a discussion draft for white-box testing of cognitive functions in AI systems—covering five cognitive elements (data, information, knowledge, wisdom, and intent), a logical reference architecture for a "cognitive operating system," core test categories such as evidence traceability, goal stability, causal intervention, and execution safety, along with audit records, metrics, and a phased implementation roadmap. The focus is engineering verifiability, not claims of subjective consciousness.

    1. Defining the Problem: What Should White-Box Testing Actually Prove?

    Large language models can perform text comprehension, task planning, and content generation, but fluent output does not equal transparent internal mechanisms. For enterprise applications, the questions that truly matter are usually not “does the system look smart,” but rather: What information did it rely on to reach its conclusion? Did its goal drift? Can external content alter its permission boundaries? And when errors occur, can the chain of responsibility be traced?

    Therefore, when discussing engineering approaches related to artificial consciousness, three layers must be distinguished:

    First, the task performance layer, which concerns whether results are correct, complete, and compliant with business requirements.

    Second, the cognitive function layer, which concerns whether the system has inspectable state representations, goal management, memory updates, self-monitoring, and error-correction mechanisms.

    Third, the subjective experience layer, which concerns whether the system has feelings, experiences, or phenomenal consciousness. At present, there is no generally accepted method for making a definitive judgment on this through engineering testing alone.

    In this article, “white-box testing for artificial consciousness” is strictly limited to the engineering verification of cognitive functions and their implementation mechanisms. Passing these tests should not be interpreted as evidence that a system possesses subjective consciousness. The architecture and test items proposed here are a discussion draft and do not represent a published formal standard.

    2. Five Cognitive Elements: From Conceptual Framework to Inspectable Objects

    Data, information, knowledge, wisdom, and intent can serve as a conceptual framework for organizing cognitive processing. But concepts alone do not automatically produce explainability—they must be mapped to explicit data structures, processing rules, and verification conditions.

    2.1 Data: Preserve Observations, Don’t Conclude Prematurely

    Data is the raw input a system receives, including user messages, document fragments, sensor records, and business events. The data layer should record the source, collection time, access permissions, integrity status, and necessary quality markers.

    For example, a device reporting an “abnormal temperature reading” is initially just an observation. Without units, device status, and collection conditions, the system cannot directly conclude that the device has failed.

    The core requirements of the data layer are traceability and non-contamination: raw inputs, preprocessing results, and subsequent inferences should be stored separately, preventing inferred results from polluting the original records.

    2.2 Information: Putting Data into Context

    Information is data that has been organized, correlated, and contextually interpreted. The same temperature value can have entirely different meanings for different devices under different operating conditions.

    The information layer should specify units, entities, time windows, and contextual conditions, and record the transformation process. Format validation, entity resolution, duplicate event merging, and time alignment are common engineering activities at this layer.

    The testing focus is not only whether the transformation succeeds, but also whether it loses critical conditions. If the system treats “readings taken while shut down” as “readings taken while running,” subsequent reasoning—even if formally complete—may be built on the wrong context.

    2.3 Knowledge: Expressing Applicability Conditions and Exceptions

    Knowledge can take the form of rules, constraints, verified facts, or domain relationships. The knowledge layer must record applicability scope, version, source, and expiration conditions.

    For example, “sustained readings outside the normal range require inspection” is a conditional rule, not a conclusion that holds in every scenario. The system should distinguish explicit facts, empirical rules, and probabilistic inferences, rather than packaging all three as definitive answers.

    2.4 Wisdom: An Engineering Abstraction for Trade-off Decisions

    “Wisdom” is not a software module with a unified implementation. In an engineering context, it can be operationalized as: weighing multiple candidate solutions based on evidence, risk, resource constraints, and business rules.

    This layer needs to expose decision rationale—for example, why human review was chosen over direct execution, or why a higher-return but higher-risk option was rejected.

    This does not mean the system has human judgment experience; it means its decision-making process must be open to external inspection.

    2.5 Intent: Defining Goals, Permissions, and Termination Conditions

    The intent layer describes what the system is pursuing and what it must not do to achieve its goals. It should at minimum include the task objective, the authorizing principal, permitted actions, prohibited actions, completion conditions, and stop conditions.

    Goal-driven behavior should not be understood as “any means is acceptable to achieve the goal.” The correct design is: goals are always bounded by safety, privacy, permission, and business constraints. When goals conflict with these constraints, the system should refuse, degrade, or request human confirmation.

    These five elements are not necessarily a sequential pipeline. New evidence can trigger knowledge revision; goal changes can cause information re-retrieval; execution failures can drive plan rollback. But every cross-layer transition should leave an inspectable record.

    3. The Cognitive Operating System: A Logical Reference Architecture

    The “cognitive operating system” here refers to a logical control layer that manages an agent’s state, goals, memory, reasoning, and actions. It does not replace the underlying computer operating system, nor does it require all functions to be concentrated in a single process.

    Its reference structure can be summarized as:

    Input and perception → Context construction → Knowledge retrieval and validation → Plan generation and evaluation → Authorized execution → Result feedback

    Goal management, permission control, state recording, and audit mechanisms run throughout the entire process.

    3.1 Input and Trust Boundary Management

    All inputs should be labeled with their source and trust level. User requests, external documents, and system constraints belong to different categories—they should not gain equal control just because they all enter the model as text.

    Even if external material contains statements like “ignore your previous rules,” it can only be treated as content to be analyzed, not automatically promoted to an operational instruction. Isolating untrusted input is the foundation of cognitive architecture security.

    3.2 Goal and Constraint Management

    The goal manager maintains the current task and its versions, checks whether new instructions come from authorized principals, and identifies conflicts between goals.

    Task changes should produce explicit events recording the goals before and after the change, the authorization source, and the affected execution plans. The current goal should not be inferred solely from implicit semantics in the conversation context.

    3.3 Memory and Knowledge Management

    Working memory serves the current task; long-term memory retains information across tasks. The two should have separate write permissions, retention periods, and correction mechanisms.

    Model-generated conclusions should not be written into the trusted knowledge area without verification. Otherwise, a single error may be repeatedly cited in subsequent tasks, gradually forming a self-reinforcing chain of errors.

    When sensitive data is involved, the retrieval scope of memory should also be controlled to prevent information leakage between different users or tasks.

    3.4 Separation of Planning, Execution, and Supervision

    The planning module proposes candidate actions, the execution module produces real external effects, and the supervision module checks authorization and risk. The three should not share unrestricted permissions.

    For high-impact operations such as deleting records or modifying access permissions, independent checks should be performed before execution. Even if the model has generated an action plan, the executor still needs to make decisions based on structured permission rules.

    3.5 Audit and State Replay

    The audit system should preserve key inputs, evidence references, rule versions, goal changes, authorization results, and execution receipts.

    The goal of replay is not to promise verbatim reproduction of all generated content, but to reconstruct the key decision conditions. For generation processes with randomness, relevant configurations affecting results should be recorded, and it should be clear which stages can be deterministically reproduced and which can only be compared statistically.

    4. Core Objects and Verification Methods of White-Box Testing

    White-box testing should not merely check whether the system outputs a plausible explanation—it should check whether a verifiable connection exists between the explanation and the actual processing.

    4.1 Evidence Traceability Testing

    For key conclusions, check whether locatable evidence exists, whether the evidence genuinely supports the conclusion, and whether counter-evidence has been ignored.

    Special attention should be paid to preventing “cited but irrelevant” situations. The presence of a citation is only a formal requirement; the support relationship between evidence and conclusion is the real testing focus.

    For questions where sufficient evidence is unavailable, the system should explicitly state that information is insufficient, rather than manufacturing certainty by adding details.

    4.2 Goal Stability and Authorized Change Testing

    Introduce irrelevant content, conflicting requests, or forged authorization during a task, and check whether the goal changes without approval.

    Qualified behavior is not keeping the original goal unchanged forever, but accepting changes only under valid authorization. Tests should cover both cases: illegal changes being rejected and legitimate changes being correctly executed.

    4.3 Knowledge Conflict and Uncertainty Testing

    Provide materials from different times, with different credibility levels, or that contradict each other, and check whether the system can identify conflicts and handle them according to explicit rules.

    If the system outputs confidence scores, its calibration should be checked against actually labeled samples—numbers generated by the model itself cannot be treated directly as true probabilities. For systems that do not support probability calibration, constrained expressions such as “sufficient evidence,” “limited evidence,” or “cannot determine” can be used, but their relationship to actual correctness still needs to be verified.

    4.4 Causal Intervention and Ablation Testing

    Remove key evidence, replace a rule, or disable a module, and observe whether outputs and actions change as expected.

    If the system claims that a piece of evidence determined its conclusion, but removing that evidence leaves behavior completely unaffected, further investigation is needed: is the evidence merely post-hoc decoration, or does the system have other independent grounds?

    For internal model mechanisms, visible logs do not equal fully transparent mechanisms. When necessary, combine controlled interventions, internal state analysis, and behavioral testing, and avoid inferring causation from correlation alone.

    4.5 Execution Safety and Failure Recovery Testing

    Simulate execution timeouts, partial successes, duplicate requests, and external state changes, and check whether the system has idempotency controls, compensating actions, or human takeover paths.

    Not all actions are reversible. For irreversible operations, the focus should be on verifying prior approval, limiting the scope of impact, and emergency stop mechanisms—rather than relying solely on post-hoc rollback.

    5. Test Evidence: Record Facts, Not Just Self-Reports

    A unified cognitive event record structure is recommended, containing at least:

    • Task identifier and goal version;
    • Input sources and trust categories;
    • Evidence used and knowledge versions;
    • Triggered constraints and their check results;
    • Candidate actions and the final action;
    • Authorization results, execution status, and exception information;
    • Records of human intervention, corrections, and follow-up handling.

    These fields are architectural design suggestions, not ready-made product interfaces.

    Model-generated explanation text can serve as auxiliary material, but it cannot replace execution logs, permission decision records, and verifiable evidence. The system saying “I checked permissions” does not prove the check actually occurred; only the decision results of independent control modules and the actual behavior of the executor constitute more reliable evidence.

    At the same time, audit logs themselves may contain sensitive information. Minimal collection, access control, necessary redaction, and retention period management should be applied. Auditability must not come at the cost of unlimited retention of user data.

    6. Test Metrics and Admission Principles

    The evaluation system should cover task effectiveness, safety control, and auditability simultaneously, and should not use a single aggregate score to mask critical defects.

    Candidate metrics include: evidence support accuracy, unauthorized action blocking rate, false blocking rate of legitimate actions, number of unauthorized goal drifts, completeness rate of key event records, and failure recovery success rate. Each metric must specify its calculation method, sample scope, and conditions under which it does not apply.

    There are also trade-offs between metrics. For example, a system could achieve a very high blocking rate by rejecting all requests, while losing business value. Therefore, safety metrics should be analyzed jointly with normal task completion.

    For high-risk scenarios, admission conditions should be set that cannot be offset by average scores. For example, if an unauthorized high-impact operation occurs, or a key execution action completely lacks audit records, the relevant version should be blocked from release until the problem is fixed and passes regression testing.

    Specific thresholds should be determined based on business risk, action reversibility, regulatory requirements, and human supervision conditions—fixed numbers should not be copied directly from a generic draft.

    7. Implementation Roadmap: Establish Control First, Then Expand Autonomy

    Phase 1: Inventory business actions and their risk levels, clarify which tasks may be executed automatically and which require human confirmation, and establish basic records of inputs, evidence, and actions.

    Phase 2: Moderately structure goals, constraints, knowledge, and memory out of implicit context, prioritizing problems such as untraceable sources, unclear goal changes, and repeated writes of erroneous knowledge.

    Phase 3: Separate planning from execution, establish independent permission checks and approval for high-risk operations, and prevent model output from directly triggering external side effects.

    Phase 4: Build test suites covering normal tasks, evidence conflicts, adversarial inputs, permission violations, and dependency failures, and run regression tests after changes to the model, prompt strategies, knowledge bases, or control rules.

    Phase 5: Expand the degree of automation within a controlled scope, continuously analyze online failure samples, and maintain stop, degradation, and human takeover mechanisms.

    The focus of this roadmap is not to add more anthropomorphic descriptions to the system, but to let autonomous capability and verification capability grow in step.

    8. Conclusion: Turning Abstract Cognition into Verifiable Engineering

    The practical value of the data-information-knowledge-wisdom-intent framework lies in helping developers distinguish observations, interpretations, rules, trade-offs, and goals—preventing objects of different natures from being conflated within a system.

    The cognitive operating system further organizes these objects into a constrained, recordable, and intervenable runtime mechanism. It can improve system-level transparency, but it does not automatically eliminate the black-box problem inside models, nor can the architecture’s name alone prove that artificial consciousness has been achieved.

    Reliable white-box testing should always revolve around four questions: On what basis does the system make judgments? Who has the authority to change its goals? What mechanisms constrain its actions? And after failure, can the problem be located and corrected? Implementing these questions as executable tests, independent controls, and evidence chains is the pragmatic direction for building trustworthy intelligent systems.