Basically, an upgrade just makes a lot of the files that are included in a backup write a newer copy. There isn't any major change to the storage format and hasn't been since Time Machine was implemented.
All the changes have been in the code that runs the backup or changes to the rules about what files are excluded, but those changes revert when you install a clean OS before you go to restore files from any of the intervals stored in the backup.
Time Machine backups are not bootable and they don't include all files - so you might not even end up restoring the files that change when you go from one OS update to the next.
Specifically - here are files that get excluded by rule:
Time machine just backs up all files that aren't on a list to be skipped. It goes forward, time interval by time interval - writing any new files and updating any changed files. Assuming you aren't running low on space in the backup destination - you won't have any older files deleted from the backup and could restore files from before you made the upgrade.