MLCrack

    COMPUTER VISION · INTERVIEW QUESTION

    Why is test-time augmentation often less attractive for latency-critical computer vision services?

    🔴 advanced · Deployment · Latency

    Hint: Focus on the decision rule, assumptions, and failure mode behind deployment · latency.

    Answer

    TTA averages predictions over transformed inputs, which can improve robustness but multiplies compute and complicates latency budgets.

    Interview reasoning

    Multiple transformed views require extra forward passes and output reconciliation. A marginal quality gain can be too expensive under a p99 budget.

    Test-time augmentation makes multiple predictions and maps them back into a common representation. Its cost includes preprocessing, GPU work, inverse transforms and output merging, which can increase queueing under load. Compare marginal gains against one-pass alternatives at an equal end-to-end budget.

    Worked example. Four views can require roughly four forward passes before detection deduplication. Under a 50 ms deadline, a small AP gain may have no deployable value.

    Validation

    Benchmark the complete merge pipeline at realistic concurrency and payload sizes.

    Profile p95/p99 at realistic concurrency, verify transform inverses, and report gains on difficult slices rather than only the global average.

    Common pitfalls

    Single-image throughput can hide queueing and production tail latency.

    Single-image throughput excludes queueing. Averaging confidence scores can alter calibration and merging can add duplicate detections.

    Likely follow-up: Benchmark the complete merge pipeline at realistic concurrency and payload sizes.