This thesis presents an experimental investigation into a previously unexplored capability of Transformers: their ability to infer Synchronous Context-Free Grammars (SCFGs), i.e. to learn and generalize over particular grammars just from example pairs of strings. More specifically, two experiments were conducted. The first experiment explored Transformers' capacity to translate between synthetic languages corresponding to the source and target side of an SCFG grammar. The second experiment sought for a Transformer configuration which would be capable of SCFG parsing, i.e. identifying the ability to recognize licensed SCFG pairs of strings based on only positive and negative training examples. With a sufficiently large model, Transformers proved capable to learn this task to a high accuracy (up to 96.7%) even for very long inputs, longer than any training items. Experiments show limitations and variability that leave parts of the problem open to further research.

Questa tesi presenta un'indagine sperimentale su una capacità precedentemente inesplorata dei Transformer: la loro abilità di inferire Synchronous Context-Free Grammars (SCFGs), ovvero di apprendere e generalizzare grammatiche specifiche a partire semplicemente da coppie di stringhe di esempio. Nello specifico, sono stati condotti due esperimenti: il primo esplora la capacità dei Transformer di tradurre tra linguaggi sintetici, che corrispondono rispettivamente al lato sorgente e al lato target di una grammatica SCFG. Il secondo esperimento consiste nella ricerca di una configurazione di Transformer in grado di effettuare il parsing di SCFGs, ovvero la capacità di riconoscere coppie di stringhe licenziate da una SCFG basandosi solo su esempi di addestramento positivi e negativi. Con un modello sufficientemente grande, i Transformer hanno dimostrato di poter apprendere questo compito con un'elevata accuratezza (fino al 96,7%), anche per input molto lunghi, più estesi di qualsiasi elemento durante l'addestramento. Gli esperimenti dimostrano variabilità e limitazioni che lasciano il problema aperto ad ulteriori ricerche.

Can Transformers Learn Synchronous Context-Free Translations? An Analysis of Pretraining on Automatically Generated Datasets

CALZONE, NICOLA
2024/2025

Abstract

This thesis presents an experimental investigation into a previously unexplored capability of Transformers: their ability to infer Synchronous Context-Free Grammars (SCFGs), i.e. to learn and generalize over particular grammars just from example pairs of strings. More specifically, two experiments were conducted. The first experiment explored Transformers' capacity to translate between synthetic languages corresponding to the source and target side of an SCFG grammar. The second experiment sought for a Transformer configuration which would be capable of SCFG parsing, i.e. identifying the ability to recognize licensed SCFG pairs of strings based on only positive and negative training examples. With a sufficiently large model, Transformers proved capable to learn this task to a high accuracy (up to 96.7%) even for very long inputs, longer than any training items. Experiments show limitations and variability that leave parts of the problem open to further research.
2024
Can Transformers Learn Synchronous Context-Free Translations? An Analysis of Pretraining on Automatically Generated Datasets
Questa tesi presenta un'indagine sperimentale su una capacità precedentemente inesplorata dei Transformer: la loro abilità di inferire Synchronous Context-Free Grammars (SCFGs), ovvero di apprendere e generalizzare grammatiche specifiche a partire semplicemente da coppie di stringhe di esempio. Nello specifico, sono stati condotti due esperimenti: il primo esplora la capacità dei Transformer di tradurre tra linguaggi sintetici, che corrispondono rispettivamente al lato sorgente e al lato target di una grammatica SCFG. Il secondo esperimento consiste nella ricerca di una configurazione di Transformer in grado di effettuare il parsing di SCFGs, ovvero la capacità di riconoscere coppie di stringhe licenziate da una SCFG basandosi solo su esempi di addestramento positivi e negativi. Con un modello sufficientemente grande, i Transformer hanno dimostrato di poter apprendere questo compito con un'elevata accuratezza (fino al 96,7%), anche per input molto lunghi, più estesi di qualsiasi elemento durante l'addestramento. Gli esperimenti dimostrano variabilità e limitazioni che lasciano il problema aperto ad ulteriori ricerche.
transformers
formal languages
generalization
CFG
machine translation
File in questo prodotto:
File Dimensione Formato  
Calzone_Nicola.pdf

accesso aperto

Dimensione 1.95 MB
Formato Adobe PDF
1.95 MB Adobe PDF Visualizza/Apri

The text of this website © Università degli studi di Padova. Full Text are published under a non-exclusive license. Metadata are under a CC0 License

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/20.500.12608/96911