Reference

Python API

The complete exported surface of vraven, vraven.decompiler, and vraven.darkside, generated from the package itself.

175 public symbolsEach symbol has its own signature, docstring, methods, and minimal usage page.

vraven

42 public symbols

CaptureConfigclass

Controls capture route order and validation behaviour.

CausalEffectPropertySpecclass

Pre-registered survival property for a vector of intervention effects.

compare_checkpointsfunction

Public VRAVEN API symbol.

compare_modelsfunction

Explain two models on exactly the same bounded materialised sample set.

CounterfactualResultclass

CounterfactualResult(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]')

DarkSideSessionclass

Bind a live PyTorch model, sample and target for intervention analyses.

DatasetItemclass

One explicit dataset item for unambiguous analysis.

DecompilationResultclass

DecompilationResult(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>)

DecompileConfigclass

DecompileConfig(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)

explainfunction

Explain one model invocation using the simple functional API.

explain_datasetfunction

Explain a bounded set of samples and compare their reduced internal traces.

explain_lrpfunction

Run epsilon-rule LRP over Linear, ReLU and Embedding modules.

Explainerclass

Reusable model-bound VRAVEN explainer.

FormalCausalMechanismCertificateclass

Proof ledger for decision, representation and causal-effect survival.

FormalCausalMechanismVerifierclass

Certify internal-vector and intervention-effect survival under L∞ input sets.

FormalMechanismApplicabilityRecordclass

Zero-radius applicability ledger for one frozen-basis cohort sample.

FormalRobustnessCertificateclass

Machine-readable proof ledger for one sample and an optional cohort.

generate_counterfactualfunction

Optimise a bounded input change towards one target class.

InputDomainSpecclass

Semantic contract for the model input on which a proof is interpreted.

IntervalBoundVerifierclass

Certify local L-infinity robustness for a supported PyTorch FX graph.

load_model_bundlefunction

Load and validate a public ``vraven.json`` model bundle.

load_pytorch_modelfunction

Load a trusted PyTorch model using an explicit format.

LRPResultclass

LRPResult(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>)

MechanismCertificateclass

MechanismCertificate(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>)

MechanismIRclass

VRAVEN's architecture-neutral representation of an observed model computation.

MechanismPropertySpecclass

Pre-registered internal representation-survival property.

ModelBundleclass

Resolved files and defaults from one contained model-bundle directory.

NeuralTraceclass

