Introducing SignalCount, OuterSignal's first contribution to the applied AI research community. SignalCount is a production system that answers a question every audience builder runs into: how many records in a filtered set meet a criterion that only a reader of their text can judge? It returns an estimate and a 90% interval in seconds, and it calls no LLM judge while the user waits. We describe it in a preprint, SignalCount: Approximate Counts with Structured and Semantic Predicates in Seconds.
Take a research hospital recruiting for a diabetes trial. A coordinator filters the patient records to type 2 diabetes, ages 40 to 70, seen this year and living near a trial site, and 50,000 patients match. That count is exact, because every part of the filter is a column. Why a patient stopped metformin is not a column; it is written in the clinical notes. So the coordinator writes the criterion in plain language, and rarely gets it right the first time: "tried metformin" matches about 9,000 patients, more than the 3,000 charts the team can screen this quarter. For "stopped metformin because blood sugar stayed high", SignalCount estimates about 2,000 patients, with a 90% interval of 418 to 2,808, in about 2.5 s. These numbers are illustrative; the production results below are measured.
One dot per sampled patient. The staircase is illustrative; the deployed table has 91 steps. At step 5, Verdicts shows one random way the judge could rule on the 50 patients at 0.8.
The work comes from OuterSignal's Applied AI Research & Engineering team, which tests new research on our own workloads, ships what holds up and publishes what it learns.
Why not ask the judge?
In OuterSignal's product, SignalCount backs custom filters and criteria for audience segmentation, in an application that serves thousands of tenants. Saving a criterion runs a batch pipeline that ends with a production LLM judge. For over 500,000 records, judging every one would cost about 1,100 times as much as an estimate and take at least half an hour.
Prior methods for counts with expensive predicates, such as ABae and prediction-powered inference, have the expensive model label a fresh sample for every new criterion at query time. Our judge takes 3.7 s at the p50 and 7.7 s at the p90 per call, so even a sample labeled in parallel overruns a 5 s budget. The paper argues this from measured latency; we did not run either method in production.
Moving the judge offline
SignalCount moves the judge out of the query path. OuterSignal's pipeline already runs a fast, non-generative classifier in front of its judge: Jev, from Typesafe AI, which scores how likely a record's text is to meet a natural-language criterion. Only records that score at least 0.10 reach the judge, and the pipeline logs the score and the judge's verdict for every record the judge sees. Those logs are labels that cost nothing more to collect, and SignalCount learns from them offline.
At query time, one ClickHouse query counts the filtered set exactly and, in the same scan, keeps the 1,000 records with the smallest seeded hash of their id: a uniform random sample, the same one each time the query is asked. The classifier scores each sampled record once, so model calls and cost never grow with the filtered set.
How the estimate works
The estimate is one multiplication:
estimate = average probability in the sample × exact size of the filtered set
The size, 50,000 patients, is counted, never estimated. The sample of 1,000 only has to tell SignalCount what share of those patients match.
That needs a probability per sampled record, and a classifier score is not one. A score of 0.9 says a record looks like a match, not that the judge accepts nine in ten like it. So offline, SignalCount bins the logged scores 0.01 wide and counts how often the judge said yes in each bin. Isotonic regression turns those rates into a staircase that never steps down as the score rises: when a bin's rate comes out below the bin under it, the two are pooled, so 70 yeses of 100 and 65 of 100 become one step at 135 of 200, or 67.5%. The table has 91 steps, from 0.10 to 1.00; below 0.10, where the judge never looks, the probability is zero.
In Figure 1, 50 of the 1,000 sampled patients get a probability of 0.8 and the other 950 score below 0.10, so the average is 50 × 0.8 / 1,000 = 0.04 and the estimate is 0.04 × 50,000 = 2,000 patients.
How sure is 2,000?
Picture three stops on a number line. The first is the estimate, 2,000. The second is what SignalCount would get by scoring all 50,000 patients instead of 1,000. The third is the true count: how many patients the judge would actually accept.
Two kinds of luck separate them. Sampling luck takes the first stop to the second: a different 1,000 patients would hold a few more or fewer high scorers, and each one moves the estimate by 40. Verdict luck takes the second to the third: a patient at 0.8 still gets a no one time in five, so the yeses rarely land exactly on the expected count, just as 100 tosses of a coin that lands heads four times in five rarely give exactly 80 heads. A bigger sample shrinks sampling luck and leaves verdict luck alone.
To size each kind, take its spread over many draws, the standard deviation. In the example, sampling luck has a standard deviation of 273 patients and verdict luck 20. Spreads do not add, but their squares (the variances) do when the two kinds of luck are independent: about 74,500 plus 400 is 74,900, and its square root is 274. Sampling luck is 99.5% of that variance.
A bell curve turns the spread into a range. One standard deviation either side holds about 68% of outcomes, 1.645 holds 90%, and 2 holds 95%; the 1.645 is simply where a bell curve leaves 5% in each tail. So the sampling term is 1.645 × 274, about 450 patients: if the calibration table is right for this criterion, the true count lies within 450 of the estimate about 90% of the time.
Standard deviations in patients. The simulated set has 50,000 patients whose probabilities sum to 2,000, like the running example, and its spreads match the example's 273, 20 and 274. The individual runs are simulated, not measured.
When the table is wrong
That "if" carries the weight. The table is fitted across tenants and criteria, and for one criterion it can run high or low. If it gives this criterion's records probabilities a third too high, the estimate is a third too high, however many records are scored: cutting the sample from 1,000 to 500 moved the median error only from 29.3% to 29.5%. This error is a factor, not an amount, so SignalCount multiplies the estimate by a margin first and adds the sampling term second:
low = estimate × low factor − sampling term
high = estimate × high factor + sampling term
At the example's estimated rate of 4%, the factors are 0.43 and 1.18, which gives 418 to 2,808; the margins supply about 1,490 patients of that 2,390 width. Without them, the initial calibration's in-sample coverage fell from 91.4% to 54.3%. An empty sample gets a floor instead: at a rate of 0.23%, 1,000 draws all come up empty about 1 time in 10 (at 1%, about 1 in 23,000), so the high end never falls below 0.23% of the set, 115 patients here.
No formula gives the factors. SignalCount fits them on past estimates whose true count is known, asking of each: how much widening would have been just enough? A run with an estimate of 2,000, a sampling term of 450 and a true count of 1,000 needs a low factor of 0.725, because 2,000 × 0.725 − 450 = 1,000. A run whose truth lies within 450 needs a factor of 1.
Top: the running example's interval. Bottom: a worked example of fitting, a past run with the same estimate and sampling term; drag its true count.
Then SignalCount lines up a group's past runs from least to most widening needed and takes the run at the 95% spot on each side. With 20 past runs, a new run is one of 21 ranks, so it needs more widening than all 20 about 1 time in 21, or 4.8%. This is split conformal prediction, and it assumes no shape for the error. Runs from one tenant are not independent draws, so the paper measures coverage instead of claiming a guarantee.
The factors depend on the estimated rate, because estimates run high at low and middle rates. Runs fall into four rate groups with factors at each group's center, and between centers the service blends on a log scale, where 1% to 10% is as far as 10% to 100% and a factor of 2 is as far from 1 as 1/2. The example's 4% lies 39% of the way from the 2.24% center to the 10% center, so its low factor lies 39% of the way from 0.47 to 0.38: 0.43.
Dots are the deployed factors at the four group centers. Lines are the blend the service applies between them. Dashed verticals mark the group edges at 1%, 5% and 20%.
In production
SignalCount is generally available in OuterSignal's product, and every estimate in the evaluation went through that deployment: 112 for latency, 244 in-sample, and a main study of 2,119 answered estimates across hundreds of tenants outside every earlier fit. The true count comes from the production verdicts, and a port of the estimator reproduces all 2,119 held-out estimates and bounds exactly from the recorded scores, so every calibration variant could be tested offline.
Over the 112 estimates of the latency study, latency from criterion to estimate had a p50 of 2.49 s and a p99 of 3.76 s, and scoring is the largest stage. Above 1,000 records latency stops growing: the p99 of each size range lies between 3.08 and 3.88 s, up to sets of 527,197 records. The scan grows with the tenant's data rather than the filtered set, and over scopes up to 1.7 million records it had a p99 of 860 ms.
Tail latency stays under the target
p99 from criterion to estimate, per range of filtered-set size in records
Judging everything grows with the set
Cost of judging every record of a set of the given size, in multiples of one estimate
Left: the p99 of each size range, from the 112 production estimates of the latency study; sets of at most 1,000 records are scored in full and not shown. Right: both sides at list model prices, with measured tokens. An estimate scores at most 1,000 records, so its cost is flat.
A 90% interval is a claim about many queries: about 90% of intervals should hold the true count. To test it without flattering the fit, the paper repeats the whole fitting on 200 random 40/30/30 splits of the main study's tenants: the table is fitted on the first part, the margins on the second, and the third is tested. Coverage averages 92.0%, with a 5th percentile of 89.0%, up from 85.5% for the initial calibration's single margin of 0.70 and 1.43, and the median width shrinks from 1.64 to 1.59 times the true count. Runs with a true count of zero were covered 57 of 60 times.
Mean coverage of the nominal 90% interval over 200 repeated 40/30/30 tenant splits. The initial calibration's coverage was measured on the same splits for all estimates together, not per group.
The point estimate still runs high: the sum of estimates is 1.15 times the sum of true counts. Pooled over the main study's 1.66 million scored records, the probabilities sum to 1.01 times the yeses, so the table is right on average. Per criterion it is not: criteria rarer than the table's pooled rate are overestimated (ratio of sums 1.38) and commoner ones underestimated (0.91), the pull toward the pooled rate that prior work predicts. The low factors are fitted to it, so coverage holds.
What we learned
Hold out by tenant. On its own fitting tenants the initial calibration covered 91.4%. A table fitted on those tenants and fixed before any held-out estimate was issued covered only 87.0% of the held-out estimates. For a calibration shared across tenants, the unit to hold out is the tenant, and the test needs many tenants.
Test a bias correction where it can hurt. The standard prior-shift correction brought our aggregate ratio to 0.96 but more than doubled the median absolute error, from 28.7% to 66.7%, because it over-corrects in both directions. SignalCount does not deploy it. Check a correction per estimated-rate group before it ships, because the aggregate it fixes can hide errors in both directions.
What comes next
The recipe travels. It needs an exact count for the structured filter, a fast classifier for the criterion, and logged pairs of the classifier's score and the expensive model's verdict. Any model cascade that screens rows with a cheap model before an expensive LLM already produces those pairs.
Three directions are open: a prediction-powered correction from a few judge verdicts on the sample, so calibration no longer has to transfer; SUM and AVG over the matches, as a ratio estimator on the same sample; and a bounded-time sampler for the scan, the one stage that still grows.
The full paper has the derivations, the ablations and every number on this page. Read the paper on arXiv.
SignalCount is the kind of work this team exists to do: take a question the product needs answered, build what the literature is missing, run it against real traffic, and publish the result with its failures measured. If you want to do that with us, we're hiring.