FLOW_ALGEBRA ExplainableAILogicOntology v1.0
TARGET_URL := "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/ai-logic/explainable-ai-logic-ontology.html"
LANGUAGE := "en-GB"
DOMAIN := MathematicalOntologies > MathematicalLogicOntologies > AILogic > ExplainableAILogicOntology
BEGIN_FLOW
ENTITY ExplainableAILogic {
TYPE := FormalExplanationAndReasoningFramework
DEFINITION := "A formal framework for representing, tracing, validating and communicating the reasons, evidence, dependencies and model factors associated with an AI result while distinguishing explanation, proof, evidence, prediction and causal attribution."
}
ENTITY AIResult { TYPE := MachineProducedOutcome }
ENTITY Explanation { TYPE := StructuredAccountOfResultBasis }
ENTITY Evidence { TYPE := SupportingInformation }
ENTITY ReasoningTrace { TYPE := StructuredDerivationRecord }
ENTITY Provenance { TYPE := OriginAndTransformationRecord }
RELATIONSHIP ExplainableAILogic --explains--> AIResult
RELATIONSHIP Explanation --uses--> Evidence
RELATIONSHIP Explanation --may_use--> ReasoningTrace
RELATIONSHIP Explanation --requires--> Provenance
RELATIONSHIP ExplainableAILogic --supports--> HumanInterpretation
RELATIONSHIP ExplainableAILogic --supports--> AIValidation
XAI_ARCHITECTURE {
COMPONENTS := {AIResult,ExplanationTarget,Evidence,ReasoningTrace,Provenance,ExplanationMethod,Validation,Audience,Context,Uncertainty}
}
EXPLANATION_TARGET {
MAY_BE := {Prediction,Classification,Recommendation,Decision,LogicalConclusion,GeneratedStatement,Plan,Action}
}
EXPLANANDUM { TYPE := ThingToBeExplained }
EXPLANANS { TYPE := InformationOfferedAsExplanation }
EXPLANATION_RELATION { Explanans -> explains -> Explanandum }
EXPLANATION_GOAL {
MAY_INCLUDE := {Why,WhyNot,How,WhatIf,Contrastive,Counterfactual,Causal,Evidential,Procedural,Debugging}
}
WHY_EXPLANATION { Result -> SupportingFactorsOrReasoning }
WHY_NOT_EXPLANATION { AlternativeResult -> MissingOrBlockingConditions }
HOW_EXPLANATION { Result -> ProcessOrDerivationSteps }
WHAT_IF_EXPLANATION { ModifiedInputOrAssumption -> RecomputeOrEstimateResult -> Compare }
CONTRASTIVE_EXPLANATION { Why ResultA rather_than ResultB }
COUNTERFACTUAL_EXPLANATION { RelevantChange -> DifferentOutcome }
COUNTERFACTUAL_WARNING { validity depends_on model_and_feasibility_assumptions }
CAUSAL_EXPLANATION { CausalModel + InterventionSemantics -> CausalAccount }
CAUSAL_WARNING { FeatureImportanceOrAssociation MUST_NOT automatically be described_as CausalEffect }
EVIDENTIAL_EXPLANATION { Result -> SupportingEvidence -> SourceProvenance }
LOGICAL_EXPLANATION { Conclusion -> Premises -> RulesOrAxioms -> Derivation }
PROOF { TYPE := FormallyValidDerivation }
EXPLANATION_VS_PROOF {
Explanation := AccountSelectedForUnderstanding
Proof := FormallyValidDerivation
MUST_REMAIN_DISTINCT := TRUE
}
EVIDENCE_VS_PROOF {
Evidence := InformationSupportingClaim
Proof := FormalDerivation
MUST_REMAIN_DISTINCT := TRUE
}
PREDICTION_VS_EXPLANATION {
Prediction := ModelOutput
Explanation := AccountOfOutputBasis
MUST_REMAIN_DISTINCT := TRUE
}
JUSTIFICATION { Result -> SupportingFactsRulesAxiomsOrEvidence }
MINIMAL_JUSTIFICATION { subset_minimal_support under declared_definition }
REASONING_TRACE {
MAY_BE := {Sequence,Tree,DAG,RuleChain,SolverTrace,ToolTrace}
}
TRACE_STEP {
COMPONENTS := {StepID,Inputs,RuleOrOperation,Parameters,Output,Dependencies,Source}
}
TRACE_DEPENDENCY { StepB depends_on StepA }
TRACE_VALIDATION { VerifyInputs -> VerifyOperation -> VerifyOutput -> VerifyDependencies }
TRACE_COMPLETENESS { SHOULD include material_steps needed_for_claimed_explanation }
TRACE_FIDELITY { explanation MUST correspond_to actual_process when claimed_as faithful }
POST_HOC_EXPLANATION { generated_after_prediction without necessarily being internal_process }
INTRINSIC_EXPLANATION { derived_directly_from interpretable_model_or_symbolic_structure }
POST_HOC_VS_INTRINSIC { MUST_REMAIN_DISTINCT := TRUE }
LOCAL_EXPLANATION { explains specific_instance_or_result }
GLOBAL_EXPLANATION { describes general_model_or_system_behaviour }
LOCAL_GLOBAL_DISTINCTION { instance_specific_evidence MUST_NOT automatically generalise_to whole_model }
MODEL_SPECIFIC_EXPLANATION { requires access_to particular_model_structure }
MODEL_AGNOSTIC_EXPLANATION { treats model_as queryable_input_output_function }
FEATURE_ATTRIBUTION { Prediction -> FeatureContributionScores }
ATTRIBUTION_SCORE { Feature -> NumericContributionOrImportance under declared_method }
ATTRIBUTION_WARNING { score is method_and_baseline_dependent and MUST_NOT automatically mean causation }
BASELINE { reference_input_or_expected_value used_by attribution_method }
BASELINE_SENSITIVITY { changing baseline MAY change attribution }
SHAP_RELATIONSHIP { ShapleyValueBasedExplanation -> FeatureAttribution }
SHAP_WARNING { values explain model_output_relative_to reference and do_not_by_themselves establish causality }
LIME_RELATIONSHIP { LocalSurrogateModel -> ApproximateLocalExplanation }
LIME_WARNING { surrogate_fidelity is local_and_approximate }
SALIENCY_RELATIONSHIP { GradientOrActivationSignal -> InputRelevanceVisualisation }
SALIENCY_WARNING { visual_prominence MUST_NOT automatically mean causal_importance }
ATTENTION_EXPLANATION_RELATIONSHIP { attention_weights MAY provide model_internal_signal }
ATTENTION_WARNING { attention_weights MUST_NOT automatically be treated_as complete_explanation }
RULE_BASED_EXPLANATION { FiredRules + SupportingFacts -> Conclusion }
EXPERT_SYSTEM_EXPLANATION { Conclusion -> RuleChain -> WorkingMemoryFacts -> Provenance }
PROLOG_EXPLANATION { QueryAnswer -> SLDResolutionSteps -> Clauses -> Unifiers }
CLP_EXPLANATION { SolutionOrFailure -> Constraints -> PropagationSteps -> SearchDecisions }
SAT_EXPLANATION { SATResult -> AssignmentOrCertificate }
UNSAT_EXPLANATION { UNSATResult -> ProofOrUnsatCore where available }
UNSAT_CORE { subset_of_constraints jointly_unsatisfiable }
ONTOLOGY_EXPLANATION { Entailment -> SupportingAxioms -> ReasonerDerivationOrJustification }
KNOWLEDGE_GRAPH_EXPLANATION { DerivedRelation -> GraphPathRulesEvidence }
RAG_EXPLANATION { GeneratedAnswer -> RetrievedSources -> UsedEvidence -> GenerationOrReasoningSteps }
RAG_WARNING { retrieval_provenance DOES_NOT guarantee generated_claim_is_supported }
LLM_EXPLANATION_WARNING { generated_rationale MUST_NOT automatically be treated_as faithful_record_of_internal_computation }
VERIFIABLE_REASON_SUMMARY { Result -> KeyPremises -> KeyOperations -> Evidence -> Conclusion }
PROVENANCE {
COMPONENTS := {Source,AuthorOrSystem,Timestamp,Version,Transformation,Derivation}
}
SOURCE_PROVENANCE { Evidence -> Origin }
MODEL_PROVENANCE { Result -> ModelID -> ModelVersion }
DATA_PROVENANCE { Result -> DatasetOrInputVersion }
TOOL_PROVENANCE { ToolResult -> Tool -> Parameters -> Time -> Status }
DERIVATION_PROVENANCE { DerivedResult -> SupportingResultsAndOperations }
PROVENANCE_INTEGRITY { links MUST correspond_to actual_source_and_processing_history }
EVIDENCE {
MAY_BE := {Observation,Document,DatabaseRecord,SensorReading,FormalAxiom,ToolResult,ExperimentalResult}
}
EVIDENCE_RELEVANCE { Evidence -> supports_or_refutes -> Claim }
EVIDENCE_STRENGTH { MAY_DEPEND_ON := {SourceQuality,Directness,Independence,Recency,Method,Consistency} }
SOURCE_CONFLICT { EvidenceA conflicts_with EvidenceB }
CONFLICT_EXPLANATION { identify conflicting_claims_sources_timestamps_assumptions }
UNCERTAINTY {
MAY_INCLUDE := {Probability,Confidence,FuzzyDegree,Possibility,UnknownStatus}
}
UNCERTAINTY_DISTINCTION {
Probability != Confidence
Probability != FuzzyTruth
Confidence != LogicalTruth
Unknown != False
}
UNCERTAINTY_EXPLANATION { Result -> UncertaintyMeasure -> Interpretation -> SourceOfUncertainty }
CONFIDENCE_WARNING { confidence_score MUST have declared_semantics }
EXPLANATION_FIDELITY { explanation accurately_reflects target_system_behaviour within declared_scope }
EXPLANATION_ACCURACY { factual_and_logical_claims in explanation are correct }
EXPLANATION_COMPLETENESS { contains sufficient_material_information for declared_goal }
EXPLANATION_RELEVANCE { focuses_on information relevant_to user_question }
EXPLANATION_CONSISTENCY { equivalent_reasoning SHOULD produce compatible_explanations }
EXPLANATION_STABILITY { irrelevant_small_changes SHOULD_NOT cause disproportionate_changes where stability_expected }
EXPLANATION_ROBUSTNESS { remains reliable under permitted_perturbations }
EXPLANATION_SIMPLICITY { minimise unnecessary_complexity while preserving material_truth }
SIMPLICITY_FIDELITY_TRADEOFF { simpler_explanation MAY omit detail; REQUIRE no_material_misrepresentation }
FAITHFULNESS_TEST { CompareExplanationClaims with ActualModelOrReasoningBehaviour }
PERTURBATION_TEST { ModifyRelevantFeature -> ObserveOutputChange -> CompareWithExplanation }
COUNTERFACTUAL_VALIDATION { CandidateCounterfactual -> CheckOutcomeChange -> CheckFeasibility -> CheckConstraintSatisfaction }
RULE_TRACE_TEST { ExplanationRuleChain -> ReplayInference -> ConfirmConclusion }
PROVENANCE_TEST { ExplanationSourceLinks -> VerifyExistenceAndUse }
REGRESSION_TEST { prior_explanations rerun_after_model_or_rule_changes }
EXPLANATION_VERSION { ExplanationID + ModelVersion + DataVersion + MethodVersion }
CHANGE_IMPACT { ModelOrKnowledgeChange -> AffectedResults -> AffectedExplanations -> Revalidation }
SYMBOLIC_XAI { ExplicitRules + Facts + Derivation -> TraceableExplanation }
SUBSYMBOLIC_XAI { LearnedModel + ExplanationMethod -> ApproximateOrModelSpecificExplanation }
NEURO_SYMBOLIC_XAI { LearnedModel + SymbolicKnowledge + FormalReasoning -> HybridExplanation }
CAUSAL_XAI { CausalModel + Intervention -> CausalExplanation }
COUNTERFACTUAL_XAI { Instance + DesiredOutcome + FeasibilityConstraints -> CounterfactualCandidate }
CONTRASTIVE_XAI { ActualOutcome + AlternativeOutcome -> DifferenceExplanation }
EXAMPLE_BASED_EXPLANATION { Result -> SimilarOrInfluentialExamples }
EXAMPLE_WARNING { similarity_or_influence MUST_NOT automatically imply causal_reason }
CONCEPT_BASED_EXPLANATION { ModelBehaviour -> HumanMeaningfulConcepts }
NATURAL_LANGUAGE_EXPLANATION { StructuredExplanation -> HumanReadableNarrative }
NLG_EXPLANATION_CONSTRAINT { generated_narrative MUST preserve structured_explanation_semantics }
HALLUCINATION_CONTROL { ExplanationClaim -> EvidenceCheck -> TraceCheck -> ProvenanceCheck -> StatusAssignment }
UNSUPPORTED_EXPLANATION_CLAIM { claim_without sufficient_evidence_or_trace }
EXPLANATION_STATUS { MAY_INCLUDE := {Verified,Supported,Approximate,Partial,Hypothetical,Unsupported,Unknown} }
STATUS_CONSTRAINT { explanation_status MUST match evidence_and_fidelity_level }
USER_QUERY { MAY_REQUEST := {Why,WhyNot,How,Evidence,Sources,Confidence,Counterfactual,Alternative} }
EXPLANATION_SELECTION { UserQuery + Audience + Context -> ExplanationType }
PERSONALISED_EXPLANATION { adapt terminology_and_detail to user_context; MUST_NOT alter underlying_facts_or_reasoning }
INTERACTIVE_EXPLANATION { Explanation -> FollowUpQuestion -> RefinedExplanation }
DRILL_DOWN { Summary -> SupportingDetail -> Trace -> Evidence }
ABSTRACTION_LEVEL { MAY_BE := {Summary,Intermediate,Technical,Formal} }
EXPLANATION_GRAPH {
Nodes := {Results,Claims,Evidence,Rules,ModelFactors,Sources}
Edges := {Supports,Derives,Contradicts,DependsOn,GeneratedBy,RetrievedFrom}
}
EXPLANATION_GRAPH_QUERY { Result -> TraverseSupportDependencies -> ReturnRelevantSubgraph }
SEMANTIC_EXPLANATION { ExplanationGraph + Ontology -> TypedExplanation }
ONTOLOGY_ALIGNMENT { explanation_terms -> ontology_entities }
ENTITY_RESOLUTION { explanation_mentions -> canonical_entities }
CONTRADICTION_DETECTION { explanation_claims -> detect logical_or_evidential_conflicts }
TEMPORAL_EXPLANATION { Result -> TimeRelevantEvidence -> TemporalDependencies }
TEMPORAL_VALIDITY { explanation valid_for declared_time_or_model_state }
EXPLANATION_EXPIRY { underlying_data_or_model_changes MAY make explanation_stale }
DECISION_EXPLANATION { Decision -> Inputs -> RulesOrModelFactors -> Constraints -> Alternatives }
RECOMMENDATION_EXPLANATION { Recommendation -> ContextFeatures -> Evidence -> ModelOrRuleBasis }
PLAN_EXPLANATION { Plan -> Goals -> Actions -> Preconditions -> Constraints }
ACTION_EXPLANATION { Action -> Trigger -> Policy -> ReasoningResult }
SAFETY_EXPLANATION { ResultOrAction -> ApplicableSafetyConstraints -> Checks -> Outcome }
CONSTRAINT_EXPLANATION { Result -> SatisfiedConstraints -> ViolatedConstraints -> Tradeoffs }
EXPLANATION_OF_FAILURE { Failure -> FailedCondition -> MissingEvidence -> ConstraintViolation -> ResourceLimit }
UNKNOWN_EXPLANATION { UnknownResult -> MissingInformation -> UnresolvedConflict -> UnsupportedInference }
TIMEOUT_EXPLANATION { Timeout -> ResourceLimit -> IncompleteSearchStatus }
EXPLAINABLE_AI_LOGIC_VS_INTERPRETABILITY {
Explainability := AccountOfWhyOrHowResultOccurs
Interpretability := DegreeSystemCanBeUnderstood
RELATED_NOT_IDENTICAL := TRUE
}
EXPLAINABLE_AI_LOGIC_VS_TRANSPARENCY {
Transparency := VisibilityIntoSystemDataModelProcess
Explainability := StructuredAccountOfResultBasis
}
EXPLAINABLE_AI_LOGIC_VS_AUDITABILITY {
Auditability := AbilityToInspectAndVerifyRecords
Explainability := AccountOfResultBasis
}
RECURSIVE_EXPLANATION {
Result -> IdentifyExplanationGoal -> GatherEvidence -> BuildDependencyStructure -> ValidateClaims -> IdentifyGaps -> Refine -> ReturnExplanation
}
RECURSION_TERMINATION {
STOP_WHEN := {ExplanationGoalSatisfied,EvidenceExhausted,RequiredFidelityReached,NoValidProgress,ResourceLimit}
}
SELF_VERIFICATION {
CandidateExplanation -> VerifyEvidence -> VerifyTrace -> VerifyProvenance -> VerifyStatus -> AcceptReviseReject
}
APPLICATION_RELATIONSHIPS {
ExplainableAILogic --supports--> ArtificialIntelligence
ExplainableAILogic --supports--> SymbolicAI
ExplainableAILogic --supports--> ExpertSystems
ExplainableAILogic --supports--> AutomatedReasoning
ExplainableAILogic --supports--> KnowledgeGraphs
ExplainableAILogic --supports--> DecisionSupport
ExplainableAILogic --supports--> ModelValidation
ExplainableAILogic --supports--> HumanOversight
ExplainableAILogic --supports--> Auditability
}
ONTOLOGY_LINKS {
PARENT := AILogicOntology
RELATED := {
ArtificialIntelligenceLogicOntology,SymbolicAIOntology,
AutomatedReasoningOntology,ExpertSystemLogicOntology,
LogicProgrammingOntology,PrologOntology,
ConstraintLogicProgrammingOntology,LogicalInferenceOntology,
KnowledgeGraphLogicOntology,SemanticConstraintOntology,
ProvenanceOntology
}
}
SEMANTIC_EQUIVALENCE {
ExplainableAILogic ≈ FormalAIExplanationLogic
ExplanationTrace ≈ StructuredReasoningTrace WHEN actual_process_correspondence
Justification ≈ SupportingKnowledgeSet WHEN formal_reasoning_context
}
CONSTRAINTS {
C1 := Explanation MUST identify target_and_goal
C2 := ExplanationProofEvidencePredictionAndCausation MUST remain distinguishable
C3 := FaithfulExplanation MUST correspond_to actual_system_behaviour
C4 := PostHocExplanation MUST be labelled
C5 := AttributionScores MUST_NOT automatically mean causation
C6 := LocalExplanations MUST_NOT automatically generalise_to global_behaviour
C7 := UncertaintyMeasures MUST retain declared_semantics
C8 := GeneratedExplanation MUST preserve structured_evidence
C9 := Provenance MUST correspond_to actual_sources
C10 := UnknownTimeoutAndPartialStatus MUST_NOT become certainty
C11 := Counterfactuals MUST satisfy feasibility_constraints
C12 := ExplanationVersion SHOULD track model_data_method_versions
}
REASONING_CHAIN Query Q {
IDENTIFY result_to_explain
IDENTIFY explanation_goal
IDENTIFY audience_and_context
IDENTIFY available_evidence
IDENTIFY provenance
SELECT explanation_method
GATHER evidence
BUILD dependency_structure
VERIFY trace_if_available
LABEL posthoc_if_applicable
VALIDATE counterfactuals_and_causal_claims
CHECK evidence_and_provenance
ASSIGN explanation_status
RETURN explanation WITH verifiable_support
}
CONFIDENCE {
CORE_XAI_LOGIC := 1.00
EXPLANATION_PROOF_DISTINCTION := 1.00
EVIDENCE_PROVENANCE := 1.00
POSTHOC_INTRINSIC_DISTINCTION := 1.00
LOCAL_GLOBAL_DISTINCTION := 1.00
ATTRIBUTION_CAUSALITY_DISTINCTION := 1.00
}
UPDATE_MODEL {
IMMUTABLE_CORE := {ExplanationTarget,ExplanationGoal,Evidence,Provenance,Fidelity,ExplicitStatus}
EXTENSIBLE := {ExplanationMethods,AttributionMethods,CounterfactualMethods,CausalMethods,AudienceModels,ExplanationGraphs,ApplicationDomains}
ON_NEW_KNOWLEDGE {
INVALIDATE affected_explanations
REBUILD dependencies
REVALIDATE evidence_and_trace
UPDATE provenance
UPDATE confidence
}
}
AI_CONSUMPTION {
MACHINE_READABLE := TRUE
HUMAN_INTERPRETABLE := TRUE
RECURSIVE_REASONING := TRUE
EXPLANATION_GRAPH_REASONING := TRUE
EVIDENCE_REASONING := TRUE
PROVENANCE_TRACKING := TRUE
TRACE_VALIDATION := TRUE
COUNTERFACTUAL_REASONING := TRUE
CAUSALITY_GUARD := TRUE
UNCERTAINTY_REASONING := TRUE
SELF_VERIFICATION := TRUE
VALIDATION_REQUIRED := TRUE
}
FLOW_HASH {
TARGET := TARGET_URL
SUBJECT := "Explainable AI Logic Ontology"
VERSION := "1.0"
CANONICAL_SIGNATURE := HASH(TARGET + SUBJECT + DOMAIN + VERSION)
}
OUTPUT {
PRIMARY_ENTITY := ExplainableAILogic
INTERPRETATION := "Explainable AI logic structures explanations around explicit targets, evidence, provenance, reasoning traces, uncertainty and validation. It distinguishes formal proof from explanatory narrative, intrinsic traces from post-hoc approximations, local from global explanations, and attribution from causality while supporting counterfactual, contrastive, symbolic and neuro-symbolic explanation methods."
}
END_FLOW
Download Code
Copy to Clipboard