Thanks for the detailed explanation. I don't really think it helps my case, though, because I already follow both recommendations:
The models aren't in the app bundle. They're delivered as Apple-hosted Background Assets packs. On first install I copy the compiled models once into Application Support, with isExcludedFromBackup set. I only re-copy when the asset pack itself changes. An app update doesn't touch these files: the path, contents and modification dates all stay the same.
I load from that stable location, never from the bundle or the asset-pack delivery folder.
I also tried an App Group container as the storage location. The result was the same.
The cache still doesn't survive an update. The models stay byte-identical and stay at the same path, and only the build number changes. After the update, the first load re-specializes again. On iPhone 18 Pro Max that takes about 30 seconds, almost all of it in my largest model. Later loads are fast again until the next update.
The per-app index under Library/Caches/com.apple.e5rt.e5bundlecache appears to reference compiled Neural Engine programs held by the system (aned), not by the app. So I suspect the cached programs are being discarded when the app is installed or updated, rather than the cache key changing.
For now, I do a throwaway warm-up load in the background on the first launch after each update. That hides some of the cost, but on A20 and M6 devices the user still sees a long first load if they start trying to use it right away.
Topic:
Machine Learning & AI
SubTopic:
Core ML