verskyt.benchmarks¶
Benchmark suites for validating paper results and comparing performance.
Module: xor_suite¶
XOR benchmark suite for Tversky Neural Networks.
Reproduces XOR experiments from “Tversky Neural Networks: Psychologically Plausible Deep Learning with Differentiable Tversky Similarity” (Doumbouya et al., 2025).
Provides both fast development benchmarks and full paper replication capabilities.
- class XORConfig(intersection_methods: ~typing.List[str | ~verskyt.core.similarity.IntersectionReduction] = <factory>, difference_methods: ~typing.List[str | ~verskyt.core.similarity.DifferenceReduction] = <factory>, normalization: ~typing.List[bool] = <factory>, feature_counts: ~typing.List[int] = <factory>, prototype_init: ~typing.List[str] = <factory>, feature_init: ~typing.List[str] = <factory>, random_seeds: ~typing.List[int] = <factory>, epochs: int = 1000, learning_rate: float = 0.1, convergence_threshold: float = 1.0)[source]¶
Bases:
objectConfiguration for XOR benchmark experiments.
- intersection_methods: List[str | IntersectionReduction]¶
- difference_methods: List[str | DifferenceReduction]¶
- __init__(intersection_methods: ~typing.List[str | ~verskyt.core.similarity.IntersectionReduction] = <factory>, difference_methods: ~typing.List[str | ~verskyt.core.similarity.DifferenceReduction] = <factory>, normalization: ~typing.List[bool] = <factory>, feature_counts: ~typing.List[int] = <factory>, prototype_init: ~typing.List[str] = <factory>, feature_init: ~typing.List[str] = <factory>, random_seeds: ~typing.List[int] = <factory>, epochs: int = 1000, learning_rate: float = 0.1, convergence_threshold: float = 1.0) None¶
- class XORResult(intersection_method: str, difference_method: str, normalize: bool, feature_count: int, prototype_init: str, feature_init: str, seed: int, final_loss: float, final_accuracy: float, converged: bool, training_time: float, loss_history: List[float] | None = None, accuracy_history: List[float] | None = None)[source]¶
Bases:
objectResults from a single XOR training run.
- __init__(intersection_method: str, difference_method: str, normalize: bool, feature_count: int, prototype_init: str, feature_init: str, seed: int, final_loss: float, final_accuracy: float, converged: bool, training_time: float, loss_history: List[float] | None = None, accuracy_history: List[float] | None = None) None¶
- class XORBenchmark(config: XORConfig)[source]¶
Bases:
objectXOR benchmark runner for Tversky Neural Networks.
- run_single_experiment(intersection_method: str, difference_method: str, normalize: bool, feature_count: int, prototype_init: str, feature_init: str, seed: int, track_history: bool = False) XORResult[source]¶
Run a single XOR training experiment.
- run_fast_xor_benchmark(verbose: bool = True) Tuple[List[XORResult], Dict[str, float]][source]¶
Run fast XOR benchmark for development (96 runs, ~60 seconds).
- run_full_xor_replication(verbose: bool = True) Tuple[List[XORResult], Dict[str, float]][source]¶
Run full paper replication (12,960 runs, ~2.2 hours).
XOR benchmark suite for validating non-linear learning capabilities.