Python API
The complete exported surface of vraven, vraven.decompiler, and vraven.darkside, generated from the package itself.
vraven
42 public symbols
CaptureConfigclassControls capture route order and validation behaviour.
CausalEffectPropertySpecclassPre-registered survival property for a vector of intervention effects.
compare_checkpointsfunctionPublic VRAVEN API symbol.
compare_modelsfunctionExplain two models on exactly the same bounded materialised sample set.
CounterfactualResultclassCounterfactualResult(target_class: 'int', original_prediction: 'int', counterfactual_prediction: 'int', original_target_score: 'float', counterfactual_target_score: 'float', success: 'bool', steps_completed: 'int', original_shape: 'tuple[int, ...]', original_values: 'list[float]', counterfactual_values: 'list[float]', delta_values: 'list[float]', top_changed_indices: 'list[int]', objective_history: 'list[float]', metadata: 'dict[str, Any]')
DarkSideSessionclassBind a live PyTorch model, sample and target for intervention analyses.
DatasetItemclassOne explicit dataset item for unambiguous analysis.
DecompilationResultclassDecompilationResult(captured: 'CapturedModel', atlas: 'ConceptAtlas', evolution: 'ConceptEvolution', causal_graph: 'CausalMechanismGraph', programme: 'MechanismProgram', contrastive: 'ContrastiveExplanation', counterfactual: 'CounterfactualProof | None', certificate: 'MechanismCertificate', profiler: 'ProfilerReport | None', focus_concept_values: 'np.ndarray', focus_logits: 'np.ndarray', target: 'int', alternative: 'int | None', class_names: 'dict[int, str]', timings_seconds: 'dict[str, float]', metadata: 'dict[str, Any]' = <factory>)
DecompileConfigclassDecompileConfig(capture: 'CaptureConfig' = <factory>, concepts: 'ConceptDiscoveryConfig' = <factory>, evolution: 'EvolutionConfig' = <factory>, causal: 'CausalGraphConfig' = <factory>, programme: 'ProgrammeConfig' = <factory>, counterfactual: 'CounterfactualConfig' = <factory>, profiler: 'ProfilerConfig' = <factory>, run_counterfactual: 'bool' = True, run_profiler: 'bool' = True, promote_association_labels: 'bool' = False, grounding_permutations: 'int' = 200, capture_example_batch: 'int' = 2, seed: 'int' = 17)
explainfunctionExplain one model invocation using the simple functional API.
explain_datasetfunctionExplain a bounded set of samples and compare their reduced internal traces.
explain_lrpfunctionRun epsilon-rule LRP over Linear, ReLU and Embedding modules.
ExplainerclassReusable model-bound VRAVEN explainer.
FormalCausalMechanismCertificateclassProof ledger for decision, representation and causal-effect survival.
FormalCausalMechanismVerifierclassCertify internal-vector and intervention-effect survival under L∞ input sets.
FormalMechanismApplicabilityRecordclassZero-radius applicability ledger for one frozen-basis cohort sample.
FormalRobustnessCertificateclassMachine-readable proof ledger for one sample and an optional cohort.
generate_counterfactualfunctionOptimise a bounded input change towards one target class.
InputDomainSpecclassSemantic contract for the model input on which a proof is interpreted.
IntervalBoundVerifierclassCertify local L-infinity robustness for a supported PyTorch FX graph.
load_model_bundlefunctionLoad and validate a public ``vraven.json`` model bundle.
load_pytorch_modelfunctionLoad a trusted PyTorch model using an explicit format.
LRPResultclassLRPResult(layers: 'list[LayerRelevance]', input_relevance: 'list[float] | None', input_relevance_shape: 'tuple[int, ...] | None', target_score: 'float', conservation_ratio: 'float', epsilon: 'float', metadata: 'dict[str, Any]' = <factory>)
MechanismCertificateclassMechanismCertificate(schema_version: 'str', model_class: 'str', target: 'int', validity_envelope: 'ValidityEnvelope', coverage: 'CoverageCertificate', fidelity: 'FidelityCertificate', claims: 'list[ClaimRecord]', dark_matter: 'dict[str, float]', warnings: 'list[str]', metadata: 'dict[str, Any]' = <factory>)
MechanismIRclassVRAVEN's architecture-neutral representation of an observed model computation.
MechanismPropertySpecclassPre-registered internal representation-survival property.
ModelBundleclassResolved files and defaults from one contained model-bundle directory.
NeuralTraceclassNeuralTrace(layers: 'list[LayerTrace]' = <factory>, prediction: 'PredictionTrace | None' = None, inputs: 'InputTrace | None' = None, target: 'int | list[int] | None' = None, mode: 'str' = 'fast', metadata: 'dict[str, Any]' = <factory>, causal_interventions: 'list[CausalInterventionTrace]' = <factory>, trace_id: 'str' = <factory>, created_at_utc: 'str' = <factory>, schema_version: 'str' = '1.0')
PerturbationResultclassPerturbationResult(levels: 'list[float]', curves: 'list[PerturbationCurve]', baseline_score: 'float', metadata: 'dict[str, Any]' = <factory>)
recommend_featuresfunctionReturn a focused set rather than running every expensive analysis.
reversefunctionConvenience entry point for the VRAVEN causal decompiler.
run_perturbation_stabilityfunctionEstimate score stability under increasing perturbation strength.
TraceDatasetclassAligned sample-level internal measurements.
VRAVEN_COLORSconstantdict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)
VRAVEN_IMPACTconstantBuilt-in mutable sequence.
VRavenConfigclassValidated configuration for one explanation run.
VRavenDatasetReportclassA collection of per-sample traces and their fixed-width fingerprints.
VRavenDecompilerclassRecover a tested high-level mechanism from a previously unseen PyTorch model.
VRavenEvolutionReportclassVRavenEvolutionReport(reports: 'tuple[VRavenReport, ...]', checkpoint_names: 'tuple[str, ...]', fingerprint_dimensions: 'int' = 128)
VRavenModelComparisonclassVRavenModelComparison(left: 'VRavenDatasetReport', right: 'VRavenDatasetReport', left_name: 'str' = 'model_a', right_name: 'str' = 'model_b')
VRavenReportclassVRavenReport(trace: 'NeuralTrace', full_tensors: 'dict[str, Any]' = <factory>, lrp_result: 'LRPResult | None' = None, perturbation_result: 'PerturbationResult | None' = None, counterfactual_result: 'CounterfactualResult | None' = None)
VRavenThemeclassLibrary-level VRAVEN visual controller for scientific figures.
vraven.decompiler
98 public symbols
AdversarialAuditorclassAudit a live PyTorch model with a measured adversarial stress suite.
AdversarialAuditReportclassAdversarial Mechanism Audit: stress testing + internal failure analysis.
AdversarialCertificateclassAdversarial Mechanism Audit: stress testing + internal failure analysis.
AttackAdequacyAuditclassDiagnostics that can reveal, but never rule out, attack failure.
AttackResultclassOne measured attack trial (Layer 1 stress + optional Layer 2 ΔM).
AUTOATTACK_SUITEconstantBuilt-in immutable sequence.
build_activation_probefunctionHook Linear/Conv modules and return a mean-pooled activation fingerprint.
build_concept_probe_from_directionsfunctionProject flattened input onto frozen concept / feature directions.
build_reverse_feature_auditsfunctionReturn independent audits for all seven signature Reverse features.
build_robustness_profilefunctionConstruct a worst-case monotone robustness profile from fixed-ε reports.
CaptureConfigclassControls capture route order and validation behaviour.
CaptureCoverageclassSeparate coverage measurements rather than a single opaque confidence score.
CapturedModelclassRuntime capture artefact.
CaptureRouteclassSupported routes used to recover model computation.
CausalConceptEdgeclassCausalConceptEdge(source: 'str', target: 'str', source_node: 'str', target_node: 'str', effect: 'float', effect_ci: 'tuple[float, float]', derivative_support: 'float | None', derivative_sign_agreement: 'bool | None', sign_stability: 'float', evolution_similarity: 'float', evolution_transport: 'float', off_manifold_distance: 'float', evidence_tier: 'str', metadata: 'dict[str, Any]' = <factory>)
CausalConceptNodeclassCausalConceptNode(concept_id: 'str', node_id: 'str', label: 'str', depth: 'float', output_effect: 'float', output_effect_ci: 'tuple[float, float]', responsibility: 'float', necessity: 'float', sign_stability: 'float', prediction_flip_rate: 'float', manifold_distance: 'float', evidence_tier: 'str', semantic_confidence: 'float', metadata: 'dict[str, Any]' = <factory>)
CausalEffectPropertySpecclassPre-registered survival property for a vector of intervention effects.
CausalEffectSurvivalPointclassCausalEffectSurvivalPoint(epsilon: 'float', status: 'CertificateStatus', certified: 'bool', absolute_l2_drift_upper_bound: 'float | None', clean_norm_lower_bound: 'float | None', relative_l2_drift_upper_bound: 'float | None', cosine_lower_bound: 'float | None', sign_stable_fraction: 'float | None', top_k_stable: 'bool | None', checks: 'dict[str, bool]' = <factory>, coordinate_lower_bounds: 'list[float]' = <factory>, coordinate_upper_bounds: 'list[float]' = <factory>, unsupported_reason: 'str | None' = None, inconclusive_reason: 'str | None' = None, effect_lower_bounds: 'list[float]' = <factory>, effect_upper_bounds: 'list[float]' = <factory>, minimum_clean_effect: 'float | None' = None, eligible_coordinate_count: 'int' = 0, required_coordinate_count: 'int' = 0)
CausalGraphConfigclassCausalGraphConfig(max_source_concepts: 'int' = 12, max_edges: 'int' = 36, max_samples: 'int' = 96, minimum_evolution_confidence: 'float' = 0.08, minimum_absolute_edge_effect: 'float' = 0.0001, bootstrap_repeats: 'int' = 300, seed: 'int' = 17, intervention_strength: 'float' = 1.0, derivative_screening: 'bool' = True, derivative_minimum: 'float' = 1e-07, output_path: 'str | Sequence[str | int] | None' = None)
CausalMechanismBuilderclassTest candidate concept relations through graph-compiled interventions.
CausalMechanismGraphclassCausalMechanismGraph(nodes: 'list[CausalConceptNode]', edges: 'list[CausalConceptEdge]', target: 'int', baseline_margin: 'np.ndarray', baseline_prediction: 'np.ndarray', metadata: 'dict[str, Any]' = <factory>)
CertificateBuilderclassPublic VRAVEN API symbol.
CertifiedAccuracyPointclassCertifiedAccuracyPoint(epsilon: 'float', n_samples: 'int', n_clean_correct: 'int', n_certified: 'int', certified_accuracy: 'float', clean_conditional_certified_accuracy: 'float', inconclusive_clean_correct: 'int', unsupported: 'int', per_class: 'dict[str, dict[str, Any]]' = <factory>)
CompiledInterventionclassCompiledIntervention(module: 'GraphModule', specs: 'tuple[InterventionSpec, ...]', gate_modules: 'dict[str, str]', gate_nodes: 'dict[str, str]', graph_code: 'str')
ConceptclassConcept(id: 'str', node_id: 'str', node_name: 'str', depth: 'float', index: 'int', feature_axis: 'int', direction: 'Tensor', mean_activation: 'float', std_activation: 'float', activation_sparsity: 'float', score_variance: 'float', top_samples: 'tuple[int, ...]', preferred_class: 'int | None' = None, class_effect_size: 'float | None' = None, semantic_label: 'str | None' = None, semantic_confidence: 'float' = 0.0, grounding: 'list[GroundingEvidence]' = <factory>, metadata: 'dict[str, Any]' = <factory>)
ConceptAtlasclassConceptAtlas(concept_sets: 'list[ConceptSet]', sample_ids: 'tuple[str, ...]', labels: 'np.ndarray | None' = None, metadata: 'dict[str, Any]' = <factory>)
ConceptChangeclassConceptChange(concept_id: 'str', label: 'str', node_id: 'str', original_value: 'float', replacement_value: 'float', normalised_cost: 'float', programme_contribution_before: 'float', programme_contribution_after: 'float', causal_output_effect: 'float | None' = None, semantic_status: 'str' = 'unresolved')
ConceptDiscoveryConfigclassConceptDiscoveryConfig(method: 'str' = 'sparse_autoencoder', max_nodes: 'int' = 6, concepts_per_node: 'int' = 6, batch_size: 'int' = 128, min_samples: 'int' = 16, min_features: 'int' = 2, max_features: 'int' = 4096, sparse_epochs: 'int' = 180, sparse_learning_rate: 'float' = 0.002, sparse_l1: 'float' = 0.002, sparse_topk: 'int | None' = 2, sparse_coherence: 'float' = 0.001, sparse_patience: 'int' = 25, pca_variance_floor: 'float' = 1e-09, seed: 'int' = 17, roles: 'tuple[MechanismRole, ...]' = (<MechanismRole.DETECT: 'detect'>, <MechanismRole.TRANSFORM: 'transform'>, <MechanismRole.GATE: 'gate'>, <MechanismRole.MERGE: 'merge'>, <MechanismRole.ACCUMULATE: 'accumulate'>, <MechanismRole.ATTEND: 'attend'>, <MechanismRole.STORE: 'store'>, <MechanismRole.READOUT: 'readout'>, <MechanismRole.UNKNOWN: 'unknown'>))
ConceptDiscoveryEngineclassPublic VRAVEN API symbol.
ConceptDriftMonitorclassMonitor incoming concept activations against a reference ConceptAtlas.
ConceptEvolutionclassConceptEvolution(edges: 'list[EvolutionEdge]', states: 'list[EvolutionState]', layer_pairs: 'list[tuple[str, str]]', metadata: 'dict[str, Any]' = <factory>)
ConceptEvolutionBuilderclassPublic VRAVEN API symbol.
ConceptSetclassConceptSet(node_id: 'str', node_name: 'str', depth: 'float', feature_axis: 'int', concepts: 'list[Concept]', scores: 'np.ndarray', method: 'str', reconstruction_error: 'float', explained_variance: 'float', feature_count: 'int', sample_count: 'int', activation_mean: 'np.ndarray | None' = None, activation_std: 'np.ndarray | None' = None, scoring_weight: 'np.ndarray | None' = None, scoring_bias: 'np.ndarray | None' = None, scoring_nonlinearity: 'str' = 'identity', scoring_topk: 'int | None' = None, metadata: 'dict[str, Any]' = <factory>)
ContrastiveExplainerclassPublic VRAVEN API symbol.
ContrastiveExplanationclassContrastiveExplanation(target: 'int', alternative: 'int | None', target_label: 'str', alternative_label: 'str', programme_margin: 'float', supporting: 'list[ContrastiveEvidence]', opposing: 'list[ContrastiveEvidence]', decisive_depth: 'float | None', cumulative_by_depth: 'list[tuple[float, float]]', plain_english: 'str', limitations: 'tuple[str, ...]', metadata: 'dict[str, Any]' = <factory>)
CoordinateSelectionProvenanceclassProvenance for the frozen intervention-coordinate basis.
CounterfactualCandidateclassCounterfactualCandidate(id: 'str', changes: 'list[ConceptChange]', total_cost: 'float', programme_margin_before: 'float', programme_margin_after: 'float', programme_flip: 'bool', model_margin_before: 'float | None' = None, model_margin_after: 'float | None' = None, model_prediction_before: 'int | None' = None, model_prediction_after: 'int | None' = None, model_flip: 'bool | None' = None, domain_valid: 'bool | None' = None, domain_validation_note: 'str' = 'No domain validator supplied.', verified: 'bool' = False, metadata: 'dict[str, Any]' = <factory>)
CounterfactualConfigclassControls bounded search over concept replacements.
CounterfactualProofclassCounterfactualProof(target: 'int', baseline_prediction: 'int', baseline_margin: 'float', baseline_programme_margin: 'float', selected: 'CounterfactualCandidate | None', candidates_tested_by_programme: 'int', candidates_verified_in_model: 'int', search_exhausted: 'bool', claim: 'str', limitations: 'tuple[str, ...]', programme_flip_candidates: 'int' = 0, verification_attempts: 'int' = 0, verification_failures: 'int' = 0, verification_budget_exhausted: 'bool' = False, metadata: 'dict[str, Any]' = <factory>)
CounterfactualProofEngineclassSearch for a compact concept intervention and verify it in the original graph.
CoverageCertificateclassCoverageCertificate(operator_coverage: 'float', parameter_coverage: 'float', gradient_coverage: 'float', intervention_coverage: 'float', semantic_coverage: 'float', semantic_association_coverage: 'float', causal_semantic_coverage: 'float', causal_semantic_association_coverage: 'float', unresolved_causal_responsibility: 'float', concepts_total: 'int', concepts_semantically_grounded: 'int', concepts_semantically_associated: 'int', causal_concepts_total: 'int', causal_concepts_grounded: 'int', causal_concepts_associated: 'int', unsupported_nodes: 'int')
DecisionProofReportclassRender a compact, evidence-led report rather than a generic metrics dashboard.
DecompilationResultclassDecompilationResult(captured: 'CapturedModel', atlas: 'ConceptAtlas', evolution: 'ConceptEvolution', causal_graph: 'CausalMechanismGraph', programme: 'MechanismProgram', contrastive: 'ContrastiveExplanation', counterfactual: 'CounterfactualProof | None', certificate: 'MechanismCertificate', profiler: 'ProfilerReport | None', focus_concept_values: 'np.ndarray', focus_logits: 'np.ndarray', target: 'int', alternative: 'int | None', class_names: 'dict[int, str]', timings_seconds: 'dict[str, float]', metadata: 'dict[str, Any]' = <factory>)
DecompileConfigclassDecompileConfig(capture: 'CaptureConfig' = <factory>, concepts: 'ConceptDiscoveryConfig' = <factory>, evolution: 'EvolutionConfig' = <factory>, causal: 'CausalGraphConfig' = <factory>, programme: 'ProgrammeConfig' = <factory>, counterfactual: 'CounterfactualConfig' = <factory>, profiler: 'ProfilerConfig' = <factory>, run_counterfactual: 'bool' = True, run_profiler: 'bool' = True, promote_association_labels: 'bool' = False, grounding_permutations: 'int' = 200, capture_example_batch: 'int' = 2, seed: 'int' = 17)
DEFAULT_STRESS_SUITEconstantBuilt-in immutable sequence.
DriftReportclassDriftReport(sample_index: 'int', overall_distance: 'float', status: 'str', top_drifting_concepts: 'list[tuple[str, float]]', metadata: 'dict[str, Any]' = <factory>)
EvolutionConfigclassEvolutionConfig(entropy_regularisation: 'float' = 0.08, sinkhorn_iterations: 'int' = 300, transport_threshold: 'float' = 0.04, similarity_threshold: 'float' = 0.25, split_mass_threshold: 'float' = 0.12, merge_mass_threshold: 'float' = 0.12, epsilon: 'float' = 1e-09)
EvolutionEdgeclassEvolutionEdge(source: 'str', target: 'str', source_node: 'str', target_node: 'str', similarity: 'float', signed_similarity: 'float', transport_mass: 'float', event: 'EvolutionEvent', confidence: 'float', metadata: 'dict[str, Any]' = <factory>)
EvolutionEventclassstr(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
EvolutionStateclassEvolutionState(concept_id: 'str', node_id: 'str', depth: 'float', event: 'EvolutionEvent', mass: 'float')
FidelityCertificateclassFidelityCertificate(observational_validation_r2: 'float', observational_validation_mae: 'float', observational_decision_agreement: 'float', interventional_correlation: 'float | None', interventional_mae: 'float | None', interventional_sign_agreement: 'float | None', counterfactual_programme_flip: 'bool | None', counterfactual_model_flip: 'bool | None', counterfactual_domain_valid: 'bool | None')
FormalCausalMechanismCertificateclassProof ledger for decision, representation and causal-effect survival.
FormalCausalMechanismVerifierclassCertify internal-vector and intervention-effect survival under L∞ input sets.
FormalMechanismApplicabilityRecordclassZero-radius applicability ledger for one frozen-basis cohort sample.
FormalMechanismCohortPointclassFormalMechanismCohortPoint(epsilon: 'float', n_samples: 'int', n_clean_correct: 'int', n_decision_certified: 'int', n_representation_certified: 'int', n_causal_effect_certified: 'int', n_mechanism_certified: 'int', n_jointly_certified: 'int', n_decision_and_mechanism: 'int', n_decision_only: 'int', n_mechanism_only: 'int', n_neither: 'int', n_representation_applicable: 'int', n_causal_applicable: 'int', n_mechanism_applicable: 'int', n_decision_and_representation_applicable: 'int', n_decision_and_causal_applicable: 'int', n_decision_and_mechanism_applicable: 'int', n_applicable_decision_and_mechanism: 'int', n_applicable_decision_only: 'int', n_applicable_mechanism_only: 'int', n_applicable_neither: 'int', decision_certified_accuracy: 'float', representation_certified_fraction: 'float', causal_effect_certified_fraction: 'float', joint_certified_accuracy: 'float', representation_applicable_fraction: 'float', causal_applicable_fraction: 'float', mechanism_applicable_fraction: 'float', applicable_decision_certified_fraction: 'float | None', applicable_mechanism_certified_fraction: 'float | None', applicable_joint_certified_fraction: 'float | None', representation_inapplicability_reasons: 'dict[str, int]' = <factory>, causal_inapplicability_reasons: 'dict[str, int]' = <factory>, mechanism_inapplicability_reasons: 'dict[str, int]' = <factory>, per_class: 'dict[str, dict[str, Any]]' = <factory>)
FormalRobustnessCertificateclassMachine-readable proof ledger for one sample and an optional cohort.
FormalVerificationPointclassFormalVerificationPoint(epsilon: 'float', status: 'VerificationStatus', certified: 'bool', clean_prediction: 'int', target: 'int', clean_margin: 'float', certified_margin_lower_bound: 'float | None', worst_competitor: 'int | None', competitor_margin_lower_bounds: 'dict[str, float]' = <factory>, output_lower_bounds: 'list[float]' = <factory>, output_upper_bounds: 'list[float]' = <factory>, layer_intervals: 'list[LayerIntervalRecord]' = <factory>, unsupported_reason: 'str | None' = None)
GraphInterventionCompilerclassInsert explicit gates into a captured FX or Export graph.
ground_concepts_from_input_groupsfunctionAttach conservative input-association evidence to discovered concepts.
GroundingEvidenceclassGroundingEvidence(candidate_label: 'str', association: 'float', absolute_association: 'float', permutation_p: 'float | None' = None, source: 'str' = 'input_association', validated: 'bool' = False, notes: 'str' = 'Association is not proof of semantic identity or causal use.')
InputDomainSpecclassSemantic contract for the model input on which a proof is interpreted.
IntervalBoundVerifierclassCertify local L-infinity robustness for a supported PyTorch FX graph.
InterventionExperimentclassPublic VRAVEN API symbol.
InterventionKindclassstr(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
InterventionResultclassInterventionResult(specs: 'tuple[InterventionSpec, ...]', target: 'int', baseline_margin: 'np.ndarray', intervened_margin: 'np.ndarray', effect: 'np.ndarray', mean_effect: 'float', median_effect: 'float', ci_low: 'float', ci_high: 'float', sign_stability: 'float', prediction_flip_rate: 'float', baseline_prediction: 'np.ndarray', intervened_prediction: 'np.ndarray', baseline_logits: 'np.ndarray', intervened_logits: 'np.ndarray', metadata: 'dict[str, Any]' = <factory>)
InterventionSpecclassInterventionSpec(node_id: 'str', kind: 'InterventionKind', label: 'str | None' = None, feature_axis: 'int' = -1, direction: 'Tensor | None' = None, baseline: 'Tensor | float | None' = None, strength: 'float' = 1.0, coefficient: 'float | Tensor | None' = None, clamp_min: 'float | None' = None, clamp_max: 'float | None' = None, metadata: 'dict[str, Any]' = <factory>)
JointMechanismPointclassJointMechanismPoint(epsilon: 'float', decision: 'FormalVerificationPoint', representation: 'VectorSurvivalPoint', causal_effect: 'CausalEffectSurvivalPoint', jointly_certified: 'bool')
LayerIntervalRecordclassLayerIntervalRecord(name: 'str', operator: 'str', lower_min: 'float', upper_max: 'float', maximum_width: 'float', unstable_fraction: 'float | None' = None)
MechanismCertificateclassMechanismCertificate(schema_version: 'str', model_class: 'str', target: 'int', validity_envelope: 'ValidityEnvelope', coverage: 'CoverageCertificate', fidelity: 'FidelityCertificate', claims: 'list[ClaimRecord]', dark_matter: 'dict[str, float]', warnings: 'list[str]', metadata: 'dict[str, Any]' = <factory>)
MechanismIRclassVRAVEN's architecture-neutral representation of an observed model computation.
MechanismProfilerclassPublic VRAVEN API symbol.
MechanismProgramclassMechanismProgram(target: 'int', concept_ids: 'tuple[str, ...]', concept_labels: 'dict[str, str]', intercept: 'float', rules: 'list[ProgrammeRule]', fidelity: 'ProgrammeFidelity', validity: 'dict[str, Any]' = <factory>, metadata: 'dict[str, Any]' = <factory>)
MechanismPropertySpecclassPre-registered internal representation-survival property.
MechanismRoleclassTyped high-level operation vocabulary used by the mechanism dialect.
MechanismSnapshotclassCompact ΔM between clean and adversarial mechanism vectors.
ModelCaptureRouterclassPublic VRAVEN API symbol.
NodeKindclassstr(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
NodeProfileclassNodeProfile(node_id: 'str', name: 'str', target: 'str', role: 'str', median_ms: 'float', p10_ms: 'float', p90_ms: 'float', mean_ms: 'float', tensor_bytes: 'int | None', parameter_count: 'int', causal_effect: 'float | None' = None, effect_per_ms: 'float | None' = None, effect_per_megabyte: 'float | None' = None, source_module: 'str | None' = None, source_file: 'str | None' = None, source_line: 'int | None' = None)
patch_modelfunctionCreate a causally patched PyTorch model with runtime intervention hooks.
PatchedModelclassWrapper around a PyTorch model that enforces causal concept interventions at runtime.
ProfilerConfigclassProfilerConfig(warmup_runs: 'int' = 2, measured_runs: 'int' = 8, use_torch_profiler: 'bool' = False, record_shapes: 'bool' = True, profile_memory: 'bool' = True, with_stack: 'bool' = False)
ProfilerReportclassProfilerReport(nodes: 'list[NodeProfile]', total_median_ms: 'float', torch_profiler_events: 'list[dict[str, Any]]', limitations: 'tuple[str, ...]', metadata: 'dict[str, Any]' = <factory>)
ProgrammeCompilerclassPublic VRAVEN API symbol.
ProgrammeConfigclassProgrammeConfig(maximum_concepts: 'int' = 16, maximum_rules: 'int' = 12, include_interactions: 'bool' = True, maximum_interactions: 'int' = 12, l1_strength: 'float' = 0.015, fista_iterations: 'int' = 1200, fista_tolerance: 'float' = 1e-08, validation_fraction: 'float' = 0.25, seed: 'int' = 17, coefficient_floor: 'float' = 1e-06, interventional_weight: 'float' = 16.0, minimum_intervention_effect: 'float' = 1e-06)
ProgrammeFidelityclassProgrammeFidelity(train_mae: 'float', validation_mae: 'float', train_r2: 'float', validation_r2: 'float', train_correlation: 'float', validation_correlation: 'float', train_decision_agreement: 'float', validation_decision_agreement: 'float', interventional_correlation: 'float | None' = None, interventional_mae: 'float | None' = None, interventional_sign_agreement: 'float | None' = None, rules: 'int' = 0, concepts: 'int' = 0)
ProgrammeRuleclassProgrammeRule(id: 'str', kind: 'str', concept_ids: 'tuple[str, ...]', labels: 'tuple[str, ...]', coefficient: 'float', term_mean: 'float', term_scale: 'float', evidence_tier: 'str', metadata: 'dict[str, Any]' = <factory>)
PublicationGateCheckclassOne independently inspectable methodological requirement.
PublicationReadinessLedgerclassNon-composite ledger of publication-evidence requirements.
reversefunctionConvenience entry point for the VRAVEN causal decompiler.
reverse_feature_auditfunctionReturn one named audit with a clear error for unsupported feature names.
ReverseFeatureAuditclassEvidence-calibrated scientific result attached to one Reverse feature.
RobustAccuracyReportclassFinite-sample clean / robust accuracy under a fixed threat model.
RobustnessCurvePointclassOne empirical robust-accuracy estimate at a declared L∞ budget.
RobustnessProfileReportclassRobust accuracy across an ε interval with uncertainty and attack attribution.
UnsupportedVerificationOperatorclassRaised when a graph operation lacks a sound interval transformer.
ValidityEnvelopeclassDeclared conditions under which the recovered explanation was evaluated.
VectorSurvivalPointclassVectorSurvivalPoint(epsilon: 'float', status: 'CertificateStatus', certified: 'bool', absolute_l2_drift_upper_bound: 'float | None', clean_norm_lower_bound: 'float | None', relative_l2_drift_upper_bound: 'float | None', cosine_lower_bound: 'float | None', sign_stable_fraction: 'float | None', top_k_stable: 'bool | None', checks: 'dict[str, bool]' = <factory>, coordinate_lower_bounds: 'list[float]' = <factory>, coordinate_upper_bounds: 'list[float]' = <factory>, unsupported_reason: 'str | None' = None, inconclusive_reason: 'str | None' = None)
VRavenDecompilerclassRecover a tested high-level mechanism from a previously unseen PyTorch model.
vraven.darkside
35 public symbols
__version__constantstr(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
analyse_activation_mediationfunctionPatch clean activations into a corrupted run and measure score recovery.
analyse_adversarial_reroutingfunctionMeasure where small input changes redirect internal evidence pathways.
analyse_causal_synergyfunctionEstimate pairwise interaction using single and joint ablations.
analyse_circuit_multiplicityfunctionMeasure non-uniqueness and empirical stability across discovered circuits.
analyse_cost_evidence_tradeofffunctionLocate layers that consume runtime while adding little measured evidence.
analyse_explanation_uncertaintyfunctionQuantify variability across seeds, perturbations or stochastic passes.
analyse_failure_anatomyfunctionCompare a failure cohort with a matched outcome cohort across depth.
analyse_high_confidence_oodfunctionFlag confident predictions whose internal fingerprints are atypical.
analyse_mechanism_transferfunctionCompare aligned intervention-effect maps across models or conditions.
analyse_method_disagreementfunctionCompare methods on the same indexed explanatory surface.
analyse_prediction_depthfunctionEstimate the earliest layer whose local prediction remains final-consistent.
analyse_representation_driftfunctionCompare aligned representations using complementary geometric measures.
analyse_stability_geometryfunctionLocate the first depth at which an internal path loses geometric stability.
analyse_topological_shiftfunctionCompare H0 persistence and optionally H1 persistence across layers.
AnalysisResultclassBase result shared by every DarkSide analysis.
audit_unused_capacityfunctionClassify units from dataset-level activity and target influence profiles.
build_circuit_wiringfunctionBuild a neuron-group wiring graph from an ε-sufficient circuit core.
compare_class_conditionalsfunctionCompare internal states for two declared classes at every shared layer.
DarkSideSessionclassBind a live PyTorch model, sample and target for intervention analyses.
detect_shortcut_reliancefunctionMeasure whether narrow input groups dominate a local prediction.
discover_decision_circuitryfunctionFind an approximate epsilon-sufficient sparse internal core.
enrich_circuit_wiring_edgesfunctionAttach structured CONNECTION cards to every wiring edge.
FeatureRecommendationclassOne feature recommendation for a user community or scientific question.
FEATURESconstantdict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)
h0_persistence_deathsfunctionReturn exact H0 Vietoris-Rips death times via a minimum spanning tree.
InputFeatureGroupclassA group of flattened input coordinates used for shortcut interventions.
inspect_internal_anatomyfunctionPrintable / plottable anatomy of Linear layers on one live forward pass.
layerwise_shortcut_probefunctionLocate where a declared shortcut variable becomes linearly decodable.
load_resultfunctionLoad and validate a versioned VRAVEN DarkSide analysis result.
map_class_conditional_unit_fieldfunctionDense unit-field map of class contrast for every shared influence layer.
print_internal_anatomyfunctionReturn the printable internal anatomy block from ``inspect_internal_anatomy``.
recommend_featuresfunctionReturn a focused set rather than running every expensive analysis.
TraceDatasetclassAligned sample-level internal measurements.
UnitGroupclassA declared intervention group inside one layer output invocation.