NeuralTrace(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')

PerturbationResultclass

PerturbationResult(levels: 'list[float]', curves: 'list[PerturbationCurve]', baseline_score: 'float', metadata: 'dict[str, Any]' = <factory>)

recommend_featuresfunction

Return a focused set rather than running every expensive analysis.

reversefunction

Convenience entry point for the VRAVEN causal decompiler.

run_perturbation_stabilityfunction

Estimate score stability under increasing perturbation strength.

TraceDatasetclass

Aligned sample-level internal measurements.

VRAVEN_COLORSconstant

dict() -> 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_IMPACTconstant

Built-in mutable sequence.

VRavenConfigclass

Validated configuration for one explanation run.

VRavenDatasetReportclass

A collection of per-sample traces and their fixed-width fingerprints.

VRavenDecompilerclass

Recover a tested high-level mechanism from a previously unseen PyTorch model.

VRavenEvolutionReportclass

VRavenEvolutionReport(reports: 'tuple[VRavenReport, ...]', checkpoint_names: 'tuple[str, ...]', fingerprint_dimensions: 'int' = 128)

VRavenModelComparisonclass

VRavenModelComparison(left: 'VRavenDatasetReport', right: 'VRavenDatasetReport', left_name: 'str' = 'model_a', right_name: 'str' = 'model_b')

VRavenReportclass

VRavenReport(trace: 'NeuralTrace', full_tensors: 'dict[str, Any]' = <factory>, lrp_result: 'LRPResult | None' = None, perturbation_result: 'PerturbationResult | None' = None, counterfactual_result: 'CounterfactualResult | None' = None)

VRavenThemeclass

Library-level VRAVEN visual controller for scientific figures.

vraven.decompiler

98 public symbols

AdversarialAuditorclass

Audit a live PyTorch model with a measured adversarial stress suite.

AdversarialAuditReportclass

Adversarial Mechanism Audit: stress testing + internal failure analysis.

AdversarialCertificateclass

Adversarial Mechanism Audit: stress testing + internal failure analysis.

AttackAdequacyAuditclass

Diagnostics that can reveal, but never rule out, attack failure.

AttackResultclass

One measured attack trial (Layer 1 stress + optional Layer 2 ΔM).

AUTOATTACK_SUITEconstant

Built-in immutable sequence.

build_activation_probefunction

Hook Linear/Conv modules and return a mean-pooled activation fingerprint.

build_concept_probe_from_directionsfunction

Project flattened input onto frozen concept / feature directions.

build_reverse_feature_auditsfunction

Return independent audits for all seven signature Reverse features.

build_robustness_profilefunction

Construct a worst-case monotone robustness profile from fixed-ε reports.

CaptureConfigclass

Controls capture route order and validation behaviour.

CaptureCoverageclass

Separate coverage measurements rather than a single opaque confidence score.

CapturedModelclass

Runtime capture artefact.

CaptureRouteclass

Supported routes used to recover model computation.

CausalConceptEdgeclass

CausalConceptEdge(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>)

CausalConceptNodeclass

CausalConceptNode(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>)

CausalEffectPropertySpecclass

Pre-registered survival property for a vector of intervention effects.

CausalEffectSurvivalPointclass

CausalEffectSurvivalPoint(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)

CausalGraphConfigclass

CausalGraphConfig(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)

CausalMechanismBuilderclass

Test candidate concept relations through graph-compiled interventions.

CausalMechanismGraphclass

CausalMechanismGraph(nodes: 'list[CausalConceptNode]', edges: 'list[CausalConceptEdge]', target: 'int', baseline_margin: 'np.ndarray', baseline_prediction: 'np.ndarray', metadata: 'dict[str, Any]' = <factory>)

CertificateBuilderclass

Public VRAVEN API symbol.

CertifiedAccuracyPointclass

CertifiedAccuracyPoint(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>)

CompiledInterventionclass

CompiledIntervention(module: 'GraphModule', specs: 'tuple[InterventionSpec, ...]', gate_modules: 'dict[str, str]', gate_nodes: 'dict[str, str]', graph_code: 'str')

Conceptclass

Concept(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>)

ConceptAtlasclass

ConceptAtlas(concept_sets: 'list[ConceptSet]', sample_ids: 'tuple[str, ...]', labels: 'np.ndarray | None' = None, metadata: 'dict[str, Any]' = <factory>)

ConceptChangeclass

ConceptChange(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')

ConceptDiscoveryConfigclass

ConceptDiscoveryConfig(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'>))

ConceptDiscoveryEngineclass

Public VRAVEN API symbol.

ConceptDriftMonitorclass

Monitor incoming concept activations against a reference ConceptAtlas.

ConceptEvolutionclass

ConceptEvolution(edges: 'list[EvolutionEdge]', states: 'list[EvolutionState]', layer_pairs: 'list[tuple[str, str]]', metadata: 'dict[str, Any]' = <factory>)

ConceptEvolutionBuilderclass

Public VRAVEN API symbol.

ConceptSetclass

ConceptSet(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>)

ContrastiveExplainerclass

Public VRAVEN API symbol.

ContrastiveExplanationclass

ContrastiveExplanation(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>)

CoordinateSelectionProvenanceclass

Provenance for the frozen intervention-coordinate basis.

CounterfactualCandidateclass

CounterfactualCandidate(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>)

CounterfactualConfigclass

Controls bounded search over concept replacements.

CounterfactualProofclass

CounterfactualProof(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>)

CounterfactualProofEngineclass

Search for a compact concept intervention and verify it in the original graph.

CoverageCertificateclass

CoverageCertificate(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')

DecisionProofReportclass

Render a compact, evidence-led report rather than a generic metrics dashboard.

DecompilationResultclass

DecompilationResult(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>)

DecompileConfigclass

DecompileConfig(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_SUITEconstant

Built-in immutable sequence.

DriftReportclass

DriftReport(sample_index: 'int', overall_distance: 'float', status: 'str', top_drifting_concepts: 'list[tuple[str, float]]', metadata: 'dict[str, Any]' = <factory>)

EvolutionConfigclass

EvolutionConfig(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)

EvolutionEdgeclass

EvolutionEdge(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>)

EvolutionEventclass

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

EvolutionStateclass

EvolutionState(concept_id: 'str', node_id: 'str', depth: 'float', event: 'EvolutionEvent', mass: 'float')

FidelityCertificateclass

FidelityCertificate(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')

FormalCausalMechanismCertificateclass

Proof ledger for decision, representation and causal-effect survival.

FormalCausalMechanismVerifierclass

Certify internal-vector and intervention-effect survival under L∞ input sets.

FormalMechanismApplicabilityRecordclass

Zero-radius applicability ledger for one frozen-basis cohort sample.

FormalMechanismCohortPointclass

FormalMechanismCohortPoint(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>)

FormalRobustnessCertificateclass

Machine-readable proof ledger for one sample and an optional cohort.

FormalVerificationPointclass

FormalVerificationPoint(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)

GraphInterventionCompilerclass

Insert explicit gates into a captured FX or Export graph.

ground_concepts_from_input_groupsfunction

Attach conservative input-association evidence to discovered concepts.

GroundingEvidenceclass

GroundingEvidence(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.')

InputDomainSpecclass

Semantic contract for the model input on which a proof is interpreted.

IntervalBoundVerifierclass

Certify local L-infinity robustness for a supported PyTorch FX graph.

InterventionExperimentclass

Public VRAVEN API symbol.

InterventionKindclass

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

InterventionResultclass

InterventionResult(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>)

InterventionSpecclass

InterventionSpec(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>)

JointMechanismPointclass

JointMechanismPoint(epsilon: 'float', decision: 'FormalVerificationPoint', representation: 'VectorSurvivalPoint', causal_effect: 'CausalEffectSurvivalPoint', jointly_certified: 'bool')

LayerIntervalRecordclass

LayerIntervalRecord(name: 'str', operator: 'str', lower_min: 'float', upper_max: 'float', maximum_width: 'float', unstable_fraction: 'float | None' = None)

MechanismCertificateclass

MechanismCertificate(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>)

MechanismIRclass

VRAVEN's architecture-neutral representation of an observed model computation.

MechanismProfilerclass

Public VRAVEN API symbol.

MechanismProgramclass

MechanismProgram(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>)

MechanismPropertySpecclass

Pre-registered internal representation-survival property.

MechanismRoleclass

Typed high-level operation vocabulary used by the mechanism dialect.

MechanismSnapshotclass

Compact ΔM between clean and adversarial mechanism vectors.

ModelCaptureRouterclass

Public VRAVEN API symbol.

NodeKindclass

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

NodeProfileclass

NodeProfile(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_modelfunction

Create a causally patched PyTorch model with runtime intervention hooks.

PatchedModelclass

Wrapper around a PyTorch model that enforces causal concept interventions at runtime.

ProfilerConfigclass

ProfilerConfig(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)

ProfilerReportclass

ProfilerReport(nodes: 'list[NodeProfile]', total_median_ms: 'float', torch_profiler_events: 'list[dict[str, Any]]', limitations: 'tuple[str, ...]', metadata: 'dict[str, Any]' = <factory>)

ProgrammeCompilerclass

Public VRAVEN API symbol.

ProgrammeConfigclass

ProgrammeConfig(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)

ProgrammeFidelityclass

ProgrammeFidelity(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)

ProgrammeRuleclass

ProgrammeRule(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>)

PublicationGateCheckclass

One independently inspectable methodological requirement.

PublicationReadinessLedgerclass

Non-composite ledger of publication-evidence requirements.

reversefunction

Convenience entry point for the VRAVEN causal decompiler.

reverse_feature_auditfunction

Return one named audit with a clear error for unsupported feature names.

ReverseFeatureAuditclass

Evidence-calibrated scientific result attached to one Reverse feature.

RobustAccuracyReportclass

Finite-sample clean / robust accuracy under a fixed threat model.

RobustnessCurvePointclass

One empirical robust-accuracy estimate at a declared L∞ budget.

RobustnessProfileReportclass

Robust accuracy across an ε interval with uncertainty and attack attribution.

UnsupportedVerificationOperatorclass

Raised when a graph operation lacks a sound interval transformer.

ValidityEnvelopeclass

Declared conditions under which the recovered explanation was evaluated.

VectorSurvivalPointclass

VectorSurvivalPoint(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)

VRavenDecompilerclass

Recover a tested high-level mechanism from a previously unseen PyTorch model.

vraven.darkside

35 public symbols

__version__constant

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

analyse_activation_mediationfunction

Patch clean activations into a corrupted run and measure score recovery.

analyse_adversarial_reroutingfunction

Measure where small input changes redirect internal evidence pathways.

analyse_causal_synergyfunction

Estimate pairwise interaction using single and joint ablations.

analyse_circuit_multiplicityfunction

Measure non-uniqueness and empirical stability across discovered circuits.

analyse_cost_evidence_tradeofffunction

Locate layers that consume runtime while adding little measured evidence.

analyse_explanation_uncertaintyfunction

Quantify variability across seeds, perturbations or stochastic passes.

analyse_failure_anatomyfunction

Compare a failure cohort with a matched outcome cohort across depth.

analyse_high_confidence_oodfunction

Flag confident predictions whose internal fingerprints are atypical.

analyse_mechanism_transferfunction

Compare aligned intervention-effect maps across models or conditions.

analyse_method_disagreementfunction

Compare methods on the same indexed explanatory surface.

analyse_prediction_depthfunction

Estimate the earliest layer whose local prediction remains final-consistent.

analyse_representation_driftfunction

Compare aligned representations using complementary geometric measures.

analyse_stability_geometryfunction

Locate the first depth at which an internal path loses geometric stability.

analyse_topological_shiftfunction

Compare H0 persistence and optionally H1 persistence across layers.

AnalysisResultclass

Base result shared by every DarkSide analysis.

audit_unused_capacityfunction

Classify units from dataset-level activity and target influence profiles.

build_circuit_wiringfunction

Build a neuron-group wiring graph from an ε-sufficient circuit core.

compare_class_conditionalsfunction

Compare internal states for two declared classes at every shared layer.

DarkSideSessionclass

Bind a live PyTorch model, sample and target for intervention analyses.

detect_shortcut_reliancefunction

Measure whether narrow input groups dominate a local prediction.

discover_decision_circuitryfunction

Find an approximate epsilon-sufficient sparse internal core.

enrich_circuit_wiring_edgesfunction

Attach structured CONNECTION cards to every wiring edge.

FeatureRecommendationclass

One feature recommendation for a user community or scientific question.

FEATURESconstant

dict() -> 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_deathsfunction

Return exact H0 Vietoris-Rips death times via a minimum spanning tree.

InputFeatureGroupclass

A group of flattened input coordinates used for shortcut interventions.

inspect_internal_anatomyfunction

Printable / plottable anatomy of Linear layers on one live forward pass.

layerwise_shortcut_probefunction

Locate where a declared shortcut variable becomes linearly decodable.

load_resultfunction

Load and validate a versioned VRAVEN DarkSide analysis result.

map_class_conditional_unit_fieldfunction

Dense unit-field map of class contrast for every shared influence layer.

print_internal_anatomyfunction

Return the printable internal anatomy block from ``inspect_internal_anatomy``.

recommend_featuresfunction

Return a focused set rather than running every expensive analysis.

TraceDatasetclass

Aligned sample-level internal measurements.

UnitGroupclass

A declared intervention group inside one layer output invocation.