Advanced terahertz gas sensor based on multi-material metasurface integration with machine learning optimization | Synapse