SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.15877 · 2026

Free Energy Heuristics: Fast-And-Frugal Cognition as Active Inference Under Uncertain Precision

Alex Bogdan

arXiv · PDF

Code that ran

6 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 4 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2606.15877.json · badge: /api/ran/2606.15877.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
Evolutionairy-AI/Free-Energy-Heuristics community
Papers with Code archive
6 ran · 4 no recorded run
FunctionStatusWhere it lives
binary_entropy Ran
ran, honoured the contract we drafted
Evolutionairy-AI/Free-Energy-Heuristics/binary_toy_monte_carlo.py
code served (permissive licence) · get_code("0596c5d2f6fcb7f7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# The function binary_entropy takes a single parameter 'p' which should be
# a numeric value between 0 and 1 (exclusive of endpoints based on the logic)
# The function computes binary entropy using the formula: -p*log(p) - (1-p)*log(1-p)

# Test with a valid probability value
p_value = 0.5

ARGS = {
    "p": p_value
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
cue_likelihood Ran
ran, honoured the contract we drafted
Evolutionairy-AI/Free-Energy-Heuristics/binary_toy_monte_carlo.py
code served (permissive licence) · get_code("28c08752b833ad0b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function cue_likelihood takes three parameters: c, s, v
# It compares c and s for equality, and returns v if equal, (1-v) if not equal
# All three parameters appear to be scalar values that support equality comparison

c = 0.5  # scalar value for cue
s = 0.5  # scalar value for stimulus
v = 0.8  # scalar value for likelihood (probability)

ARGS = {
    "c": c,
    "s": s,
    "v": v
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
cue_marginal_prob Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Evolutionairy-AI/Free-Energy-Heuristics/binary_toy_monte_carlo.py
code served (permissive licence) · get_code("ddbdc02f6b430446")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Build small sequences for c_seq and v_seq
c_seq = [1, 0, 1, 0]  # sequence of cue values (binary)
v_seq = [0.9, 0.8, 0.85, 0.75]  # sequence of reliability values
mu_0 = 0.5  # prior probability

ARGS = {
    "c_seq": c_seq,
    "v_seq": v_seq,
    "mu_0": mu_0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
expected_state_entropy Ran
ran; our contract draft was wrong, not the code
Evolutionairy-AI/Free-Energy-Heuristics/binary_toy_monte_carlo.py
code served (permissive licence) · get_code("034af69e9564701e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

ARGS = {
    "k": 3,
    "v_seq": np.array([0.7, 0.8, 0.75]),
    "alpha_0": 2.0,
    "beta_0": 3.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
p_s_given_cues Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Evolutionairy-AI/Free-Energy-Heuristics/binary_toy_monte_carlo.py
code served (permissive licence) · get_code("a18e0d26d7ccf047")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Construct arguments for p_s_given_cues function
# Parameters: c_seq, v_seq, alpha_0, beta_0

# c_seq: sequence of cues (0 or 1 values)
c_seq = [1, 0, 1, 1]

# v_seq: sequence of reliability values (between 0 and 1)
v_seq = [0.8, 0.7, 0.9, 0.75]

# alpha_0, beta_0: parameters for Beta prior
alpha_0 = 2.0
beta_0 = 3.0

ARGS = {
    "c_seq": c_seq,
    "v_seq": v_seq,
    "alpha_0": alpha_0,
    "beta_0": beta_0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
posterior_weights Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Evolutionairy-AI/Free-Energy-Heuristics/binary_toy_monte_carlo.py
code served (permissive licence) · get_code("2d48abc01808dd1f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Build arguments for posterior_weights function
# Parameters: c_seq, v_seq, mu_0

# c_seq: sequence of cue values (0 or 1)
c_seq = [1, 0, 1, 1]

# v_seq: sequence of reliability/validity values (probabilities between 0 and 1)
v_seq = [0.8, 0.7, 0.9, 0.75]

# mu_0: prior probability (between 0 and 1)
mu_0 = 0.6

ARGS = {
    "c_seq": c_seq,
    "v_seq": v_seq,
    "mu_0": mu_0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
delta_meta Not yet run
unverified (harvested, no recorded run)
Evolutionairy-AI/Free-Energy-Heuristics/binary_toy_monte_carlo.py
code served (permissive licence) · get_code("69979253c887de90")
How it ran

no invocation recorded.

expected_delta_meta Not yet run
unverified (harvested, no recorded run)
Evolutionairy-AI/Free-Energy-Heuristics/binary_toy_monte_carlo.py
code served (permissive licence) · get_code("f0d2047b22bd2f47")
How it ran

no invocation recorded.

expected_free_energy Not yet run
unverified (harvested, no recorded run)
Evolutionairy-AI/Free-Energy-Heuristics/binary_toy_monte_carlo.py
code served (permissive licence) · get_code("ae00339dd7561b69")
How it ran

no invocation recorded.

kl_mixture_two_component Not yet run
unverified (harvested, no recorded run)
Evolutionairy-AI/Free-Energy-Heuristics/binary_toy_monte_carlo.py
code served (permissive licence) · get_code("0db9de5546caa8b6")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Chain-of-thought (CoT) prompting reliably improves large language model performance on mathematical and symbolic reasoning, but recent work shows that extending CoT degrades performance on planning, contested ethical reasoning, and other tasks where the model lacks a reliable internal verifier. Literature documents both effects without a principled account of which property governs which side a given item falls on. We argue that meta-uncertainty about the precision of one's own evidence is a governing property. We prove that the variational policy minimizing expected free energy under uncertain precision truncates cue integration after a finite number k * of high-validity cues whenever the precision prior has heavy enough tails (Theorem 2.6.1), and that under a Descending Dominance condition the truncated policy is sample-wise identical to Gigerenzer's take-the-best heuristic (Theorem 2.7.4). Fast-and-frugal heuristics and active inference are, in the meta-uncertain regime, two descriptions of the same computation. This equivalence makes a sharp, falsifiable prediction about LLM behavior: on items in the highmeta-uncertainty regime, extending CoT should degrade rather than improve answer quality. We operationalize the regime with a per-item score (cross-prompt variance, cross-seed variance, and calibration error) validated by simulate-and-recover (ρ > 0.96), introduce FEH-79, a benchmark of Knightian frames across four operational categories (non-recurrent forecasting, novel-synthetic, open-ended dilemmas, strategic uncertainty) with matched confound controls, and run a pre-registered confirmatory study over seven models (five open-weight, 3B-32B, and two frontier systems), five CoT-length conditions, and 7,875 responses. The registered primary contrast is the randomly assigned reasoning length, and the decision gate requires that the interaction β 3 < 0 at a posterior probability above 0.95, together with a robust implied accuracy drop of more than 6 percentage points. The prediction held. The interaction is negative at the posterior probability 1.00, with a posteriormedian high-regime accuracy drop of 17.3 percentage points (95% credible interval [7.7, 25.5]), clearing the pre-registered gate; matched control items with definite answers show no such cost. The effect is not universal, and we do not present it as such: it is decisive in the capable mid-to-large models, directional in the two frontier systems, and absent-to-reversed in the two weakest, exactly the regime-dependent texture the theory predicts. The framework gives a principled answer to "when should we use chain-of-thought?" and unifies the Bayesian rational-analysis and fast-and-frugal traditions: less-is-more effects are evidence about the meta-uncertainty regime, not against Bayesian cognition. Keywords active inference • fast-and-frugal heuristics • Knightian uncertainty • chain-of-thought • large language models • pre-registration FEH inherits this two-level structure with a specific commitment: the second-order distribution is taken to be over a precision parameter governing prior strength, rather than over arbitrary aspects of the prior. This is a substantive modeling choice, narrower than KMM's general framework, but computationally tractable and empirically operationalizable. KMM and FEH share a common motivation: both treat the agent as uncertain about its first-order distribution and both produce decision criteria richer than standard subjective expected utility, but they differ structurally in what they penalize. KMM penalizes variance in expected utility across the second-order distribution; FEH penalizes commitment in the meta-precision posterior as cues accumulate. The two frameworks are complementary rather than equivalent (we return to this point in §2.8). The proposal in plain language Stripped of formalism, the proposal is this. Suppose an inference agent is uncertain not only about the state of the world, but about how much weight to place on its own prior beliefs. Then each additional cue the agent integrates carries two contributions to its expected free energy. The first contribution is positive: the agent learns something about the world. The second contribution is negative: the agent commits more strongly to a particular posterior over its own prior reliability, and that commitment carries an explicit cost in expected free energy that grows with the number of cues integrated. In the standard low-meta-uncertainty regime, the first contribution dominates and full Bayesian inference is optimal. In the high-meta-uncertainty regime, the second contribution begins to dominate after a finite number of cues, at which point further cue integration strictly increases expected free energy. The optimal policy in this regime is to truncate cue integration at the crossover point, and the optimal cue ordering at truncation, we will show, coincides with the validity ordering used by take-the-best. This recovers fast-and-frugal heuristics as the structural form of optimal inference under metal uncertainty. Far from being departures from rationality, heuristics in this regime are what rationality looks like. Three counterarguments, named upfront Three objections will arise from informed readers, and we name them now so the rest of the section can address them in their proper places. Objection 1 (the hierarchical Bayes objection). Hierarchical Bayesian models with uncertain hyperparameters are well-established. They do not, in general, produce heuristic-like policies. Why should we use our framework? The answer is that FEH adds two conjunctive ingredients that hierarchical Bayes alone does not supply: (a) the explicit accounting of meta-precision divergence as a free-energy cost in sequential cue integration, and (b) the evaluation of policies by expected free energy rather than by expected utility under the marginal posterior. The combination of these ingredients with hierarchical Bayes is what produces the cue-truncation result. Hierarchical Bayes alone does not.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2606.15877")
get_code_for_paper("2606.15877")
have("2606.15877")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2606.15877.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2606.15877.svg)](https://syntology.ai/paper/2606.15877)

Connect an agent — have() is free.